mirror of
https://github.com/araxiaonline/RandomScriptsforAzerothCore.git
synced 2026-06-13 02:22:19 -04:00
Add files via upload
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
local NPC_UNDEAD_ROGUE = 400114
|
||||
local NPC_TARGET = 3338
|
||||
local NPC_ADDITIONAL_TARGET = 70000
|
||||
local NPC_HUT_FIRE = 29692
|
||||
|
||||
local SPELL_SINISTER_STRIKE = 1752
|
||||
local SPELL_EVASION = 5277
|
||||
local SPELL_GOUGE = 12540
|
||||
local SPELL_CAST_DEATH = 5
|
||||
|
||||
local FIRE_SPAWN_CHANCE = 20
|
||||
local FIRE_SPAWN_RADIUS = 20
|
||||
local FIRE_DESPAWN_TIME = 600000
|
||||
|
||||
local function CastSinisterStrike(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), SPELL_SINISTER_STRIKE, true)
|
||||
end
|
||||
@@ -26,12 +32,29 @@ local function UndeadRogue_OnEnterCombat(event, creature, target)
|
||||
if targetNPC then
|
||||
CastSpellOnTarget(creature, targetNPC)
|
||||
end
|
||||
|
||||
local additionalTargetNPC = creature:GetNearestCreature(50, NPC_ADDITIONAL_TARGET)
|
||||
if additionalTargetNPC then
|
||||
CastSpellOnTarget(creature, additionalTargetNPC)
|
||||
end
|
||||
end
|
||||
|
||||
local function UndeadRogue_OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function UndeadRogue_OnWaypointReached(event, creature)
|
||||
local chance = math.random(1, 100)
|
||||
local areaId = creature:GetAreaId()
|
||||
if chance <= FIRE_SPAWN_CHANCE and (areaId == 380 or areaId == 69) then
|
||||
local x, y, z, o = creature:GetLocation()
|
||||
local xOffset = math.random(-FIRE_SPAWN_RADIUS, FIRE_SPAWN_RADIUS)
|
||||
local yOffset = math.random(-FIRE_SPAWN_RADIUS, FIRE_SPAWN_RADIUS)
|
||||
local nx, ny, nz = x + xOffset, y + yOffset, z
|
||||
creature:SpawnCreature(NPC_HUT_FIRE, nx, ny, nz, o, 3, FIRE_DESPAWN_TIME)
|
||||
end
|
||||
end
|
||||
|
||||
local function UndeadRogue_OnDamageTaken(event, creature, attacker, damage)
|
||||
local healthPct = creature:GetHealthPct()
|
||||
if healthPct <= 30 and not creature:HasAura(SPELL_EVASION) then
|
||||
@@ -41,9 +64,11 @@ end
|
||||
|
||||
local function UndeadRogue_OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
creature:DespawnOrUnsummon(10000)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(NPC_UNDEAD_ROGUE, 1, UndeadRogue_OnEnterCombat)
|
||||
RegisterCreatureEvent(NPC_UNDEAD_ROGUE, 2, UndeadRogue_OnLeaveCombat)
|
||||
RegisterCreatureEvent(NPC_UNDEAD_ROGUE, 4, UndeadRogue_OnDied)
|
||||
RegisterCreatureEvent(NPC_UNDEAD_ROGUE, 9, UndeadRogue_OnDamageTaken)
|
||||
RegisterCreatureEvent(NPC_UNDEAD_ROGUE, 6, UndeadRogue_OnWaypointReached)
|
||||
@@ -33,6 +33,7 @@ end
|
||||
|
||||
local function Banshee_OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
creature:DespawnOrUnsummon(10000)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(NPC_BANSHEE, 1, Banshee_OnEnterCombat)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
local NPC_SUTURES = 400113
|
||||
local NPC_SPAWN_ON_DEATH = 400118
|
||||
local SPAWN_DURATION = 1800000 -- 30 minutes in milliseconds
|
||||
|
||||
local SPELL_CLEAVE = 15496
|
||||
local SPELL_DISEASE_CLOUD = 30122
|
||||
local SPELL_CLEAVE = 15284
|
||||
local SPELL_ABOMINATION_SLAM = 1464
|
||||
local SPELL_KNOCKBACK = 37317
|
||||
|
||||
local YELL_COMBAT_DIALOGUE = {
|
||||
"Sutures smash!",
|
||||
@@ -16,8 +18,8 @@ local function CastCleave(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), SPELL_CLEAVE, true)
|
||||
end
|
||||
|
||||
local function CastDiseaseCloud(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), SPELL_DISEASE_CLOUD, true)
|
||||
local function CastKnockback(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), SPELL_KNOCKBACK, true)
|
||||
end
|
||||
|
||||
local function CastAbominationSlam(eventId, delay, calls, creature)
|
||||
@@ -29,17 +31,19 @@ local function Sutures_OnEnterCombat(event, creature, target)
|
||||
creature:SendUnitYell(YELL_COMBAT_DIALOGUE[math.random(1, #YELL_COMBAT_DIALOGUE)], 0)
|
||||
end
|
||||
creature:RegisterEvent(CastCleave, math.random(4000, 8000), 0)
|
||||
creature:RegisterEvent(CastDiseaseCloud, math.random(10000, 15000), 0)
|
||||
creature:RegisterEvent(CastAbominationSlam, math.random(8000, 12000), 0)
|
||||
creature:RegisterEvent(CastKnockback, math.random(18000, 32000), 0)
|
||||
end
|
||||
|
||||
local function Sutures_OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function Sutures_OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
creature:RemoveEvents()
|
||||
creature:SendUnitSay("Sutures...fall...", 0)
|
||||
local x, y, z, o = creature:GetLocation()
|
||||
creature:SpawnCreature(NPC_SPAWN_ON_DEATH, x, y, z, o, 3, SPAWN_DURATION)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(NPC_SUTURES, 1, Sutures_OnEnterCombat)
|
||||
|
||||
@@ -74,6 +74,7 @@ end
|
||||
|
||||
|
||||
function UndeadWarlord.OnSpawn(event, creature)
|
||||
creature:SetEquipmentSlots(41383, 0 ,0)
|
||||
creature:SetMaxHealth(48420)
|
||||
creature:CastSpell(creature:GetVictim(), 17683, true)
|
||||
if creature == nil or not creature:IsInWorld() then return end
|
||||
|
||||
@@ -6,7 +6,7 @@ local BUNNY_ENTRY = 400099
|
||||
local UNDEAD_BUNNY_ENTRY = 400100
|
||||
local UNDEAD_WARLORD = 400103
|
||||
local SPAWN_TYPE = 3
|
||||
local DESPAWN_TIMER = 200000 -- 3 minutes and 20 seconds in milliseconds
|
||||
local DESPAWN_TIMER = 200000
|
||||
local CAST_SPELL_ID = 67040
|
||||
local CAST_SPELL_ID2 = 32826
|
||||
|
||||
@@ -16,6 +16,7 @@ end
|
||||
|
||||
local function CastSpellPolyVis(event, delay, calls, creature)
|
||||
creature:CastSpell(creature, CAST_SPELL_ID2, false)
|
||||
creature:CastSpell(creature, 72523, true)
|
||||
end
|
||||
|
||||
local function OnQuestAccept(event, player, creature, quest)
|
||||
@@ -23,7 +24,7 @@ local function OnQuestAccept(event, player, creature, quest)
|
||||
creature:PerformEmote(1)
|
||||
creature:SetReactState(0)
|
||||
creature:RegisterEvent(CastSpellPolyVis, 17000, 1)
|
||||
creature:RegisterEvent(CastSpellWithDelay, 18200, 1) -- 10-second delay before casting the spell
|
||||
creature:RegisterEvent(CastSpellWithDelay, 18200, 1)
|
||||
local x, y, z, o = creature:GetLocation()
|
||||
for i = 1, 5 do
|
||||
local randomX = x + math.random(-4, 4)
|
||||
@@ -42,6 +43,7 @@ local function OnCreatureDeath(event, creature, killer)
|
||||
if spawner then
|
||||
spawner:SetReactState(1) -- Set react state back to aggressive
|
||||
spawner:StopSpellCast(CAST_SPELL_ID)
|
||||
spawner:RemoveAllAuras() -- Remove all auras from the creature spawner
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local undeadDragon = {}
|
||||
|
||||
function undeadDragon.OnSpawn(event, creature)
|
||||
creature:DespawnOrUnsummon(3600000)
|
||||
creature:SetMaxHealth(8554119)
|
||||
creature:CanFly(true)
|
||||
creature:SetDisableGravity(true)
|
||||
@@ -19,6 +20,13 @@ creature:RegisterEvent(undeadDragon.CastSpell6, 35000, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastBlizzard, 5000, 0)
|
||||
end
|
||||
|
||||
function undeadDragon.SpawnCreatureOnDeath(creature)
|
||||
local x, y, z, o = creature:GetLocation()
|
||||
creature:SpawnCreature(400121, x, y, z, o, 3, 1800000) -- Spawn 400121 for 30 minutes
|
||||
end
|
||||
|
||||
|
||||
|
||||
function undeadDragon.OnLeaveCombat(event, creature)
|
||||
creature:SetRegeneratingHealth(false)
|
||||
end
|
||||
@@ -91,7 +99,8 @@ end
|
||||
|
||||
|
||||
function undeadDragon.OnDeath(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
creature:RemoveEvents()
|
||||
undeadDragon.SpawnCreatureOnDeath(creature)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400035, 5, undeadDragon.OnSpawn)
|
||||
|
||||
Reference in New Issue
Block a user