To fix it for cases when you're running, maybe something like this:
Code: Select all
Sub Main
:loop
/delay 5
/if (${Me.Buff[Skinspikes]} || ${Me.Speed} || ${Me.Casting} || ${Me.Sitting}) /goto :loop
/potionbelt activate 1
/delay 1s ${Me.Casting.ID}
/delay 5s !${Me.Casting.ID}
/goto :loop
I don't know how the Buff[] member works, so you may need to substitute the exact name of the potion you're using, but that should make it cast reliably without events. Also, it might be possible to use ${Me.DamageShieldBonus} to check if you have the potion on already. However, since some gear has +Damage Shield Mods, you would probably need to add a variable to catch your base Damage Shield to the beginning, before the loop, like this:
Code: Select all
/declare oldDS int ${Me.DamageShieldBonus}
And then replace the ${Me.Buff[]} check with this:
The benefit to that is if a druid casts a better DS on you than your pots, you won't burn all your pots trying (and failing) to overwrite it. However, I haven't ever used DamageShieldBonus, so I don't know exactly how accurate it is, or how it works with regards to gear/buffs.