----===== new revision of Patch 4.0.6.2483 =====----

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#61 Post by rock5 » Sat Dec 31, 2011 1:04 pm

I just had an idea. Maybe the problem is with memoryreadrepeat.

I believe your line 26 is now

Code: Select all

tmp = memoryReadRepeat("uint", proc, self.Address + addresses.pawnId_offset) or 0;
Try changing it to

Code: Select all

tmp = memoryReadUInt(proc, self.Address + addresses.pawnId_offset) or 0;
I think memoryreadrepeat has to succeed or else it errors. If a read might fail we have to use the regular memoryread functions and then check that we got a valid value.
  • 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

User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#62 Post by cufRet8e » Sat Dec 31, 2011 3:23 pm

Runtime 107 minutes and no crash so far! I'll continue testing.
Thank you and Happy New Year!:)

EDIT: I was testing 2 bots for couple of hours. Your latest modification make a very big difference, thank you. No more crashes with line 26 :)
I caught only one:

Code: Select all

Did not find any crashed game clients.
0:45am - X:/Programs/micromacro/scripts/rom/classes/pawn.lua:241: Error in memory reading

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#63 Post by rock5 » Sat Dec 31, 2011 11:14 pm

Try the same thing on that line. Change it to

Code: Select all

	tmp = memoryReadUInt(proc, self.Address + addresses.pawnId_offset) or 0;
  • 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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#64 Post by rock5 » Sat Dec 31, 2011 11:43 pm

Also, if this is the solution to all your problems then could you try without some of the earlier changes?

Restore:
Add to line 372 of pawn.lua

Code: Select all

	tmp = memoryReadRepeat("byteptr",proc, self.Address + addresses.pawnSwim_offset1, addresses.pawnSwim_offset2)
	self.Swimming = (tmp == 3 or tmp == 4) 
Delete lines 2684-2689 of player.lua

Code: Select all

	-- Swimming wont change if it can't be read.
	local swimoffset1 = memoryReadRepeat("int",getProc(), self.Address + addresses.pawnSwim_offset1)
	if swimoffset1 ~= nil and swimoffset1 ~= 0 then
		tmp = memoryReadRepeat("byte",getProc(), swimoffset1 + addresses.pawnSwim_offset2)
		self.Swimming = (tmp == 3 or tmp == 4)
	end
I think the other changes can stay. I'm thinking of changing other values too when it detects an invalid object or pawn. Maybe set .Name = "" and Type = TP_NONE. Actually it would be good to reset it all to default values but I don't think it can be done from within :update(). Hm... I'll think a bit more on th details.
  • 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

User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#65 Post by cufRet8e » Sun Jan 01, 2012 5:03 am

OK, reverted as you said. After 10 minutes:

Code: Select all

10:2am - X:/Programs/micromacro/scripts/rom/classes/pawn.lua:372: Error in memory reading
Crashes again and again, average time 5 minutes, always same error.
I copy those two files again as they were before, now running for 52 minutes no crash yet:)

User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#66 Post by cufRet8e » Sun Jan 01, 2012 7:50 am

Found a typo:

Code: Select all

Moving in | Suggested range: 50 | Distance: 115
No more usable HP Phirius potsMACRO: Using HP potion 259/764 (33%): Prosta Mikstura Pierws
zej Pomocy (qty 86)
No new line character after message "No more usable HP Phirius pots". Those messages are coded in player.lua.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#67 Post by rock5 » Sun Jan 01, 2012 8:02 am

cufRet8e wrote:Crashes again and again, average time 5 minutes, always same error.
I was hoping we wouldn't get this error anymore. I guess it doesn't hurt to leave those changes in.
cufRet8e wrote:No more usable HP Phirius potsMACRO: Using HP potion 259/764 (33%): Prosta Mikstura Pierws
zej Pomocy (qty 86)
This is the line.

Code: Select all

					cprintf(cli.yellow, "No more usable HP Phirius pots", inventory.MaxSlots);
A "/n" can be added easy enough. Not sure what was intended with the "inventory.MaxSlots". At the moment it does nothing. Maybe it was meant to be printed but I can't see why.
  • 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

User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#68 Post by cufRet8e » Sun Jan 01, 2012 8:23 am

I guess it should be added to language[] table, and formatted like all other messages about HP/MP potions:

Code: Select all

cprintf(cli.yellow, language[19], inventory.MaxSlots); 		-- No more (usable) mana potions
Added to language tables english.lua:

Code: Select all

[19] = "No more (usable) Phirius MP potions available at bagslot 1 to %d\n",
And then translated to all languages. Because atm those messages are untranslated and always english.

BTW. Are you going to push those changes about crashes to SVN? Now, after your fixes it works like a charm.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#69 Post by rock5 » Sun Jan 01, 2012 8:32 am

I figure when someone want to add translations they can easily add it. Not much point adding it to the english language file if no one is there to translate it.

I'll include those changes in my next commit. There are still some other changes I've made that I want to clean up before committing.
  • 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

User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#70 Post by cufRet8e » Sun Jan 01, 2012 8:38 am

