Macro writing - quick tutorial

had a couple typos. Was wondering why buffs werent memming.

/declare DefaultGem string outer gem12

Same for DotsOn example. Though I changed my personal copy a little to be different based on group size.

Code:
/if (${Group.GroupSize}>3) {
/noparse /declare DotsOn string outer (${Me.GemTimer[${Me.Gem[${Dot1}]}]} && ${Me.GemTimer[${Me.Gem[${Dot2}]}]} && ${Me.GemTimer[${Me.Gem[${Dot3}]}]})
}
/if (${Group.GroupSize}<4) {
/noparse /declare DotsOn string outer (${Me.GemTimer[${Me.Gem[${Dot1}]}]} && ${Me.GemTimer[${Me.Gem[${Dot2}]}]} && ${Me.GemTimer[${Me.Gem[${Dot3}]}]} && ${LastDot4}==${Target.ID} && ${LastDot5}==${Target.ID} && ${LastDot6}==${Target.ID})
}
 
Dots were cycling too quickly on necro and occasionally caused it to skip one. Nice problem to have and all, but it is still a problem. So I fixed it by not allowing normal spells to cast unless at least 1 gem was not greyed out. aka global cooldown. I also had to change AAs to automatically /varset their Recast timer because spell_routines wasnt always detecting it for some reason. So some mobs it would cast once as intended, and other times they would cast over and over.

Also added a 1/10 second delay to instant sub so that it gave a small bit of breathing room to items/AAs otherwise it can bug item timers if you try to cast an AA before your item timer sets in. seems like an eq bug. been around awhile. your item clicks, but no red shade indicating it has a timer, even though it does.

Tested this for several hours on necro and worked exactly as intended. I dont have other classes to test with (nor do i plan on making or borrowing any) or I would assemble some other ones.
 
Posted an example mage macro but i realized i dont have the newest spell info for them. Wrote a subroutine to process anything on XTarget. You can use it for mezzing or heals or buffs or wtfever you can think of.

Code:
Sub XTarget(subname,int force)
/varset CurrentSub ${subname}
/declare i int local
/declare x int local

/for x 1 to 20
/if (!${Defined[${CurrentSub}${x}]}) /return
    /for i 1 to 10
        /if (${${CurrentSub}${x}${Me.XTarget[${i}].ID}}||!${Me.XTarget[${i}].ID}) /goto :skip
        /if (${${CurrentSub}Conditions${x}}||!${Defined[${CurrentSub}Conditions${x}]}) {
        /if (${Spell[${${CurrentSub}${x}}].TargetType.NotEqual[self]}) /squelch /tar id ${Me.XTarget[${i}].ID}
        /delay 1s ${Target.ID}==${Me.XTarget[${i}].ID}
            /if (${FindItem[${${CurrentSub}${x}}].InvSlot} && !${FindItem[${${CurrentSub}${x}}].Timer}) {
                /call Cast "${${CurrentSub}${x}}" item ${If[${Defined[${CurrentSub}Color]},${${CurrentSub}Color},Orange]}
                    /if (${Macro.Return.Equal[CAST_SUCCESS]}||${Macro.Return.Equal[CAST_NOTHOLD]}) {
                        /if (!${Defined[${CurrentSub}${x}${Me.XTarget[${i}].ID}]}) /declare ${CurrentSub}${x}${Me.XTarget[${i}].ID} timer outer
                        /if (${Defined[${CurrentSub}Recast${x}]}) /varset ${CurrentSub}${x}${Me.XTarget[${i}].ID} ${${CurrentSub}Recast${x}}
                    }
                }
            /if (${Me.AltAbilityReady[${${CurrentSub}${x}}]}) {
                /call Cast "${${CurrentSub}${x}}" alt ${If[${Defined[${CurrentSub}Color]},${${CurrentSub}Color},Orange]}
                        /if (!${Defined[${CurrentSub}${x}${Me.XTarget[${i}].ID}]}) /declare ${CurrentSub}${x}${Me.XTarget[${i}].ID} timer outer
                        /if (${Defined[${CurrentSub}Recast${x}]}) /varset ${CurrentSub}${x}${Me.XTarget[${i}].ID} ${${CurrentSub}Recast${x}}
                }    
            /if (${Me.SpellReady[${${CurrentSub}${x}}]}||${Me.Book[${${CurrentSub}${x}}]} && ${force} && !${Me.AltAbility[${${CurrentSub}${x}}]} && ${NoGlobalTimer}) {
                /call Cast "${${CurrentSub}${x}}" ${DefaultGem} ${If[${Defined[${CurrentSub}Color]},${${CurrentSub}Color},Orange]}
                    /if (${Macro.Return.Equal[CAST_SUCCESS]}||${Macro.Return.Equal[CAST_NOTHOLD]}) {
                        /if (!${Defined[${CurrentSub}${x}${Me.XTarget[${i}].ID}]}) /declare ${CurrentSub}${x}${Me.XTarget[${i}].ID} timer outer
                        /if (${Defined[${CurrentSub}Recast${x}]}) /varset ${CurrentSub}${x}${Me.XTarget[${i}].ID} ${${CurrentSub}Recast${x}}
                    }
                }                

        }
    :skip
    /next i
