editing combine.mac

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

Moderator: MacroQuest Developers

jago
orc pawn
orc pawn
Posts: 13
Joined: Tue Oct 01, 2002 2:15 am

editing combine.mac

Post by jago » Thu Oct 24, 2002 9:34 pm

trying to edit combine.mac so that I can combine more than 4 items, however the code im using locks up my everquest and doesnt work, can anyone see whats wrong?

Code: Select all

#turbo
Sub Main 
   /call FindCombiner $p0 
   /if $return==99 /return 
   /varset v80 $return 

   /cleanup 
   /click right inv $v80 

   /varset v39 0 
   /if "$cursor()"=="TRUE" /click left auto 
   :cleanpack 
   /if $pack($v80,empty)==FALSE /call CleanPack 
   /if n $v39==30 /goto :TooFull 
   /varadd v39 1 
   /if $pack($v80,empty)==FALSE /goto :cleanpack 

   /if "$cursor()"=="TRUE" /click left auto 

   :MakeItem 
      /sendkey down ctrl 

      /finditem similar "$p1" 
      /if $find()==FALSE /goto :Done 
      /click left pack $v80 0 

      /finditem similar "$p2" 
      /if $find()==FALSE /goto :Done 
      /click left pack $v80 1 

      /if "$p3"=="" /goto :Combine 
      /finditem similar "$p3" 
      /if $find()==FALSE /goto :Done 
      /click left pack $v80 2 

      /if "$p4"=="" /goto :Combine 
      /finditem similar "$p4" 
      /if $find()==FALSE /goto :Done 
      /click left pack $v80 3 

      /if "$p5"=="" /goto :Combine 
      /finditem similar "$p5" 
      /if $find()==FALSE /goto :Done 
      /click left pack $v80 4

      :Combine 
        /sendkey up ctrl 
        /click left pack $v80 combine  

      :WaitCombine 
        /if $pack($v80,empty)==FALSE /goto :WaitCombine 

      :AutoDrop 
        /click left auto 
        /delay 1 
        /if "$cursor()"=="TRUE" /goto :AutoDrop 


   /goto :MakeItem 

    :TooFull 
       /echo You are too full on stuff, aborting macro. 
       /cleanup 
       /end 

   :Done 
    /sendkey up ctrl 

/return 

Sub CleanPack 
   /varcalc v2 $pack($v80,slots)-1 
   /sendkey down shift 
   /for v1 0 to $v2 
      /if "$item($v80,$v1)"=="NULL" /goto :skipclean 
      /click left pack $v80 $v1 
      :cleanwait0 
       /if "$cursor()"!="TRUE" /goto :cleanwait0 
      /click left auto 
      :cleanwait1 
       /if "$cursor()"=="TRUE" /goto :cleanwait1 
  :skipclean 
   /next v1 
   /sendkey up shift 
/return 

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

Gengis
a ghoul
a ghoul
Posts: 116
Joined: Wed Aug 14, 2002 7:46 pm

Post by Gengis » Thu Oct 24, 2002 11:33 pm

MQ only supports $p0 - $p4 otherwise I would of included it in the macro.

$p0 is the container your using to combine the items.

$p1 through $p4 are the items you wish to combine.

jago
orc pawn
orc pawn
Posts: 13
Joined: Tue Oct 01, 2002 2:15 am

Post by jago » Fri Oct 25, 2002 2:00 am

k ty

-Mqz-
orc pawn
orc pawn
Posts: 10
Joined: Thu Oct 17, 2002 1:29 am

Post by -Mqz- » Fri Oct 25, 2002 5:26 am

Well, if you do want a 5 item combine.mac, you 'could' make a CombineSmith.mac and change the lines with

/call FindCombiner $p0 to /call FindCombiner forge
/finditem similar "$p5" to /finditem similar "$p0"

And then you got a 5 item combine :)


You always need water in smithing, right? So you could also add a

/finditem similar "water"
/if $find()==FALSE /goto :Done
/click left pack $v80 5

And make it a "6" item combine..
(Im new to all this, but think it should work)

And just make a CombineSewing.mac where it automaticaly target the sewing kit, etc etc.. Should give you a few extra mac's, but should take care of your 5-6 item combine. Just my 5 cents.
Your just jalous because the voices are talking to me.

User avatar
ap50
a snow griffon
a snow griffon
Posts: 425
Joined: Sun Aug 18, 2002 2:29 pm

Post by ap50 » Fri Oct 25, 2002 7:49 am

*edit* D'UH me!
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]