Skip to content

Monitor Players Casts

ρMain edited this page Feb 27, 2018 · 2 revisions

Want to monitor players casting bar?

That's possible! You can even chose to do an action at a given percentage of the cast bar for a given array of spell ids!

  • Callback prototype: function(object, name, x, y, z);
function PerformCallbackOnCasts(spellArray, percent, filters, enabled, callback);

-- Naive Example
-- This function holds a callback in a shared table
-- This callback is gonna kick any mage casting sheep at 90% of castbar
PerformCallbackOnCasts({MageSpells.SHEEP}, 90, nil, true,
	 function(object, name, x, y, z)
		CastSpellByID(RogueSpells.KICK, object)
	 end
)
Clone this wiki locally