Difference between revisions of "PubMsgNameDist"

From OpenKore Wiki
Jump to navigation Jump to search
(Add EventMacro event condition: PubMssNameDist)
 
(Replaced content with "{{Template:PubMsgNameDist}} Category:EventMacro_Automacros Category:EventMacro_Conditions_Event")
Line 1: Line 1:
Is checked on public messages, is true when the message matches the given regex and the name of the player which sent it also matches it's given regex and the distance matches the condition.
+
{{Template:PubMsgNameDist}}
  
: Syntax:
+
[[Category:EventMacro_Automacros]]
PubMsgNameDist <[[EventMacro#Regex|Regex]]> <[[EventMacro#Regex|Regex]]> <[[EventMacro#Math condition operators|Math condition operators]]>
 
 
 
: The first regex is for the message, the second one is for the player name
 
 
 
: Example:
 
PubMsgNameDist /(buff|bless)/ /Player to buff/ < 3
 
PubMsgNameDist /stop/ /GM/ >= 4
 
 
 
: Set variables:
 
$.PubMsgNameDistLastName => Saves the name of the player which message activated PubMsgNameDist
 
$.PubMsgNameDistLastMsg => Saves the message which activated PubMsgNameDist
 
$.PubMsgNameDistLastPos => Saves the position of the player which message activated PubMsgNameDist
 
$.PubMsgNameDistLastDist => Saves the distance to the player which message activated PubMsgNameDist
 
$.PubMsgNameDistLastID => Saves the openkore ID of the player which message activated PubMsgNameDist
 
 
[[Category:EventMacro_Conditions_Event]]
 
[[Category:EventMacro_Conditions_Event]]

Revision as of 09:20, 5 July 2019

PubMsgNameDist
  • Description: Is checked on public messages, is true when the message matches the given regex and the name of the player which sent it also matches it's given regex and the distance matches the condition.
Syntax:
PubMsgNameDist <Regex> <Regex> <Math condition operators>
The first regex is for the message, the second one is for the player name
Example:
PubMsgNameDist /(buff|bless)/ /Player to buff/ < 3
PubMsgNameDist /stop/ /GM/ >= 4
Set variables:
$.PubMsgNameDistLastName => Saves the name of the player which message activated PubMsgNameDist
$.PubMsgNameDistLastMsg => Saves the message which activated PubMsgNameDist
$.PubMsgNameDistLastPos => Saves the position of the player which message activated PubMsgNameDist
$.PubMsgNameDistLastDist => Saves the distance to the player which message activated PubMsgNameDist
$.PubMsgNameDistLastID => Saves the openkore ID of the player which message activated PubMsgNameDist