Changing Class Stops Bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Changing Class Stops Bot

#1 Post by McGuffin »

This is weird. Just started happening yesterday, got around to rebooting the system today and it persists.

Here is the problem, the code below is part of the beginning of my dailies. It gets my character to the daily location. But first, it changes to the class I want to run the dailies on. It leaves the house in Lower East and is supposed to travel via snoops to another map. Problem is when it gets to Varanas Bridge it just sits there. If I leave the bot running and port back to Lower East the bot then continues as though it just arrived on the bridge. So now for the weird. If I remove the class change portion and change class manually before starting the bot, it runs flawlessly. The code below is the portion that is hanging. It should take you to Varanas Snoop but it just sits on the bride.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
	<!-- #  1 --><waypoint x="0" z="2" y="0">
        player:target_NPC("Housekeeper");
        ChoiceOptionByName("Change class");
        yrest(500);
        player:update();
        player:target_NPC("Housekeeper");
        ChoiceOptionByName("Leave the house");
        waitForLoadingScreen(); 
        player:update();
        player:mount();
        yrest(3000);
	</waypoint>
	<!-- #  2 --><waypoint x="4726" z="416" y="77">	</waypoint>
	<!-- #  3 --><waypoint x="4392" z="174" y="78">	</waypoint>
	<!-- #  4 --><waypoint x="4471" z="-35" y="77">
        player:target_NPC("Dieve");
        ChoiceOptionByName("I want to transport to Varanas Gates");
        waitForLoadingScreen(); 
        player:update();
        yrest(500);
	</waypoint>
	<!-- #  5 --><waypoint x="2336" z="1139" y="28">
    error("Finished",0)
	</waypoint>
</waypoints>
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Changing Class Stops Bot

#2 Post by rock5 »

I ran it a couple of times, it worked both times.

It was probably just a timing glitch of some sort. I suggest you add a time limit to waitForLoadingScreen.
  • 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
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: Changing Class Stops Bot

#3 Post by McGuffin »

Changed to

Code: Select all

waitForLoadingScreen(2000);
and it worked perfectly. Thx.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Changing Class Stops Bot

#4 Post by rock5 »

waitForLoadingScreen takes seconds so if it gets stuck then you will be waiting about 33m. Usually you want about 30s just to be sure. The time limit applies to only the time it waits for the loading screen to appear. Once the loading screen appears it switches to waiting for it to disappear which is not effected by the limit.
  • 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
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: Changing Class Stops Bot

#5 Post by McGuffin »

Checked it while running two other clients and bots. May have forced an unintentional wait because of that. Normally this runs as a solo client/bot to get the morning trash stuff done. Will change it to (2) and see if that works when it runs by itself.

Just not sure why it works if the bot does not change class, but fails if the bot does change class. When it "fails" it just does not realize it went anywhere, it does not kick out a message saying there was no loading screen, it just sits there. If I then manually port somewhere, then it sees the loading screen and continues the WP file.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Changing Class Stops Bot

#6 Post by rock5 »

I can think of no reason why it would fail only if you change class.

What I think is happening is when it does the ChoiceOptionByName it starts relogging too fast ans some RoMScript in that function failed to get a response before it started to relog. This has been known to happen. So the RoMScript doesn't return control until the teleport has finished. Then the function ends and it does your waitForLoadingScreen at which point it gets stuck. So adding a time limit to waitForLoadingScreen should work.

So for instance if you set it to (2) and the loading screen doesn't appear in 2 seconds then it will continue.
  • 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
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: Changing Class Stops Bot

#7 Post by McGuffin »

Just did another test, this time I added a 5 second rest after the class change and kept the original waitForLoadingScreen();, it worked just fine. So I guess there is something going on with that ChoiceOptionByName that take a tick or two to work through.

ETA: Made a mistake and did not take out the (2), was looking at a different waitForLoadingScreen();. It failed with the 5 second rest after changing class so I used waitForLoadingScreen(2); and it worked. It did give the error that no loading screen appeared.
Post Reply