From e06acdc70331ba79a0569799610866977fde54c4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 29 May 2017 20:14:22 +0300 Subject: Update hercules scripts doc. --- server/scripts/script_commands.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt index 5ba0aaa..0ba350a 100644 --- a/server/scripts/script_commands.txt +++ b/server/scripts/script_commands.txt @@ -7449,6 +7449,27 @@ If the channel doesn't exist (or, in the case of a character-specific channel, no RID is attached), false will be returned. In case of success, true is returned. +--------------------------------------- + +*addchannelhandler("<#channel>", "") + +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>", "") + +Removes a channel handler added by addchannelhandler() + --------------------------------------- *rand({, }) -- cgit v1.2.3-70-g09d2