Rock5's Fusion Control Functions

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.
Message
Author
mailstorm
Posts: 39
Joined: Fri Feb 03, 2012 8:00 am

Re: Rock5's Fusion Control Functions

#61 Post by mailstorm » Sat Feb 18, 2012 6:44 am

can some one upload this scripts ?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's Fusion Control Functions

#62 Post by lisa » Sat Feb 18, 2012 6:47 am

It's on the first post.
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

mailstorm
Posts: 39
Joined: Fri Feb 03, 2012 8:00 am

Re: Rock5's Fusion Control Functions

#63 Post by mailstorm » Sat Feb 18, 2012 6:51 am

i see only userfunction

Alleexx
Posts: 120
Joined: Sun May 15, 2011 4:28 am
Location: Sweden

Re: Rock5's Fusion Control Functions

#64 Post by Alleexx » Sat Feb 18, 2012 6:52 am


mailstorm
Posts: 39
Joined: Fri Feb 03, 2012 8:00 am

Re: Rock5's Fusion Control Functions

#65 Post by mailstorm » Sat Feb 18, 2012 6:55 am

Alex yes i have fusion addon i need script to buy fusions and belts to start bot pick a script to run

Alleexx
Posts: 120
Joined: Sun May 15, 2011 4:28 am
Location: Sweden

Re: Rock5's Fusion Control Functions

#66 Post by Alleexx » Sat Feb 18, 2012 6:58 am

I sent code in the other topic you posted in

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

Re: Rock5's Fusion Control Functions

#67 Post by noobbotter » Sat Oct 13, 2012 10:49 pm

Each time I run Fusion_MakeMaxStones(227502, 4); (to use excellent belts and random fusion stones) it runs through and turns all available, finishes by checking all upper levels, then it restarts and does the whole thing over again, checking for any more belts, fusion stones, and all the way up through the tiers to see if it can find anything. Is that by design? ... to run though the process twice? Thanks.

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

Re: Rock5's Fusion Control Functions

#68 Post by rock5 » Sun Oct 14, 2012 1:27 am

noobbotter wrote:Each time I run Fusion_MakeMaxStones(227502, 4); (to use excellent belts and random fusion stones) it runs through and turns all available, finishes by checking all upper levels, then it restarts and does the whole thing over again, checking for any more belts, fusion stones, and all the way up through the tiers to see if it can find anything. Is that by design? ... to run though the process twice? Thanks.
That's the old function. I recommend you use the newer function MakeMaxManaStones. But to answer your question, it looks like it is supposed to do all the fusing in one pass but it repeats probably to make sure there were no failures, for instance if you had the speed set too high.

If you want to use MakeMaxManaStones this is how I would do it.

Code: Select all

Fusion_Config("Use Item Whitelist", true)
Fusion_Config("Set Whitelist", "Excellent Belt")
-- You can also set what types of fusion stones to use.
MakeMaxManaStones()
Sure it's a bit longer but you have better control.
  • 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

minhtien86
Posts: 31
Joined: Sat Mar 17, 2012 1:14 am

Re: Rock5's Fusion Control Functions

#69 Post by minhtien86 » Sat Dec 08, 2012 6:08 am

how do i clean bag without token coins for all level.

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

Re: Rock5's Fusion Control Functions

#70 Post by rock5 » Sat Dec 08, 2012 6:14 am

minhtien86 wrote:how do i clean bag without token coins for all level.
I didn't understand that. Try again.
  • 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
rido_knight
Posts: 102
Joined: Wed May 29, 2013 6:50 am
Location: Turkey

Re: Rock5's Fusion Control Functions

#71 Post by rido_knight » Fri Oct 25, 2013 3:49 am

What is wrong this script?

Code: Select all

<!-- # 13 --><waypoint x="2739" z="-1626" y="53">		
         local fscount = inventory:getItemCount(202999) -- number of Random Fusion Stones you already have
         if inventory:getItemCount(202999) >= 5 then break end
         player:merchant(110576); -- Odeley Prole
         inventory:storeBuyItem(Random Fusion Stone, 5 - fscount)
         yrest(10000)
         until false
		Fusion_MakeMaxManaStones()
	</waypoint>
Micromacro says "Failed to compile and run lua code for waypoint #13"
Last edited by rido_knight on Fri Oct 25, 2013 5:53 am, edited 1 time in total.

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

Re: Rock5's Fusion Control Functions

#72 Post by rock5 » Fri Oct 25, 2013 4:48 am

1. inventory:storeBuyItem(Random Fusion Stone, 5 - fscount)
Random Fusion Stone is seen as 3 variables separated by spaces, which is a syntax error. Should be a string.
inventory:storeBuyItem("Random Fusion Stone", 5 - fscount)

2. until false
Until is the second part of repeat loops. I see no repeats.

3. if fscount >= 5 then break end
This wont cause an error but it does nothing unless there is a loop in the waypoint. 'break' breaks from loops. The whole waypoint is treated as a function so if you want to exit the waypoint, to continue to the next waypoint, you can use 'return'.

Next time please copy and paste the text, don't take a picture of the text. It saves me from having to retype your code.
  • 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
rido_knight
Posts: 102
Joined: Wed May 29, 2013 6:50 am
Location: Turkey

Re: Rock5's Fusion Control Functions

#73 Post by rido_knight » Fri Oct 25, 2013 5:55 am

rock5 wrote:1. inventory:storeBuyItem(Random Fusion Stone, 5 - fscount)
Random Fusion Stone is seen as 3 variables separated by spaces, which is a syntax error. Should be a string.
inventory:storeBuyItem("Random Fusion Stone", 5 - fscount)

2. until false
Until is the second part of repeat loops. I see no repeats.

