what is the /script equivalent of player:target_NPC("X")
what is the /script equivalent of player:target_NPC("X")
Trying my hand at an addon, can't seem to find what api the bot calls for target_NPC?
Re: what is the /script equivalent of player:target_NPC("X")
Bot doesn't call rom api in this case.
If you want to do it with api then this two functions might be handy:
TargetNearestFriend()
UnitName("target")
If you want to do it with api then this two functions might be handy:
TargetNearestFriend()
UnitName("target")
Re: what is the /script equivalent of player:target_NPC("X")
Oh, I want to target a specifc NPC by name (to bring up their quest menu) and there may be other "friends" around...
Re: what is the /script equivalent of player:target_NPC("X")
I would try this : http://runesofmagic.gamepedia.com/API:TargetUnit
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Re: what is the /script equivalent of player:target_NPC("X")
kkulesza is correct. You would have to use those functions in a loop until you've targeted the desired target. Something like,
Code: Select all
local name = "wanted target name"
TargetNearestFriend()
local first = UnitName("target")
repeat
TargetNearestFriend()
until UnitName("target") == name or UnitName("target") == first
if UnitName("target") == name then
UseSkill(1,1)
else
SendSystemChat("Target not found")
end
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Who is online
Users browsing this forum: Bing [Bot] and 9 guests