Page 1 of 1

player:target_NPC

Posted: Sat Nov 22, 2014 7:51 pm
by beanybabe
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>

Re: player:target_NPC

Posted: Sat Nov 22, 2014 8:00 pm
by Bill D Cat
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

Re: player:target_NPC

Posted: Sat Nov 22, 2014 8:28 pm
by beanybabe
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.

Re: player:target_NPC

Posted: Sat Nov 22, 2014 10:45 pm
by rock5
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.

Re: player:target_NPC

Posted: Sat Nov 22, 2014 10:58 pm
by rock5
Done. The next commit will have the fix included.