/next x
/return
For conditions you would use ${Me.XTarget[${i}]} and then use that in combo with Spawn or whatever to come up with any variables.

Example associated /declares:
Code:
/declare Mez1 string outer Confusion
/noparse /declare NameConditions string outer (${Me.XTarget[${i}].Type.Equal[auto hater]} && ${i}>1)
/declare MezRecast1 timer outer 54s
/declare LastMez1 int outer

If anyone would like to run charinfo.mac from bot mac thread and provide me with the latest and greatest for certain classes, I can probably piece together some more class specific macros. i dont know any burn orders for pure melee, so i would need you to provide explicit burn order instructions (what buffs/classes/combos/etc). But priests/enc/hybrid should be fairly easy now with heal routine and XTarget.

I had started to make a shaman one last night and realized i was using level 95 spell info halfway through. So i stopped.
 
Last edited:
I realize now, i put in no mechanism to retarget the kill mob if you do heals or whatnot. So I rewrote some stuff and added a Pets section for heals/buffs/whatever. Everything seems to work as intended on a necro, but I wont really know for sure until I can write a macro for a priest class.

So if someone wants one written, use charinfo.mac from bot.mac thread and PM or email me a copy and give a brief description of your group setup and what spells you use and I will see what I can put together. I have my old level 100 druid ini, so I could probably use that, but its missing any new spells/AA from last months additions.
 
Force mem spells

Firstly thanks to Pete for the posts in this thread and the example macros. I love the speed of the wizard macro.

I'm using the wizard and the mage shells and it's working great apart from a couple of things:

I can't get it to force memorize spells.

If I memorize them manually (for example Shield of the Dauntless Rk. II into gem12) it will cast them straight away.

After looking through the thread on the VIP MacroQuest forum I have tried changing:

/declare DefaultGem gem12

to

/declare DefaultGem string outer gem12

I also have set:

/call Instant SelfBuff 1

I am using the spell_routines.inc from the first post.

Anyone have any ideas what I am doing wrong please?

Or can anyone provide me with an example which is successfully force memorizing spells to the DefaultGem for them so I can see what I am doing wrong?

Thank you.
 
there were definite bugs in the first couple versions. i hadnt tested any of it in game. im using the latest necro version. everything is force memming for me using the 1 at the end.

/call Duration Dot 1
 
Pete,

I've been using the wizard and mage macro from here for a bit. I have to say they are pretty excellent. One question though, why do the bots move forward at times after they kill something? It's not every time but sometimes. It happens on the mage and the wizard. Its more prevalent on the mage macro though. I've also seen it happen a few times on your regular bot macro using a shaman.

Any thoughts?


Sent from my SCH-I545 using Tapatalk 2
 
Put the following at the top of your macro if they are doing it while mounted:

Code:
/declare noInterrupt int outer 1
 
For all of you wanting to make something simple, just open up the Skillcast.mac

I wrote that thing back in 2005, have NEVER had to update it.

It's the perfect example to get started with something simple.
 
