summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-04-25 23:48:59 -0400
committergumi <mekolat@users.noreply.github.com>2017-05-12 09:43:38 -0400
commit8669002016bc60019a317124ae088a8053a0238b (patch)
tree96d582f96ccb3cadda920072f71ed07d93530e9b /doc
parentadc7a02c7896fe8984c64d2a74f804cfaae34fc7 (diff)
downloadhercules-8669002016bc60019a317124ae088a8053a0238b.tar.gz
hercules-8669002016bc60019a317124ae088a8053a0238b.tar.bz2
hercules-8669002016bc60019a317124ae088a8053a0238b.tar.xz
hercules-8669002016bc60019a317124ae088a8053a0238b.zip
add channel handler events
Diffstat (limited to 'doc')
-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 ...