How would I exclude and NPCs pet when trying to target them? I can accomplish it using the Target.ID but not using Target.CleanName.
or this one.
Rich (BB code):
Sub Main
|/declare NPCName local Lokar To`Biath
/declare NPCName int local 11449
| /target ID ${NPCName}
/target id ${Spawn[${NPCName}].ID}
/delay 1s
/if (!${Select[${Target.Type},npc,pet]} || !${Target.ID} || ${Target.Type.Equal[pet]} && !${Target.CleanName.Find[familiar]}) {
/echo Please target a vendor or guildbanker
/return
}
/echo Doing business with ${Target.CleanName}
/target id ${Spawn[${NPCName}].ID}
/delay 3s ${Target.ID}==${Spawn[${NPCName}].ID}
/if (${Target.Distance}>15) {
/moveto id ${Spawn[${NPCName}].ID}
/delay 250 ${MoveTo.Stopped}
}
/face nolook
/return
or this one.
Rich (BB code):
Sub Main
|/declare TurnInTarget int local 11449
/declare TurnInTarget string local Lokar
| /target ID ${TurnInTarget}
/target ${TurnInTarget}
/call SafeTarget ${TurnInTarget}
/return
Sub SafeTarget
/declare targid int local 0
:retarget
/if (${Target.ID} && ${Target.ID}==${Spawn[${targ}].ID}) /return
/if (${Spawn[${targ}].ID}) {
/varset targid ${Spawn[${targ}].ID}
/if (${Spawn[${targ}].Distance}<100) {
/echo Targeting ${Spawn[${targ}]}
/target id ${targid}
/delay 30 ${Target.ID}==${targid}
}
}
/if (!${Target.ID}) {
/echo [SafeTarget] couldnt find a target, retrying
/delay 1s
/goto :retarget
}
/return
Last edited:

