Code: Select all
#turbo
#event ErrorCombine "#*#You cannot combine these items in this container type!#*#"
#event FailedCombine "#*#You lacked the skills to fashion the items together.#*#"
#event SuccessCombine "#*#You have fashioned the items together to create something new!#*#"
Sub Main
/declare CurFletchSkill global
/declare LastFail global
/declare LastSuc global
/declare CombinerID global
/varset CombinerID 99
:SkillCheck
/varset CurFletchSkill ${Me.Skill[Fletching]}
/if (${Me.Skill[Fletching]}<16) /call ClassOneWoodPoint
/if (${Me.Skill[Fletching]}<36 && ${Me.Skill[Fletching]}>=16) /call MedGrooveNock
/if (${Me.Skill[Fletching]}<46 && ${Me.Skill[Fletching]}>=36) /call ParabolicFletch
/if (${Me.Skill[Fletching]}<56 && ${Me.Skill[Fletching]}>=46) /call SmallGrooveNock
/if (${Me.Skill[Fletching]}<68 && ${Me.Skill[Fletching]}>=56) /call BoneShaft
/if (${Me.Skill[Fletching]}<82 && ${Me.Skill[Fletching]}>=68) /call ShieldFletch
/if (${Me.Skill[Fletching]}<102 && ${Me.Skill[Fletching]}>=82) /call HookedArrowHead
/if (${Me.Skill[Fletching]}<122 && ${Me.Skill[Fletching]}>=102) /call WoodVane
/if (${Me.Skill[Fletching]}<135 && ${Me.Skill[Fletching]}>=122) /call CeramicShaft
/if (${Me.Skill[Fletching]}<162 && ${Me.Skill[Fletching]}>=135) /call BoneVanes
/if (${Me.Skill[Fletching]}<182 && ${Me.Skill[Fletching]}>=162) /call SilverArrowHead
/if (${Me.Skill[Fletching]}<202 && ${Me.Skill[Fletching]}>=182) /call CeramicVanes
/if (${Me.Skill[Fletching]}>=202) && {
/echo Your skill cannot be increased more than 202 with this script. If you wish to raise skill higher you can change the script to do so.
/cleanup
/endmacro
}
/goto :SkillCheck
Sub ClassOneWoodPoint
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Several Round Cut Fletchings" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub MedGrooveNock
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Several Round Cut Fletchings" 2
/call BuyItemSingle "Medium Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub ParabolicFletch
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Several Parabolic Cut Fletchings" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub SmallGrooveNock
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Several Round Cut Fletchings" 2
/call BuyItemSingle "Small Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub BoneShaft
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Bone Arrow Shafts" 1
/call BuyItemSingle "Several Round Cut Fletchings" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub ShieldFletch
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Several Shield Cut Fletchings" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub HookedArrowHead
/call BuyItemSingle "Hooked Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Several Round Cut Fletchings" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub WoodVane
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Set of Wooden Arrow Vanes" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub CeramicShaft
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Ceramic Arrow Shafts" 1
/call BuyItemSingle "Several Round Cut Fletchings" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub BoneVanes
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Set of Bone Arrow Vanes" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub SilverArrowHead
/call BuyItemSingle "Silver Tipped Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Several Round Cut Fletchings" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub CeramicVanes
/call BuyItemSingle "Field Point Arrowheads" 0
/call BuyItemSingle "Bundled Wooden Arrow Shafts" 1
/call BuyItemSingle "Set of Ceramic Arrow Vanes" 2
/call BuyItemSingle "Large Groove Nocks" 3
/call MakeArrows
/call SellItem class
/return
Sub BuyitemSingle
/delay 1
/if (${InvSlot[pack${Math.Calc[1+${CombinerID}]}].Item.Item[${Param2}].Name.Equal[${Param0}]}) /return
/itemnotify ${Param0} merchant
/delay 1
/ctrlkey /notify MerchantWnd MW_Buy_Button leftmouseup
:WaitBuy
/delay 1
/if (${InvSlot[pack${Math.Calc[1+${CombinerID}]}].Item.Item[${Param2}].Name.NotEqual[${Param0}]}) /goto :WaitBuy
/return
Sub MakeArrows
/varset LastFail 0
/varset LastSuc 0
/combine pack${8}
:WaitForCombine
/delay 1
/if (!${Item[pack${CombinerID}].Items}) /goto :WaitForCombine
/declare count local
/for count 1 to 10
/delay 1
/doevents
/if (${LastFail}==1) /return
/if (${Cursor.ID}) /goto :PutAwayArrows
/next count
:PutAwayArrows
/notify InventoryWindow IW_CharacterView leftmouseup
/delay 4
/notify InventoryWindow IW_CharacterView leftmouseup
/delay 2
:WaitDrop
/delay 2
/if (${Cursor.ID}) /goto :WaitDrop
/return
Sub SellItem
/doevents
/if (${LastFail}==1) /return
/${FindItem[Arrow]}
/declare count local
/for count 1 to 10
/delay 1
/doevents
/if (${LastFail}==1) /return
/if (${LastSuc}==1) /goto :DoSellItem
/next count
| /if $getlasterror==FIND_NOTFOUND /return
:DoSellItem
/shift /notify MerchantWnd MW_Sell_Button leftmouseup
/delay 20
:WaitForSale
| Until the arrows disappear from inventory, we loop...
/if (${Item[pack${CombinerID}].Item.Item[0].Name.Find[Arrow]}) {
/delay 20
/goto :WaitForSale
}
/shift /notify MerchantWnd MW_Sell_Button leftmouseup
/return
Sub Event_ErrorCombine
/endmacro
/return
Sub Event_FailedCombine
/varset LastFail 1
|/echo Detected Fail
/return
Sub Event_SuccessCombine
/varset LastSuc 1
|/echo Detected Combine
/return

