Originally Posted by Walkerbo
Yes, that was my goal, but I like a mystery and once I hit a limitation I wanted to follow it.
|
Well in that light.... here is the world's most inefficient way of doing it:
Lua Code:
local f = CreateFrame("Frame")
f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
f:HookScript("OnEvent", function(self, event, arg1, arg2, spellId)
if (event == "UNIT_SPELLCAST_SUCCEEDED" and GetSpellInfo(spellId):sub(1,10) == "Blingtron ") then
-- doSomething()
end
end)
This checks every single spell cast, and queries for the spell name. If the first ten characters are "Blingtron " then it assumes it must be one of the Blingtron casts.
Suffice to say, I don't recommend actually trying this. The string function would probably be very wasteful on CPU resources in combat.