Request: Conversion of PowerArrows *2*

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

seph_yaro
a lesser mummy
a lesser mummy
Posts: 72
Joined: Sat Jul 26, 2003 1:12 pm

Request: Conversion of PowerArrows *2*

Post by seph_yaro » Wed Oct 15, 2003 4:16 pm

I've looked at this, and tried to figure out how to do this myself, but quite frankly, I stink at making these macro's. So, I'm going to request this one converted - Sits.mac is great, but I like how this one if just for fletching.

Thank you to anyone who does this, this macro is mind bogglingly long, seemingly, to me.

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 

Zxeses
a ghoul
a ghoul
Posts: 103
Joined: Tue Jan 07, 2003 4:17 pm

Post by Zxeses » Wed Oct 15, 2003 5:12 pm

I'll be working on my update right now, will post it in about 15 minutes or less.

-Zx

Zxeses
a ghoul
a ghoul
Posts: 103
Joined: Tue Jan 07, 2003 4:17 pm

Post by Zxeses » Wed Oct 15, 2003 5:20 pm

Here ya go... Untested, let me know if it works (or doesnt)

Write down the errors and post em.

Code: Select all


|
|  PowerArrows.mac
|  Original by macrotoon
|  Updated & Updated again by Zxeses
|
| 1. Put your fletching kit in your FIRST inventory slot
| 2. Click open the merchant you wish to use
|
|   Do not move any windows around after you zone in
|
|   DO NOT AFK MACRO
|

