Add files via upload

This commit is contained in:
Dinkledork
2023-02-11 03:20:34 -07:00
committed by GitHub
parent 4e7172544f
commit 6273678709
9 changed files with 451 additions and 226 deletions

View File

@@ -1,8 +1,8 @@
local Patchqwerk = {}
local Patchqwerk = {}
function Patchqwerk.OnSpawn(event, creature)
creature:SendUnitYell("Patchqwerk make Lich King proud! You die now!",0)
creature:SetMaxHealth(4664000)
creature:CastSpell(creature, 41924, true)
end
function Patchqwerk.PoisonBoltVolley(eventId, delay, calls, creature)
@@ -20,7 +20,7 @@ end
function Patchqwerk.OnEnterCombat(event, creature, target)
local yellOptions = { "Patchqwerk huuuuungry!", "Time for a snack!", "You're mine now!", "You look delicious. Patchqwerk eat you now!", "I not eat in days, time to feast!", "Me smash and eat you now!", "Me so hungry, me eat anything... even you!" }
local randomIndex = math.random(1, 7)
local selectedYell = yellOptions[randomIndex] --script pulls one dialogue option from above upon entering combat.
local selectedYell = yellOptions[randomIndex]
creature:SendUnitYell(selectedYell, 0)
creature:RegisterEvent(Patchqwerk.PoisonBoltVolley, 7000, 0)
creature:RegisterEvent(Patchqwerk.CastHatefulStrike, 15000, 0)
@@ -28,8 +28,8 @@ creature:RegisterEvent(Patchqwerk.CastGore, 20000, 0)
end
function Patchqwerk.OnLeaveCombat(event, creature)
local yellOptions = { "You not so tasty afterall...", "I'll be back for seconds!", "No more play? Too bad...", "Maybe next time you'll taste better!","Me still hungry, come back later!","You not enough food, me go find more!" }
local randomIndex = math.random(1, 6)
local yellOptions = { "You not so tasty afterall...", "I be back for seconds!", "No more play? Too bad...", "Maybe next time you taste better!","Me still hungry, come back later!","You not enough food, me go find more!", "Awww...You no stay for dinner? You make Patchqwerk sad." }
local randomIndex = math.random(1, 7)
local selectedYell = yellOptions[randomIndex]
creature:SendUnitYell(selectedYell, 0)
creature:RemoveEvents()
@@ -43,7 +43,19 @@ end
creature:RemoveEvents()
end
function Patchqwerk.CheckHealth(event, creature)
if (creature:HealthBelowPct(20)) then
creature:SendUnitYell("Patchqwerk go berserk!", 0)
creature:CastSpell(creature, 41305, true) -- Cast the berserk spell (ID 41305)
elseif (creature:HealthAbovePct(95)) then
creature:CastSpell(creature, 41924, true) -- Cast the other berserk spell (ID 41924)
end
end
RegisterCreatureEvent(400012, 1, Patchqwerk.OnEnterCombat)
RegisterCreatureEvent(400012, 2, Patchqwerk.OnLeaveCombat)
RegisterCreatureEvent(400012, 4, Patchqwerk.OnDied)
RegisterCreatureEvent(400012, 5, Patchqwerk.OnSpawn)
RegisterCreatureEvent(400012, 5, Patchqwerk.OnSpawn)
RegisterCreatureEvent(400012, 6, Patchqwerk.CheckHealth)