arrows mac

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

macrolover
a ghoul
a ghoul
Posts: 107
Joined: Sun Jul 14, 2002 9:19 am

arrows mac

Post by macrolover » Tue Sep 03, 2002 11:12 am

does anyone know why this macro ends before it does the combine. it will combine but before you get the messege for the combine you get the macro has ended msg.
[[L124RD loves them dern code brackets]]

Code: Select all

 | - Arrows.mac -
|

#event CombineFail "You lacked the skills to fashion the items together."
#event CombineSuceed "You have fashioned the items together to create something new!"

Sub Main
   /call FindCombiner Fletching
   /varset v80 $return
   /if $return==99 /return 

   /cleanup
   /click right inv $return
   :MakeArrows
      /sendkey down ctrl

      /finditem similar "Fletching"
      /click left pack $v80 0

      /finditem similar "Nock"
      /click left pack $v80 1

      /finditem similar "Shaft"
      /click left pack $v80 2

      /finditem similar "Arrowhead"
      /click left pack $v80 3

      /sendkey up ctrl
      /click left pack $return combine


      /if "$item($v80,0,name)"~~"Arrowhead" /if "$item($v80,1,name)"~~"Shaft" /if "$item($v80,2,name)"~~"Fletching" /if "$item($v80,3,name)"~~"nock" /goto :DoCombine 
      /sendkey up ctrl
      /return 

      :DoCombine 
      /varset v61 0 
      /doevents flush
      /varset t9 30s
      /click left pack $v80 combine 
      /goto :DropArrows 
      
      :DropArrows 
         /doevents
      /if n $v61==0 /if n $t9>0 /goto :DropArrows 
      /doevents flush
      /if $cursor()!=TRUE /if n $v61<2 /goto :MakeArrows
      :WaitCursor
	 
      /if $cursor()!=TRUE /goto :WaitCursor
      /click left auto 
   /goto :MakeArrows 
/return

Sub Event_CombineFail 
   /varset v61 1
/return 

Sub Event_CombineSuceed 
   /varset v61 2 
/return 

Sub FindCombiner 
   /varset p2 99 
   /for v99 0 to 7 
      /if "$pack($v99,combine)"=="$p0" /varset p2 $v99 
   /next v99 
/return $p2 

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Tue Sep 03, 2002 12:02 pm

theres another post around here that has the same question, look for it, im not sure where it is is atm though ;p

macrolover
a ghoul
a ghoul
Posts: 107
Joined: Sun Jul 14, 2002 9:19 am

Post by macrolover » Wed Sep 04, 2002 3:06 am

thanks for putting in the code brackets they would not go in when i tried to put them in.