Code:
function Bigbobspawn_Reproduce2(unit)
unit:SendChatMessage(12, 0, "Death is close.")
unit:PlaySoundToSet(8888)
unit:PlaySoundToSet (8580)
unit:CastSpell(0)
x = unit:GetX()
y = unit:GetY()
z = unit:GetZ()
unit:SpawnCreature(65028, x, y, z, 0, 148, 180000)
unit:SpawnCreature(65028, x, y, z, 0, 148, 180000)
unit:RemoveEvents()
end
function Bigbobspawn_Corrupt1(unit)
unit:CastSpell(25198)
unit:SendChatMessage(12, 0, "You will die.")
unit:PlaySoundToSet (8586)
end
function Bigbobspawn_Mindcontrol1(unit)
unit:CastSpellOnTarget(26198, unit:GetRandomPlayer(7))
unit:SendChatMessage(12, 0, "Your friends will abandon you.")
unit:PlaySoundToSet (8583)
end
function Bigbobspawn_Posionaura1(unit)
unit:CastSpell(29865)
end
function Bigbobspawn_Poisonthing1(unit)
unit:CastSpell(38220)
unit:SendChatMessage(12, 0, "Your heart will explode.")
unit:PlaySoundToSet (8587)
end
function Bigbobspawn_OnEnterCombat(unit)
unit:PlaySoundToSet(8888)
unit:PlaySoundToSet(8581)
unit:SendChatMessage(12, 0, "You are already dead.")
unit:RegisterEvent("Bigbobspawn_Reproduce2",30000, 15)
unit:RegisterEvent("Bigbobspawn_Posionaura1",12000, 10)
unit:RegisterEvent("Bigbobspawn_Poisonthing1",22000, 10)
unit:RegisterEvent("Bigbobspawn_Corrupt1",17000, 5)
unit:RegisterEvent("Bigbobspawn_Mindcontrol1",23000, 5)
end
function Bigbobspawn_OnLeaveCombat(unit)
unit:RemoveEvents()
end
function Bigbobspawn_Death(unit)
x = unit:GetX()
y = unit:GetY()
z = unit:GetZ()
unit:SpawnCreature(65028, x, y, z, 0, 148, 180000)
unit:SpawnCreature(65028, x, y, z, 0, 148, 180000)
unit:SpawnCreature(65028, x, y, z, 0, 148, 180000)
unit:SpawnCreature(65028, x, y, z, 0, 148, 180000)
unit:SendChatMessage(12, 0, "Your courage will fail.")
unit:PlaySoundToSet (8582)
unit:RemoveEvents()
end
function Bigbobspawn_OnKilledTarget(unit)
unit:SendChatMessage(12, 0, "You are weak.")
unit:PlaySoundToSet (8586)
unit:RemoveEvents()
end
RegisterUnitEvent(65026, 1, "Bigbobspawn_OnEnterCombat")
RegisterUnitEvent(65026, 2, "Bigbobspawn_OnLeaveCombat")
RegisterUnitEvent(65026, 3, "Bigbobspawn_OnKilledTarget")
RegisterUnitEvent(65026, 4, "Bigbobspawn_Death")