Page 1 of 10

Rock5's Fusion Control Functions

Posted: Tue Jul 20, 2010 1:48 am
by rock5
Here is the latest version to support the new version of Fusion. This version requires Fusion v2.0 or later. This version no longer includes the Fusion_MakeMaxStones and Fusion_NumberToMake functions. Now that Fusion has become more reliable I'm no longer supporting older versions.

These functions require the Fusion addon installed. I use these in conjunction with mailbox functions to collect and pass on the mana stones between characters. You can find my mail userfunctions here.
http://www.solarstrike.net/phpBB3/viewt ... =27&t=1561

Available functions:

Fusion_MakeMaxManaStones(_maxManaStoneLevel)
  • Just makes the maximum mana stones possible. Similar to just clicking "Max" then "Start" but you have the option to specify the maximum level mana stones to make.

    Accepts argument:
    • _maxManaStoneLevel = The maxixmum level mana stones to make. If omitted, creates highest possible.
Fusion_Config(setting, value)
  • Use to change values on the fusion config page.

    Accepts arguments:
    • setting = The name of the setting to change. Accepted values include
      • 'Random Fusion Stones' (true/false)
        'Fusion Stones' (true/false)
        'Purified Fusion Stones' (true/false)
        'Item Tier Level' (number)
        'Maximum Stats' (number)
        'Use Clean Items' (true/false)
        'Use Item Whitelist' (true/false)
        'Set Whitelist' (item list eg "name1,name2")
        'White' (true/false)
        'Green' (true/false)
        'Blue' (true/false)
        'Purple' (true/false)
      value = the value to change it to.
Fusion_LoadPreset(namenum)
  • Loads a previously set up Preset of preset settings.

    Accepts argument:
    • namenum = the preset number (1 to 6) or the preset name
Fusion_NumberToBuy(_beltTierLevel)
  • Calculates minimum number to buy for belts and fusion stones to use up all your charges. Takes into account number of charges and mana stones you already have. You only need to use this if you create disposable characters.

    Accepts argument:
    • _beltTierLevel = the tier level stone the belt makes - defaults to Fusion Item Tier setting

Re: Fusion Control Functions

Posted: Tue Jul 20, 2010 5:40 pm
by miximixi007
TY,Studying

Re: Fusion Control Functions

Posted: Wed Sep 01, 2010 7:13 am
by S3v3n11
Looks like the fusion addon is broken. Anyone get it to work?

Re: Fusion Control Functions

Posted: Wed Sep 01, 2010 10:35 pm
by rock5
S3v3n11 wrote:Looks like the fusion addon is broken. Anyone get it to work?
I haven't had any complaints or tickets opened since I released the latest version 1.03 a few says ago.

Have you updated it yet?

Re: Fusion Control Functions

Posted: Thu Sep 02, 2010 5:26 am
by sdude13
nice one ty !

Re: Fusion Control Functions

Posted: Thu Sep 02, 2010 4:13 pm
by zaxahmed
Lol, rock5 ure rv? Nice to see you here, how you doin?

Re: Fusion Control Functions

Posted: Fri Sep 03, 2010 7:36 am
by S3v3n11
rock5 wrote:
S3v3n11 wrote:Looks like the fusion addon is broken. Anyone get it to work?
I haven't had any complaints or tickets opened since I released the latest version 1.03 a few says ago.

Have you updated it yet?
I just saw the new version! Thanks for your hard work!

Re: Rock5's Fusion Control Functions

Posted: Tue Oct 12, 2010 9:32 pm
by rock5
I've renamed the functions file to the correct format for the userfunctions folder.

Re: Rock5's Fusion Control Functions

Posted: Wed Dec 08, 2010 7:11 pm
by Giram
Is is possible to use any item in inventory? I noticed that you select item by id but i have many different items and i would just like to transmute them all.

Edit: Never mind... I had "Use item whitelist" checked. This is working well :)

Re: Rock5's Fusion Control Functions

Posted: Mon Jan 17, 2011 3:22 am
by task
hi rock,
I downloaded the "addon fusion Functions.lua" and copied it into micromacro/scripts/rom559/userfunctions.
Both the "buy Gold-wrapped belt" & "buy random fusion stones". work well.

But when I run the testing of the Fusion_MakeMaxStones() , the macro just open the arcane transmutor box and ran a few commands and stopped there, (see screen shoot).
The profile i using is l1-10.

Did I miss out somethings on the codeing ? Is it suppose to auto do the transmuting ?

Code: Select all

<waypoints>
	<!-- #  1 --><waypoint x="-21941" z="3955">

Fusion_MakeMaxStones()
yrest(10000)
	</waypoint>
</waypoints>

Re: Rock5's Fusion Control Functions

Posted: Mon Jan 17, 2011 5:48 am
by rock5
Do you have the settings for fusion setup properly?

If using the Gold-wrapped Belts you should be using the whitelist. If you are using Random Fusion Stones, make sure it is ticked. If it looks like it's going too fast to keep up, slow it down by increasing the speed value.

Re: Rock5's Fusion Control Functions

Posted: Mon Jan 17, 2011 9:23 am
by task
thanks for the fast reply,

I am totally lost ... :?

Are you talking about setting inside the "addon Fusion Functions .lua" file ?
I did not do any setting on it, i just copy and paste.
I have 9 Gold-wrapped Belts & 9 Random Fusion Stones in my bag..while testing out " Fusion_MakeMaxStones() " ..

By the way, what is the "Whitelist" mean ? I could not find any post related to whitelist in the forum. :?
And is there a ver 1.03 " addon fusion function.lua " ? I found out my is ver 0.1 which downloaded from 1st post.


What I planning to do is to get 9 "Excellent belt" from my mail box and than go buy 9 "Random Fusion Stones"
and do the transmuting.

Re: Rock5's Fusion Control Functions

Posted: Mon Jan 17, 2011 7:24 pm
by rock5
task wrote:Are you talking about setting inside the "addon Fusion Functions .lua" file ?
No, I'm talking about the ingame 'fusion' addon settings. You did install it didn't you? This function is for controlling that addon. This is why I asked the administrator to change the folder name to 'userfunctions'. Unfortunately people still call the userfunctions addons so there is still confusion.

It can be found here.
http://rom.curse.com/downloads/rom-addo ... usion.aspx
task wrote:By the way, what is the "Whitelist" mean ? I could not find any post related to whitelist in the forum. :?
If a whitelist is used, that means only items on the list are used. A blacklist, on the other hand does not use items on that list. Loot filter addons often use whitelists and blacklists. The Fusion addon also optionally use a whitelist.
task wrote:And is there a ver 1.03 " addon fusion function.lua " ? I found out my is ver 0.1 which downloaded from 1st post.
The ingame 'fusion' addon is version 1.03. The rombot userfunction for controlling that addon is version 0.1.
task wrote:What I planning to do is to get 9 "Excellent belt" from my mail box and than go buy 9 "Random Fusion Stones" and do the transmuting.
Yes there should be no problem with that once it's set up right.

Re: Rock5's Fusion Control Functions

Posted: Thu Jan 20, 2011 9:42 pm
by task
Ya, its a bit confusing, haha

I have downloaded the game addon, working well now :)

I did not use the userfunction in the end, I just copy the code and do abit of modified
and use it in the waypoint files. :P

Thanks you very much, Rock !!!

oh ya, the " FusionConfig_OnShow() " does not seem to work, the command did not open the "config box". But it still can do the editing in the back ground, so not a problem.
<waypoints>
<!-- # 1 --><waypoint x="2712" z="-1611" y="53">
yrest(2000)
sendMacro("FusionConfig_OnShow()"); yrest(2000)
sendMacro("FusionConfigFrame_ItemlistEditBox:SetText(TEXT('Excellent Belt'))"); yrest(2000)
sendMacro("FusionConfig_Save()"); yrest(2000)

-- Open dialogs
if RoMScript("AdvancedMagicBoxFrame ~= nil") then
sendMacro("AdvancedMagicBoxFrame:Show()"); yrest(2000)
else
sendMacro("MagicBoxFrame:Show()"); yrest(2000)
end

sendMacro("FusionFrame:Show()"); yrest(2000)

