SHOW:
|
|
- or go back to the newest paste.
1 | - | function Falling_Custom_Zone(unit, event) |
1 | + | local function FallingCustomZone(unit, event) |
2 | - | unit:RegisterEvent("FallingCustomZone", 2009, 0) |
2 | + | for k, v in ipairs(unit:GetInRangePlayers()) do |
3 | if (v and v:IsInWorld() and unit:GetDistance(v) < 6) then | |
4 | v:CastSpell(64446) | |
5 | - | function FallingCustomZone(unit, event, player) |
5 | + | v:CastSpell(5) |
6 | - | for k, v in pairs(unit:GetInRangePlayers()) do |
6 | + | v:SendBroadcastMessage("That water is awfully cold.") |
7 | - | if (unit:GetDistance(v) < 6) then |
7 | + | |
8 | if race==2 or race==5 or race==6 or race==8 or race==10 then -- Alliance | |
9 | - | if race==2 or race==5 or race==6 or race==8 or race==10 then -- Alliance |
9 | + | v:Teleport(1, 16558.873047, 15584.223633, 35.402008) |
10 | - | v:CastSpell(64446) |
10 | + | else -- below = Horde |
11 | - | v:CastSpell(5) |
11 | + | |
12 | - | v:Teleport(1, 16558.873047, 15584.223633, 35.402008) |
12 | + | |
13 | - | v:SendBroadcastMessage("That water is awfully cold.") |
13 | + | |
14 | - | else -- below = Horde |
14 | + | |
15 | - | v:CastSpell(64446) |
15 | + | |
16 | - | v:CastSpell(5) |
16 | + | |
17 | local function trigger(unit, event) | |
18 | - | v:SendBroadcastMessage("That water is awfully cold.") |
18 | + | unit:RegisterEvent(FallingCustomZone, 2000, 0) |
19 | - | end |
19 | + | |
20 | ||
21 | RegisterUnitEvent(271570, 18, trigger) |