#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
/if "$pack(0,combine)"=="Fletching" /varset CombinerID 0
:SkillCheck
| /skill Fletch
/varset CurFletchSkill $char(skill,"fletching")
/if n @CurFletchSkill<46 /if n @CurFletchSkill>=36 /call ParabolicFletch
/if n @CurFletchSkill<56 /if n @CurFletchSkill>=46 /call SmallGrooveNock
/if n @CurFletchSkill<68 /if n @CurFletchSkill>=56 /call BoneShaft
/if n @CurFletchSkill<82 /if n @CurFletchSkill>=68 /call ShieldFletch
/if n @CurFletchSkill<102 /if n @CurFletchSkill>=82 /call HookedArrowHead
/if n @CurFletchSkill<122 /if n @CurFletchSkill>=102 /call WoodVane
/if n @CurFletchSkill<135 /if n @CurFletchSkill>=122 /call CeramicShaft
/if n @CurFletchSkill<162 /if n @CurFletchSkill>=135 /call BoneVanes
/if n @CurFletchSkill<182 /if n @CurFletchSkill>=162 /call SilverArrowHead
/if n @CurFletchSkill<202 /if n @CurFletchSkill>=182 /call CeramicVanes
/if n @CurFletchSkill>=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 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 "$item(@CombinerID,@Param1,name)"=="@Param0" /return
/selectitem "@Param0" merchant
/delay 1
/sendkey up shift
/buyitem 1
:WaitBuy
/delay 1
/if "$item(@CombinerID,@Param1,name)"!="@Param0" /goto :WaitBuy
/return
Sub MakeArrows
/if $pack(@CombinerID,closed)==TRUE {
/echo You *MUST* have your fletching kit open..
/endmacro
}
/varset LastFail 0
/varset LastSuc 0
/click left pack @CombinerID combine
:WaitForCombine
/delay 1
/if $pack(@CombinerID,empty)==FALSE /goto :WaitForCombine
/declare count local
/for count 1 to 10
/delay 1
/doevents
/if n @LastFail==1 /return
/if $cursor()==TRUE /goto

utAwayArrows
/next count

utAwayArrows
/click left auto
:WaitDrop
/delay 1
/if $cursor()==TRUE /goto :WaitDrop
/return
Sub SellItem
/doevents
/if n @LastFail==1 /return
/finditem similar "Arrow"
/declare count local
/for count 1 to 10
/delay 1
/doevents
/if n @LastFail==1 /return
/if n @LastSuc==1 /goto

oSellItem
/next count
/if $getlasterror==FIND_NOTFOUND /return

oSellItem
/sendkey down shift
/delay 20
| This check is to make sure the arrows actually landed in the inventory and not
| in the range supply (ammo) slot :)
/if "$item(@CombinerID,0,name)"~~"Arrow" /click left merchant buy
|
|
:WaitForSale
| Until the arrows disappear from inventory, we loop...
/if "$item(@CombinerID,0,name)"~~"Arrow" {
/delay 20
|/echo $item(@CombinerID,0,name)
/goto :WaitForSale
}
/sendkey up shift
/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