#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
/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>=199 {
   /echo Your skill cannot be increased more than 199 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(p0,p1)
      /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

      /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 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
   | Until the arrows disappear from inventory, we loop...
   /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

User avatar
Clone39
a ghoul
a ghoul
Posts: 91
Joined: Mon Jul 07, 2003 7:26 pm
Location: Montreal, Canada

Post by Clone39 » Wed Oct 15, 2003 9:13 pm

didnt test this yet but THANK YOU.. this macro is just awesome. thanks for the conversion!

Clone39


*** EDIT ***

it doesnt work.. it buys 2 arrow head and stops there.. probly something wrong in the BuyItemSimgle sub.. i tried to look at it but i really don't know what i'm looking at.. :(

GD
a snow griffon
a snow griffon
Posts: 353
Joined: Sat Jun 29, 2002 11:57 pm

Post by GD » Wed Oct 15, 2003 11:29 pm

Code: Select all

Sub BuyitemSingle([color=red]@Param0[/color],[color=red]@Param1[/color]) 
      /delay 1 
      /if "$item(@CombinerID,[color=red]@Param1[/color],name)"=="[color=red]@Param0[/color]" /return 
      /selectitem "[color=red]@Param0[/color]" 
      /delay 1 
      /sendkey up shift 
      /buyitem 1 
    :WaitBuy 
      /delay 1 
      /if "$item(@CombinerID,[color=red]@Param1[/color],name)"!="[color=red]@Param0[/color]" /goto :WaitBuy 
/return 
From what I could tell, you only renamed the Params from $P# to just @P#, rather than @Param#
Opinions are like assholes, everyone has one, but most of them stink.

Guest

Post by Guest » Thu Oct 16, 2003 2:33 pm

still it doesnt work.. buys 1 of the selected arrowhead, wich is not the one needed for my skill lvl, and stops there.

i remeber reading something about some cases where @Param doesnt need the @ in front..

Code: Select all

Sub BuyitemSingle(@Param0,@Param1)
like in this case.. the original macro didnt have $ in front of p0.. is it possible that the error is coming from there?

like i said before i have no programming or scripting skills whatsoever so i might be totally way off the track here.. but hey, im trying.. hehe

thanks

Clone39

Lawyer
decaying skeleton
decaying skeleton
Posts: 4
Joined: Thu Oct 16, 2003 7:19 am
Contact:

Post by Lawyer » Thu Oct 16, 2003 4:14 pm

The errors that I have noticed are:

1: The macro only buys one item, and the item is whatever is highlighted in the merchant sell menu. It defaults to the first item for sale, but if you highlight something else, it will buy a single one of those instead. Grimjack suggested adding merchant to /selectitem "@Param0", so it would read /selectitem "@Param0" merchant. No luck there.

2: The macro actually stops working at the :WaitBuy command. It seems to endlessly loop there, so im thinking it is a @Param issue, but im still learning. Here is a snippet.

Code: Select all

    Sub BuyitemSingle(@Param0,@Param1) 
      /delay 1 
      /if "$item(@CombinerID,@Param1,name)"=="@Param0" /return
      /selectitem "@Param0" 
      /delay 1 
      /sendkey up shift 
      /buyitem 1 
      [b]:WaitBuy 
      /if "$item(@CombinerID,@Param1,name)"!="@Param0" /goto :WaitBuy[/b] 
      /delay 1 
  /return 
I have been trying a few things, but since my experience is limited with MQ (for now)... I have not had any luck.

reece
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Oct 14, 2003 9:45 am

Same Problem

Post by reece » Thu Oct 16, 2003 9:49 pm

I am having the same problem with the /selectitem "@Param0" merchant line. any ideas?

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Fri Oct 17, 2003 8:10 am

yes I have a few ideas, but first of all adding merchant to the /selectitem line is not a suggestion, its a nececity, thats how that command works...

Now, I know you problem is either

1. you dont have the latest zip compiled
or
2. The macro is fuxxed

here is how you find out.

go in game open a merchant that sells water and manually type /selectitem "water flask" merchant the press enter, if it does not select the water your version of MQ needs to be updated, go get the latest zip on the downloads page.
If it does select the water, you know that "@Param0" in your macro obviously doesnt contain a valid itemname, since if it would, it would select it...

to figure out what @Param0 "contains" do a /mqlog "Param0"="@Param0" right before the selectitem piece, and you will get that figured out...
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

Lawyer
decaying skeleton
decaying skeleton
Posts: 4
Joined: Thu Oct 16, 2003 7:19 am
Contact:

Post by Lawyer » Fri Oct 17, 2003 1:39 pm

Ok, I have a complete and working version now. There were two issues with Zxeses' version, after GD's @Param conversion.

Problem 1: Sub BuyitemSingle(@Param0,@Param1). Thanks to Valerian, this was resolved. You do not need a parameter list if you are using the default parameters. Once (@Param0,@Param1) was removed, it worked fine until...

Problem 2: now I look over it, it seemed to be a copy/paste error. As much as that doesnt seem likely... so ignore it.

So, Zxeses code should work fine with modification stated above. Works for me quite nicely.

User avatar
Clone39
a ghoul
a ghoul
Posts: 91
Joined: Mon Jul 07, 2003 7:26 pm
Location: Montreal, Canada

Post by Clone39 » Fri Oct 17, 2003 7:27 pm

thank you very much EQMule00, it did the trick and the macro is now working perfectly.. thanks to all of you who helped us on that problem..

:)

Clone39

CircuitFlux
decaying skeleton
decaying skeleton
Posts: 7
Joined: Sat Dec 20, 2003 3:49 pm

Post by CircuitFlux » Sat Dec 20, 2003 3:53 pm

Just an update for those who use this, Sony has modified the speed at which merchants will buy stuff. So if you are using this one, change the delay on the purchase portion to:

Code: Select all

| 
|  PowerArrows.mac 
|  Original by macrotoon 
|  Updated & Updated again by Zxeses 
|  And updated again by CircuitFlux
|
| 1. Put your fletching kit in your FIRST inventory slot 
| 2. Click open the merchant you wish to use 
| 
|   Do not move any windows around after you zone in 
| 
|   DO NOT AFK MACRO 
| 

#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 
/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>=199 { 
   /echo Your skill cannot be increased more than 199 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,@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 
   [b]/delay 20[/b] 
   | 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" { 
       [b]/delay 20 [/b]
       |/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

Space-Boy
a hill giant
a hill giant
Posts: 242
Joined: Wed Dec 04, 2002 12:53 pm
Contact:

Post by Space-Boy » Sat Dec 20, 2003 9:25 pm

thanks for the update =) id still take out the turbo personally, not nec for TS macs anymore with all the changes to combine rates and sell rates
You have gotten better at Carpal Tunnel! (247)

CircuitFlux
decaying skeleton
decaying skeleton
Posts: 7
Joined: Sat Dec 20, 2003 3:49 pm

Post by CircuitFlux » Sun Dec 21, 2003 11:46 pm

thats true. good call

hiyall
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Dec 25, 2003 11:40 am

Post by hiyall » Thu Dec 25, 2003 11:43 am

Upon starting the macro, the message 'Field Point Arrowheads' Found in slot '-5997' is displayed and then nothing more happens until I type in /endmacro ;(

Any ideas what I am messing up?