- local NPC_ID = 90021
- function boss_OnCombat(event, creature, target)
- creature:SendUnitSay("I KNOW YOU! YOU ARE MEAT!", 1)
- creature:CastSpell(target, 64719)
- creature:RegisterEvent(spell_90, 10000, 0)
- creature:RegisterEvent(spell_60, 1000, 0)
- creature:RegisterEvent(spell_50, 4000, 0)
- creature:RegisterEvent(spell_30, 4000, 0)
- creature:RegisterEvent(spell_10, 12000, 0)
- end
- function spell_90(eventID, delay, pCall, creature)
- if (creature:GetHealthPct() <= 90) then
- creature:SendUnitSay("SMASH!", 0)
- creature:CastSpell(creature:GetVictim(), 31436)
- end
- end
- function spell_60(eventID, delay, pCall, creature)
- if (creature:GetHealthPct() <= 60) then
- creature:SetScale(1.5)
- end
- end
- function spell_50(eventID, delay, pCall, creature)
- if (creature:GetHealthPct() <= 50) then
- creature:CastSpell(creature:GetVictim(), 68969)
- end
- end
- function spell_30(eventID, delay, pCall, creature)
- if (creature:GetHealthPct() <= 30) then
- creature:CastSpell(creature:GetVictim(), 67634)
- end
- end
- function spell_10(eventID, delay, pCall, creature)
- if (creature:GetHealthPct() <= 10) then
- creature:SendUnitSay("I don't like you!", 0)
- creature:CastSpell(creature:GetVictim(), 70284)
- end
- end
- function boss_OnLeaveCombat(event, creature)
- creature:SendUnitSay("Why no meat?", 0)
- creature:RemoveEvents()
- end
- function boss_OnDied(event, creature, killer)
- creature:RemoveEvents()
- for _,v in ipairs (killer:GetGroup():GetMembers()) do
- if (v:GetGroup():IsRaidGroup()) then
- if (creature:GetMapId() == v:GetMapId()) then
- OnGossipSelect(2, v, v, 0, nil, nil, 1)
- end
- end
- end
- end
- function OnGossipSelect(event, player, object, sender, intid, code, menu_id)
- if not (intid) or (intid < 1) then
- player:GossipClearMenu()
- player:GossipMenuAddItem(0, "Testing", 0, 1)
- player:GossipMenuAddItem(0, "Testing", 0, 1)
- player:GossipSendMenu(1, player, 1)
- end
- if (intid == 1) then
- player:SendBroadcastMessage("MENUID 1")
- elseif (intid == 2) then
- player:SendBroadcastMessage("MENUID 2")
- end
- end
- function boss_OnKilledTarget(event, creature, victim)
- creature:SendUnitSay("MEAT!", 0)
- end
- function boss_OnSpawn(event, creature)
- creature:SendUnitSay("I'm hungry", 0)
- creature:SetScale(1)
- creature:CastSpell(creature, 64842)
- end
- RegisterCreatureEvent(NPC_ID, 1, boss_OnCombat)
- RegisterCreatureEvent(NPC_ID, 2, boss_OnLeaveCombat)
- RegisterCreatureEvent(NPC_ID, 3, boss_OnKilledTarget)
- RegisterCreatureEvent(NPC_ID, 4, boss_OnDied)
- RegisterCreatureEvent(NPC_ID, 5, boss_OnSpawn)
- RegisterPlayerGossipEvent(1, 2, OnGossipSelect)