Est RegSayHook

From EventScripts Community Encyclopedia
Syntax: est_RegSayHook <hook text> <find partials>
Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Description

Adds a chat hook that fires an event every time that hook is said (est_sayhook)

Parameters

  • hook text - The text to be hooked
  • find partials - 0/1
Note: 0 means the event will trigger if the word is on its own, and 1 means it will trigger even if it is in a sentence.

Example

event es_map_start
{
	est_RegSayHook Hi 0
}
 
event est_sayhook
{
	if (event_var(hooktext) = hi) then es_tell event_var(userid) Hi to you too!
}

event es_map_start
{
	est_RegSayHook Hi 1
}
 
event est_sayhook
{
	if (event_var(hooktext) == hi) then es_tell event_var(userid) The word event_var(hooktext) was found in your sentence!
}
blog comments powered by Disqus