Created
December 6, 2015 03:40
-
-
Save Romain-P/ab6fe8dcda2d735e98a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function cdRemains(spellid) | |
| if select(2,GetSpellCooldown(spellid)) + (select(1,GetSpellCooldown(spellid)) - GetTime()) > 0 | |
| then return select(2,GetSpellCooldown(spellid)) + (select(1,GetSpellCooldown(spellid)) - GetTime()) | |
| else return 0 | |
| end | |
| end | |
| function castable(totem, spellid) | |
| if UnitName("Mouseover") == totem | |
| and IsSpellInRange(GetSpellInfo(spellid),"Mouseover") == 1 | |
| and cdRemains(spellid) == 0 and not PQR_IsOutOfSight("Mouseover") | |
| then return 1 | |
| else return 0 | |
| end | |
| end | |
| function track(totem) | |
| if castable(totem, 62124) == 1 | |
| then | |
| CastSpellByID(62124,"Mouseover") | |
| SendChatMessage(totem .. " broken" ,"PARTY",GetDefaultLanguage("player"),1) | |
| else if castable(totem, 20271) == 1 | |
| then | |
| CastSpellByID(20271,"Mouseover") | |
| SendChatMessage(totem .. " broken" ,"PARTY",GetDefaultLanguage("player"),1) | |
| end end | |
| end | |
| track("Earthbind Totem") | |
| track("Tremor Totem") | |
| track("Grounding Totem") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment