Add files via upload

This commit is contained in:
Dinkledork
2023-03-21 02:25:28 -06:00
committed by GitHub
parent ae862cfc54
commit 700c67a93f
50 changed files with 2044 additions and 0 deletions

27
Orgrimmar/OrgDefQuest.lua Normal file
View File

@@ -0,0 +1,27 @@
local ORG_ID = {3296, 400039, 400040, 400041, 400045, 400059, 400060, 400061, 400070, 400071}
local SPELL_ID = 100193
function OnSpellCast(event, caster, spell)
local target = spell:GetTarget()
if target and spell:GetEntry() == SPELL_ID then
local isValidTarget = false
for _, orgID in ipairs(ORG_ID) do
if target:GetEntry() == orgID then
isValidTarget = true
break
end
end
if not isValidTarget then
caster:SendBroadcastMessage("That target is not valid.")
spell:Cancel()
elseif target:HasAura(SPELL_ID) then
caster:SendBroadcastMessage("You've already used the Shadow-Drenched Cloth on that defender!")
spell:Cancel()
else
-- give kill credit to NPC ID 3296
caster:KilledMonsterCredit(3296)
end
end
end
RegisterPlayerEvent(5, OnSpellCast)