Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Guardian_OnSpawn(pUnit, Event)
- pUnit:RegisterEvent("Guardian_Walk", 1000, 1)
- pUnit:RegisterEvent("Guardian_Cast", 7000, 0)
- pUnit:RegisterEvent("Guardian_Check", 1000, 0)
- pUnit:RegisterEvent("Guardian_Plrhealth", 1000, 0)
- end
- function Guardian_Walk(pUnit, event)
- pUnit:MoveTo(16309.560547, 16247.022461, 24.612982, 0.091115)
- pUnit:SendBroadcastMessage("A guardian comes to your aid!")
- end
- function Guardian_Cast(pUnit, event)
- pUnit:MoveTo(16309.560547, 16247.022461, 24.612982, 0.091115)
- pUnit:SetCombatCapable(1)
- pUnit:FullCastSpellOnTarget(11, pUnit:GetCreatureNearestCoords(16309.560547, 16247.022461, 24.612982, 90092))
- end
- function Guardian_Check(pUnit, event)
- local boss = pUnit:GetCreatureNearestCoords(16309.560547, 16247.022461, 24.612982, 90092)
- if boss:IsDead() == true then
- pUnit:Despawn(0,0)
- end
- if boss:IsDead() == false then
- end
- function Guardian_Plrhealth(pUnit, event)
- local caller = pUnit:GetClosestPlayer()
- pUnit:FullCastSpellOnTarget(34119, caller)
- end
- end
- RegisterUnitEvent(90100, 18, Guardian_OnSpawn)
Advertisement
Add Comment
Please, Sign In to add comment