new item shop bank support

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

new item shop bank support

#1 Post by kenzu38 »

Hey guyz, need some help with adding support for the new bank slots that can store only item shop items.

So far, I got the bot to recognize the new slots but I still can't get it to transfer item shop items to those new slots. I have edited bank, inventory and item.lua from classes folder.

These are the changes I made:

-- changed all 200 to 300 in bank.lua
-- edited function getInventoryRange in inventory.lua
added these lines:

Code: Select all

	elseif rangeLower == "isbank" then
		return 201, 300, "bank"
	elseif rangeLower == "bank" or rangeLower == "banks" then
		return 1, 300, "bank"
-- added some lines in item.lua

Code: Select all

	-- Check if itemshop item
	if bag == "isbank" and not self.ItemShopItem then
		-- Item is not itemshop item. Cannot be put in itemshop bank
		return
	end
When I try this code...

Code: Select all

i = inventory:findItem("Advanced Armor Driller","itemshop") yrest(1000) if i then i:moveTo("isbank") end
...it doesn't work. But if I change "isbank" to "bank" or "bank1", it transfers the items. So I think I'm still missing something for this to work. Can anyone point out what else I need to do? Thanks.
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: new item shop bank support

#2 Post by lisa »

IS Bank will need it's own code added for it.

Start address is
0x9F3FA4
and it is every 0x44.

Code: Select all

self.Address = addresses.staticBankbase + 0x3520 + ( (self.BagId - 1) * 68 );
Which is actually only 82 items after the start of the bank class, which is kind of weird.

Rock would know more about how he did the bank class.

NVM the rentbankbase is a different static address.

So yeah the current code won't work, it would need to be updated.
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 item shop bank support

#3 Post by rock5 »

Ah, a new feature. I'll look into 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: new item shop bank support

#4 Post by rock5 »

Ok, this is how I'll make it work.
  • - findItem searches to slot 300.

    - Moving to "bank" defaults to the regular slots 1-200. To move to the isbank you have to specify "isbank" specifically.

    - Like the inventory bags, itemTotalCount will default to slots 1-300 for items and 1-200 when counting empties.
How does that sound?
  • 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
kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: new item shop bank support

#5 Post by kenzu38 »

Yep, sounds good. That's what I was trying to do, except for counting the empties which I didn't account for.
lisa wrote:IS Bank will need it's own code added for it.

Start address is
0x9F3FA4
and it is every 0x44.

Code: Select all

self.Address = addresses.staticBankbase + 0x3520 + ( (self.BagId - 1) * 68 );
So yeah the current code won't work, it would need to be updated.
I guess I really need to sit down and watch all those tutorial videos you made about reading memory so I can customize more things. :D
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: new item shop bank support

#6 Post by rock5 »

Actually the extra 100 slots are just an extension of the current slots. No extra memory code needed. I actually already did the code but was just allowing a chance for comments. I'll commit it now.

Edit: Committed to 755.
  • 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
kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: new item shop bank support

#7 Post by kenzu38 »

Ok, thanks. :)

Although, can you list here the files you changed? I just need the names of the files you changed. So bank, inventory, and item.lua are a given. What else did you change?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: new item shop bank support

#8 Post by rock5 »

A good way to see the changes I made is to right click the "rom" and select "TortoiseSVN/Show log". Select a revision in the top panel then you can double click the files in the bottom panel to see the differences between that file and the previous version.

There are 8 changed files but only 4 are in relation to this issue, bank.lua, bankitem.lua, inventory.lua and item.lua.
  • 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
kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: new item shop bank support

#9 Post by kenzu38 »

Ok, thanks for the tip. :)

Will test this as soon as I update my files.

EDIT: Just tested it, it works! Thanks!
Post Reply