If Target = npc question

Tapout

Before You Blackout
Joined
Oct 22, 2006
Messages
385
Reaction score
14
Points
18
Trying to add a line to a hotkey. What I want it to do is if the target is an npc then /attack on. I've got

/if (${Target.ID}) /attack on

But I don't know what to add to it to make it work if it's an npc. Is there something to add after target or id for only npc's?

Here is my hotkey so you can see what I'm doing.

/tar npc "npc's name"
/warp t
/stick 8 moveback
/attack on

I want the /attack on to be attack on ONLY if I have an npc targeted. Sometimes I use the hotkey to warp back to a location I like to sit at and wait for mobs to spawn. This is for farming things to kill for tradeskills. I like it this way that way I'm not afk doing the work. I still warp a bit ofcourse but I'd rather be at the keyboard doing it than let it be automated.

Any help would be appreciated. It works ok the way it is but I'd like to know how the target part of the line works especially for npc's and such.

Tapout
 
I think something like ${Target.Type.Equal[npc]} should work, cant remember exact syntax.
 
that looks like the correct syntax to me.
 
Awesome. That was exactly what I needed. Thank you.

Tapout