Just wanted to stop by and say thanks Pete, these macro's work very well for my crew, much appreciated. These are fast and do just about everything that Bot.mac does. I was wondering and I think I may have asked before, although I can't find it. Is there a way that I can get the necro.mac to slow the mobs faster? Say, Pull happens - mobs in camp, it Scents the mob then Nuke3(Undead Nuke) fires then if it lands then Death's malaise AA goes off, then necro can start dotting/nuking the mob? I have tried to write my own debuff conditions, even tried to make Undead Nuke a Debuff and I can't get it work correctly using the current necro.mac on this thread.
 
i dont think the macros on this would work correctly with the newest version of spell_routines.inc. You would want to check out the premium spell_routines.inc thread.

You can make your conditions to only fire if there is a debuff timer for your spell and the last id is for your target. You can see some pointers on the other thread.

Or if you have inspect buffs: ${Target.Buff[Death's Malaise].ID}

How I do it in bot.mac that you can translate over:
NukeSpellName1=Scintillate Bones
DebuffSpellName1=Death's Malaise
DebuffConditions1=${Me.GemTimer[${NukeSpellName1}].Seconds}>6 && ${Target.Body.Name.Equal[Undead]}
 
Last edited:
Wiz Macro

The wizard macro is great, and I'm excited about learning more on how to start making my own macros. I was able to change all the Rk. II spells because I don't have them yet. Everything seems to work great until I mem Armor of the Stonescale. Then my wizard just keeps chain casting it over and over... If I remove it, everything works fine. Any ideas?

Sorry, I'm new to this, but here's the buff section.

|Buffs
/declare BuffColor string outer White
/declare SelfBuff1 string outer Armor of the Stonescale
/declare SelfBuff2 string outer Improved Familiar
/noparse /declare SelfBuffConditions1 string outer (${Spell[Armor of the Stonescale].Stacks})
/noparse /declare SelfBuffConditions2 string outer (${Spell[Improved Familiar].Stacks})
 
Camdenbrown,

It casts over and over because ${Spell[Armor of the Stonescale].Stacks} is true. You need to check to see if you already HAVE the buff using ${Me.Buff[Armor of the Stonescale]}

You may also want to check to see if you have the spell ready, have mana, not currently fighting, etc.
 
editing

Just to Confirm if I am doing this correctly.

If I wanted to edit the snare section to NOT cast atols at all:

This is the default setting:

Code:
|snare
/declare SnareColor string outer Green
/declare LastSnare int outer
/declare Snare string outer Atol's Unresistable Shackles
/noparse /declare SnareConditions string outer (${Target.PctHPs}<25 && ${Target.Fleeing})

and this is what i changed it to to NOT snare :

Code:
|snare
/declare SnareColor string outer Green
/declare LastSnare int outer
/declare Snare string outer Atol's Unresistable Shackles
/noparse /declare SnareConditions string outer 0

I am assuming that placing a 0 there would mean it would not cast , 1 would mean once per mob targeted, etc.

I'm assuming I could just remove it entirely but this would allow for a quick edit later if I chose to. (Granted this is correct)

Thanks

-G
 
Pete, can you take a look at the wiz and mage macros again. I'm having a problem where each of these is casting self buffs over and over again even though they're already on the toons. This seems to have started recently, but i don't know when exactly. The macros are fantastic and i have adjusted them to my specific toon levels, but i've had to disable the self buffing portions because of the issue described earlier in this post. Thanks.
 
The wizard macro is great, and I'm excited about learning more on how to start making my own macros. I was able to change all the Rk. II spells because I don't have them yet. Everything seems to work great until I mem Armor of the Stonescale. Then my wizard just keeps chain casting it over and over... If I remove it, everything works fine. Any ideas?

Sorry, I'm new to this, but here's the buff section.

|Buffs
/declare BuffColor string outer White
/declare SelfBuff1 string outer Armor of the Stonescale
/declare SelfBuff2 string outer Improved Familiar
/noparse /declare SelfBuffConditions1 string outer (${Spell[Armor of the Stonescale].Stacks})
/noparse /declare SelfBuffConditions2 string outer (${Spell[Improved Familiar].Stacks})

ADD: " && !${Me.Buff[Armor of the Stonescale].ID}" between ".Stacks}" and ")"