NpcMsgDist: Difference between revisions

From OpenKore Wiki
Jump to navigation Jump to search
(Add EventMacro event condition: NpcMsgDist)
 
m (4epT moved page npcMsgDist to NpcMsgDist over a redirect without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Is checked on npc conversation messages, is true when the message matches the given regex and the distance match the given condition.
{{Template:NpcMsgDist}}


: Syntax:
[[Category:EventMacro_Automacros]]
NpcMsgDist <[[EventMacro#Regex|Regex]]> <[[EventMacro#Math condition operators|Math condition operators]]>
 
: Example:
NpcMsgDist /please come near to me/ > 5
 
: Set variables:
$.NpcMsgDistLastName => Saves the name of the npc which message activated NpcMsgDist
$.NpcMsgDistLastMsg => Saves the message which activated NpcMsgDist
$.NpcMsgDistLastPos => Saves the position of the npc which message activated NpcMsgDist
$.NpcMsgDistLastDist => Saves the distance to the npc which message activated NpcMsgDist
$.NpcMsgDistLastID => Saves the openkore ID of the npc which message activated NpcMsgDist
[[Category:EventMacro_Conditions_Event]]
[[Category:EventMacro_Conditions_Event]]

Latest revision as of 21:50, 12 September 2021

NpcMsgDist
  • Description: Is checked on npc conversation messages, is true when the message matches the given regex and the distance match the given condition.
Syntax:
NpcMsgDist <Regex> <Math condition operators>
Example:
NpcMsgDist /please come near to me/ > 5
Set variables:
$.NpcMsgDistLastName => Saves the name of the npc which message activated NpcMsgDist
$.NpcMsgDistLastMsg => Saves the message which activated NpcMsgDist
$.NpcMsgDistLastPos => Saves the position of the npc which message activated NpcMsgDist
$.NpcMsgDistLastDist => Saves the distance to the npc which message activated NpcMsgDist
$.NpcMsgDistLastID => Saves the openkore ID of the npc which message activated NpcMsgDist