Page 1 of 1

How do i use poison in a macro??

Posted: Fri Nov 15, 2002 8:50 pm
by ScOuT
I have been trying to get this Macro to work all day... i am typing in "/macro combine "Make Poison" "Creeper ivy" "creeper ivy" "etheral suspension" "sealed poison vial"" but when i do nothing happens, it says it can not find make... how the hell do i get it to use mortar and pestle?? this is pissing me off majorly can anyone help or modify this so it works and tell me exactly waht to type?? those are the four items i need to combine at a time to make what i want..

Code: Select all

| - Combine.mac 
| 
|Supports up to 9 items to combine in container 
| Usage is /macro combine "container" "item 1" "item 2" "item 3" Item 4" etc 
|   i.e. /macro combine tinkering "firewater" "bat wing" "metal shaft" 
| 
| Update: Now supports environmental containers, i.e. forge, pottery etc. 


Sub Main 

   /cleanup 
   /call FindCombiner $p0 
   /if $v10<=7 /call OpenInv 
   /if $v10==8 /call OpenEnv 
   /if $v10==99 { 
                 /echo "Cannot find container-Aborting" 
                 /end 
                } 

   :MakeItem 
      /sendkey down ctrl 

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

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

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

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

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

      /if "$p6"=="" /goto :Combine 
      /finditem similar "$p6" 
      /if $find()==FALSE /goto :Done 
      /click left $v20 5 

      /if "$p7"=="" /goto :Combine 
      /finditem similar "$p7" 
      /if $find()==FALSE /goto :Done 
      /click left $v20 6 

      /if "$p8"=="" /goto :Combine 
      /finditem similar "$p8" 
      /if $find()==FALSE /goto :Done 
      /click left $v20 7 

      /if "$p9"=="" /goto :Combine 
      /finditem similar "$p9" 
      /if $find()==FALSE /goto :Done 
      /click left $v20 8 

      :Combine 
        /sendkey up ctrl 
        /click left $v20 combine 

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

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

   /goto :MakeItem 

   :Done 
    /sendkey up ctrl 
    /cleanup 


/return 

Sub OpenInv 
   /varset v20 "pack $v10" 
   /cleanup 
   /click right inv $v10 
   /if $pack($v10,empty)==FALSE /call CleanPack 
/return 

Sub OpenEnv 
   /cleanup 
   /varset v10 e 
   /varset v20 enviro 
   /face item 
   /click left item 

   :WaitOpen 
   /if $pack($v10,open)==FALSE /goto :WaitOpen 

   /delay 5 
   /if $pack($v10,empty)==FALSE /call CleanPack 
/return 


Sub CleanPack 
   /sendkey down shift 
   /varcalc v2 $pack($v10,slots)-1 

   /for v1 0 to $v2 
   /click left $v20 $v1 
   /click left auto 
   /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 
   /if $v10==99 { 
                /itemtarget $p0 
                /if n $distance(item)<=20 /varset v10 8 
                } 
/return $v10 

Posted: Sat Nov 16, 2002 5:28 am
by Fippy
It is looking for a combiner called "make posion" instead of that put in the name of a mortar and pestle (it should be in the appenicies of the readme.htm)

yes.

Posted: Sat Nov 16, 2002 11:54 am
by ScOuT
yes i know it is, when u /identify the morta/pestle it comes up as "make poison" for the name of combine. so how the hell do i put it in? the space is what is screwing it up... i read someone else say they put return 7 because they always have their combine container there, how does this work? can i just put my morta/pestle in slot 7 and write /return 7 instead of the /fine thing?

yes.

Posted: Sat Nov 16, 2002 1:30 pm
by ScOuT
yes i know it is, when u /identify the morta/pestle it comes up as "make poison" for the name of combine. so how the hell do i put it in? the space is what is screwing it up... i read someone else say they put return 7 because they always have their combine container there, how does this work? can i just put my morta/pestle in slot 7 and write /return 7 instead of the /fine thing?

Posted: Sat Nov 16, 2002 2:54 pm
by Valerian
ok, I haven't tried this to find out for sure, but wouldn't changing

Code: Select all

/call FindCombiner $p0
to

Code: Select all

/call FindCombiner "$p0"
make it send the whole quoted "make poison" to the findcombiner sub, and thus make the findcombiner sub actually use both words?

Code: Select all

/macro combine "Make Poison" "Creeper ivy" "creeper ivy" "etheral suspension" "sealed poison vial"