Difference between revisions of "NpcMsgNameDist"

From OpenKore Wiki
Jump to navigation Jump to search
(Add EventMacro event condition: NpcMsgNameDist)
 
Line 1: Line 1:
Is checked on npc conversation messages, is true when the message matches the given regex and the name of the npc which sent it also matches it's given regex and the distance matches the condition.
+
{{Template:NpcMsgNameDist}}
  
: Syntax:
+
[[Category:EventMacro_Automacros]]
NpcMsgNameDist <[[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 npc name
 
 
 
: Example:
 
NpcMsgNameDist /You need to be closer to punch me/ /punchable npc/ > 5
 
 
 
: Set variables:
 
$.NpcMsgNameDistLastName => Saves the name of the npc which message activated NpcMsgNameDist
 
$.NpcMsgNameDistLastMsg => Saves the message which activated NpcMsgNameDist
 
$.NpcMsgNameDistLastPos => Saves the position of the npc which message activated NpcMsgNameDist
 
$.NpcMsgNameDistLastDist => Saves the distance to the npc which message activated NpcMsgNameDist
 
$.NpcMsgNameDistLastID => Saves the openkore ID of the npc which message activated NpcMsgNameDist
 
 
[[Category:EventMacro_Conditions_Event]]
 
[[Category:EventMacro_Conditions_Event]]

Revision as of 09:56, 5 July 2019

NpcMsgNameDist
  • Description: Is checked on npc conversation messages, is true when the message matches the given regex and the name of the npc which sent it also matches it's given regex and the distance matches the condition.
Syntax:
NpcMsgNameDist <Regex> <Regex> <Math condition operators>
The first regex is for the message, the second one is for the npc name
Example:
NpcMsgNameDist /You need to be closer to punch me/ /punchable npc/ > 5
Set variables:
$.NpcMsgNameDistLastName => Saves the name of the npc which message activated NpcMsgNameDist
$.NpcMsgNameDistLastMsg => Saves the message which activated NpcMsgNameDist
$.NpcMsgNameDistLastPos => Saves the position of the npc which message activated NpcMsgNameDist
$.NpcMsgNameDistLastDist => Saves the distance to the npc which message activated NpcMsgNameDist
$.NpcMsgNameDistLastID => Saves the openkore ID of the npc which message activated NpcMsgNameDist