Re-building macros, questions on efficiency

Tribunalite

I ask a lot of questions!
Joined
Apr 23, 2006
Messages
286
Reaction score
4
Points
18
Location
USA
Since my return, I've been running my old macros, and noticed a few things:

1) I use aa_purchase.inc to get AAs - I get "variable already defined" now when I start my main macro if I used a different macro using the same include. The variable is set to outer, but I never ran into an issue that it was defined 2 yrs ago - I thought global was what to use if you're setting a variable you want to reuse

2) Should I use spell_routines (/call cast "Bob's AA" /alt) or use the direct /alt act 666?

3) Is there an advantage of using a macro to fire something vs using mq2melee?
 
A couple years ago eqmule changed the macro parser.

Depending on how old your macros / includes are you may run into problems with how undefined variables are treated.

You want to put "#warning" at the start of any macro file. This directive will automatically stop your macro when it accesses an undefined variable.

There was another change in how parameters are passed so you will want to double check that the data you think is getting passed is *IS* the data you are receiving. The change had to do with how null strings can end up being ""

Bottom line - If your code hasn't been fixed, its may need some loving.
 
1) I use aa_purchase.inc to get AAs - I get "variable already defined"

global = seen everywhere, doesn't go away when you /end your macro.
outer = seen everywhere, goes away when you /end your macro.

2) Should I use spell_routines (/call cast "Bob's AA" /alt) or use the direct /alt act 666?

If you use spell_routines make sure you get a new one. spell_routines can handle some of the trickery for pausing to make sure things happen so its still useful.

3) Is there an advantage of using a macro to fire something vs using mq2melee?

MQ2Melee is good if you don't care about when something is fired. If you want to make sure A -> B -> C happen then you want to do that in a macro. ( or get creative with the holyshits )