I'll do it. It's just 6 languages and 2 basic messages. Give me a minute ;)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#71 Post by rock5 » Sun Jan 01, 2012 8:41 am

Wow do you speak 6 languages? If so there are probably lots of messages that still need translating :D
  • 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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#72 Post by rock5 » Sun Jan 01, 2012 8:48 am

By the way this is wrong "No more (usable) Phirius MP potions available at bagslot 1 to %d\n". I check "bestavailablephirius". It doesn't use "maxslot". It searches all slots.
  • 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

User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#73 Post by cufRet8e » Sun Jan 01, 2012 8:58 am

Code: Select all

Did not find any crashed game clients.
1:43pm - X:/Programs/micromacro/scripts/rom/classes/pawn.lua:626: Error in memory reading
Only one founded from long, long time

Code: Select all

local tmpTargetPtr = memoryReadRepeat("int", getProc(), self.Address + addresses.pawnTargetPtr_offset) or 0
Same problem, isn't? I guess this can be changed to use of memoryReadUInt();?
rock5 wrote:By the way this is wrong "No more (usable) Phirius MP potions available at bagslot 1 to %d\n". I check "bestavailablephirius". It doesn't use "maxslot". It searches all slots.
So how it should be then?
rock5 wrote:Wow do you speak 6 languages? If so there are probably lots of messages that still need translating :D
No, I am not, but Google Translate does:) I was thinking only about this particular message. But yeah, I look into language files, and really, some messages are missing. But this is a problem for those, who speak that languages. My native language is polish, but I am very happy using english version of rombot.

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

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#74 Post by lisa » Sun Jan 01, 2012 9:10 am

You don't want the looking for best available pot to check all slots?
You want it to only check within the range set by profile?

Lol I fixed the mana pots line today, forgot to check the hp pot line.
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
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#75 Post by cufRet8e » Sun Jan 01, 2012 9:31 am

Another one. So we have 2 rare crashes now:

Code: Select all

1:43pm - X:/Programs/micromacro/scripts/rom/classes/pawn.lua:626: Error in memory reading

Code: Select all

2:28pm - ...:/Programs/micromacro/scripts/rom/classes/player.lua:260: Error in memory reading

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#76 Post by rock5 » Sun Jan 01, 2012 9:39 am

cufRet8e wrote:Same problem, isn't? I guess this can be changed to use of memoryReadUInt();?
We can't go around changing all the memoryreadrepeats. I wonder in there is a basic flaw in memoryreadrepeat erroring when it fails. Maybe it should return nil. I'm not sure.

Bugger, I just had another look at memoryreadrepeat and it only errors if "settings.options.DEBUGGING" is true. Do you have debugging enabled?
cufRet8e wrote:I look into language files, and really, some messages are missing.
The way the bot works is it loads the English file first which should have all the messages then loads the local language file which overwrites the English messages. If there are any missing messages then it still has the English version. If you want to do some Polish translation just add the messages missing by looking at the English one and translating it.
  • 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

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

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#77 Post by lisa » Sun Jan 01, 2012 9:46 am

rock5 wrote:Bugger, I just had another look at memoryreadrepeat and it only errors if "settings.options.DEBUGGING" is true. Do you have debugging enabled?
That might explain why not everyone is having the same issue.

That does prove though that the memoryreadrepeat does fail, question is why would it fail?
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
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#78 Post by cufRet8e » Sun Jan 01, 2012 9:53 am

rock5 wrote: Bugger, I just had another look at memoryreadrepeat and it only errors if "settings.options.DEBUGGING" is true. Do you have debugging enabled?
Kill me, but yes -_-'

Can you enable it and see what happens to your rombot? This may be source of all those crashes.
lisa wrote:That might explain why not everyone is having the same issue.
That does prove though that the memoryreadrepeat does fail, question is why would it fail?
Yeah, looks pretty clear now. That's was the reason.
But, at least, I believe this may be useful to investigate errors with this memoryreadrepeat function.
Thanks you two for your involvement in fixing this!

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

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#79 Post by lisa » Sun Jan 01, 2012 9:56 am

on the language subject, I just did some searching and counted 50 print messages in default bot files that don't use the language number system, don't know about you but I don't have the time to change all of them to use the language system.
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: ----===== new revision of Patch 4.0.6.2483 =====----

#80 Post by rock5 » Sun Jan 01, 2012 10:03 am

lisa wrote:That does prove though that the memoryreadrepeat does fail, question is why would it fail?
I'd say it's mostly when things don't exist anymore or it could be anything really. It may be related to certain values, such as the swim value. Important thing is if it works ok with debugging off. I think the reason it might have been set up to error when debugging is on, is to help catch the errors. If you enable debugging to look for errors, you don't want to miss them as they scroll off the top of the screen.
cufRet8e wrote:Can you enable it and see what happens to your rombot? This may be source of all those crashes.
Problem is I mainly just do cot and survival. I wouldn't want it to crash in the middle of those. I'll see what I can do tomorrow.
  • 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

Who is online

Users browsing this forum: No registered users and 0 guests