powerarrow

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Hoho
decaying skeleton
decaying skeleton
Posts: 6
Joined: Fri Apr 16, 2004 2:25 pm

powerarrow

Post by Hoho » Fri Apr 16, 2004 2:34 pm

ok, i use default ui, no window cuts each other, flething kit is in first inv slot, target is vendor, and vendor window open, fletching kit open, inventory too(through the vendor window)

than i start via /macro powerarrow

he gives out a msg Field Point Arrowheads is in slot1, than eq client crashes to desktop

when i log back in there is 1 Field Point Arrowheads in the first slot of my fletching kit....any1 could help me ?

Hoho
decaying skeleton
decaying skeleton
Posts: 6
Joined: Fri Apr 16, 2004 2:25 pm

Post by Hoho » Fri Apr 16, 2004 2:43 pm

#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 :PutAwayArrows
/next count

:PutAwayArrows
/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 :DoSellItem
/next count

/if $getlasterror==FIND_NOTFOUND /return
:DoSellItem
/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




thats the code i use, my skill is at 37

Hoho
decaying skeleton
decaying skeleton
Posts: 6
Joined: Fri Apr 16, 2004 2:25 pm

Post by Hoho » Mon Apr 19, 2004 7:22 am

/bump

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Mon Apr 19, 2004 7:47 am

Make sure you've downloaded and compiled the latest .zip version of MQ2 and try again. There is nothing wrong with the code from what I see.

User avatar
SimpleMynd_01
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu May 08, 2003 3:16 pm

Post by SimpleMynd_01 » Mon Apr 19, 2004 8:18 am

Code: Select all

/selectitem "@Param0" merchant 
Is the likely culprit. Watch this thread for a fix.

-SimpleMynd