View difference between Paste ID: jeS0XiNW and KYM0ppgg
SHOW: | | - or go back to the newest paste.
1
--//////////////////////////////////
2
--////   Holystone Productions  ////
3
--////       Copy Right         ////
4
--////  Blizzlike Repack v 3.0  ////
5
--//////////////////////////////////
6
7
print("Loading Rotface")
8
9
local rotface = 36627
10
local SmallOoze = 43301
11
local BigOoze = 36899
12
local OozeFlood = 37006
13
14
function Rotface_OnCombat(punit, event)
15
  rotface = punit
16
   rotface:SendChatMessage(14, 0, "WEEEEEEE!")
17
    rotface:RegisterEvent("rotface_OozeFlood", 20000, 1)
18
	rotface:RegisterEvent("rotface_OozeFlood_InPairs", 22000, 1)
19
	rotface:RegisterEvent("rotface_SlimeSpray", 11000, 0)
20
	rotface:RegisterEvent("rotface_MutatedInfection", 35000, 0) 
21
end
22
23
-- Ooze Flood Start --
24
25
   -- First wave of flood --
26
27
function rotface_OozeFlood(punit, event)
28
  rotface:SpawnCreature(37006, 4427.700689, 3174.871826, 360.385315, 0, 14, 25000)
29
  rotface:RegisterEvent("rotface_OozeFlood_Two", 20000, 1)
30
end
31
32
function rotface_OozeFlood_InPairs(punit, event)
33
  rotface:SpawnCreature(37006, 4409.125000, 3155.542725, 360.385315, 0, 14, 25000)
34
  rotface:RegisterEvent("rotface_OozeFlood_InPairs_Two", 22000, 1)
35
end
36
37
   -- Secund wave of flood --
38
39
function rotface_OozeFlood_Two(punit, event)
40
  rotface:SpawnCreature(37006, 4406.874512, 3118.262207, 360.385742, 0, 14, 25000)
41
  rotface:RegisterEvent("rotface_OozeFlood_Tree", 20000, 1)
42
end
43
44
function rotface_OozeFlood_InPairs_Two(punit, event)
45
  rotface:SpawnCreature(37006, 4428.574707, 3101.385742, 360.385742, 0, 14, 25000)
46
  rotface:RegisterEvent("rotface_OozeFlood_InPairs_Tree", 22000, 1)
47
end
48
49
   -- Trede wave of flood --
50
51
function rotface_OozeFlood_Tree(punit, event)
52
  rotface:SpawnCreature(37006, 4461.988770, 3101.588867, 360.385590, 0, 14, 25000)
53
  rotface:RegisterEvent("rotface_OozeFlood_For", 20000, 1)
54
end
55
56
function rotface_OozeFlood_InPairs_Tree(punit, event)
57
  rotface:SpawnCreature(37006, 4481.371094, 3119.097412, 360.385590, 0, 14, 25000)
58
  rotface:RegisterEvent("rotface_OozeFlood_InPairs_For", 22000, 1)
59
end
60
61
   -- Last wave of flood --
62
63
function rotface_OozeFlood_For(punit, event)
64
  rotface:SpawnCreature(37006, 4482.102051, 3153.623779, 360.385590, 0, 14, 25000)
65
  rotface:RegisterEvent("rotface_OozeFlood", 20000, 1)
66
end
67
68
function rotface_OozeFlood_InPairs_For(punit, event)
69
  rotface:SpawnCreature(37006, 4463.563965, 3173.374268, 360.385590, 0, 14, 25000)
70
  rotface:RegisterEvent("rotface_OozeFlood_InPairs", 22000, 1)
71
end
72
73
-- Ooze Flood Ends --
74
75
function rotface_SlimeSpray(punit, event)
76
 rotface:SendChatMessage(14, 0, "Icky sticky.")
77
  local target = rotface:GetRandomPlayer(0)
78
   rotface:FullCastSpell(69508)
79
   rotface:AddAura(69507, 1000)
80
end
81
82
function rotface_MutatedInfection(punit, event)
83
  local targetz = rotface:GetRandomPlayer(0)
84
   rotface:CastSpellOnTarget(69674, targetz)
85
    rotface:RegisterEvent("Small_Ooze_Spawn", 12000, 1)
86
end
87
88
function Small_Ooze_Spawn(punit, event)
89
  local targetz = rotface:GetRandomPlayer(0)
90
   local x = targetz:GetX()
91
   local y = targetz:GetY()
92
   local z = targetz:GetZ()
93
   local o = targetz:GetO()
94
  rotface:SpawnCreature(SmallOoze, x, y, z, o, 14, 360000)
95
end
96
97
-- Small Ooze --
98
99
function SmallOoze_OnCombat(punit, event)
100
   smallooze = punit
