Veiled Encampment Waypoint

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Veiled Encampment Waypoint

#1 Post by Cindy » Fri Oct 05, 2012 9:41 am

Placeholder, testing now.

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Veiled Encampment Waypoint

#2 Post by Cindy » Fri Oct 05, 2012 1:10 pm

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
What am I doing wrong? i get the message printed, but it doesnt move to regain the counter....

vegasmike
Posts: 8
Joined: Mon Jul 30, 2012 12:22 pm

Re: Veiled Encampment Waypoint

#3 Post by vegasmike » Fri Oct 05, 2012 7:16 pm

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>
This works but it doesn't always seem to reinitialize on event restart. The timer check is the same one that is floating around the forums, btw. I have completely forgotten who I got it from but thanks for it to whomever it belongs.

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Veiled Encampment Waypoint

#4 Post by Cindy » Fri Oct 05, 2012 9:56 pm

I'd get a nil compare error when the timer goes away though(ScorePE is nil, and causes the script to abort).

Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: Veiled Encampment Waypoint

#5 Post by Hidden » Fri Oct 12, 2012 11:41 am

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.)

Code: Select all

 
      if (ScorePE == nil) then
                printf("Score is nil, oh no!");
                __WPL:setWaypointIndex(__WPL:findWaypointTag("WP1"));
end
not 100% sure that will work just an idea.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest