Page 5 of 10

Re: Rock5's Fusion Control Functions

Posted: Sat Nov 02, 2013 3:29 am
by runegod

Code: Select all

<!-- #  1 --><waypoint x="-21400" z="-2843" y="510">


local tobuy =  35    --Fusion_NumberToBuy(35)
      local npcname = RoMScript("TEXT('Sys122487_name')") -- 
      local beltname = RoMScript("TEXT('Sys228966_name')") -- Recall belt 6.2k
      repeat
         local beltcount = inventory:getItemCount(228966) -- number of belts you already have
         if beltcount >= tobuy then break end


         player:target_NPC(npcname); yrest(2000);
         sendMacro("ChoiceOption(1);"); yrest(2000); -- open store
inventory:storeBuyItem(beltname, tobuy)
store:buyItem(beltname ,tobuy)


yrest(10000)
    until false

</waypoint>
having a hard time getting this right, it works, but works for wrong reason

Recall belts in sarlo that cost 6200 gold has id of 228966

then there is a leather belt also called Recall belt but with id of 228959

when i run the waypoint, micro macro prints "shopping..." and it keeps buying the leather recall belts which cost 8100 gold

i double check the id with your id addon, and it clearly says two different id numbers on the belts, but just keeps buying the more expensive belt, any idea what im doing wrong??

Re: Rock5's Fusion Control Functions

Posted: Sat Nov 02, 2013 5:01 am
by rock5
It just buys the first one by that name. The store buy function can also buy by id so use the id, ie.

Code: Select all

local beltname = 228966 -- Recall belt 6.2k

Re: Rock5's Fusion Control Functions

Posted: Sun Nov 24, 2013 8:27 am
by rido_knight
Master sometime bot didnt send Recall belt to arcane transmuter.Just send fusion stone and bot come back central plaza didnt spend any charge.i use this code;

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 9 > fscount then
             if player:openStore("Odeley Prole") then
			    inventory:storeBuyItem(202999, 9- fscount)
			 end
		 end
         yrest(5000)
         Fusion_MakeMaxManaStones()
	</waypoint>
	<!-- # 14 --><waypoint x="2842" z="-1380" y="61">	</waypoint>

Re: Rock5's Fusion Control Functions

Posted: Sun Nov 24, 2013 8:43 am
by rock5
There is nothing there about belts.

Re: Rock5's Fusion Control Functions

Posted: Sun Nov 24, 2013 8:46 am
by rido_knight
rock5 wrote:There is nothing there about belts.
I wrote name white list on fusion addon sometime works but sometimes dont work :/

Re: Rock5's Fusion Control Functions

Posted: Sun Nov 24, 2013 8:58 am
by rock5
Are you saying you have all the items but the function didn't work? Are you sure the settings were all correct? Maybe you can take a snapshot of your fusion configuration dialog and show me.

Re: Rock5's Fusion Control Functions

Posted: Sun Nov 24, 2013 10:11 am
by rido_knight
rock5 wrote:Are you saying you have all the items but the function didn't work? Are you sure the settings were all correct? Maybe you can take a snapshot of your fusion configuration dialog and show me.
Problem solved i guess.I changed this userfunction but i dont remember really i did it :S anyway deleted on fusion addon whitelist and run 10 times no problem.Thanks ^_^ when u said fusion configuration and i controlled userfunction ^_^

Re: Rock5's Fusion Control Functions

Posted: Sat Nov 30, 2013 9:03 am
by rido_knight
I have problem this code.i changed like this;

Code: Select all

function Fusion_MakeMaxStones(_beltNameOrId, _beltTierLevel)
------------------------------------------------
-- Makes maximum mana stones taking into account
-- the number of charges and mana stones you
-- already have. Assumes you will have enough
-- belts/items and Random Fusion Stones.
-- Accepts arguments:
--    _beltNameOrId = name or id of the item to use
--                "all" uses all items, no whitelist
--                defaults to "Gold-wrapped Belt"
--    _beltTierLevel = the tier level stone the
--                     belt/item makes - defaults to 3
-------------------------------------------------
	local magicbox, fusion = getFrameNames()

	if type(_beltNameOrId) == "number" then -- assume item id
		_beltNameOrId = RoMScript("228966")
	elseif _beltNameOrId == nil then
		_beltNameOrId = RoMScript("Recall Belt") -- default 'Gold-wrapped Belt'
	end
	_beltTierLevel = _beltTierLevel or 5 -- defaults to 3
But bot give;

Image

Re: Rock5's Fusion Control Functions

Posted: Sat Nov 30, 2013 9:23 am
by rock5
RoMScript sends commands to the game and returns any returned values. 228966 is not a command and neither is Recall Belt. The original TEXT command is a function that returns a string. But if you only want to use Recall Belt then just set _beltNameOrId to the name. Replace this whole section

Code: Select all

	if type(_beltNameOrId) == "number" then -- assume item id
		_beltNameOrId = RoMScript("TEXT('Sys" .. _beltNameOrId .. "_name')")
	elseif _beltNameOrId == nil then
		_beltNameOrId = RoMScript("TEXT('Sys221544_name')") -- default 'Gold-wrapped Belt'
	end
with

Code: Select all

_beltNameOrId = "Recall Belt"
But why not just use the function the way it was meant to be used?

Code: Select all

Fusion_MakeMaxStones("Recal Belt", 5)

Re: Rock5's Fusion Control Functions

Posted: Sat Nov 30, 2013 9:28 am
by rido_knight
rock5 wrote:RoMScript sends commands to the game and returns any returned values. 228966 is not a command and neither is Recall Belt. The original TEXT command is a function that returns a string. But if you only want to use Recall Belt then just set _beltNameOrId to the name. Replace this whole section

Code: Select all

	if type(_beltNameOrId) == "number" then -- assume item id
		_beltNameOrId = RoMScript("TEXT('Sys" .. _beltNameOrId .. "_name')")
	elseif _beltNameOrId == nil then
		_beltNameOrId = RoMScript("TEXT('Sys221544_name')") -- default 'Gold-wrapped Belt'
	end
with

Code: Select all

_beltNameOrId = "Recall Belt"
But why not just use the function the way it was meant to be used?

Code: Select all

Fusion_MakeMaxStones("Recal Belt", 5)
i tried but i have changed already beltname line before.im confused :D well works know thanks master ^__^

Re: Rock5's Fusion Control Functions

Posted: Sat Dec 07, 2013 9:59 am
by kuripot
anyone can update the fusion addon from tier3-tier9 to tier5-tier11??

Re: Rock5's Fusion Control Functions

Posted: Sat Dec 07, 2013 6:46 pm
by kuripot
only this file i need to edit??

Code: Select all

<Ui xmlns="http://www.runewaker.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.runewaker.com/UI.xsd">



<!-- eigene Vorlagen -->

    <FontString name="FusionLabelTemplate" inherits="GameFont" justifyH="LEFT" virtual="true" >
<!--        <Anchors>
            <Anchor point="LEFT" relativePoint="RIGHT" />
        </Anchors>  -->
		<Scripts>
			<OnEnter>Fusion_Tooltip(this);</OnEnter>
			<OnLeave>GameTooltip:Hide();</OnLeave>
		</Scripts>
		<FontHeight>
			<AbsValue val="12"/>
		</FontHeight>
    </FontString>

    <CheckButton name="FusionCheckLabelTemplate" inherits="UIPanelCheckButtonTemplate" virtual="true">
		<Size>
			<AbsDimension y="24" x="24"/>
		</Size>
        <Layers>
            <Layer>
                <FontString name="$parentLabel" inherits="FusionLabelTemplate" />
            </Layer>
        </Layers>
		<Scripts>
			<OnClick>GameTooltip:Hide();</OnClick>
			<OnEnter>Fusion_Tooltip(this);</OnEnter>
			<OnLeave>GameTooltip:Hide();</OnLeave>
		</Scripts>
    </CheckButton>

	<!-- AddonManager Button  -->
	<Button name="FusionMiniButton" hidden="true" inherits="UIPanelButtonTemplate" parent="AddonManagerMiniFrame">
		<Size>
			<AbsDimension y="24" x="24"/>
		</Size>
		<Scripts>
			<OnClick>
				AddonManager.MiniButton_OnClick(this)
			</OnClick>
			<OnEnter>
				AddonManager.MiniButton_OnEnter(this)
			</OnEnter>
			<OnLeave>
				AddonManager.MiniButton_OnLeave(this)
			</OnLeave>
		</Scripts>
		<NormalTexture file="Interface\AddOns\Fusion\Textures\fusion-normal.tga"/>
		<PushedTexture file="Interface\AddOns\Fusion\Textures\fusion-normal.tga"/>
		<HighlightTexture file="Interface\AddOns\Fusion\Textures\fusion-normal.tga" alphaMode="ADD" />
	</Button>

	<Frame name="FusionConfigFrame" parent="UIParent" enableMouse="true" movable="true" hidden="true" >
		<Scripts>
			<OnLoad>FusionConfig_OnLoad();
				FusionConfig_OnLoad();
			<!--this:ClearAllAnchors();
				this:SetAnchor("CENTER", "CENTER", "UIParent", 0, 0); -->
			</OnLoad>
			<OnShow>FusionConfig_OnShow()</OnShow>
			<OnMouseDown>
				this:StartMoving("TOPLEFT");
			</OnMouseDown>
			<OnMouseUp>
				this:StopMovingOrSizing();
			</OnMouseUp>
		</Scripts>
		<Size>
			<AbsDimension x="300" y="366"/>
		</Size>

		<Backdrop bgFile="Interface\Tooltips\Tooltip-Background" edgeFile="Interface\Tooltips\Tooltip-border" tile="true">
			<BackgroundInsets>
				<AbsInset top="4" left="4" bottom="4" right="4"/>
			</BackgroundInsets>
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
		</Backdrop>
		<Anchors>
			<Anchor point="TOPRIGHT">
				<Offset>
					<AbsDimension x="-20" y="30"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer>
				<FontString name="$parent_Title" inherits="GameFontNormal" text="Fusion Settings">
					<Size>
						<AbsDimension x="300" y="40"/>
					</Size>
					<FontHeight>
						<AbsValue val="14" />
					</FontHeight>
				</FontString>
			</Layer>
		</Layers>

		<Frames>

			<CheckButton name="FusionConfigFrame_RandomFusionStones" inherits="FusionCheckLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent">
						<Offset>
							<AbsDimension x="20" y="55"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>

			<CheckButton name="$parent_FusionStones" inherits="FusionCheckLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="FusionConfigFrame_RandomFusionStones">
						<Offset>
							<AbsDimension x="0" y="-4"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>

			<CheckButton name="$parent_PurifiedFusionStones" inherits="FusionCheckLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_FusionStones">
						<Offset>
							<AbsDimension x="0" y="-4"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>


			<CheckButton name="$parent_UseItemlist" inherits="FusionCheckLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_PurifiedFusionStones">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>

			<Frame name="$parent_ItemlistBorder">
				<Size>
					<AbsDimension x="260" y="100"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent" >
						<Offset>
							<AbsDimension x="20" y="140"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Backdrop edgeFile="Interface\SocialFrame\SocialFrame_Contextborder_eg" bgFile="Interface\SocialFrame\SocialFrame_Contextborder_bg">
					<BackgroundInsets>
						<AbsInset top="16" left="16" bottom="16" right="16"/>
					</BackgroundInsets>
					<EdgeSize>
						<AbsValue val="64"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="64"/>
					</TileSize>
				</Backdrop>
			</Frame>

			<EditBox name="$parent_ItemlistEditBox" hidden="false" multiLine="true">
				<Size>
					<AbsDimension x="250" y="90"/>
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativeTo="$parent_ItemlistBorder" />
				</Anchors>
				<Scripts>
					<OnClick>GameTooltip:Hide();</OnClick>
					<OnEnter>Fusion_Tooltip(this);</OnEnter>
					<OnLeave>GameTooltip:Hide();</OnLeave>
				</Scripts>
				<FontString inherits="Font_Socal_Text"/>
			</EditBox>

			<CheckButton name="$parent_White" inherits="FusionCheckLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_UseItemlist">
						<Offset>
							<AbsDimension x="0" y="100"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>

			<CheckButton name="$parent_Green" inherits="FusionCheckLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_White">
						<Offset>
							<AbsDimension x="65" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>

			<CheckButton name="$parent_Blue" inherits="FusionCheckLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_White">
						<Offset>
							<AbsDimension x="130" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>

			<CheckButton name="$parent_Purple" inherits="FusionCheckLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_White">
						<Offset>
							<AbsDimension x="195" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>

			<CheckButton name="$parent_UseClearBag" inherits="FusionCheckLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_White">
						<Offset>
							<AbsDimension x="0" y="4"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>


			<!-- Speed Slider -->
			<Slider name="$parent_SpeedSlider" orientation="HORIZONTAL">
				<Size>
					<AbsDimension x="100" y="10"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativePoint="RIGHT"  relativeTo="$parent_White">
						<Offset>
							<AbsDimension x="30" y="54"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
						<Texture file="Interface\BagFrame\BagFrame-Slider-Border"/>
					</Layer>
					<Layer level="ARTWORK">
						<FontString inherits="GameTitleFont" text="Speed">
							<Anchors>
								<Anchor point="BOTTOM" relativePoint="TOP">
									<Offset>
										<AbsDimension x="-80" y="10"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString inherits="GameTitleFont" text="0.2">
							<Anchors>
								<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT"/>
							</Anchors>
						</FontString>
						<FontString inherits="GameTitleFont" text="2.0">
							<Anchors>
								<Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<ThumbTexture file="Interface\BagFrame\BagFrame-Slider-Knob">
					<Size>
						<AbsDimension x="16" y="16"/>
					</Size>
				</ThumbTexture>
				<Scripts>
					<OnEnter>Fusion_Tooltip(this);</OnEnter>
					<OnLeave>GameTooltip:Hide();</OnLeave>
				</Scripts>
			</Slider>


			<!-- Buttons: Save and Close -->
			<Button name="$parent_SaveButton" inherits="UIPanelButtonTemplate" text="Save">
				<Size>
					<AbsDimension x="100" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-110" y="-10"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						FusionConfig_Save();
						FusionConfigFrame:Hide();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parent_CloseButton" inherits="UIPanelButtonTemplate" text="Close">
				<Size>
					<AbsDimension x="100" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-10" y="-10"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						FusionConfigFrame:Hide();
					</OnClick>
				</Scripts>
			</Button>




		</Frames>

		<Layers>
			<Layer>
				<FontString name="$parent_FusionStonesTitleLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="300" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="20" y="35"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parent_RandomFusionStonesLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="300" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="46" y="58"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parent_FusionStonesLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="300" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="46" y="78"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parent_PurifiedFusionStonesLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="300" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="46" y="98"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parent_UseItemlistLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="300" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="46" y="121"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parent_UseClearBagLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="300" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="46" y="274"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parent_WhiteLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="80" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="46" y="246"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parent_GreenLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="80" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="111" y="246"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parent_BlueLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="80" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="176" y="246"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parent_PurpleLabel" inherits="GameTitleFont" justifyH="LEFT" >
					<Size>
						<AbsDimension x="80" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" >
							<Offset>
								<AbsDimension x="241" y="246"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

			</Layer>
		</Layers>


	</Frame>
</Ui>
but how??
i want to edit the tier 3 to tier 9 and tier 4 to tier 10

Re: Rock5's Fusion Control Functions

Posted: Sat Dec 07, 2013 8:04 pm
by kuripot
or what code i need to do to transmute the manastone tier 9 and tier 10 when found

Re: Rock5's Fusion Control Functions

Posted: Sun Dec 08, 2013 6:31 am
by Bot_romka
kuripot wrote:anyone can update the fusion addon from tier3-tier9 to tier5-tier11??
I make it already for a long time ago, but it was share only on Russian site.

Re: Rock5's Fusion Control Functions

Posted: Mon Dec 09, 2013 4:37 am
by rock5
Apparently, the maintainer of Fusion was planning a big update that included more buttons and he just committed it. It supports up to tier 20 including a few other new options.

http://www.curse.com/addons/rom/fusion

Re: Rock5's Fusion Control Functions

Posted: Thu Dec 26, 2013 5:01 am
by Eggman1414
As im sure your aware, the new fusion no longer works with your userfunction, I think he rewrote the frames.

Re: Rock5's Fusion Control Functions

Posted: Thu Dec 26, 2013 5:59 am
by rock5
ok, I'll get to work on it. I think the frame issue is, Fusion used to support old versions of AdvancedMagicBox so Fusion had to have 2 frames, FusionFrame1 and FusionFrame2. Now Fusion only supports the latest AdvancedMagicBox which doesn't require a different frame. Therefore there is only 1 fusion frame and it's just called FusionFrame.

I'm thinking of dropping support of the Fusion_MakeMaxStones and maybe also Fusion_NumberToMake. There's no real point in them. The newer function Fusion_MakeMaxManaStones is all you really need. Fusion_NumberToBuy may still be useful.

Re: Rock5's Fusion Control Functions

Posted: Thu Dec 26, 2013 8:00 am
by Eggman1414
interesting about the frames though, didn't know that's how it worked in the first place. I agree, those two functions are really the only ones anyone will want to use.

Re: Rock5's Fusion Control Functions

Posted: Fri Dec 27, 2013 12:42 am
by rock5
Updated to 0.4. Needs testing. Please test.

Re: Rock5's Fusion Control Functions

Posted: Fri Dec 27, 2013 8:33 am
by Eggman1414
Errors out at line 249:

RoMScript("Fusion:Do_onClick(FusionFrame_Do)");

Checked it for you Should be

RoMScript("Fusion:Do_OnClick(FusionFrame_Do)")

the "o" was not Cap. :)

but I cant seem to get it to start. It just tells me, not enough items to transmute. I have random stones and belts. config is empty.