MQ working, macro not working

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

Moderator: MacroQuest Developers

SuperSlowClicker
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Jul 03, 2003 1:41 am

MQ working, macro not working

Post by SuperSlowClicker » Fri Jul 18, 2003 2:27 am

Ok, Running this macro to make Celestial Essences. It SORTA Works, but once it starts I have to Ctrl-Alt-Delete /kill EQ..

It seems to lock me out of the game,

I cannot enter /end
My HOTKEY for /end will not work either
With my bags Closed it tries to click on them in the Inv window to get the ingredients so it will not end normally.
ALSO- When the macro is running all my movement is occurring like Ctrl key is mashed, all strafing no turning

Code: Select all

|   TradeSkill.mac - rudimentary tradeskill macro, 
|       now that /finditem works.  ATM it doesn't support 
|       enviro containers.  ALL containers in your inventory 
|       must be already open, and cannot have been moved 
|       since they were opened.  You may need to change the 
|       /delay 5 commands to something higher depending on 
|       your video and net lag.  Customizing it to a different 
|       recipe is quite easy- just replace the AddIngred 
|       lines with your own ingredients and replace the 
|       FindCombiner line with the name of the container you're 
|       using.  It's recommended you put the container you're 
|       going to combine in in slot 7 so products don't stack up 
|       in it. 

#turbo 

#define CombinerPack v97 
#define IngredSize v98 

#chat tell 

Sub Main 
    /press ctrl 
    /press alt 
    /press shift 

    /varset IngredSize 0 

    /call AddIngred "The Scent of Marr"       | List of ingredients.  The AddIngred 
    /call AddIngred "Celestial Solvent"       | subroutine automatically sets the index. 
 
    /call FindCombiner "mortar and pestle"    | Name of the container to combine in. 
                                              | It's highly recommented to put the combine 
                                              | container in slot 7. 

    /echo $CombinerPack 

    :RunMake 

    /press shift 
    /sendkey down ctrl 
    /delay 3 
    /for v99 0 to $v90 
        /if $pack($p0,empty)==FALSE { 
            /call ClearPack 
            /press shift 
            /sendkey down ctrl 
        } 
        /call ClearCursor 

        /finditem "$a(0,$v99)" 
        /delay 6 
        /if $find()==FALSE { 
            /goto :Done 
        } 
        /click left pack $CombinerPack $v99 
        /delay 6 
    /next v99 

    /click left pack $CombinerPack combine 
    /doevents 
    /goto :RunMake 

    :Done 
/return 

Sub ClearCursor 
    :Start 
        /if $cursor()!=NULL { 
            /click left auto 
            /delay 6 
        } 
        /delay 1 
    /if $cursor()!=NULL /goto :Start 
/return 

Sub ClearPack 
    /call ClearCursor 

    /if $pack($p0,empty)==TRUE /goto :Finished 
    :ReClear 
    /press ctrl 
    /sendkey down shift 

    /varcalc v50 $pack($p0,slots)-1 
    /delay 5 
    /for v99 0 to $v50 
        /click left pack $p0 $v99 
        /delay 6 
        /call ClearCursor 
    /next v99 
    /if $pack($p0,empty)==FALSE /goto :ReClear 

    :Finished 
/return 

Sub AddIngred 
    /varset v90 $IngredSize 
    /varset a(0,$IngredSize) "$p0" 
    /varcalc IngredSize $IngredSize+1 
    /echo $p0 
/return 

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

    /if $CombinerPack==99 { 
        /echo No container named "$p0" found. 
        /endmacro 
    } 
/return $CombinerPack 

Sub Event_Chat 
    /endmacro 
/return

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Fri Jul 18, 2003 3:09 am

Well, it's your macro, you debug it.

You might add a few of these, though:
/sendkey up ctrl

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

Post by EqMule » Fri Jul 18, 2003 3:21 am

and you should really run eqw, because then you can release the mouse and that will let you type /endmacro
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.

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

Post by Kint » Fri Jul 18, 2003 5:26 am

press the ctrl key once and then type /end really fast or hit your end hotkey. EqW is very helpfull too like eqmule said.

SuperSlowClicker
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Jul 03, 2003 1:41 am

Post by SuperSlowClicker » Sun Jul 20, 2003 11:16 pm

