In-memory inventory

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: In-memory inventory

#61 Post by rock5 » Tue Jul 20, 2010 10:11 am

VoidMain wrote:Any news about this?
Did it worked properly after the las patches i posted?
I'm sorry for absence, i had some troubles with my ISP and got disconnected all weekend :S
Sorry it's taken so long but I've been really busy.

I've added the 2 files and updated to the latest svn. Now I get this error.

Code: Select all

Name:
Table not found for ID: 212238
scripts\rev/bot.lua:17: ...m Files/micromacro/scripts/rev/classes/EquipItem.lua:45:
attempt to perform arithmetic on field 'BaseItemAddress' (a nil value)
212238 is my new staff so here is the weapons db section.

Code: Select all

Name: WeaponObjectDB
Adding range. Start: 210001     End: 211626     Address: 9B8CB20        Table#: 25
Maybe somewhere along the way, with all the file updates, I might have messed up the folder I'm using for your tests. Could you send all the latest versions of your files and I'll apply it to a fresh copy of rombot.
  • 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

VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: In-memory inventory

#62 Post by VoidMain » Tue Jul 20, 2010 7:13 pm

rock5 wrote:
VoidMain wrote:Any news about this?
Did it worked properly after the las patches i posted?
I'm sorry for absence, i had some troubles with my ISP and got disconnected all weekend :S
Sorry it's taken so long but I've been really busy.

I've added the 2 files and updated to the latest svn. Now I get this error.

Code: Select all

Name:
Table not found for ID: 212238
scripts\rev/bot.lua:17: ...m Files/micromacro/scripts/rev/classes/EquipItem.lua:45:
attempt to perform arithmetic on field 'BaseItemAddress' (a nil value)
212238 is my new staff so here is the weapons db section.

Code: Select all

Name: WeaponObjectDB
Adding range. Start: 210001     End: 211626     Address: 9B8CB20        Table#: 25
Maybe somewhere along the way, with all the file updates, I might have messed up the folder I'm using for your tests. Could you send all the latest versions of your files and I'll apply it to a fresh copy of rombot.
Ok, here is a patch to apply directly to a fresh SVN copy of rombot, try it and let me know how it works for you, i'm using it for killing normaly now and seems to work smooth.
Attachments
MemoryInventoryAndEquipment.zip
(8.09 KiB) Downloaded 122 times

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

Re: In-memory inventory

#63 Post by rock5 » Tue Jul 20, 2010 11:43 pm

VoidMain wrote:Ok, here is a patch to apply directly to a fresh SVN copy of rombot, try it and let me know how it works for you, i'm using it for killing normaly now and seems to work smooth.

Code: Select all

