SplitBagItem broken?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

SplitBagItem broken?

#1 Post by Cindy » Sat Mar 30, 2013 8:20 am

I've been trying to fuse some Wind Elements, with no success (using element fuser script of Rock)

Debugged it to

Code: Select all

RoMScript("SplitBagItem("..item.BagId..","..need..")")
The ID and number are correct, so I tried to run it in ROM as /run SplitBagItem(61,3) i moved it to first slot. Got a red message about "Item error: cannot split the item stack". Can anyone confirm that they nerfed this API recently?

I've used the element fuser script a few weeks ago successfully.

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

Re: SplitBagItem broken?

#2 Post by rock5 » Sat Mar 30, 2013 9:13 am

Splitting does till work. Note, '61' might not be the bagid. Use this instead to test it.

Code: Select all

/run SplitBagItem(GetBagItemInfo(1),3)
I was able to test it with Wind Elements. It worked.
  • 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: SplitBagItem broken?

#3 Post by lisa » Sat Mar 30, 2013 9:18 am

I could be wrong but that BagId is the one that is random on each bag, so 61 won't be first slot of bag 1.

--=== LOL ===--

I tested it and went to post and saw rock already did exactly what I was going to post.

I tested with

Code: Select all

/script SplitBagItem( 1 , 5 );
first slot of item shop bag.
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

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: SplitBagItem broken?

#4 Post by Cindy » Fri Apr 05, 2013 4:31 pm

thanks!

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: SplitBagItem broken?

#5 Post by Cindy » Fri Aug 02, 2013 5:51 am

So this problem still exists. When I run the element fuser script, on some of my characters this works but on others it doesn't:

Code: Select all

local function Fuse(id,num)
		-- Move items to magic box
		local need = num
		local magicslot = 51
		print("fuse%s-%s", id, num )
		for i = 61,240 do
			local item = inventory.BagSlot[i]
			item:update()
			if item.Available and (not item.Empty) and item.Id == id then
				printf("got @ "..i)
				if item.ItemCount > need then
					printf("split "..need.." of "..item.BagId.." ")					
					RoMScript("SplitBagItem("..item.BagId..","..need..")")
					rest(1000)
					need = 0
				else
					item:pickup()
					need = need - item.ItemCount
				end
				yrest(200)
				inventory.BagSlot[magicslot]:pickup() yrest(200)
				magicslot = magicslot + 1
			end
			if need == 0 then break end
		end
		yrest(500)		
		-- Press 'Confirm'
		RoMScript("MagicBoxRequest()");

		yrest(500)
		EmptyMagicbox()
		inventory:update()
	end
Output:
got @ 152split 3 of 175 fuse%s-%s 241479 3

I paused the bot mid execution, and using the values displayed (for bag id) i manually executed /script SplitBagItem(175,3). This worked in that 3 elements were broken off the staff and were hovering on the cursor. When the bot runs the cursor doesn't change. So I thought maybe this is a timing issue, added the rest(1000). Unfortunately, it still does not work.

(Note the code does validate that slotid and bagid are different).

Any ideas/suggestions?

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

Re: SplitBagItem broken?

#6 Post by rock5 » Fri Aug 02, 2013 6:23 am

It's a bit strange. If it works on some characters then that would imply that the code is correct but there is something about some characters that makes it not work. If it consistently doesn't work on a particular character then you need to play around with it until you figure out why. Try adding print statement in various positions to print out values and see if they have the values you expect. Add player:sleep() in a few places to pause the script so you can check each step has been done before continuing. See if there are any warning messages appearing saying why it's not working.

Hope that helps.
  • 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] and 2 guests