Problems with item:moveTo inventory

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Posts: 156
Joined: Thu Oct 03, 2019 4:08 am

Problems with item:moveTo inventory

#1 Post by Andre235 » Mon Mar 13, 2023 3:53 am

i have a function in my secret garden script, that automatically moves the items to the itemshop bank, but it works not really good...
the script is running, every item appears at the mouse cursor, but only 20-30% of the items will be moved.
myabe it is an address or a timing problem. i tried to set a "yrest(1000)" after the "item:moveTo("isbank")" but no success with this.
can anybody help me or probably having a similar problem?

Code: Select all


		for slot = 1, 240 do
			item = inventory.BagSlot[slot]
			if item and item.ItemShopItem then

thank you :-)

Posts: 156
Joined: Thu Oct 03, 2019 4:08 am

Re: Problems with item:moveTo inventory

#2 Post by Andre235 » Mon Mar 13, 2023 7:34 am

me again:
i think i solved the problem...
at first: its bag slot 0-239, instead of 1-240.
and i played around with the item.max_stack address and now i got no issues and it moves the items completely...
here is my addresses.lua
(9.17 KiB) Downloaded 79 times
@Admin: can you confirm it and put it to the git repository?

thank you an have fun :-)

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

Re: Problems with item:moveTo inventory

#3 Post by Administrator » Tue Mar 14, 2023 6:05 pm

Thanks for the update.

I took a quick look at it and I see what's going on. It looks like they removed the max item stack value from the item structure itself (no idea where it was moved to at the moment). That's why the bot was no longer able to read the item max stack count.

When you updated the address, I'm guessing you kind of of tried a few things and noticed that 0x2c seemed to work for you. However, it looks like it is almost always causing the max stack to return as 0. Inside the
method, it tries to stack items when it can and it does this by checking if the item is stackable by testing if the max stack count is > 1; in this case, 0 is never greater than 1, and therefore it skips that piece of code, giving the impression it is working correctly.

I'll have to give it some thought and see if there's something better we can do. At the very least, we can disregard trying to stack the items.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest