--Combines reasonably fast, without "missing" or skipping
--Will not create more arrows after you've reached an important skill level, 1 arrow per round, then skillcheck.
--Sell Arrows will wait until the arrows are actually sold
--Uses event checking to speed up delays
--Doesnt attempt to do uneeded steps (could improve on this later)
--WILL NOT BUY ITEMS YOU ALREADY HAVE, if you stop the macro half way thru a combine, you can start again and it will finish the half done one before starting the next.
Code: Select all
| PowerArrows.mac
| Original by macrotoon
| 1. Put your fletching kit in your FIRST inventory slot
| 2. Click open the merchant you wish to use
|
| Notes: If this fails in ShadowHaven, try the POK or another vendor
| An unfixed locations bug causes it to fail to sell the arrows
| on certain merchants.
|
| DO NOT AFK MACRO
|
#turbo
#define CurFletchSkill v1
#define LastFail v4
#define LastSuc v5
#define CombinerID v88
#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
/varset CombinerID 99
/if "$pack(0,combine)"=="Fletching" /varset CombinerID 0
/if n $CombinerID==99 {
/echo The Fletching kit *MUST* be in the first inventory slot
/return
/endmacro
}
:SkillCheck
| /skill Fletch
/varset CurFletchSkill $char(skill,"fletching")
/if n $CurFletchSkill<30 /call MedGroveNock
/if n $CurFletchSkill<65 /if n $CurFletchSkill>=30 /call BoneShaft
/if n $CurFletchSkill<100 /if n $CurFletchSkill>=65 /call HookedArrowHead
/if n $CurFletchSkill<130 /if n $CurFletchSkill>=100 /call CeramicShaft
/if n $CurFletchSkill<160 /if n $CurFletchSkill>=130 /call BoneVanes
/if n $CurFletchSkill<195 /if n $CurFletchSkill>=160 /call CeramicVanes
/if n $CurFletchSkill>=195 {
/echo Your skill cannot be increased more than 195 with this script If you wish to raise skill higher you can change the script to do so.
/cleanup
/endmacro
}
/goto :SkillCheck
Sub MedGroveNock
/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 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 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 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 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,$p1,name)"=="$p0" /return
/selectitem "$p0"
/delay 1
/sendkey up shift
/buyitem 1
:WaitBuy
/delay 1
/if "$item($CombinerID,$p1,name)"!="$p0" /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
/for v75 1 to 10
/delay 1
/doevents
/if n $LastFail==1 /return
/if $cursor()==TRUE /goto :PutAwayArrows
/next v75
:PutAwayArrows
/click left auto
:WaitDrop
/delay 1
/if $cursor()==TRUE /goto :WaitDrop
/return
Sub SellItem
/doevents
/if n $LastFail==1 /return
/finditem similar "Arrow"
/for v75 1 to 10
/delay 1
/doevents
/if n $LastFail==1 /return
/if n $LastSuc==1 /goto :DoSellItem
/next v75
/if $getlasterror==FIND_NOTFOUND /return
:DoSellItem
/sendkey down shift
/delay 1
| 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
/if "$item($CombinerID,0,name)"~~"Arrow" {
/delay 1
|/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




donations for this month's patches.