Pause on reading from memory

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Pause on reading from memory

#1 Post by gloover »

Hey rock, greetingz lisa.

I'm using a modified version of RBAssist - its darned with some functions reading the curent speed from the memory etc.
The problem is by using the teleport, entering the house/guld castle ... everything wich is causing the loading screen - crashing the bot, because it cannot read the memory during the loading screen. Is there any possibility to prefent this? May any check inside the loop of RBASSIST looking for loading-screen?

thx in advance!
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Pause on reading from memory

#2 Post by lisa »

In party.lua I use this at the start of the loop.

Code: Select all

		if memoryReadBytePtr(getProc(),addresses.loadingScreenPtr, addresses.loadingScreen_offset) ~= 0 then
			repeat
				printf("loading screen has appeared, waiting for it to end.\n")
				yrest(1000)
			until memoryReadBytePtr(getProc(),addresses.loadingScreenPtr, addresses.loadingScreen_offset) == 0
		end
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Pause on reading from memory

#3 Post by gloover »

YES! that is it - thanx lisa!
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Pause on reading from memory

#4 Post by rock5 »

There's a new function called isInGame() that returns true only if fully in the game. The loadingscreen flag only indicates if the loading screen is visible. It wont detect if you are at the login or character selection screen like when changing character.

So maybe something like

Code: Select all

while not isInGame() do
        printf("Not currently in game, waiting for it to reenter.\n")
        yrest(1000)
end
  • 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
Post Reply