Not that I disagree with any of the help that you've received in this thread--almost all the advice here has been pretty sound, but I'd like to point out something fundamental that most macro developers for MQ2 miss:
Writing a macro for MQ2 often involves getting a slight grip on multi-threaded code (or at least the BEHAVIOR of multithreaded code). This is VERY hard for a new programmer to get their mind wrapped around.
Your dilemma is a classic example. You have three basic tasks:
1) Make a pet and/or target an existing pet.
2) Make a bunch of summoned gear.
3) Give summoned gear to the pet.
Seems pretty easy! It's not actually. The problem involves MQ2 executing macro statements as fast as it can but Everquest (client and more importantly the server) not being ready for the issuance of the subsequent statements. The easy fix (but not always the best one) is to hard-wire some delays inbetween activities to ensure that the client (or server) is ready for follow-up commands. For some things (such as this quick-and-dirty macro) using delays probably makes the most sense.
What if you wanted your macro to be a little smarter though? How bout "Can I make it such that if I move my Mage around after I start the macro that it won't try to make the next summoned item until I stop moving?" What if you forget to memorize one of your summon-item spells? What about if you get attacked in the middle of this? Can we make it stop? Your pet will be busy and hard to target. Hell, your pet may die from the time you fire the macro up until the time it finishes!
I know I know... That's all rediculous (if not rediculous, pretty remote at least) and you didn't ask for a macro that complex or robust. All I wanted to say is that it would behoove most macro-writers to start thinking of "game states" and "client states" when writing their macros, and check the MANY conditions when continuing with a macro activity before moving on to the next subsequent section of their macro.
Personally, I'd do this:
Code: Select all
Pseudocode/Logic:
1) Check for a pet.
a) If I have a pet, memspell summonpet (if not already), cast it.
b) If I don't have a pet, memspell makerathepet (if not already), cast it.
2) In a loop that checks for ${Me.SpellReady[${gem_slot_of_summoned_shit_spells}]} && !${Me.Moving}:
a) Make an item, and loop
3) Check if your pet is nearby, if not (maybe fail with a popup warning about him fighting) otherwise target it.
4) In a loop checking your cursor for an item, give stuff to your pet til cursor is empty.
A macro designed like this will be able to handle lag, and even pop-up situations that may get you in trouble. It's FAR from complete. There are so many things that can happen to make it fail it's mind-boggling. Your job is to catch the 99% solution and pray the other 1% doesn't happen!
Good luck,
--Jerle