Add files via upload

This commit is contained in:
Dinkledork
2023-03-16 03:44:34 -06:00
committed by GitHub
parent 27aa9b7e61
commit b0a3c479e8
7 changed files with 319 additions and 96 deletions

View File

@@ -1,87 +1,95 @@
local UndeadWarlord = {}; local UndeadWarlord = {};
local function CastShadowStrike(eventId, delay, calls, creature) local function CastShadowStrike(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 33914, true) creature:CastSpell(creature:GetVictim(), 33914, true)
end end
local function CastFear(eventId, delay, calls, creature) local function CastFear(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 5782, true) creature:CastSpell(creature:GetVictim(), 5782, true)
end end
local function CastSummonSkeleton(eventId, delay, calls, creature) local function CastSummonSkeleton(eventId, delay, calls, creature)
creature:CastSpell(creature, 59711, true) creature:CastSpell(creature, 59711, true)
end end
local enterCombatDialogue = { local enterCombatDialogue = {
"Your end has come. I will feast on your bones.", "Your life is forfeit to the Lich King!",
"You are no match for me!", "The Scourge will devour your soul!",
"Your death will be swift.", "You dare challenge the might of the Scourge?",
"You dare challenge me?" "Your pitiful existence ends here!"
} }
local leaveCombatDialogue = { local leaveCombatDialogue = {
"Coward!", "Your cowardice prolongs the inevitable!",
"You won't escape next time!", "The Lich King's grasp reaches far, mortal!",
"I'll be back for more!", "We will meet again, and you will fall!",
"You are lucky to leave this place alive." "Your luck will run out soon enough."
} }
local killTargetDialogue = { local killTargetDialogue = {
"Another soul for the taking!", "Another soul for the taking!",
"Your life is mine!", "Your life serves the Scourge now!",
"You were no match for me!", "You never stood a chance against the Scourge!",
"Your death was inevitable." "Your death only strengthens our ranks."
} }
local deathDialogue = { local deathDialogue = {
"You... How?", "You... How?",
"I'll be back!", "I'll be back!",
"This is not the end!", "This is not the end!",
"I'll haunt your dreams!" "I'll haunt your dreams!"
} }
function UndeadWarlord.OnEnterCombat(event, creature, target) function UndeadWarlord.OnEnterCombat(event, creature, target)
local randomDialogue = enterCombatDialogue[math.random(4)] if math.random(100) <= 40 then
creature:SendUnitYell(randomDialogue, 0) local randomDialogue = enterCombatDialogue[math.random(4)]
creature:RegisterEvent(CastShadowStrike, 5000, 0) creature:SendUnitYell(randomDialogue, 0)
creature:RegisterEvent(CastFear, 7000, 0) end
creature:RegisterEvent(CastSummonSkeleton, 15000, 0) creature:RegisterEvent(CastShadowStrike, math.random(7000, 9000), 0)
creature:RegisterEvent(CastFear, math.random(9500, 13000), 0)
creature:RegisterEvent(CastSummonSkeleton, math.random(13500, 17000), 0)
end end
function UndeadWarlord.OnLeaveCombat(event, creature) function UndeadWarlord.OnLeaveCombat(event, creature)
local randomDialogue = leaveCombatDialogue[math.random(4)] if math.random(100) <= 40 then
creature:SendUnitYell(randomDialogue, 0) local randomDialogue = leaveCombatDialogue[math.random(4)]
creature:RemoveEvents() creature:SendUnitYell(randomDialogue, 0)
end
creature:RemoveEvents()
end end
function UndeadWarlord.OnKilledTarget(event, creature, victim) function UndeadWarlord.OnKilledTarget(event, creature, victim)
local randomDialogue = killTargetDialogue[math.random(4)] local randomDialogue = killTargetDialogue[math.random(4)]
creature:SendUnitYell(randomDialogue, 0) creature:SendUnitYell(randomDialogue, 0)
end end
function UndeadWarlord.OnDied(event, creature, killer) function UndeadWarlord.OnDied(event, creature, killer)
local randomDialogue = deathDialogue[math.random(4)] local randomDialogue = deathDialogue[math.random(4)]
creature:SendUnitYell(randomDialogue, 0) creature:SendUnitYell(randomDialogue, 0)
creature:CastSpell(creature, 100202, true)
creature:RemoveEvents() creature:RemoveEvents()
end end
function UndeadWarlord.OnSpawn(event, creature) function UndeadWarlord.OnSpawn(event, creature)
creature:SetMaxHealth(48420) creature:SetMaxHealth(48420)
creature:CastSpell(creature:GetVictim(), 17683, true) creature:CastSpell(creature:GetVictim(), 17683, true)
if creature == nil or not creature:IsInWorld() then return end if creature == nil or not creature:IsInWorld() then return end
creature:SendUnitYell("Quickly servants! The Master expects swift results.", 0) creature:SendUnitYell("Quickly servants! The Master expects swift results.", 0)
creature:CastSpell(creature, 59711, true) creature:CastSpell(creature, 59711, true)
creature:RegisterEvent(function (eventId, delay, calls, creature) creature:RegisterEvent(function (eventId, delay, calls, creature)
if creature == nil or not creature:IsInWorld() then return end if creature == nil or not creature:IsInWorld() then return end
creature:CastSpell(creature, 59711, true) creature:CastSpell(creature, 59711, true)
end, 15000, 0) end, 15000, 0)
end end
RegisterCreatureEvent(300018, 1, UndeadWarlord.OnEnterCombat) RegisterCreatureEvent(300018, 1, UndeadWarlord.OnEnterCombat)
RegisterCreatureEvent(300018, 2, UndeadWarlord.OnLeaveCombat) RegisterCreatureEvent(300018, 2, UndeadWarlord.OnLeaveCombat)
RegisterCreatureEvent(300018, 3, UndeadWarlord.OnKilledTarget) RegisterCreatureEvent(300018, 3, UndeadWarlord.OnKilledTarget)
RegisterCreatureEvent(300018, 4, UndeadWarlord.OnDied) RegisterCreatureEvent(300018, 4, UndeadWarlord.OnDied)
RegisterCreatureEvent(300018, 5, UndeadWarlord.OnSpawn) RegisterCreatureEvent(300018, 5, UndeadWarlord.OnSpawn)

View File

@@ -11,7 +11,7 @@ player:SendBroadcastMessage("You need to place the barrier in a more strategic l
spell:Cancel() spell:Cancel()
else else
player:KilledMonsterCredit(killCreditNpcId) player:KilledMonsterCredit(killCreditNpcId)
player:SendBroadcastMessage("You have successfully placed the barrier and received kill credit for NPC " .. killCreditNpcId .. ".") player:SendBroadcastMessage("You have successfully built a barrier!")
end end
end end
end end

38
DarionTur.lua Normal file
View File

@@ -0,0 +1,38 @@
local CustomCreature = {}
local NPC_ID = 400081
local MAX_HEALTH = 8432 -- Set the desired max health value
local ABILITY_1 = 16856
local ABILITY_2 = 676
function CustomCreature.OnSpawn(event, creature)
creature:SetMaxHealth(MAX_HEALTH)
creature:SetHealth(MAX_HEALTH)
end
function CustomCreature.OnCombat(event, creature, target)
creature:RegisterEvent(CustomCreature.Ability1, 7000, 0)
creature:RegisterEvent(CustomCreature.Ability2, 22000, 0)
end
function CustomCreature.Ability1(event, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), ABILITY_1, true)
end
function CustomCreature.Ability2(event, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), ABILITY_2, true)
end
function CustomCreature.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function CustomCreature.OnDeath(event, creature, killer)
creature:RemoveEvents()
end
RegisterCreatureEvent(NPC_ID, 5, CustomCreature.OnSpawn)
RegisterCreatureEvent(NPC_ID, 1, CustomCreature.OnCombat)
RegisterCreatureEvent(NPC_ID, 2, CustomCreature.OnLeaveCombat)
RegisterCreatureEvent(NPC_ID, 4, CustomCreature.OnDeath)

8
DarionTur2.lua Normal file
View File

@@ -0,0 +1,8 @@
local NPC_ID_DAMION_TUR = 400079
local SOUND_ID = 20436
local function OnDamionTurSpawn(event, creature)
creature:PlayDirectSound(SOUND_ID)
end
RegisterCreatureEvent(NPC_ID_DAMION_TUR, 5, OnDamionTurSpawn)

View File

@@ -0,0 +1,20 @@
local GAME_EVENT_ID = 17 -- Set the game event ID
local npcIds = {344, 12480, 1284, 400064, 234} -- Add your NPC entries here
local function DespawnAndRespawnNpcs(event, gameEventId)
if gameEventId == GAME_EVENT_ID then
local players = GetPlayersInWorld() -- Get all players in the world
for _, player in ipairs(players) do
for _, npcId in ipairs(npcIds) do
local npcs = player:GetCreaturesInRange(1000, npcId) -- Get creatures within a radius of 1000 units from the player
for _, npc in ipairs(npcs) do
npc:DespawnOrUnsummon()
npc:Respawn()
end
end
end
end
end
RegisterServerEvent(34, DespawnAndRespawnNpcs) -- Game Event Start
RegisterServerEvent(35, DespawnAndRespawnNpcs) -- Game Event End

View File