-- Set number to make
sendMacro("FusionFrameFusionNumberEditBox3:SetText('0')"); yrest(1000)
sendMacro("FusionFrameFusionNumberEditBoxFusionAndItem:SetText('9')"); yrest(1000)
sendMacro("FusionFrameFusionNumberEditBox5:SetText('3')"); yrest(1000)
sendMacro("FusionFrameFusionNumberEditBox6:SetText('1')"); yrest(1000)
-- Do
sendMacro("Fusion_QueueManastones(FusionFrame_Do)");
repeat yrest(2000) until RoMScript("Fusion.LastGrad")==0

-- close
yrest(2000)
if RoMScript("AdvancedMagicBoxFrame ~= nil") then
sendMacro("AdvancedMagicBoxFrame:Hide()"); yrest(1500)
else
sendMacro("MagicBoxFrame:Hide()"); yrest(1500)
end
yrest(3000)
</waypoint>
</waypoints>

Re: Rock5's Fusion Control Functions

Posted: Fri Jan 21, 2011 4:26 am
by sdude13
@task: I do the same, i buy 27 stones, go to the mailbox get T4 items and do then exaclty one T7, doing this 3 times, then create T8 and send
it to another char.

Buy 27 Stones:

Code: Select all

      local tobuy = 27
      local npcname = RoMScript("TEXT('Sys111392_name')") -- Leskar Prole
      local stonename = RoMScript("TEXT('Sys202999_name')") -- Random Fusion Stone
      repeat
         local fscount = inventory:getItemCount(202999) -- number of Random Fusion Stones you already have
         if fscount >= tobuy then break end
         player:target_NPC(npcname); yrest(2000);
         sendMacro("ChoiceOption(1);"); yrest(2000); -- open store
         BuyItemByName(stonename, tobuy - fscount)
         yrest(10000)
      until false
Make one T7/T8 Stone:

Code: Select all

function Fusion_MS()
------------------------------------------------
-- Creates exactly one fusion stone T7 and one T8 if 3xT77 are avaible
-- using 27 mana stones
-- using 27 grade 4 items 
-- 
------------------------------------------------
		-- Open dialogs
		if RoMScript("AdvancedMagicBoxFrame ~= nil") then
			sendMacro("AdvancedMagicBoxFrame:Show()"); yrest(2000)
		else
			sendMacro("MagicBoxFrame:Show()"); yrest(2000)
		end
		sendMacro("FusionFrame:Show()"); yrest(2000)
		-- Set number to make

		sendMacro("FusionFrameFusionNumberEditBox3:SetText('0')"); yrest(1000)
		sendMacro("FusionFrameFusionNumberEditBoxFusionAndItem:SetText('27')"); yrest(1000)
		sendMacro("FusionFrameFusionNumberEditBox5:SetText('9')"); yrest(1000)
		sendMacro("FusionFrameFusionNumberEditBox6:SetText('3')"); yrest(1000)
		sendMacro("FusionFrameFusionNumberEditBox7:SetText('1')"); yrest(1000)
		sendMacro("FusionFrameFusionNumberEditBox8:SetText('1')"); yrest(1000)
		-- Do
		sendMacro("Fusion_QueueManastones(FusionFrame_Do)");
		repeat yrest(2000) until RoMScript("Fusion.LastGrad")==0
		-- close
		yrest(15000)
		if RoMScript("AdvancedMagicBoxFrame ~= nil") then
			sendMacro("AdvancedMagicBoxFrame:Hide()"); yrest(1500)
		else
			sendMacro("MagicBoxFrame:Hide()"); yrest(1500)
		end
end
What i do is check if fusion stones are 27 if not go to waypoint to buy stones.
if 27 are present set waypoint to go to postbox. This way, you can run it endlessly
with the standard 60 bag slots, because at the postbox you can get as many items
until the bag is full. 27 fusion 33 T4, after fusion its 6 t4 items and one t7 so still place to do another two round
to get 3 T7, doing then a T8 send it and restart from scratch.

because ultimate mail takes automaticly all mails, and if it aborts because of the bag is full
there are empty mail in your box.

so before using take all mail i delete the empty mails:

