Veiled Encampment Waypoint
					Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
	Only post additional bot resources here. Please do not ask unrelated questions.
Veiled Encampment Waypoint
Placeholder, testing now.
			
									
									
						Re: Veiled Encampment Waypoint
Code: Select all
   function waitForEventStart()
      repeat
         yrest(3000) -- check every second
         local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
		 if (ScorePE == nil) then
		 printf("Score is nil, oh no!");
		<!-- #  2 --><waypoint x="-2804" z="-18154" y="836">	</waypoint>
		<!-- #  3 --><waypoint x="-2926" z="-18034" y="836">	</waypoint>
		<!-- #  4 --><waypoint x="-2813" z="-18155" y="836">	</waypoint>
		<!-- #  5 --><waypoint x="-2666" z="-17962" y="837">	</waypoint>		 
		 end
		 
         if Count == 2 and YourTargetScore > ScorePE then break end
      until false
   end
Re: Veiled Encampment Waypoint
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
               
        YourTargetScore = 1776
   function waitForEventStart()
      repeat
         yrest(1000) -- check every second
         local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
         if Count == 2 and YourTargetScore > ScorePE then break end
      until false
   end
   function isEventFinished()
       local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
       if Count ~= 2 or ScorePE >= YourTargetScore then
         __WPL:setForcedWaypointType("RUN")
         __WPL:setWaypointIndex(__WPL:findWaypointTag("WP1"));
      end
   end
</onload>
	<!-- #  2 --><waypoint x="-2651" z="-17953" y="812">	
	inventory:useItem("Magic Circle Charge Rune");
	if (isEventFinished()) then
               __WPL:setWaypointIndex(__WPL:findWaypointTag("WP1"));
              end;
	player:target_NPC("Forem Mone");
	RoMScript("OnClick_QuestListButton(1, 1);");yrest(100)
	RoMScript("OnClick_QuestListButton(3, 1);");yrest(100)
		RoMScript("CompleteQuest();");yrest(500)
		player:target_NPC("Forem Mone");
	RoMScript("OnClick_QuestListButton(1, 1);");yrest(100)
						RoMScript("OnClick_QuestListButton(1, 1);");
				  		__WPL:setDirection(WPT_FORWARD);
							inventory:useItem("Magic Circle Charge Rune");
	</waypoint>
	<!-- #  3 --><waypoint x="-2812" z="-18150" y="811">		
	inventory:useItem("Magic Circle Charge Rune");
	</waypoint>
	<!-- #  4 --><waypoint x="-2936" z="-18020" y="811">	
	inventory:useItem("Magic Circle Charge Rune");
			  		__WPL:setDirection(WPT_BACKWARD);
	</waypoint>
		<!-- #  3 --><waypoint x="-2651" z="-17953" y="812" tag="WP1">        waitForEventStart(); 	</waypoint>
</waypoints>Re: Veiled Encampment Waypoint
I'd get a nil compare error when the timer goes away though(ScorePE is nil, and causes the script to abort).
			
									
									
						Re: Veiled Encampment Waypoint
Waypoints need to be boxed eg.
<waypoints>
<!-- # 2 --><waypoint x="-2804" z="-18154" y="836"> </waypoint>
<!-- # 3 --><waypoint x="-2926" z="-18034" y="836"> </waypoint>
</waypoints>
Not sure if that will work inside the <onload> </onload> but the idea is good.
Maybe a function that overrides the waitForStart function eg.. timerisnil = start script (the timer should theoretically pop up then.)
not 100% sure that will work just an idea.
			
									
									
						<waypoints>
<!-- # 2 --><waypoint x="-2804" z="-18154" y="836"> </waypoint>
<!-- # 3 --><waypoint x="-2926" z="-18034" y="836"> </waypoint>
</waypoints>
Not sure if that will work inside the <onload> </onload> but the idea is good.
Maybe a function that overrides the waitForStart function eg.. timerisnil = start script (the timer should theoretically pop up then.)
Code: Select all
 
      if (ScorePE == nil) then
                printf("Score is nil, oh no!");
                __WPL:setWaypointIndex(__WPL:findWaypointTag("WP1"));
end
Who is online
Users browsing this forum: No registered users and 0 guests