From 5f808c05895682e0f29fd0e118ea6cbf5d35e8f8 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Sun, 12 Mar 2023 08:55:05 -0600 Subject: [PATCH] Add files via upload --- BlightedZombie.lua | 1 - BlightedZombie2.lua | 29 ++++++++++++++++++ FleshFlayer.lua | 37 ++++++++++++++++++++++ GibberingGhoul.lua | 27 +++++++++++++++++ HateShrieker.lua | 35 +++++++++++++++++++++ Necrofiend2.lua | 36 ++++++++++++++++++++++ OrgDefQuest.lua | 27 +++++++++++++++++ PatchwerkHorror.lua | 2 +- PatchworkHorror2.lua | 38 +++++++++++++++++++++++ Rattlegore.lua | 64 +++++++++++++++++++++++++++++++++++++++ RisenConstruct.lua | 53 ++++++++++++++++++++++++++++++++ RisenGuard.lua | 33 ++++++++++++++++++++ SWGKillCred.lua | 41 +++++++++++++------------ SkeletalWarlord.lua | 14 ++++----- SpectralAttendant (2).lua | 40 ++++++++++++++++++++++++ TrapCredit.lua | 4 ++- VenomBelcher.lua | 38 +++++++++++++++++++++++ 17 files changed, 490 insertions(+), 29 deletions(-) create mode 100644 BlightedZombie2.lua create mode 100644 FleshFlayer.lua create mode 100644 GibberingGhoul.lua create mode 100644 HateShrieker.lua create mode 100644 Necrofiend2.lua create mode 100644 OrgDefQuest.lua create mode 100644 PatchworkHorror2.lua create mode 100644 Rattlegore.lua create mode 100644 RisenConstruct.lua create mode 100644 RisenGuard.lua create mode 100644 SpectralAttendant (2).lua create mode 100644 VenomBelcher.lua diff --git a/BlightedZombie.lua b/BlightedZombie.lua index 0612d8f..a71924c 100644 --- a/BlightedZombie.lua +++ b/BlightedZombie.lua @@ -33,4 +33,3 @@ RegisterCreatureEvent(400051, 4, BlightedZombie.OnDeath) RegisterCreatureEvent(400051, 5, BlightedZombie.OnSpawn) - diff --git a/BlightedZombie2.lua b/BlightedZombie2.lua new file mode 100644 index 0000000..6454bbc --- /dev/null +++ b/BlightedZombie2.lua @@ -0,0 +1,29 @@ +local BlightedZombie = {} + +function BlightedZombie.OnCombat(event, creature, target) +creature:RegisterEvent(BlightedZombie.Ability1, 7000, 0) +creature:RegisterEvent(BlightedZombie.Ability2, 12000, 0) +end + +function BlightedZombie.Ability1(event, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 52476, true) +end + +function BlightedZombie.Ability2(event, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 37597, true) +end + +function BlightedZombie.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function BlightedZombie.OnDeath(event, creature, killer) + creature:RemoveEvents() +end + +RegisterCreatureEvent(4475, 1, BlightedZombie.OnCombat) +RegisterCreatureEvent(4475, 2, BlightedZombie.OnLeaveCombat) +RegisterCreatureEvent(4475, 4, BlightedZombie.OnDeath) + + + diff --git a/FleshFlayer.lua b/FleshFlayer.lua new file mode 100644 index 0000000..998875a --- /dev/null +++ b/FleshFlayer.lua @@ -0,0 +1,37 @@ +local FleshFlayer = {}; + +local function CastLeap(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), 47482, true) +end + +local function CastPlague(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), 52230, true) +end + +local function CastExplode(eventId, delay, calls, creature) +creature:CastSpell(creature, 47496, true) +end + +local function CastRend(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 18106, true) +end + +local function OnEnterCombat(event, creature, target) + creature:RegisterEvent(CastLeap, 100, 1) + creature:RegisterEvent(CastPlague, 500, 1) + creature:RegisterEvent(CastRend, 2000, 1) + creature:RegisterEvent(CastPlague, 20000, 0) + creature:RegisterEvent(CastExplode, 30000, 0) + end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() +end + +local function OnDied(event, creature, killer) + creature:RemoveEvents() +end + +RegisterCreatureEvent(10407, 1, OnEnterCombat) +RegisterCreatureEvent(10407, 2, OnLeaveCombat) +RegisterCreatureEvent(10407, 4, OnDied) \ No newline at end of file diff --git a/GibberingGhoul.lua b/GibberingGhoul.lua new file mode 100644 index 0000000..db31865 --- /dev/null +++ b/GibberingGhoul.lua @@ -0,0 +1,27 @@ +local GibberingGhoul = {} + +function GibberingGhoul.OnCombat(event, creature, target) +creature:RegisterEvent(GibberingGhoul.Ability2, 100, 1) +creature:RegisterEvent(GibberingGhoul.Ability1, 7000, 0) +creature:RegisterEvent(GibberingGhoul.Ability2, 12000, 0) +end + +function GibberingGhoul.Ability1(event, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 34113, true) +end + +function GibberingGhoul.Ability2(event, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 12889, true) +end + +function GibberingGhoul.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function GibberingGhoul.OnDeath(event, creature, killer) + creature:RemoveEvents() +end + +RegisterCreatureEvent(8531, 1, GibberingGhoul.OnCombat) +RegisterCreatureEvent(8531, 2, GibberingGhoul.OnLeaveCombat) +RegisterCreatureEvent(8531, 4, GibberingGhoul.OnDeath) diff --git a/HateShrieker.lua b/HateShrieker.lua new file mode 100644 index 0000000..2a26d61 --- /dev/null +++ b/HateShrieker.lua @@ -0,0 +1,35 @@ +local HateShrieker = {} + +function HateShrieker.OnEnterCombat(event, creature, target) +creature:RegisterEvent(HateShrieker.Screech, 7000, 0) +creature:RegisterEvent(HateShrieker.ShadowWordPain, math.random(11000,16000), 0) +end + + +function HateShrieker.Screech(eventId, delay, calls, creature) +creature:CastSpell(creature, 3589) +end + +function HateShrieker.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function HateShrieker.OnDied(event, creature, killer) +creature:RemoveEvents() +end + +function HateShrieker.ShadowWordPain(eventId, delay, calls, creature) +local targets = creature:GetAITargets(10) +if #targets == 0 then + return +end +local target = targets[math.random(#targets)] +creature:CastSpell(target, 10893) +creature:ClearThreatList() +end + + + +RegisterCreatureEvent(8541, 1, HateShrieker.OnEnterCombat) +RegisterCreatureEvent(8541, 2, HateShrieker.OnLeaveCombat) +RegisterCreatureEvent(8541, 4, HateShrieker.OnDied) \ No newline at end of file diff --git a/Necrofiend2.lua b/Necrofiend2.lua new file mode 100644 index 0000000..8c24fcb --- /dev/null +++ b/Necrofiend2.lua @@ -0,0 +1,36 @@ +local Necrofiend = {} + +function Necrofiend.OnEnterCombat(event, creature, target) + creature:RegisterEvent(Necrofiend.WebSpray, 12000, 0, creature) + creature:RegisterEvent(Necrofiend.CastBanefulPoison, 7000, 0, creature) + creature:RegisterEvent(Necrofiend.DeadlyPoison, 10000, 0, creature) +end + +function Necrofiend.WebSpray(event, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), 55508, true) +end + +function Necrofiend.DeadlyPoison(event, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), 34616, true) +end + +function Necrofiend.CastBanefulPoison(event, delay, calls, creature) + local targets = creature:GetAITargets(10) + if #targets == 0 then + return + end + local target = targets[math.random(#targets)] + creature:CastSpell(target, 15475, true) +end + +function Necrofiend.OnLeaveCombat(event, creature) + creature:RemoveEvents() +end + +function Necrofiend.OnDied(event, creature, killer) + creature:RemoveEvents() +end + +RegisterCreatureEvent(11551, 1, Necrofiend.OnEnterCombat) +RegisterCreatureEvent(11551, 2, Necrofiend.OnLeaveCombat) +RegisterCreatureEvent(11551, 4, Necrofiend.OnDied) diff --git a/OrgDefQuest.lua b/OrgDefQuest.lua new file mode 100644 index 0000000..a45aa23 --- /dev/null +++ b/OrgDefQuest.lua @@ -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) \ No newline at end of file diff --git a/PatchwerkHorror.lua b/PatchwerkHorror.lua index b02d4c7..33ce3b1 100644 --- a/PatchwerkHorror.lua +++ b/PatchwerkHorror.lua @@ -27,7 +27,7 @@ end local function OnEnterCombat(event, creature, target) creature:RegisterEvent(AcidSpit, 7000, 0) - creature:RegisterEvent(CastBludgeoningStrike, 14000, 0) + creature:RegisterEvent(CastBludgeoningStrike, 13000, 0) creature:RegisterEvent(CastSpecialSpell, 1000, 0) end diff --git a/PatchworkHorror2.lua b/PatchworkHorror2.lua new file mode 100644 index 0000000..5607228 --- /dev/null +++ b/PatchworkHorror2.lua @@ -0,0 +1,38 @@ +local PatchWorkHorror2 = {}; + +local function AcidSpit(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), 61597, true) +end + +local function KnockAway(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), 10101, true) +end + + +function CastBludgeoningStrike(eventId, delay, calls, creature) + local targets = creature:GetAITargets(10) + if #targets == 0 then + return + end + local target = targets[math.random(#targets)] + creature:CastSpell(target, 60870, true) +end + + +local function OnEnterCombat(event, creature, target) + creature:RegisterEvent(AcidSpit, 7000, 0) + creature:RegisterEvent(CastBludgeoningStrike, 13000, 0) + creature:RegisterEvent(KnockAway, 16000, 0) + end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() +end + +local function OnDied(event, creature, killer) + creature:RemoveEvents() +end + +RegisterCreatureEvent(10414, 1, OnEnterCombat) +RegisterCreatureEvent(10414, 2, OnLeaveCombat) +RegisterCreatureEvent(10414, 4, OnDied) \ No newline at end of file diff --git a/Rattlegore.lua b/Rattlegore.lua new file mode 100644 index 0000000..1a55c26 --- /dev/null +++ b/Rattlegore.lua @@ -0,0 +1,64 @@ +local Rattlegore = {}; + +local function Thunderclap(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 26554, true) +end + +local function WhirlwindKnockback(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 34109, true) +end + +local function Enrage(eventId, delay, calls, creature) +creature:CastSpell(creature, 15716, true) +end + +local function BoneArmor(eventId, delay, calls, creature) +creature:CastSpell(creature, 38882, true) +end + +local function Thrash(eventId, delay, calls, creature) +creature:CastSpell(creature, 3391, true) +end + +local function SweepingStrikes(eventId, delay, calls, creature) +creature:CastSpell(creature, 18765, true) +end + +function Stun(eventId, delay, calls, creature) +local targets = creature:GetAITargets(10) +if #targets == 0 then +return +end +local target = targets[math.random(#targets)] +creature:CastSpell(target, 17308, true) +end + +local function OnEnterCombat(event, creature, target) +creature:RegisterEvent(Thunderclap, 7000, 0) +creature:RegisterEvent(WhirlwindKnockback, 11000) +creature:RegisterEvent(Stun, 16000, 0) +creature:RegisterEvent(Thrash, 8500, 0) +creature:RegisterEvent(BoneArmor, 15000, 0) +creature:RegisterEvent(BoneArmor, 500, 1) +creature:RegisterEvent(SweepingStrikes, 100, 1) +end + +local function OnHealthUpdate(event, creature, value) +if (creature:GetHealthPct() <= 20) then +creature:RemoveEvents() +creature:RegisterEvent(Enrage, 100, 1) +end +end + +local function OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +local function OnDied(event, creature, killer) +creature:RemoveEvents() +end + +RegisterCreatureEvent(11622, 1, OnEnterCombat) +RegisterCreatureEvent(11622, 9, OnHealthUpdate) +RegisterCreatureEvent(11622, 2, OnLeaveCombat) +RegisterCreatureEvent(11622, 4, OnDied) \ No newline at end of file diff --git a/RisenConstruct.lua b/RisenConstruct.lua new file mode 100644 index 0000000..309a675 --- /dev/null +++ b/RisenConstruct.lua @@ -0,0 +1,53 @@ +local RisenConstruct = {}; + +local function ArcingSmash(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 1619, true) +end + +local function Enrage(eventId, delay, calls, creature) +creature:CastSpell(creature, 15716, true) +end + +local function Thrash(eventId, delay, calls, creature) +creature:CastSpell(creature, 3391, true) +end + +local function SweepingStrikes(eventId, delay, calls, creature) +creature:CastSpell(creature, 18765, true) +end + +function Stun(eventId, delay, calls, creature) +local targets = creature:GetAITargets(10) +if #targets == 0 then +return +end +local target = targets[math.random(#targets)] +creature:CastSpell(target, 17308, true) +end + +local function OnEnterCombat(event, creature, target) +creature:RegisterEvent(ArcingSmash, 7000, 0) +creature:RegisterEvent(Stun, 13000, 0) +creature:RegisterEvent(Thrash, 8500, 0) +creature:RegisterEvent(SweepingStrikes, 100, 1) +end + +local function OnHealthUpdate(event, creature, value) +if (creature:GetHealthPct() <= 20) then +creature:RemoveEvents() +creature:RegisterEvent(Enrage, 100, 1) +end +end + +local function OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +local function OnDied(event, creature, killer) +creature:RemoveEvents() +end + +RegisterCreatureEvent(10488, 1, OnEnterCombat) +RegisterCreatureEvent(10488, 9, OnHealthUpdate) +RegisterCreatureEvent(10488, 2, OnLeaveCombat) +RegisterCreatureEvent(10488, 4, OnDied) \ No newline at end of file diff --git a/RisenGuard.lua b/RisenGuard.lua new file mode 100644 index 0000000..05acd86 --- /dev/null +++ b/RisenGuard.lua @@ -0,0 +1,33 @@ +local RisenGuard = {} + +function RisenGuard.OnCombat(event, creature, target) +creature:RegisterEvent(RisenGuard.Ability2, 100, 1) +creature:RegisterEvent(RisenGuard.Ability1, 7000, 0) +creature:RegisterEvent(RisenGuard.Ability2, 12000, 0) +creature:RegisterEvent(RisenGuard.Ability3, 10000, 0) +end + +function RisenGuard.Ability1(event, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 34113, true) +end + +function RisenGuard.Ability2(event, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 8380, true) +end + +function RisenGuard.Ability3(event, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 5164, true) +end + +function RisenGuard.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function RisenGuard.OnDeath(event, creature, killer) + creature:RemoveEvents() +end + +RegisterCreatureEvent(10489, 1, RisenGuard.OnCombat) +RegisterCreatureEvent(10489, 2, RisenGuard.OnLeaveCombat) +RegisterCreatureEvent(10489, 4, RisenGuard.OnDeath) + diff --git a/SWGKillCred.lua b/SWGKillCred.lua index 9fcfb0d..ee9eacd 100644 --- a/SWGKillCred.lua +++ b/SWGKillCred.lua @@ -1,24 +1,27 @@ -local SWG_IDS = {68, 400013, 400033, 400014, 1976} +local SWG_ID = {68, 400013, 400033, 400014, 1976} local SPELL_ID = 100141 function OnSpellCast(event, caster, spell) - local target = spell:GetTarget() - if target and spell:GetEntry() == SPELL_ID then - local isValidTarget = false - for _, swgID in ipairs(SWG_IDS) do - if target:GetEntry() == swgID then - isValidTarget = true - break - end - end - if not isValidTarget then - caster:SendBroadcastMessage("") - spell:Cancel() - else - -- give kill credit to NPC ID 68 - caster:KilledMonsterCredit(68) - end - end +local target = spell:GetTarget() +if target and spell:GetEntry() == SPELL_ID then +local isValidTarget = false +for _, swgID in ipairs(SWG_ID) do +if target:GetEntry() == swgID 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("Target has already been empowered.") +spell:Cancel() +else +-- give kill credit to NPC ID 68 +caster:KilledMonsterCredit(68) +end +end end -RegisterPlayerEvent(5, OnSpellCast) +RegisterPlayerEvent(5, OnSpellCast) \ No newline at end of file diff --git a/SkeletalWarlord.lua b/SkeletalWarlord.lua index 8dd451f..56be757 100644 --- a/SkeletalWarlord.lua +++ b/SkeletalWarlord.lua @@ -1,11 +1,6 @@ local SkeletalWarlord = {} SkeletalWarlord.minChargeRange = 10 -function SkeletalWarlord.OnSpawn(event, creature) -creature:SetMaxHealth(54353) -creature:CastSpell(creature, 17683, true) -end - function SkeletalWarlord.OnEnterCombat(event, creature, target) creature:RegisterEvent(SkeletalWarlord.Whirlwind, 15000, 0) creature:RegisterEvent(SkeletalWarlord.MortalStrike, 7000, 0) @@ -25,7 +20,7 @@ creature:RemoveEvents() end function SkeletalWarlord.OnDied(event, creature, killer) -creature:DespawnOrUnsummon(5000) +creature:DespawnOrUnsummon(15000) creature:RemoveEvents() end @@ -39,10 +34,15 @@ function SkeletalWarlord.Charge(eventId, delay, calls, creature) end -RegisterCreatureEvent(400056, 5, SkeletalWarlord.OnSpawn) + RegisterCreatureEvent(400056, 1, SkeletalWarlord.OnEnterCombat) RegisterCreatureEvent(400056, 2, SkeletalWarlord.OnLeaveCombat) RegisterCreatureEvent(400056, 4, SkeletalWarlord.OnDied) +RegisterCreatureEvent(1788, 1, SkeletalWarlord.OnEnterCombat) +RegisterCreatureEvent(1788, 2, SkeletalWarlord.OnLeaveCombat) +RegisterCreatureEvent(1788, 4, SkeletalWarlord.OnDied) + + diff --git a/SpectralAttendant (2).lua b/SpectralAttendant (2).lua new file mode 100644 index 0000000..357d25a --- /dev/null +++ b/SpectralAttendant (2).lua @@ -0,0 +1,40 @@ +local SpectralAttendant = {} + +function SpectralAttendant.OnEnterCombat(event, creature, target) +creature:RegisterEvent(SpectralAttendant.Cripple, 6000, 0) +creature:RegisterEvent(SpectralAttendant.AOEFear, 13000, 0) +creature:RegisterEvent(SpectralAttendant.Teleport, math.random(14000,16000), 0) +end + + +function SpectralAttendant.Cripple(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 11443, true) +end + +function SpectralAttendant.AOEFear(eventId, delay, calls, creature) +creature:CastSpell(creature, 8122) +end + +function SpectralAttendant.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function SpectralAttendant.OnDied(event, creature, killer) +creature:RemoveEvents() +end + +function SpectralAttendant.Teleport(eventId, delay, calls, creature) +local targets = creature:GetAITargets(10) +if #targets == 0 then + return +end +local target = targets[math.random(#targets)] +creature:CastSpell(target, 69904) +creature:ClearThreatList() +end + + + +RegisterCreatureEvent(11873, 1, SpectralAttendant.OnEnterCombat) +RegisterCreatureEvent(11873, 2, SpectralAttendant.OnLeaveCombat) +RegisterCreatureEvent(11873, 4, SpectralAttendant.OnDied) \ No newline at end of file diff --git a/TrapCredit.lua b/TrapCredit.lua index 5530870..06cb2a8 100644 --- a/TrapCredit.lua +++ b/TrapCredit.lua @@ -4,6 +4,8 @@ local NPC_ID = 400034 -- The ID of the NPC you want players to get kill credit f local ALLOWED_ZONES = { 1519, -- SW City 12, + 14, + 1637 } -- List of allowed spell IDs @@ -32,7 +34,7 @@ function OnPlayerCastSpell(event, player, spell) if table.indexOf(ALLOWED_SPELLS, spellId) ~= -1 then if table.indexOf(ALLOWED_ZONES, zoneId) == -1 then spell:Cancel() - player:SendBroadcastMessage("You cannot cast this spell in this area.") + player:SendBroadcastMessage("You cannot use that here.") else player:KilledMonsterCredit(NPC_ID) player:SendBroadcastMessage("You have successfuly placed a trap!") diff --git a/VenomBelcher.lua b/VenomBelcher.lua new file mode 100644 index 0000000..9852697 --- /dev/null +++ b/VenomBelcher.lua @@ -0,0 +1,38 @@ +local VenomBelcher = {}; + +local function VenomSpit(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), 24011, true) +end + +local function SlowingPoison(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), 14897, true) +end + + +function CastRetchingPlague(eventId, delay, calls, creature) + local targets = creature:GetAITargets(10) + if #targets == 0 then + return + end + local target = targets[math.random(#targets)] + creature:CastSpell(target, 30080, true) +end + + +local function OnEnterCombat(event, creature, target) + creature:RegisterEvent(VenomSpit, 7000, 0) + creature:RegisterEvent(CastRetchingPlague, 13000, 0) + creature:RegisterEvent(SlowingPoison, 16000, 0) + end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() +end + +local function OnDied(event, creature, killer) + creature:RemoveEvents() +end + +RegisterCreatureEvent(10417, 1, OnEnterCombat) +RegisterCreatureEvent(10417, 2, OnLeaveCombat) +RegisterCreatureEvent(10417, 4, OnDied) \ No newline at end of file