How to Target a specific mob in an mq2Events event?

nitramneb

Premium Member
Joined
May 26, 2023
Messages
25
Reaction score
14
Points
3
Trying to set up an event to target (and move back to) a particular mob. My move away works fine, just can't figure out how to retarget it with the return event, so can move back and resume the beat down.
 
  • Like
Reactions: EQDAB
If you want to make sure of which one to target, you could always create a global int, and set that before you change to new target (via your event, multiline), and then the return to target event would reference that saved ID.

Something like:

autoexec.cfg
Code:
/if (!${Defined[LastTargetID]}) /declare LastTargetID int global 0

zoned.cfg
Code:
/varset LastTargetID 0

As part of your event, before changing to the new target, would be like: /varset LastTargetID ${Target.ID}
For returning, something like: /if (${LastTargetID} && ${Spawn[npc id ${LastTargetID}) /multiline ; /tar id ${LastTargetID} ; /varset LastTargetID 0
 
  • Love
Reactions: EQDAB