Actually, it's NOT my macro. :)

Because I'm not the author, I honestly have no idea what /sendkey up ctrl will do or where to put it.

It's a macro that I got from the boards here, and it worked PERFECTLY before the last patch. I had no issues with /end or being locked out of my keyboard. and at that time if I was having a problem with a script, I could always hit enter and /end one char at a time and eventually kill the macro. Currently I cannot even Alt-Shift-R to get out of the window. the ONLY keyboard command that does anything is Ctrl-Alt-Delete

My reason for posting this here was an attempt to help the community by pointing out some strange behaviour in MQ since the patch. It is possible that I'm the only one with this problem or that this problem is soley with this script.

But, as I said above, this script worked flawlessly before the patch.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Mon Jul 21, 2003 3:14 am

Nope, that macro was/is not flawless, that's for sure.

fryfrog
a hill giant
a hill giant
Posts: 271
Joined: Fri Jun 20, 2003 5:37 am

Post by fryfrog » Mon Jul 21, 2003 6:04 am

check out the trade skill macro called "ts.mac" it is quite a bit better than the one you are trying to use, and i would say it is tons easier to use. it has some problems with environmental containers, so you may want to check out my post at the very end for a fixed up version. it would work if /click left item were working, thats the only thing that seems to bomb it :)

eqjoe
a grimling bloodguard
a grimling bloodguard
Posts: 984
Joined: Sat Sep 28, 2002 12:26 pm

Post by eqjoe » Mon Jul 21, 2003 6:56 pm

Create an event that sets a variable ... check the state of that variable every pass and if it is "TRUE", call a sub that ends the macro. So, you can trigger the event by simply "saying" something ingame.

SuperSlowClicker
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Jul 03, 2003 1:41 am

Post by SuperSlowClicker » Tue Jul 22, 2003 3:12 am

I tried ts.mac and (maybe it was me) I couldn't get it to work. When I tried this one it worked fine.

What I meant by the statement that this script worked flawlessly, was that it did what it was supposed to do. It worked and I was able to interrupt it if i needed to. Now that is not possible.

Maybe whatever changed between then and now will allow ts.mac to work for me now. :D

I'll give it a shot.


As far as "creating an event"...

/em begins stare off into space without a clue

fryfrog
a hill giant
a hill giant
Posts: 271
Joined: Fri Jun 20, 2003 5:37 am

Post by fryfrog » Tue Jul 22, 2003 4:21 am

in the ts thread, i would suggest posting what your problem with it was. there are a few simple things you could run into, by default the code at the top will NOT work with world containers. you can either edit it to work yourself or scroll down to my post and use the slightly modified one i did. the only other hardish part would be setting the delay (i would suggest 4 instead of 2) and then getting the syntax right for starting it. also, you DO have to change ONE setting in the MQ source and recompile it. maybe that was your original issue.

SuperSlowClicker
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Jul 03, 2003 1:41 am

Post by SuperSlowClicker » Tue Jul 22, 2003 4:39 am

Ok ts.mac works now.. weird, maybe my problem before was one of not enough understanding, maybe it was a problem in the first script, Either way, I copied the second ts.mac in the thread and that works fine now.

There was no need to recompile, (unless that change was updated in CVS already) as I don't need 10 ingredients.


I added in this little gem and it helps me out to end the macro if I want to cut it off fast.

Code: Select all

/if $target(name)==$char(name) /endmacro
Thanks to all for their suggestions and help, love the project!

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

Post by ap50 » Tue Jul 22, 2003 7:34 am

I like the self-target thing, quick, simple and effective, saves creating a /ENDMACRO hotkey.
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]

fryfrog
a hill giant
a hill giant
Posts: 271
Joined: Fri Jun 20, 2003 5:37 am

Post by fryfrog » Tue Jul 22, 2003 9:05 am

If you don't edit the max stack vars, you will only be able to do up to 7 ingrediants (9 total variables) before it messes up. I added a work around into mine that WILL work with 8 components (10 variables), but I am not sure what happens when you go above 10 total variables w/o modifying the MAX_STACKVARS.

This was all done on accident because 1) I thought I HAD set MAX_STACKVARS to 30 and 2) I forgot to do an nmake clean in the / dir (I did it in EQLib but forgot it when I went back one dir). I posted the updated version :)