userfunction_magicbox

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
Message
Author
Celesteria
Posts: 36
Joined: Mon Jun 01, 2015 7:44 am

userfunction_magicbox

#1 Post by Celesteria » Wed Jun 17, 2015 4:51 am

hello again,

this is a set of functions to fuse items/elements/manastones without the need of an ingame-addon like fusion. It handles nearly every functionality of the magicbox.

(UMB = userfunction_magicbox)


function UMB_getCharges ()
------------------------------------------------------------------------------------
-- get current amount of arcane charges
--
-- arguments:
-- none
-- returns:
-- number
------------------------------------------------------------------------------------


function UMB_getMagicBoxEnabled ()
------------------------------------------------------------------------------------
-- check if magicbox is enabled
--
-- arguments:
-- none
-- returns:
-- boolean
------------------------------------------------------------------------------------


function UMB_buyCharges (secPass, numTokensToKeep)
------------------------------------------------------------------------------------
-- find ID, buy arcane charges from itemshop using phirius tokens, use items
--
-- arguments:
-- secPass - [required] secondary password
-- numTokensToKeep - [optional] how many phirius tokens left (at least)
--
-- returns:
-- nothing
------------------------------------------------------------------------------------


function UMB_numToBuy (id, itemTier, maxStoneTier)
------------------------------------------------------------------------------------
-- calculates the number of required items/stones
--
-- arguments:
-- id - [required] id of item to check (f.e. from fjord is 228966, default stone id is 202999)
-- itemTier - [required] tier of the item in itemID (belt from fjord is 5)
-- maxStoneTier - [optional] highest tier to build (default 20)
-- returns:
-- number
------------------------------------------------------------------------------------


function UMB_fuseItems (...)
------------------------------------------------------------------------------------
-- fusing a list of items
--
-- arguments:
-- a list of (max. 5) items or itemIDs or itemNames (mixed)
--
-- returns:
-- nothing
------------------------------------------------------------------------------------


function UMB_fuseTierStones (itemID, itemTier, stoneID, maxStoneTier)
------------------------------------------------------------------------------------
-- fuses items and fusion stones as much as possible
--
-- arguments:
-- itemID - [required] id of the item to use (belt from fjord is 228966)
-- itemTier - [required] tier of the item in itemID (belt from fjord is 5)
-- stoneID - [optional] id of fusion stones to use (default 202999)
-- maxStoneTier - [optional] highest tier to build (default 20)
--
-- returns:
-- nothing
------------------------------------------------------------------------------------

function UMB_fuseElements (element, level, amount)
------------------------------------------------------------------------------------
-- fuses elements to higher level
--
-- arguments:
-- element - [required] type of element - ELE_WIND, ELE_WATER, ELE_FIRE, ELE_EARTH
-- level - [required] max level to fuse - LVL_STARDUST, LVL_SAND, LVL_STONE, LVL_DIAMOND
-- amount - [optional] number of fused elements in bag to finish
--
-- returns:
-- boolean - failure or success
------------------------------------------------------------------------------------


Version 1.2
* functions renames to prevent problems with other fusion functions
* added function UMB_getCharges and UMB_getMagicBoxEnabled
* making UMB_numToBuy public
* added the variable __timing to balance the speed of fusing (sometimes the bot is faster than RoM)
Version 1.1
* removed a copy'n'paste bug
Version 1.0
* initial release
Attachments
userfunction_magicbox.lua
Version 1.2
(9.47 KiB) Downloaded 349 times
I am a botter, but no cheater. So none of my scripts ever use any of the hacks like swimhack, speedhack, wallhack...
I hope you can understand my english. Its not my native language and it has been a long time since I used it the last time :)

Celesteria
Posts: 36
Joined: Mon Jun 01, 2015 7:44 am

Re: userfunction_magicbox

#2 Post by Celesteria » Sat Jun 27, 2015 7:11 am

updated to version 1.2
I am a botter, but no cheater. So none of my scripts ever use any of the hacks like swimhack, speedhack, wallhack...
I hope you can understand my english. Its not my native language and it has been a long time since I used it the last time :)

leroy
Posts: 19
Joined: Thu Sep 19, 2013 11:57 am

Re: userfunction_magicbox

#3 Post by leroy » Sat Jun 27, 2015 2:21 pm

Sofar the Fusion addon has been enough for me but I might just try your functions :)
Thanx for all the contributions you made!

Agrozet
Posts: 23
Joined: Mon May 07, 2012 7:02 am

Re: userfunction_magicbox

#4 Post by Agrozet » Thu Mar 15, 2018 1:01 pm

Hi.
Can you tell me what to insert in the script to repeat the task and finish ok?
Thank you

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN">
<onload>	
	
	UMB_fuseItems (241095,241095,241095,241114)	
	yrest(2000)
	if inventory:itemTotalCount(241096) ~= 81 then
	inventory:update()
	return UMB_fuseItems (241095,241095,241095,241114)
	end
-----------------------------------------------------------
	UMB_fuseItems (241096,241096,241096,241114)	
	yrest(2000)
	if inventory:itemTotalCount(241097) ~= 27 then
        inventory:update()	
	return UMB_fuseItems (241096,241096,241096,241114)	
	end
--------------------------------------------------------------	
	UMB_fuseItems (241097,241097,241097,241114)	
	yrest(2000)
	if inventory:itemTotalCount(241098) ~= 9 then
	inventory:update()
	return UMB_fuseItems (241097,241097,241097,241114)	
	end
------------------------------------------------------------
	UMB_fuseItems (241098,241098,241098,241114)

</onload>

</waypoints>

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests