have I struck gold?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

have I struck gold?

#1 Post by jduartedj »

Hi,
(specially for you rock5)

Upon trying with some addresses to get the bot running for the new patch I tried using

Code: Select all

inventoryBagIds = 0x9C6C66, (instead of previous 0x9CA828)

which still didn't get my inventory address correct BUT, (AND THIS IS A BIG BUT)
I did got the address (indirectly at least) of the itemshopbag! if you examine this output (under) you'll notice


Code: Select all

BagID: 186      contains: 1      (202226) [Black Horse (Permanent)]

Well this item is located in the 2nd slot of my itemshop bag!!!

I don't know how the offsets work here since i've never tried messing with memory addresses but I guess this means that somewhere offsetting this address at that point (same as from the old address to that point too) one can find the 2nd slot of the itemshop bag.

I hope at least this can help rock5's TODO item regarding this!


Code: Select all

The macro is currently not running. Press the start key (DELETE) to begin.
You may use (END) key to stop/pause the script.
Resumed.
OPENING LOCAL SKILLS DB!
Tentativa de leitura do endereço do jogador
[DEBUG] playerAddr: 0x2BEA1400
[DEBUG] player classes: 4/6
[DEBUG] player pet: 0x2BFB3480
[DEBUG] Player target: 0x0
[DEBUG] player in battle: false
[DEBUG] mousePawn: 0x342B8200
[DEBUG] mousePawn id: 112689
[DEBUG] camAddress: 0x330E400
[DEBUG] Cam X: 467.16, Y: 65.29, Z: 70.39
[DEBUG] Cam XU: -0.35, YU: 0.92, ZU: 0.16
A janela do RoM é de dimensäo: 0x0, canto superior esquerdo em -32000,-32000
MACRO Test: ok
Foi encontrado o feitiço 'a distância MAGE_LIGHTNING
[DEBUG] CPU Frequency 1948.33
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 138 is <EMPTY>.
BagID: 31 is <EMPTY>.
BagID: 4 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 138 is <EMPTY>.
BagID: 31 is <EMPTY>.
BagID: 4 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 27 is <EMPTY>.
BagID: 186      contains: 1      (202226) [Black Horse (Permanent)]
BagID: 2 is <EMPTY>.
BagID: 7 is <EMPTY>.
BagID: 137 is <EMPTY>.
BagID: 152 is <EMPTY>.
BagID: 6 is <EMPTY>.
BagID: 78 is <EMPTY>.
BagID: 2 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
BagID: 1 is <EMPTY>.
Inventory update took: 204
Slot: 1 contains: 1      (223665) [Swordsman Energy Headscarf]  Dura: 80
Slot: 2 contains: 1      (224239) [Juice-stained Gloves]        Dura: 80
Slot: 3 contains: 1      (223827) [High Quality Cloth Shoes]    Dura: 80
Slot: 4 contains: 1      (221521) [Honored Soldier's Coat]      Dura: 80
Slot: 5 contains: 1      (222723) [Soft Trousers of Madness]    Dura: 87
Slot: 6 contains: 1      (220830) [Crimson Feather Cloak]       Dura: 116
Slot: 7 contains: 1      (221261) [Totem Waist Cloth]   Dura: 94
Slot: 8 contains: 1      (223682) [Black Market Shoulder Guards]        Dura: 80

Slot: 9 contains: 1      (223476) [Phoenix Necklace]    Dura: 106
Slot: 10 <EMPTY>.
Slot: 11 <EMPTY>.
Slot: 12        contains: 1      (223084) [Honor Ring]  Dura: 80
Slot: 13        contains: 1      (222165) [Magic Cruelty Ring]  Dura: 74
Slot: 14        contains: 1      (223085) [Honor Earring]       Dura: 80
Slot: 15        contains: 1      (224579) [Intelligence Earring]        Dura: 78

Slot: 16        contains: 1      (210770) [Giri's Staff of Concentration]
Dura: 113
Slot: 17 <EMPTY>.
Slot: 18 <EMPTY>.
Slot: 19 <EMPTY>.
Slot: 20 <EMPTY>.
Slot: 21 <EMPTY>.
Slot: 22        contains: 1      (222865) [Little Devil's Wings]        Dura: 10
0
EDIT: according to my calculator it should be address 0x9C5CBC...
Last edited by jduartedj on Wed Dec 15, 2010 10:18 pm, edited 3 times in total.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
fobsauce
Posts: 46
Joined: Wed Dec 15, 2010 3:40 pm

Re: have I struck gold?

#2 Post by fobsauce »

how do you dump inventory data?
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: have I struck gold?

#3 Post by jduartedj »

fobsauce wrote:how do you dump inventory data?

Code: Select all

<option name="DEBUG_INV"	value="true" />
(Put this in your profile.)
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: have I struck gold?

#4 Post by Administrator »

Well, each item is 32 bytes, so if your first item was bagId 186, that's a 0x4C2C byte offset.
0x9C6C66 - 0x4C2C = 0x9C203A. Try that.
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: have I struck gold?

#5 Post by jduartedj »

Damn now you got me messing with memmory and stuff ... xD

I figured out that first Item Shop Bag slot starts at 0x9C5C78(item id)
and the last starts at 0x9c6979(item ID)

sure hope this helps!
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: have I struck gold?

#6 Post by jduartedj »

Also it seems that the memory addresses of item shop bag are fixed and continuous! so unlike the regular bag that uses addresses all over for consecutive items, you can easily get the item shop addresses the simply adding 32 bytes to the value I posted before.
Regarding the normal bags (rom-bot's inventory), what I cannot find is the table of bagids or the pointers or whatever that point to the addresses of each bagid. Because it seems that every bag id has it's own address and they are not consecutive!!! I don't know this, But I would guess this was not this way before... ?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: have I struck gold?

#7 Post by jduartedj »

Well I don't really need to mess around with memory much at all to figure out that Bag IDs: 185-234 (inclusive) are the Item shop bag and 235-239 are the Arcane Transmuter Bag IDs. Fortunately all these values are fixed and consecutive in memory.

Regarding Inventory Ids (normal Bag) I cant seem to make sense of it! they seem random, I'm gonna se because in memory the address seem to be consecutive even if their bag ids are scrambled.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: have I struck gold?

#8 Post by jduartedj »

I've found the bag's memory addresses, but they aren't consecutive in slot number. They do come in blocks of bag pages, but the order of the slots is kind of scrambles in the memory region. The memory is consecutive in this order of bag slots:
SLOTORDER = {20, 27, 26, 15, 29, 12, 28, 23, 25, 8, 19, 13, 21, 24, 6, 9, 3, 17, 11, 7, 4, 18, 16, 14, 2, 22, 10, 1, 5, 30};

So its start with the 20th slot of the bag then the 27th, 26th etc....

Does this make any sense to you?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: have I struck gold?

#9 Post by Administrator »

I was just about to start messing around with fixing all the inventory stuff, but it looks like you've done a lot of work on it already. You can probably save me some time here. Can you give me the addresses you've found? Probably 1 or 2 addresses to some bag slots would do the trick. One should be enough, but two would work great as a confirmation.
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: have I struck gold?

#10 Post by jduartedj »

thats the thing... the bags slots aren't consecutive in memory..... I have no idea why because the item shop bag slots are consecutive! but the normal bag slots aren't! I'll pm you an excel sheet with them all for BAG I.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: have I struck gold?

#11 Post by rock5 »

The reason I added itemshop and transmutor in my todo list is because I realized that they are all in 1 big list. To read all 3, all you need to do is increase the range. They are in order of bag ids not slot numbers. For the bags the slotnumbers have to be looked up but obviously for the transmutor and item shop this is not necessary.

But of course there is more to it than that. The existing functions that assume you are talking about the bag would need to be checked to make sure they are using the right command for the items location or even if that function is possible. Also we would probably need more functions in regards to moving the items.

Anyway, I've been busy with other things, and this wasn't even high on my list. So it's good someone else is handling 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
Post Reply