Page 1 of 1

Revers makes Charr move to 0,0

Posted: Mon Mar 01, 2010 11:54 am
by net_ralf
Hi there,

i am haveing issues with my script. I am using a waypoint file with the a reverse script that makes the char move back and forth. however when he returns to waypoint #1 it says n the micromacro window:
Moving to waypoint #1 (0,0)

Here is my waypoint file:

Code: Select all

<waypoints>
	<!-- # 1 --><waypoint x="-13422" z="-3747">	</waypoint>
	<!-- # 2 --><waypoint x="-13545" z="-3837">	</waypoint>
	<!-- # 3 --><waypoint x="-13823" z="-4068">	</waypoint>
	<!-- # 4 --><waypoint x="-13979" z="-4196">	</waypoint>
	<!-- # 5 --><waypoint x="-14264" z="-4139">	</waypoint>
	<!-- # 6 --><waypoint x="-14429" z="-4176">	</waypoint>
	<!-- # 7 --><waypoint x="-14565" z="-4294">	</waypoint>
	<!-- # 8 --><waypoint x="-14797" z="-4323">	</waypoint>
	<!-- # 9 --><waypoint x="-14940" z="-4268">	</waypoint>
	<!-- # 10 --><waypoint x="-15067" z="-4149">player:harvest();</waypoint>
	<!-- # 11 --><waypoint x="-15252" z="-4164">	</waypoint>
	<!-- # 12 --><waypoint x="-15556" z="-4166">	</waypoint>
	<!-- # 13 --><waypoint x="-15797" z="-4168">	</waypoint>
	<!-- # 14 --><waypoint x="-15983" z="-4242">	</waypoint>
	<!-- # 15 --><waypoint x="-16026" z="-4340">	</waypoint>
	<!-- # 16 --><waypoint x="-16112" z="-4574">player:harvest();</waypoint>
	<!-- # 17 --><waypoint x="-16149" z="-4686">player:harvest();</waypoint>
	<!-- # 18 --><waypoint x="-16092" z="-4591">	</waypoint>
	<!-- # 19 --><waypoint x="-16156" z="-4303">	</waypoint>
	<!-- # 20--><waypoint x="-16296" z="-4178">	</waypoint>
	<!-- # 21--><waypoint x="-16451" z="-4034">	</waypoint>
	<!-- # 22--><waypoint x="-16606" z="-3907">	</waypoint>
	<!-- # 23--><waypoint x="-16605" z="-3812">	</waypoint>
	<!-- # 24--><waypoint x="-16515" z="-3784">	</waypoint>
	<!-- # 25--><waypoint x="-16431" z="-3812">	</waypoint>
	<!-- # 26--><waypoint x="-16414" z="-3848">player:harvest();</waypoint>
	<!-- # 27--><waypoint x="-16409" z="-3867">player:harvest();</waypoint>
	<!-- # 28--><waypoint x="-16397" z="-3930">	</waypoint>
	<!-- # 29--><waypoint x="-16647" z="-3997">	</waypoint>
	<!-- # 30--><waypoint x="-16862" z="-3775">	</waypoint>
	<!-- # 31--><waypoint x="-16914" z="-3597">	</waypoint>
	<!-- # 32--><waypoint x="-17006" z="-3280">	</waypoint>
	<!-- # 33--><waypoint x="-16948" z="-3088">	</waypoint>
	<!-- # 34--><waypoint x="-16935" z="-2871">player:harvest();</waypoint>
	<!-- # 35--><waypoint x="-16935" z="-2871">player:harvest();</waypoint>
	<!-- # 36--><waypoint x="-17042" z="-2839">	</waypoint>
	<!-- # 37--><waypoint x="-17268" z="-2851">	</waypoint>
	<!-- # 38--><waypoint x="-17419" z="-2743">	</waypoint>
	<!-- # 39--><waypoint x="-17517" z="-2776">	</waypoint>
	<!-- # 40--><waypoint x="-17692" z="-2780">	</waypoint>
	<!-- # 41--><waypoint x="-17915" z="-2714">	</waypoint>
	<!-- # 42--><waypoint x="-18050" z="-2529">player:harvest();</waypoint>
	<!-- # 43--><waypoint x="-18349" z="-2520">
	if(player.free_counter1 == 0) then player.free_counter1 = os.time(); end;
	if( os.difftime(os.time(), player.free_counter1) > 7200 ) then  --4 hours
	player.free_counter1 = os.time();
	player:rest(1);
	RoMScript("UseSkill(1,2);");  --recall
	yrest(40000);  --wait while load screen
	loadPaths("aslan);  --load repair path from teleport drop
	end
	</waypoint>
	<!-- # 44--><waypoint x="-18348" z="-2520">__WPL:reverse();</waypoint>
</waypoints>
any idea why he is doing that?

Re: Revers makes Charr move to 0,0

Posted: Mon Mar 01, 2010 7:32 pm
by Administrator
loadPaths("aslan);
Aren't you forgetting something there?

You should also be calling player:update() after you finish recalling.

Re: Revers makes Charr move to 0,0

Posted: Tue Mar 02, 2010 5:49 am
by net_ralf
thx for the " :) but that wasnt the issue. it still doesnt do what it should. where yould you put the player:update()

Code: Select all

   <!-- # 43--><waypoint x="-18349" z="-2520">
   if(player.free_counter1 == 0) then player.free_counter1 = os.time(); end;
   if( os.difftime(os.time(), player.free_counter1) > 7200 ) then  --4 hours
   player.free_counter1 = os.time();
   player:rest(1);
   RoMScript("UseSkill(1,2);");  --recall
   yrest(40000);  --wait while load screen
   loadPaths("aslan");  --load repair path from teleport drop
   player:update()
   end
   </waypoint>


Re: Revers makes Charr move to 0,0

Posted: Tue Mar 02, 2010 11:20 am
by Administrator
Try putting __WPL:setWaypointIndex(1) after the call to loadPaths().