player:target_NPC

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

player:target_NPC

#1 Post by beanybabe » Sat Nov 22, 2014 7:51 pm

I was using rombot 3.29 rev 778

to make a waypoint.

If you start at portal in logar and press 1 then target snoop press 5 press 6 then 3(go to varanas) save and check the xml it fails their are 2 << >> that seem to be causing problems.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="-1159" z="-5541" y="61">
			player:target_NPC(111256) -- Snoop the Stubborn
			ChoiceOptionByName(">> Transport to Varanas <<")
	</waypoint>
	<!-- #  2 --><waypoint x="2294" z="1154" y="24">	</waypoint>
</waypoints>

User avatar
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: player:target_NPC

#2 Post by Bill D Cat » Sat Nov 22, 2014 8:00 pm

I'd suggest you try using Rock5's travelTo user function for dealing with Snoop. It makes things so much easier when traveling between zones.

http://www.solarstrike.net/phpBB3/viewt ... =27&t=4940

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: player:target_NPC

#3 Post by beanybabe » Sat Nov 22, 2014 8:28 pm

Ive thought of trying that function but on simple waypoints I prefer to just use the default waypoints as made by the creator. I have been adding a wait and loop to check for npc on other end.

Code: Select all

      repeat
      yrest(500)
      until player:target_NPC(111256) -- Snoop the Stubborn
	ChoiceOptionByName(">> Transport to Varanas <<")
	yrest(500);	
	mountUp();
I just ran into 2 places (logar to varanas) and (east_varanas to central_varanas) that it creates invalid html. I wanted to let him know so he might apply a fix to the code some time later.


I can fix by just using
ChoiceOption(3) -- transport to varanas.
which will work but some times the choices move.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: player:target_NPC

#4 Post by rock5 » Sat Nov 22, 2014 10:45 pm

I believe the >> are added by an addon. The >> will cause an error. ChoiceOptionByName works with partial names so you can just delete those brackets and it should work, eg.

Code: Select all

ChoiceOptionByName("Transport to Varanas")
But you are right, it's a good idea if createpath could handle and fix it. I'll look into it.
  • 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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: player:target_NPC

#5 Post by rock5 » Sat Nov 22, 2014 10:58 pm

Done. The next commit will have the fix included.
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests