poison macro to 105 or so

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

User avatar
Kint
a hill giant
a hill giant
Posts: 208
Joined: Thu Mar 13, 2003 3:36 am

poison macro to 105 or so

Post by Kint » Sat Jun 28, 2003 2:09 am

Code: Select all

#define Droot v0  
#define ArootClick v1
#define slot v2
#define poison v3

 Sub Main 
/if $p0=="" {
/echo you need to specify which slot your mortar & pestle is (0-7)
/endmacro }
/varset slot $p0
/sendkey down ctrl
:loop
/varset Droot 0
/varset ArootClick 0
 /click right inv $slot
/goto :vial

:vial
/if "$cursor(name)"!="Lined Poison Vial" /finditem "Lined Poison Vial"
/delay 1s
/if "$cursor(name)"!="Lined Poison Vial" /goto :vial
/click left pack $slot 5
/delay 1s
/goto :root

:root
/finditem "alocasia root"
/delay 1s
/if "$cursor(name)"!="Alocasia Root" /goto :root
/varadd Droot 1
/click left pack $slot $ArootClick
/varadd ArootClick 1
/if n "$Droot"!="2" /goto :root
/goto :suspension

:suspension
/finditem "Constrict Suspension"
/delay 1s
/if "$cursor(name)"!="Constrict Suspension" /goto :suspension
/click left pack $slot 3
/goto :combine

:combine
/mouseto 830 450 abs
/delay 1s
/click left
/delay 1s
/if "$cursor(name)"=="atrophic sap" /click left auto
/delay 1s
/if "$cursor(name)"=="Lined Poison Vial" /click left auto
/goto :loop
only problom I seem to have is when I run out of ingredients in an open back it crashes

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sat Jun 28, 2003 4:07 am

Well, one obvious thing I see wrong is you are missing /return as the last line for Sub Main. Not sure if this would be the reason for the crash but might be why.

Also, are you using the default containers? I see some code in there that could be simplified quite a bit if you are. I assume you are because I see you are placing items in specific slots using /click left <pack> <slot>.

I took the liberty of editing your macro to simplify it:

Code: Select all

#define slot v2
#define poison v3

Sub Main
    /if $p0=="" {
        /echo you need to specify which slot your mortar & pestle is (0-7)
        /goto :EndIt
    }

    /varset slot $p0

    /sendkey down ctrl

    :vial
    /finditem "lined poison vial"
    /delay 5
    /if "$cursor(name)"!="lined poison vial" /goto :vial
    /click left pack $slot 0
    /delay 1s

    :root
    /delay 5
    /finditem "alocasia root"
    /delay 5
    /if "$cursor(name)"!="alocasia root" /goto :root
    /click left pack $slot 1

    :root2
    /delay 5
    /finditem "alocasia root"
    /delay 5
    /if "$cursor(name)"!="alocasia root" /goto :root2
    /click left pack $slot 2

    :suspension
    /delay 5
    /finditem "constrict suspension"
    /delay 5
    /if "$cursor(name)"!="constrict suspension" /goto :suspension
    /click left pack $slot 3

    :combine
    /delay 6
    /click left pack $slot combine
    /delay 5
    /click left auto
    /delay 5
    /goto :loop

    :EndIt
    /sendkey up ctrl
    /zapvars
    /endmacro

/return
Look at my modifications and maybe you might want to try this one instead. Some of the delays might need to be modified though.

User avatar
Kint
a hill giant
a hill giant
Posts: 208
Joined: Thu Mar 13, 2003 3:36 am

Post by Kint » Sat Jun 28, 2003 7:28 am

since the mortar and pestle is only a 6 slot pack MQ doesn't parse the combine button location correctly so I had to do an absolute mouseto. I can't believe I forgot the /return on the main too. I guess since yours saves the use of two variables it might be smaller memory wise, but a bit longer.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sat Jun 28, 2003 11:31 am

Kint wrote:since the mortar and pestle is only a 6 slot pack MQ doesn't parse the combine button location correctly so I had to do an absolute mouseto. I can't believe I forgot the /return on the main too. I guess since yours saves the use of two variables it might be smaller memory wise, but a bit longer.
I wasn't trying to annoy you, I was just trying to help.

As far as your Mortar and Pestle problem goes...

I use macros that have a Mortar and Pestle for the combiner. Using /click left <pack> combine works just fine.

Are you using the default UI container?