Get the ID of the target which is hitting me

simon022

New member
Joined
Feb 18, 2013
Messages
41
Reaction score
0
Points
0
Any one here can tell me how to get the ID of the target which is hitting me?:confused:
 
If there is only one target hitting you, you can clear your target and let it auto target the mob that hits you and then see what it's ID is:

Code:
/squelch /target clear
/delay 3
/delay 5s ${Target.ID}
/echo ${Target.ID} is hitting me

Otherwise, if you can't clear your target for some reason, you'd have to make a guess at it by looking at what mobs are close to you and facing toward. I don't know of any 100% method without actually targeting the mob.
 
==

maybe grab the id of the mob that is closest to you---since it'd have to be in range of you to physically hit you (barring any zradius flukes where mobs can magically hit you a floor above/below etc)

start with a...

/varset nmob ${Me.NearestSpawn[npc radius #].ID}
then
/target ${nmob}

for when you get hit...replace the # with a a low number, 10-20 range?

that's where I'd start at least...
 
negative. as dev mentioned. you can only best guess based on Spawn[].MaxRange and if it is facing you. and it is still a guess. but you could combo that with a Spawn[].Animation and it would be a little more accurate.

Though, Spawn[].AggroHolder may work now to do what you want.