Page 1 of 1

Detecting if I am the caster of a debuff

Posted: Sun Oct 17, 2021 7:16 pm
by Screedcom
Is there a fairly simple way to detect if a debuff on a mob belongs to my character? I typically use the simple line below to determine when to recast DoT's. However it obviously doesn't work well in a raiding situation because other people may cast the same DoT.

/if (${Target.PctHPs}>=25 && !${Target.Buff[Sunshock].ID} && ${Cast.Ready[10]}) /call MQ2Cast "Sunshock" gem10

Any better ways to handle this?

Re: Detecting if I am the caster of a debuff

Posted: Sun Oct 17, 2021 10:04 pm
by dewey2461
Great question.

https://www.macroquest2.com/wiki/index. ... CachedBuff

This has a member CasterName

Re: Detecting if I am the caster of a debuff

Posted: Thu Oct 21, 2021 9:24 am
by caj
you may have to insert a /delay 3 after you target the NPC or PC in order for the macro to read any of the debuff/dots landed on the target. Buffs/dots/debuffs do not show up instantly like it once did.

Re: Detecting if I am the caster of a debuff

Posted: Thu Oct 21, 2021 10:03 pm
by dewey2461
I ended up just creating timers for the debuffs based on the spell ID and Target ID

Re: Detecting if I am the caster of a debuff

Posted: Fri Oct 22, 2021 12:51 pm
by caj
Here is how I would write the above line;

Code: Select all

/if (${Target.PctHPs}>=25 && !${Bool[${Target.Buff[Sunshock].ID}]} && ${Cast.Ready[10]}) /cast 10
I think the issue with the original line is;

Code: Select all

!${Target.Buff[Sunshock].ID}
Because I cannot /echo this line with the "!" and get the desired output, without the "!" the line comes up "NULL" and should be changed to;

Code: Select all

!${Bool[{${Target.Buff[Sunshock].ID}]} 
... or depending if your looking for a TRUE argument drop the "!" from the line.

I also changed "/call MQ2Cast "Sunshock" gem10" to "/cast 10" because its a shorter line and Everquest does the same exact thing and one less thing the macro has to do. Hope this helps.

Re: Detecting if I am the caster of a debuff

Posted: Fri Oct 22, 2021 8:44 pm
by Screedcom
Maybe for additional clarity on the question. This is specifically for casting dots that stack on a mob in a raid scenario with multiple druids casting.

I want the macro to cast the dot if the same dot cast by 'me' is not already on the mob.

@Dewey2461, I played around with Cached Buff but couldn't get the result I wanted, but perhaps what I tried was wrong. Maye this is why you mentioned timers based on Spell ID and Target ID.

@Caj, no issue on the delay the macro line works fine for casting and no issue with the check in a single Druid scenario also specifying the spell will force it to be memorized if it isn't already.

Re: Detecting if I am the caster of a debuff

Posted: Fri Oct 22, 2021 8:57 pm
by caj
Im pretty sure thats how I wrote the line the way you wanted.

Code: Select all

/if (${Target.PctHPs}>=25 && !${Bool[${Target.Buff[Sunshock].ID}]} && ${Cast.Ready[10]}) /cast 10
if target has more than 25% hp and the target does not have Sunshock and gem 10 is ready then /cast 10

fyi, you can do that with any spell that shows up in the target "Effects" spell window.

checking if a spell is memorized can be done a couple of ways by presaving groups of spell lists and then recall the list by "/memspellset name-of-spell-list" the second way is to use the "/memorize" option, something like: /if (!${Me.Gem[Sunshock]}) /memorize "Sunshock" 10