Ranged skill found: PRIEST_CHAIN_OF_LIGHT
[DEBUG] CPU Frequency 2349.13
Table not found for ID: 212342
Wrong value returned in update of item id: 212342
Table not found for ID: 212238
...m Files/micromacro/scripts/rev/classes/EquipItem.lua:45: attempt to perform arith
metic on field 'BaseItemAddress' (a nil 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

VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: In-memory inventory

#64 Post by VoidMain » Wed Jul 21, 2010 1:54 am

rock5 wrote:
VoidMain wrote:Ok, here is a patch to apply directly to a fresh SVN copy of rombot, try it and let me know how it works for you, i'm using it for killing normaly now and seems to work smooth.

Code: Select all

Ranged skill found: PRIEST_CHAIN_OF_LIGHT
[DEBUG] CPU Frequency 2349.13
Table not found for ID: 212342
Wrong value returned in update of item id: 212342
Table not found for ID: 212238
...m Files/micromacro/scripts/rev/classes/EquipItem.lua:45: attempt to perform arith
metic on field 'BaseItemAddress' (a nil value)
Damn, can you plesa change:

Code: Select all

local debugTableIndexes = false;
local debugTableRanges = false;
in lines 11 and 12 of MemoryTable.lua to:

Code: Select all

local debugTableIndexes = true;
local debugTableRanges = true;
And show me the whole output for the table: WeaponObjectDB?
Sorry for the inconvenience :(

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

Re: In-memory inventory

#65 Post by rock5 » Wed Jul 21, 2010 4:59 am

VoidMain wrote:And show me the whole output for the table: WeaponObjectDB?
Sorry for the inconvenience :(

Code: Select all

Name: WeaponObjectDB
092% [**********************************************----]Table starts with id: 21000
1                Dir: 9BACB20
Adding range. Start: 210001     End: 211626     Address: 9BACB20        Table#: 25
Readed from 9BA0000      at 0x4 9BDFC00 Original pointer: 9BA0000
Readed at 9BA0000        in 0x8 9BDFE00 ID: 211642
Returning: 9BDFE00
Falla 3

Tenemos ID: 211626      En dir: 9BDFE00
Readed 2: 211641
Readed 2: 211640
Readed 2: 211639
Readed 2: 211638
Readed 2: 211637
Readed 2: 211636
Readed 2: 211635
Readed 2: 211634
Readed 2: 211633
Readed 2: 211632
Received: 9BA0000       Returning: 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

VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: In-memory inventory

#66 Post by VoidMain » Wed Jul 21, 2010 1:26 pm

rock5 wrote:
VoidMain wrote:And show me the whole output for the table: WeaponObjectDB?
Sorry for the inconvenience :(

Code: Select all

Name: WeaponObjectDB
092% [**********************************************----]Table starts with id: 21000
1                Dir: 9BACB20
Adding range. Start: 210001     End: 211626     Address: 9BACB20        Table#: 25
Readed from 9BA0000      at 0x4 9BDFC00 Original pointer: 9BA0000
Readed at 9BA0000        in 0x8 9BDFE00 ID: 211642
Returning: 9BDFE00
Falla 3

Tenemos ID: 211626      En dir: 9BDFE00
Readed 2: 211641
Readed 2: 211640
Readed 2: 211639
Readed 2: 211638
Readed 2: 211637
Readed 2: 211636
Readed 2: 211635
Readed 2: 211634
Readed 2: 211633
Readed 2: 211632
Received: 9BA0000       Returning: 0
Damn, that was my bad, there are 3 places in wich i should change the hard coded number for a variable and only changed it in 2, can you please, change the line 246 of MemoryTable.lua from:

Code: Select all

for i = 1, 10 do -- 10 lines should be enough...
to:

Code: Select all

for i = 1, threshold do -- 10 lines should be enough...
and let me know if that solves it?
Thanks again ^^

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

Re: In-memory inventory

#67 Post by rock5 » Wed Jul 21, 2010 10:28 pm

VoidMain wrote:Damn, that was my bad, there are 3 places in wich i should change the hard coded number for a variable and only changed it in 2, can you please, change the line 246 of MemoryTable.lua from:

Code: Select all

for i = 1, 10 do -- 10 lines should be enough...
to:

Code: Select all

for i = 1, threshold do -- 10 lines should be enough...
and let me know if that solves it?
Thanks again ^^
Yes, that has finally done it. It is working. Well done.
  • 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: In-memory inventory

#68 Post by rock5 » Wed Jul 21, 2010 11:52 pm

Can I suggest the bot needs a couple carriage returns?

After the while loop at line 355 of MemoryTable.lua add

Code: Select all

	printf("\n");
Change line 129 of functions.lua to

Code: Select all

	    		printf("\nChoose your character that you want to play on:\n");
Although I realize it was already like this.
  • 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

VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: In-memory inventory

#69 Post by VoidMain » Thu Jul 22, 2010 3:59 am

rock5 wrote:Can I suggest the bot needs a couple carriage returns?

After the while loop at line 355 of MemoryTable.lua add

Code: Select all

	printf("\n");
Change line 129 of functions.lua to

Code: Select all

	    		printf("\nChoose your character that you want to play on:\n");
Although I realize it was already like this.
You're right, that way it fits better, thanks for pointing that out ^^

Now... May i ask you another favor?
Can you test it with the bot working, i mean hunting...
I'll attach a new patch against the latest SVN because i added a small fix in player.lua so it can drink potions (it was using bagSlot to check the name of the item with RoMScript but that is not necesary anymore, the bot is working with this modifications in a heavy crowded hunting area near Dalanis and i have to say its very nice to see it behaving like it does now...
I also added a small fix to player.lua to be able of use the new Lootable field, so the bot won't try to loot "empty" mobs, in the mean time i'm working on a solution to "ground buffs" (dunno a better name for those :P) i have the theory that those should be like any other object and should be accessible via the objects table...

Anyway, if you can test this new version please let me know how it goes for you, many thanks again for all your help ^^

Juest change the extension from .txt to .patch, forum won't let me upload a .patch file -.-
Attachments
MemoryInventoryAndEquipment.txt
(38.07 KiB) Downloaded 100 times

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

Re: In-memory inventory

#70 Post by rock5 » Thu Jul 22, 2010 5:22 am

VoidMain wrote:I also added a small fix to player.lua to be able of use the new Lootable field, so the bot won't try to loot "empty" mobs
That's going to make a lot of people happy. Seems like every other day someone is posting about wait times when looting. How about detecting lootable bodies other people have left? I'd love to see an option to loot any lootable bodies encountered.
VoidMain wrote:in the mean time i'm working on a solution to "ground buffs" (dunno a better name for those :P) i have the theory that those should be like any other object and should be accessible via the objects table...
I believe they are called sigils. I don't get the impression that they are like other objects so I doubt you'll find them in the objects table. Good luck though.
VoidMain wrote:Anyway, if you can test this new version please let me know how it goes for you, many thanks again for all your help ^^
I'll test it now and get back to you.
  • 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: In-memory inventory

#71 Post by rock5 » Thu Jul 22, 2010 5:46 am

VoidMain wrote:Anyway, if you can test this new version please let me know how it goes for you, many thanks again for all your help ^^
I just started the bot and my initial impression is it loots like a pro.:)

The only problem I see is, if the body isn't lootable the character heads to the next target before the body even hits the ground. I think that looks a bit bottish. Maybe a 1 sec pause is needed if that happens?

I'll let it run for a few hours and let you know if I encounter any problems.
  • 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: In-memory inventory

#72 Post by rock5 » Thu Jul 22, 2010 6:02 am

rock5 wrote:
VoidMain wrote:in the mean time i'm working on a solution to "ground buffs" (dunno a better name for those :P) i have the theory that those should be like any other object and should be accessible via the objects table...
I believe they are called sigils. I don't get the impression that they are like other objects so I doubt you'll find them in the objects table. Good luck though.
Actually I think I just proved that they are not objects. I just got a sigil and ran rom/getid. When I pointed at the sigil with the mouse, rom/getid didn't give me an id.

That said, they are part of the world so must be recorded somewhere, so maybe they are in the object table.
  • 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

VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: In-memory inventory

#73 Post by VoidMain » Thu Jul 22, 2010 6:46 am

rock5 wrote:
rock5 wrote:
VoidMain wrote:in the mean time i'm working on a solution to "ground buffs" (dunno a better name for those :P) i have the theory that those should be like any other object and should be accessible via the objects table...
I believe they are called sigils. I don't get the impression that they are like other objects so I doubt you'll find them in the objects table. Good luck though.
Actually I think I just proved that they are not objects. I just got a sigil and ran rom/getid. When I pointed at the sigil with the mouse, rom/getid didn't give me an id.

That said, they are part of the world so must be recorded somewhere, so maybe they are in the object table.
Yeah, i did a mini monitor to check the object table and i can see the buffs-sigils in there so definitely objects, we have to identify wich range and we are set, after we get this realeased, maybe we can dedicate some time to that...

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: In-memory inventory

#74 Post by Administrator » Thu Jul 22, 2010 9:53 am

Nice work so far. We're getting a bit off-topic here, but I'll allow it. If you can provide me a list of sigil names and/or types (as in the object's type; these can be seen at the top of classes/pawn.lua) that would help. I've got a plan for how to handle these.

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

Re: In-memory inventory

#75 Post by rock5 » Thu Jul 22, 2010 10:43 am

I think I've noticed a small problem.

I've been keeping 1 eye on the bot while watching TV and I've noticed 3 or 4 times it didn't loot the body even though it was standing right next to it. Immediately after killing the mob it continued on.

Maybe sometimes the bot is too quick to check the lootable flag that the lootable flag wasn't set yet?
  • 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

VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: In-memory inventory

#76 Post by VoidMain » Thu Jul 22, 2010 11:59 am

Administrator wrote:Nice work so far. We're getting a bit off-topic here, but I'll allow it. If you can provide me a list of sigil names and/or types (as in the object's type; these can be seen at the top of classes/pawn.lua) that would help. I've got a plan for how to handle these.
Sigils are type 3 and ranges from 200004 to 200962 so far, might be more but i think they are all in itemstable.db...

VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: In-memory inventory

#77 Post by VoidMain » Thu Jul 22, 2010 12:01 pm

rock5 wrote:I think I've noticed a small problem.

I've been keeping 1 eye on the bot while watching TV and I've noticed 3 or 4 times it didn't loot the body even though it was standing right next to it. Immediately after killing the mob it continued on.

Maybe sometimes the bot is too quick to check the lootable flag that the lootable flag wasn't set yet?
Yeah, that could be the problem i noticed that when lag spikes to 400+ ms, we could add a small yrest there before updating to give it time for the server to respond...

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

Re: In-memory inventory

#78 Post by rock5 » Thu Jul 22, 2010 1:21 pm

VoidMain wrote:Yeah, that could be the problem i noticed that when lag spikes to 400+ ms, we could add a small yrest there before updating to give it time for the server to respond...
That's what I was thinking.

Have you thought about what I said above about a pause if the body isn't lootable so as to look less bottish?
  • 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

VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: In-memory inventory

#79 Post by VoidMain » Thu Jul 22, 2010 2:17 pm

rock5 wrote:
VoidMain wrote:Yeah, that could be the problem i noticed that when lag spikes to 400+ ms, we could add a small yrest there before updating to give it time for the server to respond...
That's what I was thinking.

Have you thought about what I said above about a pause if the body isn't lootable so as to look less bottish?
Yes, i think a random pause there would be nice...

I'll aply both fixes and come back to you.

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

Re: In-memory inventory

#80 Post by rock5 » Sun Jul 25, 2010 10:39 pm

VoidMain wrote:
rock5 wrote:
VoidMain wrote:Yeah, that could be the problem i noticed that when lag spikes to 400+ ms, we could add a small yrest there before updating to give it time for the server to respond...
That's what I was thinking.

Have you thought about what I said above about a pause if the body isn't lootable so as to look less bottish?
Yes, i think a random pause there would be nice...

I'll aply both fixes and come back to you.
Personally I wouldn't make the pause random, I'd make it a set size. If you are the type of person that wants a random sized human looking pause after looting you can always use LOOT_PAUSE_AFTER.

ps. You've been quiet the last couple of days. How's the Inventory changes coming along? Have you been in contact with Administrator? What does he think?
  • 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: Ahrefs [Bot], Bing [Bot] and 5 guests