Public Macros I'm looking for some assistance with a Macro.
Reply
I'm looking for some assistance with a Macro.
Hey there, I'm looking to build up a macro for my Shammy that will check to see if a spell was resisted and attempt to re-cast it (for example his Slow or his DoT list). I'm pretty new to this macro thing so if someone could give me some pointers on where to start that would be mighty helpful. I don't mind writing up the code I just need some help with some of the usages of commands within MQ2.

Thanks

*Edit*
I was thinking of trying something like this, but since the LS is down I can't currently. My spell gem 2 is always my slow on my shammy and 3,4,5 are Poison, Disease, and magic DoT's respectively. Once the LS comes back up I'll give this a try, but if anyone has suggestions I'd appreciate it.

Macro
More +

Sub Main
/target Sam
/delay 1s
/assist
:SLOW
/cast 2 -maxtries|3
/delay 6s
/string ${Cast.Result}
{ /if /string ${Cast.Result}=Cast_Resist}
    /tell Sam Resisted
    /goto :SLOW
    }
     
{ /if /string ${Cast.Result}=CAST_SUCCESS
     /tell Sam Success
     /goto :END
     }
 :END
 
 /return
Sun May 15, 2011 4:07 pm
Okay I've played around a bit with the macro, but it's still not working as I'd like here's the updated code.


*edit* Updated again, and thanks for putting the syntax there, didn't realize that was an option

Macro
More +
Sub Main
/target Sam
/delay 1s
/assist
:SLOW
/delay 5
/casting "Drowsy" gem2 -maxtries|3
/if (${Cast.Result.Equal.[CAST_RESIST]}) {/goto :SLOW}

/if (${Cast.Result.Equal.[CAST_SUCCESS]}) {/goto :END}
       

:END

 
/return
Sun May 15, 2011 6:51 pm
i never really messed with /casting, i'm not super familiar with it, but how is it not working?
Sun May 15, 2011 8:15 pm
Project Lead
Well the intention would be that if a spell if resisted the macro will send a message to my main letting him know it was resisted and then attempting to re-cast it. Once the spell finally landed, or the character went below a % of mana a message would be sent to my main with either success or OOM. Currently the macro isn't following the IF statements I don't think. The macro will re-cast if resisted, but I can't tell if that's just part of the MQCast.

*Edit*

Casting does automatically re-cast the spell on resist so that solves one problem, but still can't figure out why it's either ignore my IF statements all together or it is always returning as Cast.Successful.

*Edit Edit*
Alright, well it is always returning as Cast.Successful so I guess I'm going to have to think of another way to do this since the IF statements won't work as separators for the commands.
Sun May 15, 2011 8:19 pm
Scraping this project and moving on to something else. Thanks for the help
Sun May 15, 2011 9:06 pm
You can set up chims or sounds in eq and have them make a certain sound when a resist happens. I use it for tells and resists.
Mon May 16, 2011 6:41 am
Listen to This Guy
yeah same here, i have a audio trigger seted on the successfull slow message.
that way, if i don't hear the spell, i know i must recast

i'm not sure, but i think the spell_routines.inc allow advanced return catching, does one of them triggers on resist ?
Mon May 16, 2011 7:02 am
This is found within the spell_routines.inc

Macro
More +
Usage:
|        /call Cast "spellname|itemname|AAname|AA#" [item|alt|gem#] [give up time][s|m] [custom subroutine name] [Number of resist recasts]
Mon May 16, 2011 11:21 am
Listen to This Guy
Or try something like this

Macro
More +
Sub DeBuff
:DeBuff_Loop
     /call cast ${SpellDeBuff}
     /if (${Macro.Return.Equal["CAST_RESISTED"]}) /goto :DeBuff_Loop
/return
Mon May 16, 2011 12:00 pm
Listen to This Guy
I use /casting a fair bit and I can see an issue...

Macro
More +

Sub Main
/target Sam
/delay 1s
/assist
:SLOW
/delay 5
/casting "Drowsy" gem2 -maxtries|3
/if (${Cast.Result.Equal.[CAST_RESIST]}) {/goto :SLOW}

/if (${Cast.Result.Equal.[CAST_SUCCESS]}) {/goto :END}
       

:END

 
/return


Your gem is in the wrong area...

Macro
More +
/casting "Drowsy|gem2" -maxtries|3


The above should work a little better. (You can remove the cast result part as the -maxtries|3 will deal with that.)

Then you could go further and remove the targeting if you like...

MQ2NetBots will help with that. Just make sure you have
Macro
More +
/netbots netbots=on send=on grab=on


Then you could use -targetid

Macro
More +
/casting "Drowsy|gem2" -maxtries|3 -targetid|${NetBots[Sam].TargetID}


Basically when triggered it will cast Droswy out of Gem 2 at Sam's Target. :) Done!
Fri Sep 09, 2011 1:00 am
I think what you might want is :

Macro
More +

Sub Main
/target id ${Spawn[pc Sam].ID}
/delay 1s ${Target.ID}==${Spawn[pc Sam].ID}
/assist
/delay 1s ${Target.ID}!=${Spawn[pc Sam].ID}
:SLOW
/delay 5
/casting "Drowsy|gem2" -maxtries|3
/delay 10s ${Cast.Status.Find[C]}
/delay 10s !${Cast.Status.Find[C]}
/delay 5
/if (${Cast.Result.Equal.[CAST_SUCCESS]}) {/goto :END}
/goto :SLOW
       

:END

 
/return
Thu Sep 15, 2011 1:12 pm
Macro
More +
/target id ${Spawn[pc Sam].ID}


is a bit redundant.

What goes in "${Spawn[HERE]}" and "/target HERE" access the same bit of code. So what you are doing inside of the Spawn object you might as well just pass directly to target.

you can also add an = sign to make sure you don't target Sammy instead of Sam.

Macro
More +
/target pc =Sam



Macro
More +
${Target.ID}==${Spawn[pc Sam].ID}


This will also perform a spawn search, and directly access the spawn object in EQ. This is quick, but wouldnt be as quick as doing a text comparison on the target name. Like this:


Macro
More +
/delay 1s ${Target.Name.Equal[Sam]}
/assist
/delay 1s ${Target.Name.NotEqual[Sam]}
Thu Sep 15, 2011 3:10 pm
Project Lead
Public Macros I'm looking for some assistance with a Macro.
Reply