Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #this is supposed to go in the custom display
- function()
- if _G["WA_chaos_player"] then
- posx, posy = UnitPosition("player")
- posx_chaos, posy_chaos = UnitPosition(_G["WA_chaos_player"])
- diffx = posx_chaos - posx
- diffy = posy_chaos - posy
- distance = math.floor(math.sqrt(math.pow(diffx, 2) + math.pow(diffy, 2)) + 0.5)
- if WA_expiration then
- distance = distance.."m\n"..math.floor(_G["WA_expiration"] - GetTime() + 0.5)
- end
- return distance
- end
- return "-"
- end
- ---------------------------------------------------------------------------------------------------------------------------
- #this goes in the event trigger
- function(event, _, type, _, _, sourceName, _, _, _, destName, _, _, _, spellName)
- if type == "SPELL_CAST_SUCCESS" then
- if string.find(spellName, "Artillery") or string.find(spellName, "Artillery") then
- _G["WA_chaos_player"] = destName
- _G["WA_expiration"] = GetTime() + 10
- return true
- end
- end
- return false
- end
- ----------------------------------------------------------------------------------------------------------------------------
- #this goes in the event hide
- function(event, _, type, _, _, destName, _, _, _, _, _, _, _, spellName)
- if type == "SPELL_AURA_REMOVED" then
- if string.find(spellName, "Artillery") or string.find(spellName, "Artillery") then
- return true
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement