How to put items into arcane transmutor?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

How to put items into arcane transmutor?

#1 Post by Jandrana »

I'd like to make a script to put certain items into the arcane transmutor.

I tried to understand the elementfuser script, but currently I'm only confused.

In the script I only find "item:pickup()" methods. How to drop items?

Could somebody pls explain the steps in this routine?

Code: Select all

	local function Fuse(id,num)
		-- Move items to magic box
		local need = num
		local magicslot = 51
		for i = 61,240 do
			local item = inventory.BagSlot[i]
			item:update()
			if item.Available and (not item.Empty) and item.Id == id then
				if item.ItemCount > need then
					RoMScript("SplitBagItem("..item.BagId..","..need..")")
					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
Thank you!
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: How to put items into arcane transmutor?

#2 Post by lisa »

in a nut shell you want to pickup the item and then pickup the slot to put it in.


Transmutor is BagSlot 51-55

Code: Select all

item = inventory:findItem("Moonlight Pearl") 
toslot = inventory.BagSlot[55] 
item:pickup() 
toslot:pickup()
That would move the MoonlightPearl to the last slot in transmuter regardless of if anything is in that slot. If something is there then it swaps with it.

So in the code you posted there are lots of checks to deal with that ( I didn't read it all though) So basically it would check if the slot is empty or not. No doubt a check for if the item you want to move is in an available blagslot, rent may have expired.

Hopefully the little code I posted helps you in some way =)
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: How to put items into arcane transmutor?

#3 Post by rock5 »

After you have the item you can move it to the transmutor by using the moveTo function.

Code: Select all

item = inventory:findItem("Moonlight Pearl") 
if item then
    item:moveTo("magicbox")
end
Benefit of this is you don't have to look for an empty and it will merge if it can.
  • 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: How to put items into arcane transmutor?

#4 Post by lisa »

hmm when I looked through item.lua I didn't see any bag = "magicbox"

Ahhh I get it now, getInventoryRange designates magicbox to 51-60.
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: How to put items into arcane transmutor?

#5 Post by Cindy »

Code: Select all

	for i = 1,10 do
		item = inventory:findItem("Small Hoe") 
		if item then  
		     item:moveTo("magicbox")	end	
		item = inventory:findItem("Small Spade") 
		if item then  
			item:moveTo("magicbox")	end	
		item = inventory:findItem("Small Hatchet") 
		if item then  
			item:moveTo("magicbox")	end	
	end
.. does not seem to do anything (i have Small Hoes in the backpack).

Also, any way to trigger auto purchase in Pet Auto Craft via the bot? Basically at the start of my Golden Egg farm, I'd like to buy 10 stacks of tools (exact type to be determined from a profile setting?) and move them into the transmutor for out-of-sight storage. I'd love for all this to happen automatically, right now I do everything manually.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: How to put items into arcane transmutor?

#6 Post by rock5 »

The only thing I can see wrong with the code is that the magic box is included by default in items searches so it might be finding items that are already in the magic box. Try limiting the searches to the bags, eg.

Code: Select all

item = inventory:findItem("Small Hoe","bags") 
Yes there are options to have your pet auto craft. Have a look in the default.xml profile to see the main ones. Mainly you need

Code: Select all

		<option name="EGGPET_ENABLE_CRAFT"	value="true" />		<!-- If using same slot for assist and craft, onlt 1 can be enabled. -->
		<option name="EGGPET_CRAFT_SLOT"	value="1" />
		<option name="EGGPET_CRAFT_RATIO"	value="1:1:1" /> 		<!-- mining:woodworking:herbalism ratio to produce. -->
The profile is missing the options for buying though. They are

Code: Select all

		<option name="EGGPET_HOE"		value="99" />
		<option name="EGGPET_SPADE"		value="99" />
		<option name="EGGPET_HATCHET"	value="99" />
These work the same as potion and arrow buying options.

MRC_Optimized is set up to use these settings to automatically go buy more tools when needed.
  • 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
lolita
Posts: 139
Joined: Thu Oct 20, 2011 5:39 am
Location: Serbia

Re: How to put items into arcane transmutor?

#7 Post by lolita »

Cindy maybe this will help for moving items

Code: Select all

function test_move_to_transmutor()
	local move_list = {
		"Small Hatchet",
		"Small Spade",
		"Small Hoe"
			}
	
	for k,v in pairs(move_list) do
		repeat
			local item = inventory:findItem(v,"bags")
			if item then
				item:moveTo("magicbox")
			end
		until not item or inventory:itemTotalCount(0,"magicbox") == 0
	end
end
Life is a journey, not destination :D
Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: How to put items into arcane transmutor?

#8 Post by Cindy »

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

Re: How to put items into arcane transmutor?

#9 Post by Cindy »

Thank you!
noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: How to put items into arcane transmutor?

#10 Post by noobbotter »

I have a related follow up question. If I have the bot put two items in the transmutor and I want to combine them, How would I do that? I got the part where it puts the two items (a stone and a piece of equipment) but how to I transmute them? I didn't see a way to do that using the fusion mod by Rock 5. I just need to be able to press the button to fuse and then I can do the code to move the resulting stone from the transmutor. Thanks.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: How to put items into arcane transmutor?

#11 Post by rock5 »

Well, the userfunction never 'clicks' the magicbox fuse button. It only uses the fusion addon start button. To see the right command you would have had to have a look in the fusion addon.

Anyway, the command is,

Code: Select all

RoMScript("MagicBoxRequest()")
  • 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
noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: How to put items into arcane transmutor?

#12 Post by noobbotter »

Awesome. Thanks. That worked for me.
Post Reply