Code: Select all

	player:target_Object("Postfach",1000)	-- need to translate to english if you need	  
	 		  -- clean up empty mail
	 		  RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(2000)
	 		  RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(10000)
	 		  sendMacro("CloseWindows()") yrest(1000)
				-- get new mail
		 			local occupiedSlots, totalSlots = sendMacro("GetBagCount()") --if bag is full
                                 if 60>occupiedSlots then 
			 			player:target_Object("Postfach",1000)		-- need to translate to english if you need  
	 				 	UMM_TakeM()
	 					yrest(2000)
	 					sendMacro("CloseWindows()") yrest(1000)		
				end	 			

Re: Rock5's Fusion Control Functions

Posted: Tue Jan 25, 2011 9:12 am
by task
wow, that used alot of charges, i only got 13 after each run :P

Re: Rock5's Fusion Control Functions

Posted: Tue Jan 25, 2011 9:47 am
by sdude13
it uses 27 charges for T4, 9 charges for T5, 3 charges T6 and 1 charge for the T7
40 charges at total for one run.
when 3 Runs are completed an additional charge to get the T8.

I run it last Night with 2500 charges and all the items i have collected for some time (sent from my characters) ;)

Re: Rock5's Fusion Control Functions

Posted: Sun Jun 05, 2011 9:07 am
by rock5
Version 0.2 changelog:
  • Added support for t4 items to all functions.
  • Added ability to use t2 mana stones (although why would you :)).
  • Can now specify what items to use or "all" to turn of whitelist and use all items.
  • Can specify what level tier items you are using.
  • For backward compatibility, still defaults to "Gold-wrapped Belt" and level t3 items.
  • Reduced the "yrest" commands so it goes faster.
  • If you have rombot rev 548 or newer then it will empty all 10 transmutor slots for you.
  • Uses progressbar to show progress of making stones.
  • Clearer mm messages.
  • Before, if you couldn't use up all your changes, it would get stuck in a loop. Now it will continue.
  • Added function to change any setting on the config page. No longer need to manually change any setting for new characters.

Re: Rock5's Fusion Control Functions

Posted: Sun Jun 05, 2011 10:31 am
by rock5
Here are the examples using version 0.2 and using t4 items. I've also updated it with newer functions that are now available.

To buy Excellent Belts from Nebular Grey-Eye;

Code: Select all

	<!-- #  1 --><waypoint x="2500" z="48311" y="132" >
		local tobuy = Fusion_NumberToBuy(4) -- for t4 items
		local npcname = RoMScript("TEXT('Sys116627_name')") -- Nebular Grey-Eye
		local beltname = RoMScript("TEXT('Sys227502_name')") -- Excellent Belt
		repeat
			local beltcount = inventory:getItemCount(227502) -- number of belts you already have
			if beltcount >= tobuy then break end
			player:openStore(npcname);	
			inventory:storeBuyItem(beltname, tobuy - beltcount)
			yrest(10000)
		until false
	</waypoint>
To buy Random Fusion Stones from Leskar Prole;

Code: Select all

	<!-- # 16 --><waypoint x="-22999" z="4608">
		local tobuy = Fusion_NumberToBuy(4) -- will be using t4 items
		local npcname = RoMScript("TEXT('Sys111392_name')") -- Leskar Prole
		local stonename = RoMScript("TEXT('Sys202999_name')") -- Random Fusion Stone
		repeat
			local fscount = inventory:getItemCount(202999) -- number of Random Fusion Stones you already have
			if fscount >= tobuy then break end
			player:openStore(npcname);
			inventory:storeBuyItem(stonename, tobuy - fscount)
			yrest(10000)
		until false
	</waypoint>
Then when you have purchased the right number of belts and fusion stones just execute

Code: Select all

Fusion_MakeMaxStones(227502, 4)
I've used the id 227502 instead of "Excellent Belt" to keep with the theme that these examples will work in any language. I execute this command near the mail box before sending the resulting mana stones to the next character.

Re: Rock5's Fusion Control Functions

Posted: Wed Sep 28, 2011 8:18 am
by gloover
Hmm, nether Fusion_MakeMaxStones(227502, 9) nor Fusion_MakeMaxStones() seems to work :-(

Code: Select all

Making Mana stones...
Setting 'Use Item Whitelist' to true.
and nothing happens.

I have 9 fusion stones and 9 excellent belts in my inventory, whts wrong?