summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-05-15 01:25:39 +0200
committerGitHub <noreply@github.com>2017-05-15 01:25:39 +0200
commitbe118c7fad6df29dc691452ef511ac12fea37a06 (patch)
tree36c9f9e7714ffea7d1b9d21b86ddc7ed61e955c0 /doc/script_commands.txt
parentab333a87fb891793321b0e4467d8389c8f80be35 (diff)
parent8669002016bc60019a317124ae088a8053a0238b (diff)
downloadhercules-be118c7fad6df29dc691452ef511ac12fea37a06.tar.gz
hercules-be118c7fad6df29dc691452ef511ac12fea37a06.tar.bz2
hercules-be118c7fad6df29dc691452ef511ac12fea37a06.tar.xz
hercules-be118c7fad6df29dc691452ef511ac12fea37a06.zip
Merge pull request #1719 from mekolat/channel2
add channel handler events
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 5ba0aaa2e..0ba350ad1 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -7450,6 +7450,27 @@ no RID is attached), false will be returned. In case of success, true is
returned.
---------------------------------------
+
+*addchannelhandler("<#channel>", "<NPC::OnEvent>")
+
+This command will trigger the specified event every time a player
+talks in the specified channel, with said player as attached rid.
+It assigns the message to @channelmes$
+
+OnChannelMessage:
+ channelmes("#chan", "Echo: " + @channelmes$);
+ end;
+
+OnInit:
+ addchannelhandler("#chan", "NPC::OnChannelMessage");
+
+---------------------------------------
+
+*removechannelhandler("<#channel>", "<NPC::OnEvent>")
+
+Removes a channel handler added by addchannelhandler()
+
+---------------------------------------
*rand(<number>{, <number>})
This function returns a number ...