101
    smallooze:Unroot()
102
     smallooze:CastSpell(69750)
103
	 smallooze:AddAura(69751, 0)
104
      smallooze:RegisterEvent("smallooze_StickyOoze", 10000, 0)
105
	  smallooze:RegisterEvent("smallooze_BigOoze_SpawnCheck", 1000, 0)
106
end
107
108
function smallooze_BigOoze_SpawnCheck(punit, event)
109
   local target = smallooze:GetClosestFriend()
110
     if smallooze:GetDistanceYards(target) < 10 then 
111
	  local x = smallooze:GetX()
112
	  local z = smallooze:GetY()
113
	  local z = smallooze:GetZ()
114
	  local o = smallooze:GetO()
115
	smallooze:SpawnCreature(36899, x, y, z, o, 14, 360000)
116
  end
117
end
118
119
function smallooze_StickyOoze(punit, event)
120
    local player = smallooze:GetRandomPlayer(0)
121
   smallooze:CastSpellAoF(player:GetX(), player:GetY(), player:GetZ(), 69776)
122
    player:AddAura(69778, 1000)
123
end
124
125
-- Big Ooze --
126
127
function BigOoze_OnCombat(punit, event)
128
   bigooze = punit
129
    bigooze:CastSpell(69760)
130
	bigooze:AddAura(69761, 0)
131
     bigooze:RegisterEvent("BigOoze_StickyOoze", 10000, 0)
132
	 bigooze:RegisterEvent("BigOoze_Aura_Check", 1000, 0)
133
	 bigooze:RegisterEvent("BigOoze_UnstableOozeExplosion", 1000, 0)
134
end
135
136
function BigOoze_StickyOoze(punit, event)
137
    local player = bigooze:GetRandomPlayer(0)
138
   bigooze:CastSpellAoF(player:GetX(), player:GetY(), player:GetZ(), 69776)
139
    player:AddAura(69778, 1000)
140
end
141
142
function BigOoze_Aura_Check(punit, event)
143
   local target = bigooze:GetInRangeFriends()
144
    if target:GetDistanceYards(bigooze) < 10 then 
145
	 bigooze:AddAura(69558, 0)
146
  end
147
end
148
149
function BigOoze_UnstableOozeExplosion(punit, event)
150
  if bigooze:HasAura(69558) == 5 then
151
      local targets = GetThreeRandomEnemies(pUnit)
152
        if(targets) then
153
           for k,v in ipairs(targets) do
154
             pUnit:CastSpellOnTarget(69839, v)
155
            end
156
        end
157
	end
158
end
159
160
function OozeFlood_OnSpawn(punit, event)
161
   oozeflod = punit
162
    oozeflod:Root()
163
    oozeflod:SetModel(11686)
164
    oozeflod:SetScale(5)
165
    oozeflod:RegisterEvent("oozeflod_Cast", 1000, 1)
166
	oozeflod:RegisterEvent("oozeflod_Aura_Check", 500, 0)
167
end
168
169
function oozeflod_Cast(punit, event)
170
    local x = oozeflod:GetX()
171
	local y = oozeflod:GetY()
172
	local z = oozeflod:GetZ()
173
   oozeflod:CastSpellAoF(x, y, z, 69776)
174
end
175
176
function oozeflod_Aura_Check(punit, event)
177
   local target = oozeflod:GetClosestEnemy()
178
    if oozeflod:GetDistanceYards(target) < 20 then 
179
	 oozeflod:CastSpellOnTarget(69789, target)
180
   end
181
end
182
183
function Rotface_OnLeaveCombat(punit, event)
184
   punit:RemoveEvents()
185
end
186
187
function Rotface_OnKillPlayer(punit, event)
188
	 punit:SendChatMessage(14, 0, "Daddy make toys out of you!")
189
end
190
191
function Rotface_OnDead(punit, event)
192
   punit:RemoveEvents()
193
end
194
195
function SmallOoze_OnDeath(punit, event)
196
    punit:Despawn(1, 0)
197
end
198
199
RegisterUnitEvent(rotface, 1, "Rotface_OnCombat")
200
RegisterUnitEvent(rotface, 2, "Rotface_OnLeaveCombat")
201
RegisterUnitEvent(rotface, 3, "Rotface_OnKillPlayer")
202
RegisterUnitEvent(rotface, 4, "Rotface_OnDead")
203
RegisterUnitEvent(SmallOoze, 1, "SmallOoze_OnCombat")
204
RegisterUnitEvent(SmallOoze, 4, "SmallOoze_OnDeath")
205
RegisterUnitEvent(BigOoze, 1, "BigOoze_OnCombat")
206
RegisterUnitEvent(OozeFlood, 18, "OozeFlood_OnSpawn")