@@ -2,14 +2,19 @@ local NPC_ENTRY1 = 400080
local REQUIRED_QUEST_ID = 30011 local REQUIRED_QUEST_ID = 30011
local function OnGossipHello(event, player, creature) local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.") if player:HasQuestFailed(REQUIRED_QUEST_ID) then
return player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
end else
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1) player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
player:GossipSendMenu(1, creature) end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end end
local function OnGossipSelect(event, player, creature, sender, intid, code) local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then if (intid == 1) then
creature:MoveWaypoint() creature:MoveWaypoint()
@@ -52,14 +57,19 @@ RegisterCreatureEvent(NPC_ENTRY1, 3, OnDeath)
local NPC_ENTRY2 = 400082 local NPC_ENTRY2 = 400082
local function OnGossipHello(event, player, creature) local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.") if player:HasQuestFailed(REQUIRED_QUEST_ID) then
return player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
end else
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1) player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
player:GossipSendMenu(1, creature) end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end end
local function OnGossipSelect(event, player, creature, sender, intid, code) local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then if (intid == 1) then
creature:MoveWaypoint() creature:MoveWaypoint()
@@ -101,14 +111,19 @@ RegisterCreatureEvent(NPC_ENTRY2, 3, OnDeath)
local NPC_ENTRY3 = 400083 local NPC_ENTRY3 = 400083
local function OnGossipHello(event, player, creature) local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.") if player:HasQuestFailed(REQUIRED_QUEST_ID) then
return player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
end else
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1) player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
player:GossipSendMenu(1, creature) end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end end
local function OnGossipSelect(event, player, creature, sender, intid, code) local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then if (intid == 1) then
creature:MoveWaypoint() creature:MoveWaypoint()
@@ -150,14 +165,19 @@ RegisterCreatureEvent(NPC_ENTRY3, 3, OnDeath)
local NPC_ENTRY4 = 400084 local NPC_ENTRY4 = 400084
local function OnGossipHello(event, player, creature) local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.") if player:HasQuestFailed(REQUIRED_QUEST_ID) then
return player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
end else
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1) player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
player:GossipSendMenu(1, creature) end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end end
local function OnGossipSelect(event, player, creature, sender, intid, code) local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then if (intid == 1) then
creature:MoveWaypoint() creature:MoveWaypoint()
@@ -199,14 +219,19 @@ RegisterCreatureEvent(NPC_ENTRY4, 3, OnDeath)
local NPC_ENTRY5 = 400085 local NPC_ENTRY5 = 400085
local function OnGossipHello(event, player, creature) local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.") if player:HasQuestFailed(REQUIRED_QUEST_ID) then
return player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
end else
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1) player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
player:GossipSendMenu(1, creature) end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end end
local function OnGossipSelect(event, player, creature, sender, intid, code) local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then if (intid == 1) then
creature:MoveWaypoint() creature:MoveWaypoint()
@@ -248,14 +273,19 @@ RegisterCreatureEvent(NPC_ENTRY5, 3, OnDeath)
local NPC_ENTRY6 = 400086 local NPC_ENTRY6 = 400086
local function OnGossipHello(event, player, creature) local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.") if player:HasQuestFailed(REQUIRED_QUEST_ID) then
return player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
end else
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1) player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
player:GossipSendMenu(1, creature) end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end end
local function OnGossipSelect(event, player, creature, sender, intid, code) local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then if (intid == 1) then
creature:MoveWaypoint() creature:MoveWaypoint()
@@ -297,14 +327,19 @@ RegisterCreatureEvent(NPC_ENTRY6, 3, OnDeath)
local NPC_ENTRY7 = 400087 local NPC_ENTRY7 = 400087
local function OnGossipHello(event, player, creature) local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.") if player:HasQuestFailed(REQUIRED_QUEST_ID) then
return player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
end else
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1) player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
player:GossipSendMenu(1, creature) end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end end
local function OnGossipSelect(event, player, creature, sender, intid, code) local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then if (intid == 1) then
creature:MoveWaypoint() creature:MoveWaypoint()
@@ -346,14 +381,19 @@ RegisterCreatureEvent(NPC_ENTRY7, 3, OnDeath)
local NPC_ENTRY8 = 400088 local NPC_ENTRY8 = 400088
local function OnGossipHello(event, player, creature) local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.") if player:HasQuestFailed(REQUIRED_QUEST_ID) then
return player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
end else
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1) player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
player:GossipSendMenu(1, creature) end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end end
local function OnGossipSelect(event, player, creature, sender, intid, code) local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then if (intid == 1) then
creature:MoveWaypoint() creature:MoveWaypoint()
@@ -395,14 +435,19 @@ RegisterCreatureEvent(NPC_ENTRY8, 3, OnDeath)
local NPC_ENTRY9 = 400089 local NPC_ENTRY9 = 400089
local function OnGossipHello(event, player, creature) local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.") if player:HasQuestFailed(REQUIRED_QUEST_ID) then
return player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
end else
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1) player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
player:GossipSendMenu(1, creature) end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end end
local function OnGossipSelect(event, player, creature, sender, intid, code) local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then if (intid == 1) then
creature:MoveWaypoint() creature:MoveWaypoint()
@@ -437,4 +482,78 @@ end
RegisterCreatureGossipEvent(NPC_ENTRY9, 1, OnGossipHello) RegisterCreatureGossipEvent(NPC_ENTRY9, 1, OnGossipHello)
RegisterCreatureGossipEvent(NPC_ENTRY9, 2, OnGossipSelect) RegisterCreatureGossipEvent(NPC_ENTRY9, 2, OnGossipSelect)
RegisterCreatureEvent(NPC_ENTRY9, 5, OnSpawn) RegisterCreatureEvent(NPC_ENTRY9, 5, OnSpawn)
RegisterCreatureEvent(NPC_ENTRY9, 3, OnDeath) RegisterCreatureEvent(NPC_ENTRY9, 3, OnDeath)
local NPC_ENTRY10 = 849
local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end
local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then
player:GossipComplete()
player:KilledMonsterCredit(NPC_ENTRY1)
local random = math.random(0, 4)
if random == 0 then
creature:SendUnitSay("Mommmmy!!!!", 0)
elseif random == 1 then
creature:SendUnitSay("But I wanted to go play with Sally...", 0)
elseif random == 2 then
creature:SendUnitSay("Really? Stay indoors? How boring...", 0)
elseif random == 3 then
creature:SendUnitSay("Darn those yucky Scourge...", 0)
else
creature:SendUnitSay("Awww, no fun!", 0)
end
creature:DespawnOrUnsummon(1000) -- Despawn after 2 seconds (2000 milliseconds)
end
end
RegisterCreatureGossipEvent(NPC_ENTRY10, 1, OnGossipHello)
RegisterCreatureGossipEvent(NPC_ENTRY10, 2, OnGossipSelect)
local NPC_ENTRY11 = 848
local function OnGossipHello(event, player, creature)
if not player:HasQuest(REQUIRED_QUEST_ID) then
if player:HasQuestFailed(REQUIRED_QUEST_ID) then
player:SendBroadcastMessage("Your time ran out, and you have failed this quest...")
else
player:SendBroadcastMessage("You must be on a certain quest to interact with this person.")
end
return
end
player:GossipMenuAddItem(0, "The scourge are coming! Please head to the inn!", 0, 1)
player:GossipSendMenu(1, creature)
end
local function OnGossipSelect(event, player, creature, sender, intid, code)
if (intid == 1) then
player:GossipComplete()
player:KilledMonsterCredit(NPC_ENTRY1)
local random = math.random(0, 4)
if random == 0 then
creature:SendUnitSay("Mommmmy!!!!", 0)
elseif random == 1 then
creature:SendUnitSay("But I wanted to go play with Sally...", 0)
elseif random == 2 then
creature:SendUnitSay("Really? Stay indoors? How boring...", 0)
elseif random == 3 then
creature:SendUnitSay("Darn those yucky Scourge...", 0)
else
creature:SendUnitSay("Awww, no fun!", 0)
end
creature:DespawnOrUnsummon(1000) -- Despawn after 2 seconds (2000 milliseconds)
end
end
RegisterCreatureGossipEvent(NPC_ENTRY11, 1, OnGossipHello)
RegisterCreatureGossipEvent(NPC_ENTRY11, 2, OnGossipSelect)

30
LakeshireLoremaster1.lua Normal file
View File

@@ -0,0 +1,30 @@
-- Creature ID for the creature that gives the quests
local CREATURE_ID = 400096
-- Quest and sound IDs for the quests that should trigger the sounds
local QUEST_ACCEPT = {
[30015] = 20439,
[30016] = 20441
}
local QUEST_COMPLETE = {
[30014] = 20438,
[30015] = 20440,
[30016] = 20442
}
-- Register the event for quest accept
RegisterCreatureEvent(CREATURE_ID, 31, function(event, player, creature, quest)
local soundID = QUEST_ACCEPT[quest:GetId()]
if soundID then
player:PlayDistanceSound(soundID)
end
end)
-- Register the event for quest reward
RegisterCreatureEvent(CREATURE_ID, 34, function(event, player, creature, quest)
local soundID = QUEST_COMPLETE[quest:GetId()]
if soundID then
creature:PlayDistanceSound(soundID)
end
end)