waitForLoadingScreen();

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

waitForLoadingScreen();

#1 Post by bobdole »

I am having big problems with: waitForLoadingScreen(); working, it used to work well but as of late when the character exits instances they are getting stuck on the previous waypoint and perm stuck. The current code I am using is:

Code: Select all

	</waypoint>
	<!-- # 46 --><waypoint x="-150" z="-2206" y="680">
			waitForLoadingScreen(2000);
                       player:update();
			__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
	</waypoint>
Any suggestions would be very helpful.
BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: waitForLoadingScreen();

#2 Post by BillDoorNZ »

do a search for: GoToPortal

and use that in combination with waitForLoadingScreen - also, dont use 2000 (thats 2000 seconds it will wait for a loading screen for - thats why youre getting 'stuck') change it to 10 to 30 - thats usually more than enough.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: waitForLoadingScreen();

#3 Post by rock5 »

And make sure the waypoint before entering the portal is far enough that it doesn't enter by mistake. Sometimes if the waypoint is too close and there is a bit of lag, you don't stop in time and end up going through the portal early.

I've been thinking of doing all-in-one functions for going through portals and porting via npc. I'm a bit busy at the moment but I'll try to remember this for later.
  • 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
bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: waitForLoadingScreen();

#4 Post by bobdole »

This look right:


Code: Select all

	<!-- # 46 --><waypoint x="-150" z="-2206" y="680">
	waitForLoadingScreen(30);
        if GoToPortal() then
        player:update();
	__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
	</waypoint>
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: waitForLoadingScreen();

#5 Post by rock5 »

No that's not right. First you stop outside the portal. Then you GoToPortal() then you waitForLoadingScreen(). And an 'if' statement needs an 'end'. So something like this if you want to use an 'if' statement.

Code: Select all

   <!-- # 46 --><waypoint x="-150" z="-2206" y="680">
   if GoToPortal() then
      waitForLoadingScreen(30);
      player:update();
      __WPL:setWaypointIndex(__WPL:findWaypointTag("first point on other side of portal"));
   else
      error("Can't find portal")
   end
   </waypoint>
Although if the coordinates are correct then the portal will always be there so it's not really worth using an 'if' statement there. Might be worth it on the waitForLoadingScreen to make sure you go through but every time I've used GoToPortal() it's worked. It's very reliable.
  • 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
bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: waitForLoadingScreen();

#6 Post by bobdole »

Thanks, I will try that. I am having a hell of time with this code, seems I can sit and watch it and its fine but the moment I walk away it seems to get stuck and auto logout. lol
bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: waitForLoadingScreen();

#7 Post by bobdole »

Tried that code and the very 1st attempt it went haywire:

Code: Select all

Moving to waypoint #45, (-123, -2162)
Swimhack DEactivated.
Moving to waypoint #46, (-150, -2206)
Clearing target.
Unsticking player... at position -146,-2200. Trial 1 from maximum 10 trials
Moving to waypoint #46, (-150, -2206)
Player address changed: 0x33C14600
Ranged skill found: SCOUT_VAMPIRE_ARROWS
Unsticking player... at position -146,-2200. Trial 2 from maximum 10 trials
Moving to waypoint #46, (-150, -2206)
Unsticking player... at position -146,-2200. Trial 3 from maximum 10 trials
Moving to waypoint #45, (-123, -2162)
Unsticking player... at position -146,-2200. Trial 4 from maximum 10 trials
Moving to waypoint #45, (-123, -2162)
Unsticking player... at position -146,-2200. Trial 5 from maximum 10 trials
bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: waitForLoadingScreen();

#8 Post by bobdole »

Based on your comments about how to use GoToPortal() in your other thread, I am trying something different. Waypoint # 46 was actually in the portal so it would have me just waiting for the waitForLoadingScreen. I have removed that waypoint and moved all the code to the previous way point so now I am entering the portal using GoToPortal():

Code: Select all

	<!-- # 45 --><waypoint x="-123" z="-2162" y="680"> 
        flyoff();
        player:cast("ROGUE_HIDE")
        GoToPortal()
        waitForLoadingScreen(30);
        player:update();
        __WPL:setWaypointIndex(__WPL:findWaypointTag("first point on other side of portal"));
	</waypoint>
I have to ask, what is

Code: Select all

__WPL:setWaypointIndex(__WPL:findWaypointTag("first point on other side of portal")); 
doing in place of

Code: Select all

__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
its working but I just wanted to understand why.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: waitForLoadingScreen();

#9 Post by rock5 »

Code: Select all

__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
This sets the next waypoint as the one with tag="start". If your script just continues on the next waypoint then you don't need this line. It's probably worked both ways for you because you don't have either of those tags I'm guessing, so it continues with the next line anyway.
  • 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
bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: waitForLoadingScreen();

#10 Post by bobdole »

I have the tag for start and its way above the waypoint I am last using so that's what confused me. So far since removing the one way point everything seems to be going well. My next question is regarding the speed hack. Is there a way to set the speed hack in a waypoint and if so whats the safest speed to use so the character doesn't rubber band?
bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: waitForLoadingScreen();

#11 Post by bobdole »

I found your speedhack userfunction and testing it @ speed(55). Guess if all goes perfect for an hour I will up it to 56 and keep testing.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: waitForLoadingScreen();

#12 Post by rock5 »

bobdole wrote:I found your speedhack userfunction and testing it @ speed(55). Guess if all goes perfect for an hour I will up it to 56 and keep testing.
Someone posted a list of optimal speeds for different situations. The speed they had if you are not using any speed pots etc. was 59. I've been using that for some of my alt scripts with no problem.
  • 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
bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: waitForLoadingScreen();

#13 Post by bobdole »

So far (knock on wood) since I removed the one waypoint and started using your GoToPortal code from a little further distance, I have not had the character go haywire once!
Post Reply