3. if fscount >= 5 then break end
This wont cause an error but it does nothing unless there is a loop in the waypoint. 'break' breaks from loops. The whole waypoint is treated as a function so if you want to exit the waypoint, to continue to the next waypoint, you can use 'return'.

Next time please copy and paste the text, don't take a picture of the text. It saves me from having to retype your code.
Sorry master :D edited picture..

damn i didnt make it :( I just understand this,your comment :(

Code: Select all

local fscount = inventory:getItemCount(202999) -- number of Random Fusion Stones you already have
         if inventory:getItemCount(202999) >= 5 then return
         player:merchant(110576); -- Odeley Prole
         inventory:storeBuyItem("Random Fusion Stone", 5 - fscount)
         yrest(10000)
		Fusion_MakeMaxManaStones()

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

Re: Rock5's Fusion Control Functions

#74 Post by rock5 » Fri Oct 25, 2013 6:22 am

It's missing an end for the if statement. Let me see if I can figure out what it's supposed to do.

Code: Select all

         local fscount = inventory:getItemCount(202999) -- number of Random Fusion Stones you already have
         if 5 > fscount then
             player:merchant(110576); -- Odeley Prole
             inventory:storeBuyItem("Random Fusion Stone", 5 - fscount)
         end
         yrest(10000)
         Fusion_MakeMaxManaStones()
That will buy fusion stones if you don't have 5 then make maximum mana stones. Is that all you wanted it to do?
  • 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
rido_knight
Posts: 102
Joined: Wed May 29, 2013 6:50 am
Location: Turkey

Re: Rock5's Fusion Control Functions

#75 Post by rido_knight » Fri Oct 25, 2013 6:28 am

rock5 wrote:It's missing an end for the if statement. Let me see if I can figure out what it's supposed to do.

Code: Select all

         local fscount = inventory:getItemCount(202999) -- number of Random Fusion Stones you already have
         if 5 > fscount then
             player:merchant(110576); -- Odeley Prole
             inventory:storeBuyItem("Random Fusion Stone", 5 - fscount)
         end
         yrest(10000)
         Fusion_MakeMaxManaStones()
That will buy fusion stones if you don't have 5 then make maximum mana stones. Is that all you wanted it to do?
yeah..i ll send belt,money and i have all mana stones to 10 level character from main character...I m writing this script for varanas.Take mail go to stone merchant take stone make mana stone and then go to mailbox send...i achieved take mail send mail go to merchant but i failed there..Check my inventory how much fusiton i have..if i havent 5 fusion take 5 stone and then make tier.


edit:i tried this code.It doesnt give compile error anymore but when micromacro says shopping . . . bot doesnt buy anything :/

add this it works know thank u so much master :D

Code: Select all

player:target_NPC(110576);
			 sendMacro("ChoiceOption(1);");

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

Re: Rock5's Fusion Control Functions

#76 Post by rock5 » Fri Oct 25, 2013 7:50 am

Probably because player:merchant() closes the store after it finishes what it does. Basically, player:merchant buys and sells according to your profile settings.

To open the store for buying with your own code you can use

Code: Select all

player:openStore("npcname")
Which basically does exactly what you used but it does add a safety feature in that it returns true if the store opens. So you can do something like

Code: Select all

if player:openStore("npcname") then
    -- your code to buy or sell stuff
end
When using your own custom selling script this is vital but it's not so important when buying as buying is fairly safe.
  • 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
rido_knight
Posts: 102
Joined: Wed May 29, 2013 6:50 am
Location: Turkey

Re: Rock5's Fusion Control Functions

#77 Post by rido_knight » Fri Oct 25, 2013 8:27 am

rock5 wrote:Probably because player:merchant() closes the store after it finishes what it does. Basically, player:merchant buys and sells according to your profile settings.

To open the store for buying with your own code you can use

Code: Select all

player:openStore("npcname")
Which basically does exactly what you used but it does add a safety feature in that it returns true if the store opens. So you can do something like

Code: Select all

if player:openStore("npcname") then
    -- your code to buy or sell stuff
end
When using your own custom selling script this is vital but it's not so important when buying as buying is fairly safe.

thank u so much..i want to learn right and functional code so i ll change it :D

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Rock5's Fusion Control Functions

#78 Post by kuripot » Sat Oct 26, 2013 5:47 pm

how to chooce the cheapest fusion stone to buy??

edited.
nevermind... i see it has different IDs

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Rock5's Fusion Control Functions

#79 Post by kuripot » Sat Oct 26, 2013 11:22 pm

sdude13 wrote:@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	 			


what is that mean??

Code: Select all

Waypoint #5 is closer then #1. Hence we start with waypoint #5.
Moving to waypoint #5, (-23434, 4091)
We found Mailbox and will harvest it.
No mail to take.
Use MACRO: Executing RoMScript "CloseWindows()".
Use MACRO: Executing RoMScript "GetBagCount()".
Use MACRO: Executing RoMScript "MagicBoxFrame:Show()".
Use MACRO: Executing RoMScript "FusionFrame:Show()".
The game client did not crash.
12:19am - IGF:\FusionFrame:Show()\ [string "local a={FusionFrame:Show()} return
a"]:1: attempt to index global 'FusionFrame' (a nil value)


AL lib: FreeContext: (02102EC0) Deleting 1 Source(s)
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>

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

Re: Rock5's Fusion Control Functions

#80 Post by rock5 » Sun Oct 27, 2013 1:50 am

That's because it tries to do everything manually so when the frame names changed a while ago it stopped working.

You can pretty much completely replace the Fusion_MS function with Fusion_MakeMaxManaStones(). Just make sure you don't have any low tier items in your inventory before you use it.
  • 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], Bing [Bot] and 1 guest