├── AUndeadWarlord.lua ├── AbilitiesOnLevelUp.lua ├── AccountMounts.lua ├── Alleria1.lua ├── Alleria2.lua ├── AllianceMage.lua ├── AllianceMage2.lua ├── AlliancePaladin.lua ├── AlliancePaladin2.lua ├── AlliancePriest.lua ├── AlliancePriest2.lua ├── AllianceWarHerald.lua ├── ArchBishopBen.lua ├── ArcherusDK.lua ├── Auctioneer.lua ├── Auto91.lua ├── Auto_Rez.lua ├── Barrier.lua ├── BlightedZombie.lua ├── BlightedZombie2.lua ├── BlisteringZombie.lua ├── BlisteringZombie2.lua ├── Bolvar.lua ├── Bolvar2.lua ├── BoneSentinel.lua ├── BoneWitch.lua ├── Bonk.lua ├── Boss_Bazzalan.lua ├── Boss_Jergosh.lua ├── Boss_Oggleflint.lua ├── Boss_Taragaman.lua ├── BufferNPC.lua ├── CarbonCopy.lua ├── ChromieEventScripts.lua ├── CooldownFreeFlying.lua ├── CoreRager.lua ├── CreepStalker.lua ├── Crossroads ├── CrosroadsStalker.lua ├── CrossroadsBanshee.lua ├── CrossroadsGuards.lua ├── CrossroadsSutures.lua └── CrossroadsVillagerQuestV2.lua ├── CrossroadsVillagerQuest.lua ├── CrossroadsVillagerQuestV2.lua ├── CustomGreench.lua ├── Custom_XP.lua ├── CustomizeCharacter.lua ├── DarionTur.lua ├── DarionTur2.lua ├── DarkRanger.lua ├── DarkValk.lua ├── Deadmines └── CaptainRattlebones.lua ├── DeathStalker.lua ├── DecayingColossus.lua ├── DespawnRespawnScourgeQuestGivers.lua ├── DingMask.lua ├── DinkleDoom.lua ├── DinkleRez.lua ├── DinkleStone1.lua ├── Dinklestone2.lua ├── Draven.lua ├── Dumbassery.lua ├── Duthorian.lua ├── Enchanter.lua ├── EventAnnounce.lua ├── FOEREAPER.lua ├── Faction_Shared ├── Auto91.lua ├── Barrier.lua ├── Blight.lua ├── BlightedZombie.lua ├── BlightedZombie2.lua ├── BlisteringZombie.lua ├── BlisteringZombie2.lua ├── BoneWitch.lua ├── CreepStalker.lua ├── DespawnRespawnScourgeQuestGivers.lua ├── DingMask.lua ├── DinkleRez.lua ├── Emote.lua ├── FlameShocker.lua ├── FleshFlayer.lua ├── Ghoul.lua ├── GibberingGhoul.lua ├── HateShrieker.lua ├── NPCBrave.lua ├── NPCFreakout.lua ├── Necrofiend.lua ├── Necrofiend2.lua ├── PallidHorror.lua ├── RandomScourgeAttack.lua ├── Rattlegore.lua ├── RisenConstruct.lua ├── RisenGuard.lua ├── ScourgeQuestsWorkAround.lua ├── ShredderAndMechWIngs.lua ├── SkeletalWarlord.lua ├── SkeletalWarrior.lua ├── SpectralAttendant.lua ├── SpectralAttendant2.lua ├── Startstop.lua ├── StoneSkinGargoyle.lua ├── TrapCredit.lua ├── TreeChopping.lua └── VenomBelcher.lua ├── FlameShocker.lua ├── FleshFlayer.lua ├── FlightHandler.lua ├── FlightHandler2.lua ├── FlyForFree.lua ├── FlyableWaypoints.lua ├── FrostbroodWhelp.lua ├── GM_Menu_Players.lua ├── Garr.lua ├── Gehennas.lua ├── GemVendor.lua ├── Gender.lua ├── Ghoul.lua ├── GibberingGhoul.lua ├── Golemagg.lua ├── Hardcore.lua ├── HardcoreItemRemoval.lua ├── HardcoreMode ├── Hardcore.lua └── HardcoreItemRemoval.lua ├── HateShrieker.lua ├── Hazzrash.lua ├── Holliday └── CustomGreench.lua ├── HordeShout.lua ├── HordeWarHerald.lua ├── Item.dbc ├── Kara └── PrinceTenris.lua ├── KeinDK.lua ├── KillCred.lua ├── LAkeshireVillagers2.lua ├── LICENSE ├── Lakeshire ├── AUndeadWarlord.lua ├── DarionTur.lua ├── DarionTur2.lua ├── DeathStalker.lua ├── Dumbassery.lua ├── LakeshireCitizenScript.lua ├── LakeshireGuard.lua ├── LakeshireLoremaster1.lua ├── RedridgeRetreat.lua ├── RefurbishedShredder.lua ├── Riddle.lua ├── SpiritofThalgorath.lua ├── quest_30018_spawn_bunnies.lua ├── quest_30018_trash_bunnies.lua └── quest_30018_undead_bunny.lua ├── LakeshireCitizenScript.lua ├── LakeshireGuard.lua ├── LakeshireLoremaster1.lua ├── Laurena.lua ├── LevelUpReward.lua ├── Lithe-Stalker.lua ├── LowCreatureXP.lua ├── LowQuestXP.lua ├── Lucifron.lua ├── Magmadar.lua ├── Magmakin.lua ├── MiscTools ├── ChromieEventScripts.lua ├── DinkleStone1.lua ├── Dinklestone2.lua ├── FelRushSoundFix.lua ├── FlightHandler2.lua ├── FlyableWaypoints.lua ├── GhoulDust.lua ├── GlidingHandler.lua ├── IndividualProgression.lua ├── Murky.lua ├── SmolderingEmberRestrict.lua ├── SoL.lua ├── StormwindRezFix.lua └── reload_scripts.lua ├── MoltenCore ├── CoreRager.lua ├── Gehennas.lua ├── GemVendor.lua ├── Golemagg.lua ├── Hazzrash.lua ├── Lucifron.lua ├── Magmadar.lua ├── Magmakin.lua ├── Smolder.lua └── SocketeerV1 .lua ├── Money_Conversion.lua ├── Murky.lua ├── NPCBrave.lua ├── NPCFreakout.lua ├── Necrofiend.lua ├── Necrofiend2.lua ├── OrgArcher.lua ├── OrgBerserker.lua ├── OrgDefQuest.lua ├── OrgGuardKillCred.lua ├── Orgrimmar ├── ArcherusDK.lua ├── BoneSentinel.lua ├── DarkRanger.lua ├── DarkValk.lua ├── DecayingColossus.lua ├── Draven.lua ├── FrostbroodWhelp.lua ├── HordeShout.lua ├── HordeWarHerald.lua ├── OrgArcher.lua ├── OrgBerserker.lua ├── OrgDefQuest.lua ├── OrgGuardKillCred.lua ├── OrgrimmarVillager.lua ├── RunokWildmane.lua ├── Skalathrax.lua ├── StealthPot.lua ├── Sylvanas.lua ├── TempMount.lua └── TurretKillCred.lua ├── OrgrimmarVillager.lua ├── PallidHorror.lua ├── Patchqwerk.lua ├── Patchqwerktest.lua ├── PatchwerkHorror.lua ├── PatchworkHorror2.lua ├── Player.cpp ├── Player.h ├── Playtime_Reward.lua ├── Potions_cooldowns.lua ├── PrinceTenris.lua ├── QuestComplete.lua ├── README.md ├── RaidBuffs.lua ├── Random-AttackTest1.lua ├── RandomAttack.lua ├── RandomScourgeAttack.lua ├── Rattlegore.lua ├── RedridgeEmote.lua ├── RedridgeRetreat.lua ├── RefurbishedShredder.lua ├── Riddle.lua ├── RisenConstruct.lua ├── RisenGuard.lua ├── RunokWildmane.lua ├── SW-Archer.lua ├── SW-Guard.lua ├── SW-GuardCleave.lua ├── SWDefenders.lua ├── SWGKillCred.lua ├── SWTrapCredit.lua ├── SWTrapQuestR.lua ├── SWVillager.lua ├── Scorn.lua ├── ScourgeBuffs.lua ├── ScourgeQuestsWorkAround.lua ├── Setnpclevel - SWGuards2.lua ├── Setnpclevel-Event17.lua ├── Sever.lua ├── Shailiea.lua ├── Skalathrax.lua ├── SkeletalWarlord.lua ├── SkeletalWarrior.lua ├── Smolder.lua ├── SmolderingEmberRestrict.lua ├── SoL.lua ├── SocketeerV1 .lua ├── SpectralAttendant (2).lua ├── SpectralAttendant.lua ├── SpectralAttendant2.lua ├── Spells_on_levelup.lua ├── SpiritofThalgorath.lua ├── StartWithPet.lua ├── Startstop.lua ├── StealthPot.lua ├── StoneSkinGargoyle.lua ├── Stormwind ├── Alleria1.lua ├── Alleria2.lua ├── AllianceMage.lua ├── AllianceMage2.lua ├── AlliancePaladin.lua ├── AlliancePaladin2.lua ├── AlliancePriest.lua ├── AlliancePriest2.lua ├── AllianceWarHerald.lua ├── ArchBishopBen.lua ├── Bolvar.lua ├── Bolvar2.lua ├── Duthorian.lua ├── Laurena.lua ├── Patchqwerk.lua ├── PatchwerkHorror.lua ├── PatchworkHorror2.lua ├── SW-Archer.lua ├── SW-Guard.lua ├── SW-GuardCleave.lua ├── SWDefenders.lua ├── SWGKillCred.lua ├── SWVillager.lua ├── Shailiea.lua ├── TrapQuestA.lua ├── TrapQuestR.lua ├── Turalyon1.lua └── Turalyon2.lua ├── SummonAll.lua ├── Sylvanas.lua ├── TempMount.lua ├── TrapCredit.lua ├── TrapQuestA.lua ├── TrapQuestR.lua ├── Trash_Earthborer.lua ├── Trash_RagefireTrogg.lua ├── Trash_SearingBlaceCultist.lua ├── TreeChopping.lua ├── Turalyon.lua ├── Turalyon1.lua ├── Turalyon2.lua ├── TurretKillCred.lua ├── Unbind.lua ├── UnlimitedAmmo.lua ├── VanillaDungeonScourge ├── Scorn.lua └── Sever.lua ├── VenomBelcher.lua ├── VincentADKMorph.lua ├── WeaponMaster.lua ├── Weapon_Visual_Style.lua ├── Westfall ├── FOEREAPER.lua └── Lithe-Stalker.lua ├── Yelmek.lua ├── allweapons.zip ├── boss_kruul.lua ├── buff.lua ├── give_loom.lua ├── quest_30018_spawn_bunnies.lua ├── quest_30018_trash_bunnies.lua ├── quest_30018_undead_bunny.lua ├── reload_scripts.lua ├── repair.lua ├── reset_instances.lua ├── spell_hunter.cpp └── teleporter.lua /Alleria1.lua: -------------------------------------------------------------------------------- 1 | local npcid = 400019 2 | 3 | function OnSpawn(event, creature) 4 | creature:SetWalk(true) 5 | creature:MoveWaypoint() 6 | creature:SetReactState(0) 7 | end 8 | 9 | RegisterCreatureEvent(npcid, 5, OnSpawn) -------------------------------------------------------------------------------- /AllianceMage2.lua: -------------------------------------------------------------------------------- 1 | local AMage = {} 2 | 3 | local function CastFireball(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 38692, true) 5 | end 6 | 7 | local function CastFrostbolt(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 27071, true) 9 | end 10 | 11 | local function CastBlizzard(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 42213, true) 13 | end 14 | 15 | local function CastArcaneExplosion(eventId, delay, calls, creature) 16 | creature:CastSpell(creature:GetVictim(), 19712, true) 17 | end 18 | 19 | local function OnEnterCombat(event, creature, target) 20 | creature:RegisterEvent(CastFireball, 3600, 0) 21 | creature:RegisterEvent(CastFrostbolt, 7200, 0) 22 | creature:RegisterEvent(CastBlizzard, 9000, 0) 23 | creature:RegisterEvent(CastArcaneExplosion, 10800, 0) 24 | end 25 | 26 | local function OnLeaveCombat(event, creature) 27 | creature:RemoveEvents() 28 | end 29 | 30 | local function OnDied(event, creature, killer) 31 | creature:RemoveEvents() 32 | end 33 | 34 | RegisterCreatureEvent(400027, 1, OnEnterCombat) 35 | RegisterCreatureEvent(400027, 2, OnLeaveCombat) 36 | RegisterCreatureEvent(400027, 4, OnDied) -------------------------------------------------------------------------------- /AlliancePaladin.lua: -------------------------------------------------------------------------------- 1 | local AlliancePaladin = 400030 2 | local kingsSpell = 25898 3 | local wisdomSpell = 25918 4 | local mightSpell = 25916 5 | 6 | local function OnSpawn(event, creature) 7 | creature:CastSpell(creature, kingsSpell, true) 8 | end 9 | 10 | local function OnGossipHello(event, player, creature) 11 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_magic_magearmor:50:50:-13:0|tGrant me a Blessing of Kings", 0, 1, false, "", 0) 12 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_holy_sealofwisdom:50:50:-13:0|tGrant me a Blessing of Wisdom", 0, 2, false, "", 0) 13 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_holy_fistofjustice:50:50:-13:0|tGrant me a Blessing of Might", 0, 3, false, "", 0) 14 | player:GossipSendMenu(1, creature) 15 | end 16 | 17 | local function OnGossipSelect(event, player, creature, sender, intid, code, menuid) 18 | if intid == 1 then 19 | player:CastSpell(player, kingsSpell, true) 20 | elseif intid == 2 then 21 | player:CastSpell(player, wisdomSpell, true) 22 | elseif intid == 3 then 23 | player:CastSpell(player, mightSpell, true) 24 | end 25 | player:GossipComplete() 26 | end 27 | 28 | RegisterCreatureEvent(AlliancePaladin, 5, OnSpawn) 29 | RegisterCreatureGossipEvent(AlliancePaladin, 1, OnGossipHello) 30 | RegisterCreatureGossipEvent(AlliancePaladin, 2, OnGossipSelect) -------------------------------------------------------------------------------- /AlliancePaladin2.lua: -------------------------------------------------------------------------------- 1 | local AlliancePaladin = {} 2 | 3 | local function CastCS(eventId, delay, calls, creature) 4 | creature:CastSpell(creature, 35395, true) 5 | end 6 | 7 | local function CastCons(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 20924, true) 9 | end 10 | 11 | local function CastDS(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 53385, true) 13 | end 14 | 15 | local function CastJOL(eventId, delay, calls, creature) 16 | creature:CastSpell(creature:GetVictim(), 20271, true) 17 | end 18 | 19 | local function CastAvengingWrath(event, creature) 20 | creature:CastSpell(creature, 31884, true) 21 | end 22 | 23 | local function CastKings(event, creature) 24 | creature:CastSpell(creature, 20217, true) 25 | end 26 | 27 | local function OnEnterCombat(event, creature, target) 28 | creature:RegisterEvent(CastCS, 6000, 0) 29 | creature:RegisterEvent(CastCons, 8000, 0) 30 | creature:RegisterEvent(CastDS, 10000, 0) 31 | creature:RegisterEvent(CastJOL, 11000, 0) 32 | end 33 | 34 | local function OnLeaveCombat(event, creature) 35 | creature:RemoveEvents() 36 | end 37 | 38 | local function OnDied(event, creature, killer) 39 | creature:RemoveEvents() 40 | end 41 | 42 | local function OnSpawn(event, creature) 43 | creature:CastSpell(creature, 20217, true) 44 | end 45 | 46 | RegisterCreatureEvent(400030, 1, OnEnterCombat) 47 | RegisterCreatureEvent(400030, 2, OnLeaveCombat) 48 | RegisterCreatureEvent(400030, 4, OnDied) 49 | RegisterCreatureEvent(400030, 5, OnSpawn) 50 | 51 | -------------------------------------------------------------------------------- /AlliancePriest2.lua: -------------------------------------------------------------------------------- 1 | local APriest = {}; 2 | 3 | local function CastSmite(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 48122, true) 5 | end 6 | 7 | local function CastHolyFire(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 48134, true) 9 | end 10 | 11 | local function CastSWP(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 27605, true) 13 | end 14 | 15 | local function OnEnterCombat(event, creature, target) 16 | creature:RegisterEvent(CastSmite, 2600, 0) 17 | creature:RegisterEvent(CastHolyFire, 5000, 0) 18 | creature:RegisterEvent(CastSWP, 15000, 0) 19 | end 20 | 21 | local function OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | local function OnDied(event, creature, killer) 26 | creature:RemoveEvents() 27 | end 28 | 29 | RegisterCreatureEvent(400026, 1, OnEnterCombat) 30 | RegisterCreatureEvent(400026, 2, OnLeaveCombat) 31 | RegisterCreatureEvent(400026, 4, OnDied) -------------------------------------------------------------------------------- /AllianceWarHerald.lua: -------------------------------------------------------------------------------- 1 | local NPC_ID = 35200 -- replace with the NPC's ID 2 | local BLESSING_SPELL_ID = 100003 -- replace with the first spell ID 3 | local SOULSTONE_SPELL_ID = 20707 -- replace with the second spell ID 4 | 5 | local function OnGossipHello(event, player, creature) 6 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\Spell_Holy_ReviveChampion:50:50:-43:0|tReceive the King's blessing", 0, 1, false, "", 0) 7 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\inv_misc_orb_04:50:50:-43:0|tReceive a Soulstone", 0, 2, false, "", 0) 8 | player:GossipSendMenu(1, creature) 9 | end 10 | 11 | local function OnGossipSelect(event, player, creature, sender, intid, code, menuid) 12 | if intid == 1 then 13 | player:CastSpell(player, BLESSING_SPELL_ID, true) 14 | elseif intid == 2 then 15 | player:CastSpell(player, SOULSTONE_SPELL_ID, true) 16 | end 17 | player:GossipComplete() 18 | end 19 | 20 | local function YellDialogue(event, creature) 21 | creature:SendUnitYell("Adventurers, do not go unprepared! Come speak with me and I will grant you a blessing!", 0) 22 | end 23 | 24 | RegisterCreatureGossipEvent(NPC_ID, 1, OnGossipHello) 25 | RegisterCreatureGossipEvent(NPC_ID, 2, OnGossipSelect) 26 | 27 | -- triggers the yell function on spawn 28 | RegisterCreatureEvent(NPC_ID, 5, function(event, creature) YellDialogue(event, creature) end) 29 | 30 | -------------------------------------------------------------------------------- /Auctioneer.lua: -------------------------------------------------------------------------------- 1 | local Auctioneer = {}; 2 | 3 | function Auctioneer.OnGossipHello(event, player, object) 4 | player:GossipClearMenu() 5 | player:GossipMenuAddItem(0, "What happened here?", 0, 0) 6 | player:GossipSendMenu(1, object) 7 | end 8 | 9 | function Auctioneer.OnGossipSelect(event, player, object, sender, intid, code, menuid) 10 | if (intid == 0) then 11 | object:SendUnitSay("Big block of ice came tumbling out of the sky and smacked right into the Auctionhouse. We're lucky we even made it out alive...", 0) 12 | end 13 | end 14 | 15 | RegisterCreatureGossipEvent(400063, 1, Auctioneer.OnGossipHello) 16 | RegisterCreatureGossipEvent(400063, 2, Auctioneer.OnGossipSelect) -------------------------------------------------------------------------------- /Auto91.lua: -------------------------------------------------------------------------------- 1 | --Custom Content Auto-loader. If you don't see custom content in Azeroth or unscripted creatures, it's because it's December 31st. Just .event stop 91 and .event start 91 again. 2 | --DO NOT TOUCH! THIS IS TO FIX AN EXTREMELY ANNOYING BUG! 3 | 4 | local eventId = 91 5 | 6 | function OnStartup() 7 | StartGameEvent(eventId, true) 8 | end 9 | 10 | RegisterServerEvent(14, OnStartup) -------------------------------------------------------------------------------- /Auto_Rez.lua: -------------------------------------------------------------------------------- 1 | local SPELL_ID = 51916 2 | 3 | function OnKilledByCreature(event, killer, killed) 4 | killed:CastSpell(killed, SPELL_ID, true) 5 | end 6 | 7 | RegisterPlayerEvent(8, OnKilledByCreature) 8 | -------------------------------------------------------------------------------- /Barrier.lua: -------------------------------------------------------------------------------- 1 | local npcId = 400092 2 | local spellId = 100199 3 | local range = 8 4 | local killCreditNpcId = 400095 5 | 6 | function OnSpellCast(event, player, spell) 7 | if spell:GetEntry() == spellId then 8 | nearestCreature = player:GetNearestCreature(range, npcId) 9 | if nearestCreature == nil then 10 | player:SendBroadcastMessage("You need to place the barrier in a more strategic location.") 11 | spell:Cancel() 12 | else 13 | player:KilledMonsterCredit(killCreditNpcId) 14 | player:SendBroadcastMessage("You have successfully built a barrier!") 15 | end 16 | end 17 | end 18 | 19 | RegisterPlayerEvent(5, OnSpellCast) 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /BlightedZombie.lua: -------------------------------------------------------------------------------- 1 | local BlightedZombie = {} 2 | 3 | function BlightedZombie.OnSpawn(event, creature) 4 | creature:SetMaxHealth(17720) 5 | creature:CastSpell(creature:GetVictim(), 17683, true) 6 | end 7 | 8 | function BlightedZombie.OnCombat(event, creature, target) 9 | creature:RegisterEvent(BlightedZombie.Ability1, 7000, 0) 10 | creature:RegisterEvent(BlightedZombie.Ability2, 14000, 0) 11 | end 12 | 13 | function BlightedZombie.Ability1(event, delay, calls, creature) 14 | creature:CastSpell(creature:GetVictim(), 52476, true) 15 | end 16 | 17 | function BlightedZombie.Ability2(event, delay, calls, creature) 18 | creature:CastSpell(creature:GetVictim(), 37597, true) 19 | end 20 | 21 | function BlightedZombie.OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | function BlightedZombie.OnDeath(event, creature, killer) 26 | creature:DespawnOrUnsummon(5000) 27 | creature:RemoveEvents() 28 | end 29 | 30 | RegisterCreatureEvent(400051, 1, BlightedZombie.OnCombat) 31 | RegisterCreatureEvent(400051, 2, BlightedZombie.OnLeaveCombat) 32 | RegisterCreatureEvent(400051, 4, BlightedZombie.OnDeath) 33 | RegisterCreatureEvent(400051, 5, BlightedZombie.OnSpawn) 34 | 35 | 36 | -------------------------------------------------------------------------------- /BlightedZombie2.lua: -------------------------------------------------------------------------------- 1 | local BlightedZombie = {} 2 | 3 | function BlightedZombie.OnCombat(event, creature, target) 4 | creature:RegisterEvent(BlightedZombie.Ability1, 7000, 0) 5 | creature:RegisterEvent(BlightedZombie.Ability2, 12000, 0) 6 | end 7 | 8 | function BlightedZombie.Ability1(event, delay, calls, creature) 9 | creature:CastSpell(creature:GetVictim(), 52476, true) 10 | end 11 | 12 | function BlightedZombie.Ability2(event, delay, calls, creature) 13 | creature:CastSpell(creature:GetVictim(), 37597, true) 14 | end 15 | 16 | function BlightedZombie.OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | function BlightedZombie.OnDeath(event, creature, killer) 21 | creature:RemoveEvents() 22 | end 23 | 24 | RegisterCreatureEvent(4475, 1, BlightedZombie.OnCombat) 25 | RegisterCreatureEvent(4475, 2, BlightedZombie.OnLeaveCombat) 26 | RegisterCreatureEvent(4475, 4, BlightedZombie.OnDeath) 27 | -------------------------------------------------------------------------------- /BlisteringZombie.lua: -------------------------------------------------------------------------------- 1 | local BlisteringZombie = {}; 2 | 3 | local function CastArmyOfTheDead(eventId, delay, calls, creature) 4 | creature:CastSpell(creature, 42650, true) 5 | end 6 | 7 | local function CastSpit(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 25262, true) 9 | end 10 | 11 | local function CastSpecialSpell(eventId, delay, calls, creature) 12 | local victim = creature:GetVictim() 13 | if not victim then 14 | return 15 | end 16 | if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then 17 | creature:CastSpell(victim, 5, true) 18 | end 19 | end 20 | 21 | 22 | local function OnEnterCombat(event, creature, target) 23 | creature:RegisterEvent(CastArmyOfTheDead, 25000, 0) 24 | creature:RegisterEvent(CastSpit, 5000, 0) 25 | creature:RegisterEvent(CastSpecialSpell, 1000, 0) 26 | end 27 | 28 | local function OnLeaveCombat(event, creature) 29 | creature:RemoveEvents() 30 | end 31 | 32 | local function OnSpawn(event, creature) 33 | creature:RegisterEvent(CastArmyOfTheDead, 1000, 1) 34 | end 35 | 36 | local function OnDied(event, creature, killer) 37 | creature:DespawnOrUnsummon(5000) 38 | creature:RemoveEvents() 39 | end 40 | 41 | RegisterCreatureEvent(400029, 1, OnEnterCombat) 42 | RegisterCreatureEvent(400029, 2, OnLeaveCombat) 43 | RegisterCreatureEvent(400029, 4, OnDied) 44 | RegisterCreatureEvent(400029, 5, OnSpawn) -------------------------------------------------------------------------------- /BlisteringZombie2.lua: -------------------------------------------------------------------------------- 1 | local BlisteringZombie = {}; 2 | 3 | function BlisteringZombie.OnSpawn(event, creature) 4 | creature:SetMaxHealth(8224) 5 | creature:CastSpell(creature:GetVictim(), 17683, true) 6 | end 7 | 8 | function BlisteringZombie.OnCombat(event, creature, target) 9 | creature:RegisterEvent(BlisteringZombie.Ability1, 8000, 0) 10 | end 11 | 12 | function BlisteringZombie.Ability1(event, delay, calls, creature) 13 | creature:CastSpell(creature:GetVictim(), 55604, true) 14 | end 15 | 16 | function BlisteringZombie.OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | function BlisteringZombie.OnDeath(event, creature, killer) 21 | creature:DespawnOrUnsummon(10000) 22 | creature:RemoveEvents() 23 | end 24 | 25 | RegisterCreatureEvent(400077, 1, BlisteringZombie.OnCombat) 26 | RegisterCreatureEvent(400077, 2, BlisteringZombie.OnLeaveCombat) 27 | RegisterCreatureEvent(400077, 4, BlisteringZombie.OnDeath) 28 | RegisterCreatureEvent(400077, 5, BlisteringZombie.OnSpawn) -------------------------------------------------------------------------------- /Bolvar.lua: -------------------------------------------------------------------------------- 1 | local Bolvar = {} 2 | 3 | local function CastAS(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 32699, true) 5 | end 6 | 7 | local function CastHOR(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 53595, true) 9 | end 10 | 11 | local function CastSunder(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 58461, true) 13 | end 14 | 15 | local function CastAvengingWrath(event, creature) 16 | creature:CastSpell(creature, 31884, true) 17 | end 18 | 19 | local function CastKings(event, creature) 20 | creature:CastSpell(creature, 20217, true) 21 | end 22 | 23 | local function OnEnterCombat(event, creature, target) 24 | creature:RegisterEvent(CastAS, 12600, 0) 25 | creature:RegisterEvent(CastHOR, 5000, 0) 26 | creature:RegisterEvent(CastSunder, 10000, 0) 27 | creature:RegisterEvent(CastAvengingWrath, 1, 1) 28 | end 29 | 30 | local function OnLeaveCombat(event, creature) 31 | creature:RemoveEvents() 32 | end 33 | 34 | local function OnDied(event, creature, killer) 35 | creature:RemoveEvents() 36 | end 37 | 38 | local function OnSpawn(event, creature) 39 | creature:CastSpell(creature, 20217, true) 40 | end 41 | 42 | RegisterCreatureEvent(1748, 1, OnEnterCombat) 43 | RegisterCreatureEvent(1748, 2, OnLeaveCombat) 44 | RegisterCreatureEvent(1748, 4, OnDied) 45 | RegisterCreatureEvent(1748, 5, OnSpawn) 46 | 47 | -------------------------------------------------------------------------------- /BoneSentinel.lua: -------------------------------------------------------------------------------- 1 | local BoneSentinel = {}; 2 | 3 | local function CastShadowCleave(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 38226, true) 5 | end 6 | 7 | local function CastEarthquake(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 33919, true) 9 | end 10 | 11 | local function CastSpecialSpell(eventId, delay, calls, creature) 12 | local victim = creature:GetVictim() 13 | if not victim then 14 | return 15 | end 16 | if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then 17 | creature:CastSpell(victim, 5, true) 18 | end 19 | end 20 | 21 | local function OnEnterCombat(event, creature, target) 22 | creature:RegisterEvent(CastShadowCleave, 5000, 0) 23 | creature:RegisterEvent(CastEarthquake, 12000, 0) 24 | creature:RegisterEvent(CastSpecialSpell, 1000, 0) 25 | end 26 | 27 | local function OnLeaveCombat(event, creature) 28 | creature:RemoveEvents() 29 | end 30 | 31 | local function OnDied(event, creature, killer) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(400036, 1, OnEnterCombat) 36 | RegisterCreatureEvent(400036, 2, OnLeaveCombat) 37 | RegisterCreatureEvent(400036, 4, OnDied) 38 | -------------------------------------------------------------------------------- /BoneWitch.lua: -------------------------------------------------------------------------------- 1 | local BoneWitch = {}; 2 | 3 | 4 | local function CastBoneShards(eventId, delay, calls, creature) 5 | creature:CastSpell(creature, 17014, true) 6 | end 7 | 8 | local function OnSpawn(event, creature, target) 9 | creature:RegisterEvent(CastBoneShards, 100, 1) 10 | creature:RegisterEvent(CastBoneShards, 14000, 0) 11 | end 12 | 13 | local function OnDied(event, creature, killer) 14 | creature:DespawnOrUnsummon(25000) 15 | creature:RemoveEvents() 16 | end 17 | 18 | RegisterCreatureEvent(16380, 5, OnSpawn) 19 | RegisterCreatureEvent(16380, 4, OnDied) -------------------------------------------------------------------------------- /Boss_Bazzalan.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | EmuDevs 3 | Eluna Lua Engine 4 | Eluna Scripts 5 | Eluna Wiki 6 | 7 | -= Script Information =- 8 | * Script Type: Boss Fight 9 | * Npc: Bazzalan <11519> 10 | --]] 11 | 12 | local Bazzalan = {}; 13 | 14 | function Bazzalan.OnEnterCombat(event, creature, target) 15 | creature:RegisterEvent(Bazzalan.Poison, math.random(3000, 5000), 0) 16 | creature:RegisterEvent(Bazzalan.Sinister_Strike, 8000, 0) 17 | end 18 | 19 | function Bazzalan.Poison(event, delay, pCall, creature) 20 | if (math.random(1, 100) <= 75) then 21 | creature:CastSpell(creature:GetVictim(), 744) 22 | end 23 | end 24 | 25 | function Bazzalan.Sinister_Strike(event, delay, pCall, creature) 26 | if (math.random(1, 100) <= 85) then 27 | creature:CastSpell(creature:GetVictim(), 14873) 28 | end 29 | end 30 | 31 | function Bazzalan.Reset(event, creature) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(11519, 1, Bazzalan.OnEnterCombat) 36 | RegisterCreatureEvent(11519, 2, Bazzalan.Reset) -- OnLeaveCombat 37 | RegisterCreatureEvent(11519, 4, Bazzalan.Reset) -- OnDied -------------------------------------------------------------------------------- /Boss_Jergosh.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | EmuDevs 3 | Eluna Lua Engine 4 | Eluna Scripts 5 | Eluna Wiki 6 | 7 | -= Script Information =- 8 | * Script Type: Boss Fight 9 | * Npc: Jergosh the Invoker <11518> 10 | --]] 11 | 12 | local Jergosh = {}; 13 | 14 | function Jergosh.OnEnterCombat(event, creature, target) 15 | creature:RegisterEvent(Jergosh.Immolate, 12000, 0) 16 | creature:RegisterEvent(Jergosh.Curse_of_Weakness, 30000, 0) 17 | end 18 | 19 | function Jergosh.Immolate(event, delay, pCall, creature) 20 | if (math.random(1, 100) <= 85) then 21 | creature:CastSpell(creature:GetVictim(), 20800) 22 | end 23 | end 24 | 25 | function Jergosh.Curse_of_Weakness(event, delay, pCall, creature) 26 | if (math.random(1, 100) <= 75) then 27 | local players = creature:GetPlayersInRange() 28 | creature:CastSpell(players[math.random(1, #players)], 11980) 29 | end 30 | end 31 | 32 | function Jergosh.Reset(event, creature) 33 | creature:RemoveEvents() 34 | end 35 | 36 | RegisterCreatureEvent(11518, 1, Jergosh.OnEnterCombat) 37 | RegisterCreatureEvent(11518, 2, Jergosh.Reset) -- OnLeaveCombat 38 | RegisterCreatureEvent(11518, 4, Jergosh.Reset) -- OnDied -------------------------------------------------------------------------------- /Boss_Oggleflint.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | EmuDevs 3 | Eluna Lua Engine 4 | Eluna Scripts 5 | Eluna Wiki 6 | 7 | -= Script Information =- 8 | * Script Type: Boss Fight 9 | * Npc: Oggleflint <11517> 10 | --]] 11 | 12 | local Oggleflint = {}; 13 | 14 | function Oggleflint.OnEnterCombat(event, creature, target) 15 | creature:RegisterEvent(Oggleflint.Cleave, 8000, 0) 16 | end 17 | 18 | function Oggleflint.Cleave(event, delay, pCall, creature) 19 | if (math.random(1, 100) <= 70) then 20 | creature:CastSpell(creature:GetVictim(), 40505) 21 | end 22 | end 23 | 24 | function Oggleflint.Reset(event, creature) 25 | creature:RemoveEvents() 26 | end 27 | 28 | RegisterCreatureEvent(11517, 1, Oggleflint.OnEnterCombat) 29 | RegisterCreatureEvent(11517, 2, Oggleflint.Reset) -- OnLeaveCombat 30 | RegisterCreatureEvent(11517, 4, Oggleflint.Reset) -- OnDied -------------------------------------------------------------------------------- /Boss_Taragaman.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | EmuDevs 3 | Eluna Lua Engine 4 | Eluna Scripts 5 | Eluna Wiki 6 | 7 | -= Script Information =- 8 | * Script Type: Boss Fight 9 | * Npc: Taragaman the Hungerer <11520> 10 | --]] 11 | 12 | local Taragaman = {}; 13 | 14 | function Taragaman.OnEnterCombat(event, creature, target) 15 | creature:RegisterEvent(Taragaman.Uppercut, 5000, 0) 16 | creature:RegisterEvent(Taragaman.Fire_Nova, 8000, 0) 17 | end 18 | 19 | function Taragaman.Uppercut(event, delay, pCall, creature) 20 | if (math.random(1, 100) <= 85) then 21 | creature:CastSpell(creature:GetVictim(), 18072) 22 | end 23 | end 24 | 25 | function Taragaman.Fire_Nova(event, delay, pCall, creature) 26 | if (math.random(1, 100) <= 75) then 27 | creature:CastSpell(creature:GetVictim(), 11970) 28 | end 29 | end 30 | 31 | function Taragaman.Reset(event, creature) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(11520, 1, Taragaman.OnEnterCombat) 36 | RegisterCreatureEvent(11520, 2, Taragaman.Reset) -- OnLeaveCombat 37 | RegisterCreatureEvent(11520, 4, Taragaman.Reset) -- OnDied -------------------------------------------------------------------------------- /CooldownFreeFlying.lua: -------------------------------------------------------------------------------- 1 | --This script is for people who want to remove the cooldowns for Up, Up and Away and Skyburst spells 2 | --Up, Up and Away will still have a CD but is reset when you cast Skyburst 3 | 4 | local resetCooldown = false -- Set to true to enable 5 | local castFullHeal = false -- Set to true to enable. This will remove the damage caused to the player by Skyburst 6 | 7 | local function ResetCooldowns(event, player, spell) 8 | local spellId = spell:GetEntry() 9 | 10 | if resetCooldown and (spellId == 100209 or spellId == 100217 or spellId == 100216 or spellId == 100221) then 11 | player:ResetSpellCooldown(100210) 12 | player:ResetSpellCooldown(100211) 13 | player:ResetSpellCooldown(100218) 14 | player:ResetSpellCooldown(100219) 15 | player:ResetSpellCooldown(100214) 16 | player:ResetSpellCooldown(100213) 17 | player:ResetSpellCooldown(100215) 18 | player:ResetSpellCooldown(100220) 19 | elseif castFullHeal and not player:IsInCombat() and (spellId == 100210 or spellId == 100211 or spellId == 100218 or spellId == 100219 or spellId == 100214 or spellId == 100213 or spellId == 100215 or spellId == 100220) then 20 | player:CastSpell(player, 17683, true) 21 | end 22 | end 23 | 24 | RegisterPlayerEvent(5, ResetCooldowns) 25 | 26 | -------------------------------------------------------------------------------- /CoreRager.lua: -------------------------------------------------------------------------------- 1 | CoreRager = {} 2 | 3 | function CoreRager.CastMangle(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 19820, true) 5 | end 6 | 7 | function CoreRager.OnDamageTaken(event, creature, attacker, damage) 8 | if creature:GetHealthPct() < 50 then 9 | creature:CastSpell(creature, 17683, true) 10 | creature:SendUnitEmote("Core Rager refuses to die while its master is in trouble.", 0) 11 | end 12 | end 13 | 14 | function CoreRager.OnEnterCombat(event, creature, target) 15 | creature:RegisterEvent(CoreRager.CastMangle, 7000, 0) 16 | end 17 | 18 | function CoreRager.OnLeaveCombat(event, creature) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function CoreRager.OnDied(event, creature, killer) 23 | creature:RemoveEvents() 24 | end 25 | 26 | function CoreRager.OnSpawn(event, creature) 27 | creature:SetMaxHealth(200000) 28 | end 29 | 30 | function CoreRager.OnGolemaggDeath(event, creature, boss) 31 | local coreRagers = creature:GetCreaturesInRange(100, 11672) 32 | for _, coreRager in pairs(coreRagers) do 33 | coreRager:CastSpell(coreRager, 13520, true) 34 | end 35 | end 36 | 37 | RegisterCreatureEvent(11672, 1, CoreRager.OnEnterCombat) 38 | RegisterCreatureEvent(11672, 2, CoreRager.OnLeaveCombat) 39 | RegisterCreatureEvent(11672, 4, CoreRager.OnDied) 40 | RegisterCreatureEvent(11672, 5, CoreRager.OnSpawn) 41 | RegisterCreatureEvent(11672, 9, CoreRager.OnDamageTaken) 42 | 43 | RegisterCreatureEvent(11988, 4, CoreRager.OnGolemaggDeath) -------------------------------------------------------------------------------- /CreepStalker.lua: -------------------------------------------------------------------------------- 1 | local CreepStalker = {}; 2 | 3 | local function CastRake(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 9904, true) 5 | end 6 | 7 | local function CastStun(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 34510, true) 9 | end 10 | 11 | local function OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(CastRake, 5000, 0) 13 | creature:RegisterEvent(CastStun, 12000, 0) 14 | end 15 | 16 | local function OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | local function OnDied(event, creature, killer) 21 | creature:DespawnOrUnsummon(5000) 22 | creature:RemoveEvents() 23 | end 24 | 25 | RegisterCreatureEvent(400032, 1, OnEnterCombat) 26 | RegisterCreatureEvent(400032, 2, OnLeaveCombat) 27 | RegisterCreatureEvent(400032, 4, OnDied) -------------------------------------------------------------------------------- /Crossroads/CrossroadsBanshee.lua: -------------------------------------------------------------------------------- 1 | local NPC_BANSHEE = 400112 2 | local NPC_TARGET = 3338 3 | 4 | local SPELL_BANSHEE_SCREAM = 8124 5 | local SPELL_SHADOW_BOLT = 9613 6 | local SPELL_CAST_DEATH = 5 7 | 8 | local function CastShadowBolt(eventId, delay, calls, creature) 9 | creature:CastSpell(creature:GetVictim(), SPELL_SHADOW_BOLT, true) 10 | end 11 | 12 | local function CastBansheeScream(eventId, delay, calls, creature) 13 | creature:CastSpell(creature:GetVictim(), SPELL_BANSHEE_SCREAM, true) 14 | end 15 | 16 | local function CastSpellOnTarget(creature, targetNPC) 17 | creature:CastSpell(targetNPC, SPELL_CAST_DEATH, true) 18 | end 19 | 20 | local function Banshee_OnEnterCombat(event, creature, target) 21 | creature:RegisterEvent(CastShadowBolt, math.random(4000, 8000), 0) 22 | creature:RegisterEvent(CastBansheeScream, math.random(9000, 18000), 1) 23 | 24 | local targetNPC = creature:GetNearestCreature(50, NPC_TARGET) 25 | if targetNPC then 26 | CastSpellOnTarget(creature, targetNPC) 27 | end 28 | end 29 | 30 | local function Banshee_OnLeaveCombat(event, creature) 31 | creature:RemoveEvents() 32 | end 33 | 34 | local function Banshee_OnDied(event, creature, killer) 35 | creature:RemoveEvents() 36 | creature:DespawnOrUnsummon(10000) 37 | end 38 | 39 | RegisterCreatureEvent(NPC_BANSHEE, 1, Banshee_OnEnterCombat) 40 | RegisterCreatureEvent(NPC_BANSHEE, 2, Banshee_OnLeaveCombat) 41 | RegisterCreatureEvent(NPC_BANSHEE, 4, Banshee_OnDied) 42 | -------------------------------------------------------------------------------- /Crossroads/CrossroadsGuards.lua: -------------------------------------------------------------------------------- 1 | local NPC_HORDE_GUARD = 400105 2 | 3 | local SPELL_REND = 6547 4 | 5 | local function CastRend(eventId, delay, calls, creature) 6 | creature:CastSpell(creature:GetVictim(), SPELL_REND, true) 7 | end 8 | 9 | local function HordeGuard_OnEnterCombat(event, creature, target) 10 | creature:RegisterEvent(CastRend, 100, 1) 11 | creature:RegisterEvent(CastRend, math.random(8000, 15000), 0) 12 | end 13 | 14 | local function HordeGuard_OnLeaveCombat(event, creature) 15 | creature:RemoveEvents() 16 | creature:EmoteState(375) 17 | end 18 | 19 | local function HordeGuard_OnSpawn(event, creature) 20 | creature:EmoteState(375) 21 | creature:SetEquipmentSlots(6905, 0, 0) 22 | end 23 | 24 | RegisterCreatureEvent(NPC_HORDE_GUARD, 1, HordeGuard_OnEnterCombat) 25 | RegisterCreatureEvent(NPC_HORDE_GUARD, 2, HordeGuard_OnLeaveCombat) 26 | RegisterCreatureEvent(NPC_HORDE_GUARD, 5, HordeGuard_OnSpawn) 27 | -------------------------------------------------------------------------------- /CustomGreench.lua: -------------------------------------------------------------------------------- 1 | --Needs lots and lots of work. Register health check to event 9. 2 | --Add true false statements to check if he's reached below 50. 3 | --Don't remove events unnecessarily 4 | 5 | local AbominableGreench = {}; 6 | 7 | function AbominableGreench.OnDie(event, creature) 8 | creature:SendUnitYell("Argh... I'll be back!", 0) 9 | end 10 | 11 | function AbominableGreench.Enrage(event, delay, calls, creature) 12 | if (creature:GetHealthPct() <= 50) then 13 | creature:RemoveEvents() 14 | creature:CastSpell(creature, 61369, true) 15 | creature:RegisterEvent(AbominableGreench.FrostAttack, 4000, 0) 16 | end 17 | end 18 | 19 | function AbominableGreench.FrostAttack(event, delay, calls, creature) 20 | local TARGET = creature:GetAITarget(1, true, 0, 45) 21 | creature:CastSpell(TARGET, 35263, true) 22 | end 23 | 24 | function AbominableGreench.OnEnterCombat(event, creature, target) 25 | local TARGET = creature:GetAITarget(1, true, 0, 45) 26 | creature:CastSpell(TARGET, 33547, true) 27 | creature:SendUnitYell("You can try to stop me, but it's just a waste of time. I'm the king of Winter Veil crime!", 0) 28 | creature:RegisterEvent(AbominableGreench.Enrage, 1000, 0) 29 | end 30 | 31 | function AbominableGreench.OnLeaveCombat(event, creature) 32 | creature:SendUnitYell("What's the matter? Don't you like my holiday spirit?", 0) 33 | creature:RemoveEvents() 34 | end 35 | 36 | RegisterCreatureEvent(13602, 1, AbominableGreench.OnEnterCombat) 37 | RegisterCreatureEvent(13602, 2, AbominableGreench.OnLeaveCombat) 38 | RegisterCreatureEvent(13602, 4, AbominableGreench.OnDie) -------------------------------------------------------------------------------- /DarionTur.lua: -------------------------------------------------------------------------------- 1 | local CustomCreature = {} 2 | local NPC_ID = 400081 3 | local MAX_HEALTH = 8432 -- Set the desired max health value 4 | 5 | 6 | local ABILITY_1 = 16856 7 | local ABILITY_2 = 676 8 | 9 | function CustomCreature.OnSpawn(event, creature) 10 | creature:SetMaxHealth(MAX_HEALTH) 11 | creature:SetHealth(MAX_HEALTH) 12 | end 13 | 14 | function CustomCreature.OnCombat(event, creature, target) 15 | creature:RegisterEvent(CustomCreature.Ability1, 7000, 0) 16 | creature:RegisterEvent(CustomCreature.Ability2, 22000, 0) 17 | end 18 | 19 | function CustomCreature.Ability1(event, delay, calls, creature) 20 | creature:CastSpell(creature:GetVictim(), ABILITY_1, true) 21 | end 22 | 23 | function CustomCreature.Ability2(event, delay, calls, creature) 24 | creature:CastSpell(creature:GetVictim(), ABILITY_2, true) 25 | end 26 | 27 | function CustomCreature.OnLeaveCombat(event, creature) 28 | creature:RemoveEvents() 29 | end 30 | 31 | function CustomCreature.OnDeath(event, creature, killer) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(NPC_ID, 5, CustomCreature.OnSpawn) 36 | RegisterCreatureEvent(NPC_ID, 1, CustomCreature.OnCombat) 37 | RegisterCreatureEvent(NPC_ID, 2, CustomCreature.OnLeaveCombat) 38 | RegisterCreatureEvent(NPC_ID, 4, CustomCreature.OnDeath) 39 | -------------------------------------------------------------------------------- /DarionTur2.lua: -------------------------------------------------------------------------------- 1 | local NPC_ID_DAMION_TUR = 400079 2 | local SOUND_ID = 20436 3 | 4 | local function OnDamionTurSpawn(event, creature) 5 | creature:PlayDirectSound(SOUND_ID) 6 | end 7 | 8 | RegisterCreatureEvent(NPC_ID_DAMION_TUR, 5, OnDamionTurSpawn) 9 | -------------------------------------------------------------------------------- /DarkRanger.lua: -------------------------------------------------------------------------------- 1 | local DarkRanger = {} 2 | 3 | local function CastShoot(eventId, delay, calls, creature) 4 | creature:CastSpell(target, 37770, true) -- cast shoot on target 5 | end 6 | 7 | 8 | local function CastBlackArrow(eventId, delay, calls, creature) 9 | creature:CastSpell(creature:GetVictim(), 63671, true) 10 | end 11 | 12 | local function CastExplodingShot(eventId, delay, calls, creature) 13 | creature:CastSpell(creature:GetVictim(), 33792, true) 14 | end 15 | 16 | local function CastBarrage(eventId, delay, calls, creature) 17 | creature:CastSpell(creature:GetVictim(), 10188, true) 18 | end 19 | 20 | local function OnEnterCombat(event, creature, target) 21 | creature:RegisterEvent(CastShoot, 750, 0) 22 | creature:RegisterEvent(CastBlackArrow, 16000, 0) 23 | creature:RegisterEvent(CastBarrage, 10000, 0) 24 | creature:RegisterEvent(CastExplodingShot, 7000, 0) 25 | end 26 | 27 | local function OnLeaveCombat(event, creature) 28 | creature:RemoveEvents() 29 | end 30 | 31 | local function OnDied(event, creature, killer) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(400072, 1, OnEnterCombat) 36 | RegisterCreatureEvent(400072, 2, OnLeaveCombat) 37 | RegisterCreatureEvent(400072, 4, OnDied) 38 | 39 | RegisterCreatureEvent(400073, 1, OnEnterCombat) 40 | RegisterCreatureEvent(400073, 2, OnLeaveCombat) 41 | RegisterCreatureEvent(400073, 4, OnDied) 42 | 43 | -------------------------------------------------------------------------------- /DeathStalker.lua: -------------------------------------------------------------------------------- 1 | local DeathStalker = {} 2 | 3 | function DeathStalker.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(DeathStalker.Cripple, 1000, 1) 5 | creature:RegisterEvent(DeathStalker.Cripple, 8000, 0) 6 | end 7 | 8 | function DeathStalker.Cripple(eventId, delay, calls, creature) 9 | local targetList = creature:GetAITargets(5) 10 | local targetCount = #targetList 11 | 12 | if targetCount > 0 then 13 | local randomIndex = math.random(1, targetCount) 14 | local randomTarget = targetList[randomIndex] 15 | creature:CastSpell(randomTarget, 6217, true) 16 | else 17 | creature:CastSpell(creature:GetVictim(), 6217, true) 18 | end 19 | end 20 | 21 | function DeathStalker.OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | function DeathStalker.OnDied(event, creature, killer) 26 | creature:RemoveEvents() 27 | end 28 | 29 | RegisterCreatureEvent(400102, 1, DeathStalker.OnEnterCombat) 30 | RegisterCreatureEvent(400102, 2, DeathStalker.OnLeaveCombat) 31 | RegisterCreatureEvent(400102, 4, DeathStalker.OnDied) 32 | -------------------------------------------------------------------------------- /DinkleDoom.lua: -------------------------------------------------------------------------------- 1 | local Dinkledork = {} 2 | 3 | function Dinkledork.OnSpawn(event, creature) 4 | creature:CastSpell(creature, 100138, true) 5 | creature:CastSpell(creature, 100035, true) 6 | end 7 | 8 | RegisterCreatureEvent(400066, 5, Dinkledork.OnSpawn) -------------------------------------------------------------------------------- /DinkleRez.lua: -------------------------------------------------------------------------------- 1 | local SPELL_ID = 100191 2 | local AURA_1 = 100003 3 | local AURA_2 = 100168 4 | 5 | function OnKilledByCreature(event, killer, killed) 6 | if (killed:HasAura(AURA_1) or killed:HasAura(AURA_2)) then 7 | if not killed:HasSpellCooldown(SPELL_ID) then 8 | killed:CastSpell(killed, SPELL_ID, false) 9 | end 10 | end 11 | end 12 | 13 | RegisterPlayerEvent(8, OnKilledByCreature) 14 | -------------------------------------------------------------------------------- /Draven.lua: -------------------------------------------------------------------------------- 1 | local Draven = {}; 2 | 3 | function Draven.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(Draven.CastFanOfKnives, 10000, 0) 5 | creature:RegisterEvent(Draven.CastSaroniteBomb, 7000, 0) 6 | creature:RegisterEvent(Draven.CastCloakOfShadows, 11500, 0) 7 | creature:RegisterEvent(Draven.CastBladeFlurry, 13000, 0) 8 | end 9 | 10 | function Draven.OnLeaveCombat(event, creature) 11 | creature:RemoveEvents() 12 | end 13 | 14 | function Draven.OnDied(event, creature, killer) 15 | creature:RemoveEvents() 16 | end 17 | 18 | function Draven.CastFanOfKnives(event, delay, calls, creature) 19 | creature:CastSpell(creature:GetVictim(), 51723, true) 20 | end 21 | 22 | function Draven.CastSaroniteBomb(event, delay, calls, creature) 23 | creature:CastSpell(creature:GetVictim(), 56350, true) 24 | end 25 | 26 | function Draven.CastCloakOfShadows(event, delay, calls, creature) 27 | creature:CastSpell(creature, 31224, true) 28 | end 29 | 30 | function Draven.CastBladeFlurry(event, delay, calls, creature) 31 | creature:CastSpell(creature, 13877, true) 32 | end 33 | 34 | RegisterCreatureEvent(400069, 1, Draven.OnEnterCombat) 35 | RegisterCreatureEvent(400069, 2, Draven.OnLeaveCombat) 36 | RegisterCreatureEvent(400069, 4, Draven.OnDied) 37 | 38 | -------------------------------------------------------------------------------- /Dumbassery.lua: -------------------------------------------------------------------------------- 1 | --I was being dumb. Don't ask. 2 | 3 | local CREATURE_ID = 1069 4 | local ITEM_ID = 65006 5 | local ITEM_COUNT = 1 6 | local REQUIRED_QUEST_ID = 30015 7 | 8 | local function OnCreatureKill(event, player, creature) 9 | if creature:GetEntry() == CREATURE_ID and player:HasQuest(REQUIRED_QUEST_ID) then 10 | player:AddItem(ITEM_ID, ITEM_COUNT) 11 | end 12 | end 13 | 14 | RegisterPlayerEvent(7, OnCreatureKill) 15 | -------------------------------------------------------------------------------- /Duthorian.lua: -------------------------------------------------------------------------------- 1 | local DuthorianRall = {}; 2 | 3 | local function CastJoL(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 20185, true) 5 | end 6 | 7 | local function OnEnterCombat(event, creature, target) 8 | creature:RegisterEvent(CastJoL, 5000, 0) 9 | end 10 | 11 | local function OnLeaveCombat(event, creature) 12 | creature:RemoveEvents() 13 | end 14 | 15 | local function OnDied(event, creature, killer) 16 | creature:RemoveEvents() 17 | end 18 | 19 | RegisterCreatureEvent(6171, 1, OnEnterCombat) 20 | RegisterCreatureEvent(6171, 2, OnLeaveCombat) 21 | RegisterCreatureEvent(6171, 4, OnDied) -------------------------------------------------------------------------------- /EventAnnounce.lua: -------------------------------------------------------------------------------- 1 | local eventRegistered = false 2 | 3 | local function SendWorldAnnouncement(eventid) 4 | if eventid == 17 then 5 | SendWorldMessage("The Lich King has sent forth his forces to attack the people of Azeroth. Quickly adventurers, defend your cities!") 6 | end 7 | end 8 | 9 | if not eventRegistered then 10 | RegisterServerEvent(17, SendWorldAnnouncement) 11 | eventRegistered = true 12 | end -------------------------------------------------------------------------------- /FOEREAPER.lua: -------------------------------------------------------------------------------- 1 | local FoeReaper = {}; 2 | 3 | local function CastTrample(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 5568, true) 5 | end 6 | 7 | local function CastKnockback(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 49398, true) 9 | end 10 | 11 | function FoeReaper.OnEnterCombat(event, creature, target) 12 | creature:SendUnitYell("You like me, you really like me!", 0) 13 | creature:RegisterEvent(CastTrample, 5000, 0) 14 | creature:RegisterEvent(CastKnockback, 15000, 0) 15 | end 16 | 17 | function FoeReaper.OnLeaveCombat(event, creature) 18 | creature:SendUnitYell("Haha, you lose!", 0) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function FoeReaper.OnDied(event, creature, killer) 23 | if(killer:GetObjectType() == "Player") then 24 | killer:SendBroadcastMessage("You killed " ..creature:GetName().."!") 25 | end 26 | creature:RemoveEvents() 27 | end 28 | 29 | function FoeReaper.OnSpawn(event, creature) 30 | creature:SendUnitYell("I'm baaaaaaaaack!!!", 0) 31 | end 32 | 33 | RegisterCreatureEvent(900003, 1, FoeReaper.OnEnterCombat) 34 | RegisterCreatureEvent(900003, 2, FoeReaper.OnLeaveCombat) 35 | RegisterCreatureEvent(900003, 4, FoeReaper.OnDied) 36 | RegisterCreatureEvent(900003, 5, FoeReaper.OnSpawn) -------------------------------------------------------------------------------- /Faction_Shared/Auto91.lua: -------------------------------------------------------------------------------- 1 | --Custom Content Auto-loader. If you don't see custom content in Azeroth or unscripted creatures, it's because it's December 31st. Just .event stop 91 and .event start 91 again. 2 | --DO NOT TOUCH! THIS IS TO FIX AN EXTREMELY ANNOYING BUG! 3 | 4 | local eventId = 91 5 | 6 | function OnStartup() 7 | StartGameEvent(eventId, true) 8 | end 9 | 10 | RegisterServerEvent(14, OnStartup) -------------------------------------------------------------------------------- /Faction_Shared/Barrier.lua: -------------------------------------------------------------------------------- 1 | local npcId = 400092 2 | local spellId1 = 100199 3 | local spellId2 = 100206 4 | local range = 8 5 | local killCreditNpcId = 400095 6 | 7 | function OnSpellCast(event, player, spell) 8 | local spellEntry = spell:GetEntry() 9 | 10 | if spellEntry == spellId1 or spellEntry == spellId2 then 11 | nearestCreature = player:GetNearestCreature(range, npcId) 12 | if nearestCreature == nil then 13 | player:SendBroadcastMessage("You need to place the barrier in a more strategic location.") 14 | spell:Cancel() 15 | else 16 | player:KilledMonsterCredit(killCreditNpcId) 17 | player:SendBroadcastMessage("You have successfully built a barrier!") 18 | end 19 | end 20 | end 21 | 22 | RegisterPlayerEvent(5, OnSpellCast) 23 | -------------------------------------------------------------------------------- /Faction_Shared/Blight.lua: -------------------------------------------------------------------------------- 1 | local NPC_CUSTOM = 400119 2 | local WANDER_RADIUS = 5 3 | 4 | function CustomNPC_OnSpawn(event, creature) 5 | creature:SetDefaultMovementType(1) 6 | creature:SetWanderRadius(WANDER_RADIUS) 7 | creature:MoveRandom(WANDER_RADIUS) 8 | end 9 | 10 | RegisterCreatureEvent(NPC_CUSTOM, 5, CustomNPC_OnSpawn) 11 | -------------------------------------------------------------------------------- /Faction_Shared/BlightedZombie.lua: -------------------------------------------------------------------------------- 1 | local BlightedZombie = {} 2 | 3 | function BlightedZombie.OnSpawn(event, creature) 4 | --creature:SetMaxHealth(17720) 5 | creature:CastSpell(creature:GetVictim(), 17683, true) 6 | end 7 | 8 | function BlightedZombie.OnCombat(event, creature, target) 9 | creature:RegisterEvent(BlightedZombie.Ability1, 7000, 0) 10 | creature:RegisterEvent(BlightedZombie.Ability2, 14000, 0) 11 | end 12 | 13 | function BlightedZombie.Ability1(event, delay, calls, creature) 14 | creature:CastSpell(creature:GetVictim(), 52476, true) 15 | end 16 | 17 | function BlightedZombie.Ability2(event, delay, calls, creature) 18 | creature:CastSpell(creature:GetVictim(), 37597, true) 19 | end 20 | 21 | function BlightedZombie.OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | function BlightedZombie.OnDeath(event, creature, killer) 26 | creature:DespawnOrUnsummon(5000) 27 | creature:RemoveEvents() 28 | end 29 | 30 | RegisterCreatureEvent(400051, 1, BlightedZombie.OnCombat) 31 | RegisterCreatureEvent(400051, 2, BlightedZombie.OnLeaveCombat) 32 | RegisterCreatureEvent(400051, 4, BlightedZombie.OnDeath) 33 | RegisterCreatureEvent(400051, 5, BlightedZombie.OnSpawn) 34 | 35 | 36 | -------------------------------------------------------------------------------- /Faction_Shared/BlightedZombie2.lua: -------------------------------------------------------------------------------- 1 | local BlightedZombie = {} 2 | 3 | function BlightedZombie.OnCombat(event, creature, target) 4 | creature:RegisterEvent(BlightedZombie.Ability1, 7000, 0) 5 | creature:RegisterEvent(BlightedZombie.Ability2, 12000, 0) 6 | end 7 | 8 | function BlightedZombie.Ability1(event, delay, calls, creature) 9 | creature:CastSpell(creature:GetVictim(), 52476, true) 10 | end 11 | 12 | function BlightedZombie.Ability2(event, delay, calls, creature) 13 | creature:CastSpell(creature:GetVictim(), 37597, true) 14 | end 15 | 16 | function BlightedZombie.OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | function BlightedZombie.OnDeath(event, creature, killer) 21 | creature:RemoveEvents() 22 | end 23 | 24 | RegisterCreatureEvent(4475, 1, BlightedZombie.OnCombat) 25 | RegisterCreatureEvent(4475, 2, BlightedZombie.OnLeaveCombat) 26 | RegisterCreatureEvent(4475, 4, BlightedZombie.OnDeath) 27 | -------------------------------------------------------------------------------- /Faction_Shared/BlisteringZombie.lua: -------------------------------------------------------------------------------- 1 | local BlisteringZombie = {}; 2 | 3 | local function CastArmyOfTheDead(eventId, delay, calls, creature) 4 | creature:CastSpell(creature, 42650, true) 5 | end 6 | 7 | local function CastSpit(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 25262, true) 9 | end 10 | 11 | local function CastSpecialSpell(eventId, delay, calls, creature) 12 | local victim = creature:GetVictim() 13 | if not victim then 14 | return 15 | end 16 | if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then 17 | creature:CastSpell(victim, 5, true) 18 | end 19 | end 20 | 21 | local function OnEnterCombat(event, creature, target) 22 | creature:RegisterEvent(CastArmyOfTheDead, 25000, 0) 23 | creature:RegisterEvent(CastSpit, 5000, 0) 24 | creature:RegisterEvent(CastSpecialSpell, 1000, 0) 25 | end 26 | 27 | local function OnLeaveCombat(event, creature) 28 | creature:RemoveEvents() 29 | end 30 | 31 | local function OnSpawn(event, creature) 32 | creature:RegisterEvent(CastArmyOfTheDead, 1000, 1) 33 | end 34 | 35 | local function OnDied(event, creature, killer) 36 | creature:DespawnOrUnsummon(5000) 37 | creature:RemoveEvents() 38 | end 39 | 40 | 41 | RegisterCreatureEvent(400029, 1, OnEnterCombat) 42 | RegisterCreatureEvent(400029, 2, OnLeaveCombat) 43 | RegisterCreatureEvent(400029, 4, OnDied) 44 | RegisterCreatureEvent(400029, 5, OnSpawn) 45 | 46 | -------------------------------------------------------------------------------- /Faction_Shared/BoneWitch.lua: -------------------------------------------------------------------------------- 1 | local BoneWitch = {}; 2 | 3 | 4 | local function CastBoneShards(eventId, delay, calls, creature) 5 | creature:CastSpell(creature, 17014, true) 6 | end 7 | 8 | local function OnSpawn(event, creature, target) 9 | creature:RegisterEvent(CastBoneShards, 100, 1) 10 | creature:RegisterEvent(CastBoneShards, 14000, 0) 11 | end 12 | 13 | local function OnDied(event, creature, killer) 14 | creature:DespawnOrUnsummon(25000) 15 | creature:RemoveEvents() 16 | end 17 | 18 | RegisterCreatureEvent(16380, 5, OnSpawn) 19 | RegisterCreatureEvent(16380, 4, OnDied) -------------------------------------------------------------------------------- /Faction_Shared/CreepStalker.lua: -------------------------------------------------------------------------------- 1 | local CreepStalker = {}; 2 | 3 | local function CastRake(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 9904, true) 5 | end 6 | 7 | local function CastStun(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 34510, true) 9 | end 10 | 11 | local function OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(CastRake, 5000, 0) 13 | creature:RegisterEvent(CastStun, 12000, 0) 14 | end 15 | 16 | local function OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | local function OnDied(event, creature, killer) 21 | creature:DespawnOrUnsummon(5000) 22 | creature:RemoveEvents() 23 | end 24 | 25 | RegisterCreatureEvent(400032, 1, OnEnterCombat) 26 | RegisterCreatureEvent(400032, 2, OnLeaveCombat) 27 | RegisterCreatureEvent(400032, 4, OnDied) -------------------------------------------------------------------------------- /Faction_Shared/DinkleRez.lua: -------------------------------------------------------------------------------- 1 | local SPELL_ID = 100191 2 | local AURA_1 = 100003 3 | local AURA_2 = 100168 4 | 5 | function OnKilledByCreature(event, killer, killed) 6 | if (killed:HasAura(AURA_1) or killed:HasAura(AURA_2)) then 7 | if not killed:HasSpellCooldown(SPELL_ID) then 8 | killed:CastSpell(killed, SPELL_ID, false) 9 | end 10 | end 11 | end 12 | 13 | RegisterPlayerEvent(8, OnKilledByCreature) 14 | -------------------------------------------------------------------------------- /Faction_Shared/FlameShocker.lua: -------------------------------------------------------------------------------- 1 | local FlameShocker = {}; 2 | 3 | 4 | local function CastFlameShock(eventId, delay, calls, creature) 5 | creature:CastSpell(creature:GetVictim(), 10448, true) 6 | end 7 | 8 | local function OnEnterCombat(event, creature, target) 9 | creature:RegisterEvent(CastFlameShock, 100, 1) 10 | creature:RegisterEvent(CastFlameShock, 8000, 0) 11 | end 12 | 13 | local function OnLeaveCombat(event, creature) 14 | creature:RemoveEvents() 15 | end 16 | 17 | local function OnDied(event, creature, killer) 18 | creature:CastSpell(killer, 28323, true) 19 | creature:DespawnOrUnsummon(25000) 20 | creature:RemoveEvents() 21 | end 22 | 23 | RegisterCreatureEvent(16383, 1, OnEnterCombat) 24 | RegisterCreatureEvent(16383, 2, OnLeaveCombat) 25 | RegisterCreatureEvent(16383, 4, OnDied) -------------------------------------------------------------------------------- /Faction_Shared/FleshFlayer.lua: -------------------------------------------------------------------------------- 1 | local FleshFlayer = {}; 2 | 3 | local function CastLeap(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 47482, true) 5 | end 6 | 7 | local function CastPlague(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 52230, true) 9 | end 10 | 11 | local function CastExplode(eventId, delay, calls, creature) 12 | creature:CastSpell(creature, 47496, true) 13 | end 14 | 15 | local function CastRend(eventId, delay, calls, creature) 16 | creature:CastSpell(creature:GetVictim(), 18106, true) 17 | end 18 | 19 | local function OnEnterCombat(event, creature, target) 20 | creature:RegisterEvent(CastLeap, 100, 1) 21 | creature:RegisterEvent(CastPlague, 500, 1) 22 | creature:RegisterEvent(CastRend, 2000, 1) 23 | creature:RegisterEvent(CastPlague, 20000, 0) 24 | creature:RegisterEvent(CastExplode, 30000, 0) 25 | end 26 | 27 | local function OnLeaveCombat(event, creature) 28 | creature:RemoveEvents() 29 | end 30 | 31 | local function OnDied(event, creature, killer) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(10407, 1, OnEnterCombat) 36 | RegisterCreatureEvent(10407, 2, OnLeaveCombat) 37 | RegisterCreatureEvent(10407, 4, OnDied) -------------------------------------------------------------------------------- /Faction_Shared/Ghoul.lua: -------------------------------------------------------------------------------- 1 | local Ghoul = {}; 2 | 3 | local function CastLeap(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 47482, true) 5 | end 6 | 7 | local function CastPlague(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 52230, true) 9 | end 10 | 11 | local function CastExplode(eventId, delay, calls, creature) 12 | creature:CastSpell(creature, 47496, true) 13 | end 14 | 15 | local function OnEnterCombat(event, creature, target) 16 | creature:RegisterEvent(CastLeap, 100, 1) 17 | creature:RegisterEvent(CastPlague, 100, 1) 18 | creature:RegisterEvent(CastPlague, 20000, 0) 19 | creature:RegisterEvent(CastExplode, 23000, 0) 20 | end 21 | 22 | local function OnLeaveCombat(event, creature) 23 | creature:RemoveEvents() 24 | end 25 | 26 | local function OnDied(event, creature, killer) 27 | creature:DespawnOrUnsummon(5000) 28 | creature:RemoveEvents() 29 | end 30 | 31 | RegisterCreatureEvent(400047, 1, OnEnterCombat) 32 | RegisterCreatureEvent(400047, 2, OnLeaveCombat) 33 | RegisterCreatureEvent(400047, 4, OnDied) -------------------------------------------------------------------------------- /Faction_Shared/GibberingGhoul.lua: -------------------------------------------------------------------------------- 1 | local GibberingGhoul = {} 2 | 3 | function GibberingGhoul.OnCombat(event, creature, target) 4 | creature:RegisterEvent(GibberingGhoul.Ability2, 100, 1) 5 | creature:RegisterEvent(GibberingGhoul.Ability1, 7000, 0) 6 | creature:RegisterEvent(GibberingGhoul.Ability2, 12000, 0) 7 | end 8 | 9 | function GibberingGhoul.Ability1(event, delay, calls, creature) 10 | creature:CastSpell(creature:GetVictim(), 34113, true) 11 | end 12 | 13 | function GibberingGhoul.Ability2(event, delay, calls, creature) 14 | creature:CastSpell(creature:GetVictim(), 12889, true) 15 | end 16 | 17 | function GibberingGhoul.OnLeaveCombat(event, creature) 18 | creature:RemoveEvents() 19 | end 20 | 21 | function GibberingGhoul.OnDeath(event, creature, killer) 22 | creature:RemoveEvents() 23 | end 24 | 25 | RegisterCreatureEvent(8531, 1, GibberingGhoul.OnCombat) 26 | RegisterCreatureEvent(8531, 2, GibberingGhoul.OnLeaveCombat) 27 | RegisterCreatureEvent(8531, 4, GibberingGhoul.OnDeath) 28 | -------------------------------------------------------------------------------- /Faction_Shared/HateShrieker.lua: -------------------------------------------------------------------------------- 1 | local HateShrieker = {} 2 | 3 | function HateShrieker.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(HateShrieker.Screech, 7000, 0) 5 | creature:RegisterEvent(HateShrieker.ShadowWordPain, math.random(11000,16000), 0) 6 | end 7 | 8 | 9 | function HateShrieker.Screech(eventId, delay, calls, creature) 10 | creature:CastSpell(creature, 3589) 11 | end 12 | 13 | function HateShrieker.OnLeaveCombat(event, creature) 14 | creature:RemoveEvents() 15 | end 16 | 17 | function HateShrieker.OnDied(event, creature, killer) 18 | creature:RemoveEvents() 19 | end 20 | 21 | function HateShrieker.ShadowWordPain(eventId, delay, calls, creature) 22 | local targets = creature:GetAITargets(10) 23 | if #targets == 0 then 24 | return 25 | end 26 | local target = targets[math.random(#targets)] 27 | creature:CastSpell(target, 10893) 28 | creature:ClearThreatList() 29 | end 30 | 31 | 32 | 33 | RegisterCreatureEvent(8541, 1, HateShrieker.OnEnterCombat) 34 | RegisterCreatureEvent(8541, 2, HateShrieker.OnLeaveCombat) 35 | RegisterCreatureEvent(8541, 4, HateShrieker.OnDied) -------------------------------------------------------------------------------- /Faction_Shared/NPCBrave.lua: -------------------------------------------------------------------------------- 1 | local BRAVE_IDS = {5412, 5614, 5511, 5512, 957, 7798, 11026, 5518, 5510, 5509, 1416, 5514, 29016, 29019, 3518, 1472, 31423, 3314, 3312, 3323, 5188, 3370, 3368, 3371, 3316, 3405, 11046, 3347, 3348, 6986, 31433} 2 | local BRAVERY_DIALOGUE = { 3 | "I fear no enemy!", 4 | "I will fight to the bitter end!", 5 | "This battle is mine!", 6 | "This is MY city!", 7 | "My courage will never falter!", 8 | "I'll show you what true bravery is!", 9 | "I am unbreakable!", 10 | "This fight is mine to win!", 11 | "I'll fight until my last breath!", 12 | "Pfft, you think you can scare the likes of me!?" 13 | } 14 | 15 | local function OnCombat(event, creature, target) 16 | if math.random() < 0.5 then -- 50% chance to trigger dialogue 17 | creature:SendUnitSay(BRAVERY_DIALOGUE[math.random(#BRAVERY_DIALOGUE)], 0) 18 | end 19 | end 20 | 21 | for i, id in ipairs(BRAVE_IDS) do 22 | RegisterCreatureEvent(id, 1, OnCombat) 23 | end 24 | -------------------------------------------------------------------------------- /Faction_Shared/NPCFreakout.lua: -------------------------------------------------------------------------------- 1 | local FREAKOUT_NPC = { 30217, 4981, 483, 5193, 1402, 70021, 1257, 1286, 1285, 3520, 3513, 1432, 1402, 1444, 7917, 1212, 6173, 5489, 4982, 5484, 14500, 14450, 14496, 14497, 6579, 5519, 6007, 29152, 9977, 1395, 2795, 1320, 1318, 1310, 3399, 7010, 5811, 3351, 400062, 400067 } 2 | 3 | function OnEnterCombat(event, creature, target) 4 | creature:CastSpell(creature, 31358, true) -- fear spell 5 | local yellOptions = { 6 | "Aaahhh! Somebody help!", 7 | "I can't believe this is happening, why is this happening?!", 8 | "I don't know what to do, I don't know what to do!", 9 | "No! Stay away from me!", 10 | "Please, please let this be a nightmare!", 11 | "I can't handle this, I can't handle this!", 12 | "No, no, no!", 13 | "This can't be happening!", 14 | "I'm not ready for this!", 15 | "This is insane, how did we get here?!", 16 | "Why is this happening to me?!", 17 | "I don't want to die!", 18 | "I'm not prepared for this, I'm not prepared for this at all!", 19 | "Please, someone help me!", 20 | "There's no way this is happening!" 21 | } 22 | local randomIndex = math.random(1, 15) 23 | local selectedYell = yellOptions[randomIndex] 24 | creature:SendUnitYell(selectedYell, 0) 25 | end 26 | 27 | for i, id in ipairs(FREAKOUT_NPC) do 28 | RegisterCreatureEvent(id, 1, OnEnterCombat) 29 | end 30 | -------------------------------------------------------------------------------- /Faction_Shared/Necrofiend.lua: -------------------------------------------------------------------------------- 1 | local Necrofiend = {} 2 | 3 | function Necrofiend.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(Necrofiend.WebSpray, 15000, 0, creature) 5 | creature:RegisterEvent(Necrofiend.CastBanefulPoison, 7000, 0, creature) 6 | creature:RegisterEvent(Necrofiend.SpecialSpell, 1000, 0, creature) 7 | end 8 | 9 | function Necrofiend.SpecialSpell(eventId, delay, calls, creature) 10 | local victim = creature:GetVictim() 11 | if not victim then 12 | return 13 | end 14 | if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then 15 | creature:CastSpell(victim, 5, true) 16 | end 17 | end 18 | 19 | 20 | 21 | function Necrofiend.WebSpray(event, delay, calls, creature) 22 | creature:CastSpell(creature:GetVictim(), 55508, true) 23 | end 24 | 25 | function Necrofiend.CastBanefulPoison(event, delay, calls, creature) 26 | local targets = creature:GetAITargets(10) 27 | if #targets == 0 then 28 | return 29 | end 30 | local target = targets[math.random(#targets)] 31 | creature:CastSpell(target, 15475, true) 32 | end 33 | 34 | function Necrofiend.OnLeaveCombat(event, creature) 35 | creature:RemoveEvents() 36 | end 37 | 38 | function Necrofiend.OnDied(event, creature, killer) 39 | creature:DespawnOrUnsummon(5000) 40 | creature:RemoveEvents() 41 | end 42 | 43 | RegisterCreatureEvent(400055, 1, Necrofiend.OnEnterCombat) 44 | RegisterCreatureEvent(400055, 2, Necrofiend.OnLeaveCombat) 45 | RegisterCreatureEvent(400055, 4, Necrofiend.OnDied) 46 | -------------------------------------------------------------------------------- /Faction_Shared/Necrofiend2.lua: -------------------------------------------------------------------------------- 1 | local Necrofiend = {} 2 | 3 | function Necrofiend.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(Necrofiend.WebSpray, 12000, 0, creature) 5 | creature:RegisterEvent(Necrofiend.CastBanefulPoison, 7000, 0, creature) 6 | creature:RegisterEvent(Necrofiend.DeadlyPoison, 10000, 0, creature) 7 | end 8 | 9 | function Necrofiend.WebSpray(event, delay, calls, creature) 10 | creature:CastSpell(creature:GetVictim(), 55508, true) 11 | end 12 | 13 | function Necrofiend.DeadlyPoison(event, delay, calls, creature) 14 | creature:CastSpell(creature:GetVictim(), 34616, true) 15 | end 16 | 17 | function Necrofiend.CastBanefulPoison(event, delay, calls, creature) 18 | local targets = creature:GetAITargets(10) 19 | if #targets == 0 then 20 | return 21 | end 22 | local target = targets[math.random(#targets)] 23 | creature:CastSpell(target, 15475, true) 24 | end 25 | 26 | function Necrofiend.OnLeaveCombat(event, creature) 27 | creature:RemoveEvents() 28 | end 29 | 30 | function Necrofiend.OnDied(event, creature, killer) 31 | creature:RemoveEvents() 32 | end 33 | 34 | RegisterCreatureEvent(11551, 1, Necrofiend.OnEnterCombat) 35 | RegisterCreatureEvent(11551, 2, Necrofiend.OnLeaveCombat) 36 | RegisterCreatureEvent(11551, 4, Necrofiend.OnDied) 37 | -------------------------------------------------------------------------------- /Faction_Shared/PallidHorror.lua: -------------------------------------------------------------------------------- 1 | local PallidHorror = {} 2 | 3 | function PallidHorror.OnDied(event, creature, killer) 4 | creature:CastSpell(creature, 28699, true) 5 | end 6 | 7 | RegisterCreatureEvent(16394, 4, PallidHorror.OnDied) -------------------------------------------------------------------------------- /Faction_Shared/RisenConstruct.lua: -------------------------------------------------------------------------------- 1 | local RisenConstruct = {}; 2 | 3 | local function ArcingSmash(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 1619, true) 5 | end 6 | 7 | local function Enrage(eventId, delay, calls, creature) 8 | creature:CastSpell(creature, 15716, true) 9 | end 10 | 11 | local function Thrash(eventId, delay, calls, creature) 12 | creature:CastSpell(creature, 3391, true) 13 | end 14 | 15 | local function SweepingStrikes(eventId, delay, calls, creature) 16 | creature:CastSpell(creature, 18765, true) 17 | end 18 | 19 | function Stun(eventId, delay, calls, creature) 20 | local targets = creature:GetAITargets(10) 21 | if #targets == 0 then 22 | return 23 | end 24 | local target = targets[math.random(#targets)] 25 | creature:CastSpell(target, 17308, true) 26 | end 27 | 28 | local function OnEnterCombat(event, creature, target) 29 | creature:RegisterEvent(ArcingSmash, 7000, 0) 30 | creature:RegisterEvent(Stun, 13000, 0) 31 | creature:RegisterEvent(Thrash, 8500, 0) 32 | creature:RegisterEvent(SweepingStrikes, 100, 1) 33 | end 34 | 35 | local function OnHealthUpdate(event, creature, value) 36 | if (creature:GetHealthPct() <= 20) then 37 | creature:RemoveEvents() 38 | creature:RegisterEvent(Enrage, 100, 1) 39 | end 40 | end 41 | 42 | local function OnLeaveCombat(event, creature) 43 | creature:RemoveEvents() 44 | end 45 | 46 | local function OnDied(event, creature, killer) 47 | creature:RemoveEvents() 48 | end 49 | 50 | RegisterCreatureEvent(10488, 1, OnEnterCombat) 51 | RegisterCreatureEvent(10488, 9, OnHealthUpdate) 52 | RegisterCreatureEvent(10488, 2, OnLeaveCombat) 53 | RegisterCreatureEvent(10488, 4, OnDied) -------------------------------------------------------------------------------- /Faction_Shared/RisenGuard.lua: -------------------------------------------------------------------------------- 1 | local RisenGuard = {} 2 | 3 | function RisenGuard.OnCombat(event, creature, target) 4 | creature:RegisterEvent(RisenGuard.Ability2, 100, 1) 5 | creature:RegisterEvent(RisenGuard.Ability1, 7000, 0) 6 | creature:RegisterEvent(RisenGuard.Ability2, 12000, 0) 7 | creature:RegisterEvent(RisenGuard.Ability3, 10000, 0) 8 | end 9 | 10 | function RisenGuard.Ability1(event, delay, calls, creature) 11 | creature:CastSpell(creature:GetVictim(), 34113, true) 12 | end 13 | 14 | function RisenGuard.Ability2(event, delay, calls, creature) 15 | creature:CastSpell(creature:GetVictim(), 8380, true) 16 | end 17 | 18 | function RisenGuard.Ability3(event, delay, calls, creature) 19 | creature:CastSpell(creature:GetVictim(), 5164, true) 20 | end 21 | 22 | function RisenGuard.OnLeaveCombat(event, creature) 23 | creature:RemoveEvents() 24 | end 25 | 26 | function RisenGuard.OnDeath(event, creature, killer) 27 | creature:RemoveEvents() 28 | end 29 | 30 | RegisterCreatureEvent(10489, 1, RisenGuard.OnCombat) 31 | RegisterCreatureEvent(10489, 2, RisenGuard.OnLeaveCombat) 32 | RegisterCreatureEvent(10489, 4, RisenGuard.OnDeath) 33 | 34 | -------------------------------------------------------------------------------- /Faction_Shared/ScourgeQuestsWorkAround.lua: -------------------------------------------------------------------------------- 1 | local questIds = {9265, 9264, 9263, 9262, 9261, 9260} 2 | local itemId = 22892 3 | local itemCount = 3 4 | local totalLooted = {} 5 | 6 | local function OnLootItem(event, player, item, count) 7 | if item:GetEntry() == itemId then 8 | for _, questId in pairs(questIds) do 9 | if player:HasQuest(questId) then 10 | if not totalLooted[questId] then 11 | totalLooted[questId] = 0 12 | end 13 | totalLooted[questId] = totalLooted[questId] + count 14 | if totalLooted[questId] >= itemCount then 15 | player:CompleteQuest(questId) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | 22 | RegisterPlayerEvent(32, OnLootItem) 23 | -------------------------------------------------------------------------------- /Faction_Shared/SkeletalWarlord.lua: -------------------------------------------------------------------------------- 1 | local SkeletalWarlord = {} 2 | SkeletalWarlord.minChargeRange = 10 3 | 4 | function SkeletalWarlord.OnEnterCombat(event, creature, target) 5 | creature:RegisterEvent(SkeletalWarlord.Whirlwind, 15000, 0) 6 | creature:RegisterEvent(SkeletalWarlord.MortalStrike, 7000, 0) 7 | creature:RegisterEvent(SkeletalWarlord.Charge, 10000, 0) 8 | end 9 | 10 | function SkeletalWarlord.Whirlwind(eventId, delay, calls, creature) 11 | creature:CastSpell(creature:GetVictim(), 36982, true) 12 | end 13 | 14 | function SkeletalWarlord.MortalStrike(eventId, delay, calls, creature) 15 | creature:CastSpell(creature:GetVictim(), 21553, true) 16 | end 17 | 18 | function SkeletalWarlord.OnLeaveCombat(event, creature) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function SkeletalWarlord.OnDied(event, creature, killer) 23 | creature:DespawnOrUnsummon(15000) 24 | creature:RemoveEvents() 25 | end 26 | 27 | function SkeletalWarlord.Charge(eventId, delay, calls, creature) 28 | local targets = creature:GetAITargets(SkeletalWarlord.minChargeRange) 29 | if #targets == 0 then 30 | return 31 | end 32 | local target = targets[math.random(#targets)] 33 | creature:CastSpell(target, 19471, true) 34 | end 35 | 36 | 37 | 38 | RegisterCreatureEvent(400056, 1, SkeletalWarlord.OnEnterCombat) 39 | RegisterCreatureEvent(400056, 2, SkeletalWarlord.OnLeaveCombat) 40 | RegisterCreatureEvent(400056, 4, SkeletalWarlord.OnDied) 41 | 42 | 43 | RegisterCreatureEvent(1788, 1, SkeletalWarlord.OnEnterCombat) 44 | RegisterCreatureEvent(1788, 2, SkeletalWarlord.OnLeaveCombat) 45 | RegisterCreatureEvent(1788, 4, SkeletalWarlord.OnDied) 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Faction_Shared/SkeletalWarrior.lua: -------------------------------------------------------------------------------- 1 | local SkeletalWarrior = {} 2 | 3 | 4 | 5 | function SkeletalWarrior.OnSpawn(event, creature) 6 | --creature:SetMaxHealth(7720) 7 | creature:SetEquipmentSlots(10570, 0, 0) 8 | creature:CastSpell(creature:GetVictim(), 17683, true) 9 | end 10 | 11 | function SkeletalWarrior.OnCombat(event, creature, target) 12 | creature:RegisterEvent(SkeletalWarrior.Ability1, 10000, 0) 13 | end 14 | 15 | function SkeletalWarrior.Ability1(event, delay, calls, creature) 16 | creature:CastSpell(creature:GetVictim(), 6547, true) 17 | end 18 | 19 | function SkeletalWarrior.OnLeaveCombat(event, creature) 20 | creature:RemoveEvents() 21 | end 22 | 23 | function SkeletalWarrior.OnDeath(event, creature, killer) 24 | creature:DespawnOrUnsummon(10000) 25 | creature:RemoveEvents() 26 | end 27 | 28 | RegisterCreatureEvent(400016, 1, SkeletalWarrior.OnCombat) 29 | RegisterCreatureEvent(400016, 2, SkeletalWarrior.OnLeaveCombat) 30 | RegisterCreatureEvent(400016, 4, SkeletalWarrior.OnDeath) 31 | RegisterCreatureEvent(400016, 5, SkeletalWarrior.OnSpawn) 32 | -------------------------------------------------------------------------------- /Faction_Shared/SpectralAttendant2.lua: -------------------------------------------------------------------------------- 1 | local SpectralAttendant = {} 2 | 3 | function SpectralAttendant.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(SpectralAttendant.Cripple, 6000, 0) 5 | creature:RegisterEvent(SpectralAttendant.AOEFear, 13000, 0) 6 | creature:RegisterEvent(SpectralAttendant.Teleport, math.random(14000,16000), 0) 7 | end 8 | 9 | 10 | function SpectralAttendant.Cripple(eventId, delay, calls, creature) 11 | creature:CastSpell(creature:GetVictim(), 11443, true) 12 | end 13 | 14 | function SpectralAttendant.AOEFear(eventId, delay, calls, creature) 15 | creature:CastSpell(creature, 8122) 16 | end 17 | 18 | function SpectralAttendant.OnLeaveCombat(event, creature) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function SpectralAttendant.OnDied(event, creature, killer) 23 | creature:RemoveEvents() 24 | end 25 | 26 | function SpectralAttendant.Teleport(eventId, delay, calls, creature) 27 | local targets = creature:GetAITargets(10) 28 | if #targets == 0 then 29 | return 30 | end 31 | local target = targets[math.random(#targets)] 32 | creature:CastSpell(target, 69904) 33 | creature:ClearThreatList() 34 | end 35 | 36 | 37 | 38 | RegisterCreatureEvent(11873, 1, SpectralAttendant.OnEnterCombat) 39 | RegisterCreatureEvent(11873, 2, SpectralAttendant.OnLeaveCombat) 40 | RegisterCreatureEvent(11873, 4, SpectralAttendant.OnDied) -------------------------------------------------------------------------------- /Faction_Shared/Startstop.lua: -------------------------------------------------------------------------------- 1 | --DO NOT DELETE ME! FIXES AN ANNOYING AF BUG 2 | 3 | local holidayEventIds = {17, 91} 4 | 5 | local function OnPlayerLogin(event, player) 6 | if not player:IsInWorld() then 7 | return 8 | end 9 | 10 | for _, eventId in ipairs(holidayEventIds) do 11 | local isHolidayActive = IsGameEventActive(eventId) 12 | 13 | if isHolidayActive then 14 | StopGameEvent(eventId) 15 | StartGameEvent(eventId) 16 | end 17 | end 18 | end 19 | 20 | RegisterPlayerEvent(3, OnPlayerLogin) 21 | -------------------------------------------------------------------------------- /Faction_Shared/StoneSkinGargoyle.lua: -------------------------------------------------------------------------------- 1 | local StoneskinGargoyle = {} 2 | 3 | local function GustOfWind(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 61663, true) 5 | end 6 | 7 | local function StoneStomp(eventId, delay, calls, creature) 8 | local targets = creature:GetAITargets(10) 9 | if #targets == 0 then 10 | return 11 | end 12 | local target = targets[math.random(#targets)] 13 | creature:CastSpell(target, 49675, true) 14 | end 15 | 16 | local function OnEnterCombat(event, creature, target) 17 | creature:RegisterEvent(GustOfWind, 15000, 0) 18 | creature:RegisterEvent(StoneStomp, 8000, 0) 19 | end 20 | 21 | local function OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | local function OnDied(event, creature, killer) 26 | creature:DespawnOrUnsummon(5000) 27 | creature:RemoveEvents() 28 | end 29 | 30 | RegisterCreatureEvent(400053, 1, OnEnterCombat) 31 | RegisterCreatureEvent(400053, 2, OnLeaveCombat) 32 | RegisterCreatureEvent(400053, 4, OnDied) -------------------------------------------------------------------------------- /Faction_Shared/TrapCredit.lua: -------------------------------------------------------------------------------- 1 | local NPC_ID = 400034 -- The ID of the NPC you want players to get kill credit for 2 | 3 | -- List of allowed zones (use zone ID) 4 | local ALLOWED_ZONES = { 5 | 1519, -- SW City 6 | 12, 7 | 14, 8 | 1637 9 | } 10 | 11 | -- List of allowed spell IDs 12 | local ALLOWED_SPELLS = { 13 | 100144, -- Spell 1 14 | 100142, 15 | 100143, 16 | 100145, 17 | -- Add more spells here as needed 18 | } 19 | 20 | -- Define the indexOf function for tables 21 | function table.indexOf(t, value) 22 | for k, v in ipairs(t) do 23 | if v == value then 24 | return k 25 | end 26 | end 27 | return -1 28 | end 29 | 30 | function OnPlayerCastSpell(event, player, spell) 31 | local spellId = spell:GetEntry() 32 | local zoneId = player:GetZoneId() 33 | 34 | if table.indexOf(ALLOWED_SPELLS, spellId) ~= -1 then 35 | if table.indexOf(ALLOWED_ZONES, zoneId) == -1 then 36 | spell:Cancel() 37 | player:SendBroadcastMessage("You cannot use that here.") 38 | else 39 | player:KilledMonsterCredit(NPC_ID) 40 | player:SendBroadcastMessage("You have successfuly placed a trap!") 41 | end 42 | end 43 | end 44 | 45 | RegisterPlayerEvent(5, OnPlayerCastSpell) 46 | -------------------------------------------------------------------------------- /Faction_Shared/VenomBelcher.lua: -------------------------------------------------------------------------------- 1 | local VenomBelcher = {}; 2 | 3 | local function VenomSpit(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 24011, true) 5 | end 6 | 7 | local function SlowingPoison(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 14897, true) 9 | end 10 | 11 | 12 | function CastRetchingPlague(eventId, delay, calls, creature) 13 | local targets = creature:GetAITargets(10) 14 | if #targets == 0 then 15 | return 16 | end 17 | local target = targets[math.random(#targets)] 18 | creature:CastSpell(target, 30080, true) 19 | end 20 | 21 | 22 | local function OnEnterCombat(event, creature, target) 23 | creature:RegisterEvent(VenomSpit, 7000, 0) 24 | creature:RegisterEvent(CastRetchingPlague, 13000, 0) 25 | creature:RegisterEvent(SlowingPoison, 16000, 0) 26 | end 27 | 28 | local function OnLeaveCombat(event, creature) 29 | creature:RemoveEvents() 30 | end 31 | 32 | local function OnDied(event, creature, killer) 33 | creature:RemoveEvents() 34 | end 35 | 36 | RegisterCreatureEvent(10417, 1, OnEnterCombat) 37 | RegisterCreatureEvent(10417, 2, OnLeaveCombat) 38 | RegisterCreatureEvent(10417, 4, OnDied) -------------------------------------------------------------------------------- /FlameShocker.lua: -------------------------------------------------------------------------------- 1 | local FlameShocker = {}; 2 | 3 | 4 | local function CastFlameShock(eventId, delay, calls, creature) 5 | creature:CastSpell(creature:GetVictim(), 10448, true) 6 | end 7 | 8 | local function OnEnterCombat(event, creature, target) 9 | creature:RegisterEvent(CastFlameShock, 100, 1) 10 | creature:RegisterEvent(CastFlameShock, 8000, 0) 11 | end 12 | 13 | local function OnLeaveCombat(event, creature) 14 | creature:RemoveEvents() 15 | end 16 | 17 | local function OnDied(event, creature, killer) 18 | creature:CastSpell(killer, 28323, true) 19 | creature:DespawnOrUnsummon(25000) 20 | creature:RemoveEvents() 21 | end 22 | 23 | RegisterCreatureEvent(16383, 1, OnEnterCombat) 24 | RegisterCreatureEvent(16383, 2, OnLeaveCombat) 25 | RegisterCreatureEvent(16383, 4, OnDied) -------------------------------------------------------------------------------- /FleshFlayer.lua: -------------------------------------------------------------------------------- 1 | local FleshFlayer = {}; 2 | 3 | local function CastLeap(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 47482, true) 5 | end 6 | 7 | local function CastPlague(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 52230, true) 9 | end 10 | 11 | local function CastExplode(eventId, delay, calls, creature) 12 | creature:CastSpell(creature, 47496, true) 13 | end 14 | 15 | local function CastRend(eventId, delay, calls, creature) 16 | creature:CastSpell(creature:GetVictim(), 18106, true) 17 | end 18 | 19 | local function OnEnterCombat(event, creature, target) 20 | creature:RegisterEvent(CastLeap, 100, 1) 21 | creature:RegisterEvent(CastPlague, 500, 1) 22 | creature:RegisterEvent(CastRend, 2000, 1) 23 | creature:RegisterEvent(CastPlague, 20000, 0) 24 | creature:RegisterEvent(CastExplode, 30000, 0) 25 | end 26 | 27 | local function OnLeaveCombat(event, creature) 28 | creature:RemoveEvents() 29 | end 30 | 31 | local function OnDied(event, creature, killer) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(10407, 1, OnEnterCombat) 36 | RegisterCreatureEvent(10407, 2, OnLeaveCombat) 37 | RegisterCreatureEvent(10407, 4, OnDied) -------------------------------------------------------------------------------- /FlightHandler2.lua: -------------------------------------------------------------------------------- 1 | -- Don't touch without consulting me first. Don't want you to screw up your game. 2 | 3 | local AURA_ID = 100225 4 | local TRIGGER_SPELLS = {100211, 100213, 100214} 5 | local CAST_SPELLS = {100210, 100218, 100219, 100220} 6 | local CAST_SPELL_ID = 69669 7 | 8 | local function tableContains(table, element) 9 | for _, value in pairs(table) do 10 | if value == element then 11 | return true 12 | end 13 | end 14 | return false 15 | end 16 | 17 | local function CheckAuraStacksAndCast(player, auraId, triggerSpells, castSpellId) 18 | if player:HasAura(auraId) then 19 | local aura = player:GetAura(auraId) 20 | local stacks = aura:GetStackAmount() 21 | if stacks >= 3 then 22 | player:CastSpell(player, castSpellId, true) 23 | end 24 | end 25 | end 26 | 27 | local function OnSpellCast(event, player, spell, skipCheck) 28 | local spellId = spell:GetEntry() 29 | if tableContains(TRIGGER_SPELLS, spellId) then 30 | CheckAuraStacksAndCast(player, AURA_ID, TRIGGER_SPELLS, CAST_SPELL_ID) 31 | elseif tableContains(CAST_SPELLS, spellId) then 32 | if player:HasAura(AURA_ID) then 33 | player:RemoveAura(AURA_ID) 34 | end 35 | end 36 | end 37 | 38 | RegisterPlayerEvent(5, OnSpellCast) 39 | -------------------------------------------------------------------------------- /FlyableWaypoints.lua: -------------------------------------------------------------------------------- 1 | local Waypoint = {}; 2 | 3 | function Waypoint.OnSpawn(event, creature) 4 | creature:CanFly(true) 5 | creature:SetDisableGravity(true) 6 | end 7 | 8 | RegisterCreatureEvent(1, 5, Waypoint.OnSpawn) 9 | -------------------------------------------------------------------------------- /FrostbroodWhelp.lua: -------------------------------------------------------------------------------- 1 | local frostbroodWhelps = {}; 2 | 3 | function frostbroodWhelps.OnSpawn(event, creature) 4 | creature:CanFly(true) 5 | creature:SetDisableGravity(true) 6 | end 7 | 8 | RegisterCreatureEvent(400057, 5, frostbroodWhelps.OnSpawn) 9 | 10 | RegisterCreatureEvent(16531, 5, frostbroodWhelps.OnSpawn) -------------------------------------------------------------------------------- /Garr.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Day36512/RandomScriptsforAzerothCore/b5a08bde3e0a8b545edd42118dc2c7f401502452/Garr.lua -------------------------------------------------------------------------------- /Gender.lua: -------------------------------------------------------------------------------- 1 | local SwitchGender = {} 2 | local MSG_GEN = "#gender" 3 | 4 | local Cost = 0 --This is in copper so the value that is now 100g so 1000000c 5 | local Gold = 0 -- Gold value for visual on screen to showup. Can probably improve this later 6 | 7 | local function SwitchGender(event, player, msg, Type, lang) 8 | if (msg:find(MSG_GEN)) then 9 | local gmRank = player:GetGMRank() 10 | if (gmRank <= 0) then -- change number (0-3) 0 - to all 1,2,3 GM with rank 11 | player:SendAreaTriggerMessage("You Dont have access to this.") 12 | return 13 | end 14 | 15 | if player:GetCoinage() >= Cost then 16 | else 17 | player:SendAreaTriggerMessage("You require" .. Gold .. " Gold") 18 | return false 19 | end 20 | 21 | player:SetCoinage(player:GetCoinage() - Cost) 22 | player:SendAreaTriggerMessage(Gold .. " Gold Been taken") 23 | 24 | if player:GetGender() == 0 then 25 | player:SetGender(1) 26 | return false 27 | end 28 | 29 | if player:GetGender() == 1 then 30 | player:SetGender(0) 31 | return false 32 | end 33 | end 34 | end 35 | RegisterPlayerEvent(18, SwitchGender) 36 | -------------------------------------------------------------------------------- /Ghoul.lua: -------------------------------------------------------------------------------- 1 | local Ghoul = {}; 2 | 3 | local function CastLeap(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 47482, true) 5 | end 6 | 7 | local function CastPlague(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 52230, true) 9 | end 10 | 11 | local function CastExplode(eventId, delay, calls, creature) 12 | creature:CastSpell(creature, 47496, true) 13 | end 14 | 15 | local function OnEnterCombat(event, creature, target) 16 | creature:RegisterEvent(CastLeap, 100, 1) 17 | creature:RegisterEvent(CastPlague, 100, 1) 18 | creature:RegisterEvent(CastPlague, 20000, 0) 19 | creature:RegisterEvent(CastExplode, 23000, 0) 20 | end 21 | 22 | local function OnLeaveCombat(event, creature) 23 | creature:RemoveEvents() 24 | end 25 | 26 | local function OnDied(event, creature, killer) 27 | creature:DespawnOrUnsummon(5000) 28 | creature:RemoveEvents() 29 | end 30 | 31 | RegisterCreatureEvent(400047, 1, OnEnterCombat) 32 | RegisterCreatureEvent(400047, 2, OnLeaveCombat) 33 | RegisterCreatureEvent(400047, 4, OnDied) -------------------------------------------------------------------------------- /GibberingGhoul.lua: -------------------------------------------------------------------------------- 1 | local GibberingGhoul = {} 2 | 3 | function GibberingGhoul.OnCombat(event, creature, target) 4 | creature:RegisterEvent(GibberingGhoul.Ability2, 100, 1) 5 | creature:RegisterEvent(GibberingGhoul.Ability1, 7000, 0) 6 | creature:RegisterEvent(GibberingGhoul.Ability2, 12000, 0) 7 | end 8 | 9 | function GibberingGhoul.Ability1(event, delay, calls, creature) 10 | creature:CastSpell(creature:GetVictim(), 34113, true) 11 | end 12 | 13 | function GibberingGhoul.Ability2(event, delay, calls, creature) 14 | creature:CastSpell(creature:GetVictim(), 12889, true) 15 | end 16 | 17 | function GibberingGhoul.OnLeaveCombat(event, creature) 18 | creature:RemoveEvents() 19 | end 20 | 21 | function GibberingGhoul.OnDeath(event, creature, killer) 22 | creature:RemoveEvents() 23 | end 24 | 25 | RegisterCreatureEvent(8531, 1, GibberingGhoul.OnCombat) 26 | RegisterCreatureEvent(8531, 2, GibberingGhoul.OnLeaveCombat) 27 | RegisterCreatureEvent(8531, 4, GibberingGhoul.OnDeath) 28 | -------------------------------------------------------------------------------- /HardcoreItemRemoval.lua: -------------------------------------------------------------------------------- 1 | local function hasItem90000(player) 2 | return player:GetItemCount(90000) > 0 3 | end 4 | 5 | -- Remove custom starter items 6 | local function removeItems(player) 7 | local removed = false 8 | local items = {60002, 10594, 65000} 9 | for _, entry in ipairs(items) do 10 | local itemCount = player:GetItemCount(entry) 11 | if itemCount > 0 then 12 | for i = 0, itemCount - 1 do 13 | player:RemoveItem(entry, 1) 14 | end 15 | removed = true 16 | end 17 | end 18 | return removed 19 | end 20 | 21 | -- Remove Murky 22 | local function removeSpell(player) 23 | player:RemoveSpell(24939) 24 | player:RemoveSpell(100117) 25 | player:RemoveSpell(100118) 26 | end 27 | 28 | -- Script body 29 | local function onLogin(event, player) 30 | if hasItem90000(player) then 31 | if removeItems(player) then 32 | player:SendBroadcastMessage("Welcome to Hardcore Mode. Please watch your step!") 33 | end 34 | removeSpell(player) 35 | end 36 | end 37 | 38 | -- Register the script to be triggered on player login 39 | RegisterPlayerEvent(3, onLogin) -------------------------------------------------------------------------------- /HardcoreMode/HardcoreItemRemoval.lua: -------------------------------------------------------------------------------- 1 | local function hasItem90000(player) 2 | return player:GetItemCount(90000) > 0 3 | end 4 | 5 | -- Remove custom starter items 6 | local function removeItems(player) 7 | local removed = false 8 | local items = {60002, 10594, 65000} 9 | for _, entry in ipairs(items) do 10 | local itemCount = player:GetItemCount(entry) 11 | if itemCount > 0 then 12 | for i = 0, itemCount - 1 do 13 | player:RemoveItem(entry, 1) 14 | end 15 | removed = true 16 | end 17 | end 18 | return removed 19 | end 20 | 21 | -- Remove Murky 22 | local function removeSpell(player) 23 | player:RemoveSpell(24939) 24 | player:RemoveSpell(100117) 25 | player:RemoveSpell(100118) 26 | player:RemoveSpell(100105) 27 | end 28 | 29 | -- Script body 30 | local function onLogin(event, player) 31 | if hasItem90000(player) then 32 | if removeItems(player) then 33 | player:SendBroadcastMessage("Welcome to Hardcore Mode. Please watch your step!") 34 | end 35 | removeSpell(player) 36 | end 37 | end 38 | 39 | -- Register the script to be triggered on player login 40 | RegisterPlayerEvent(3, onLogin) -------------------------------------------------------------------------------- /HateShrieker.lua: -------------------------------------------------------------------------------- 1 | local HateShrieker = {} 2 | 3 | function HateShrieker.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(HateShrieker.Screech, 7000, 0) 5 | creature:RegisterEvent(HateShrieker.ShadowWordPain, math.random(11000,16000), 0) 6 | end 7 | 8 | 9 | function HateShrieker.Screech(eventId, delay, calls, creature) 10 | creature:CastSpell(creature, 3589) 11 | end 12 | 13 | function HateShrieker.OnLeaveCombat(event, creature) 14 | creature:RemoveEvents() 15 | end 16 | 17 | function HateShrieker.OnDied(event, creature, killer) 18 | creature:RemoveEvents() 19 | end 20 | 21 | function HateShrieker.ShadowWordPain(eventId, delay, calls, creature) 22 | local targets = creature:GetAITargets(10) 23 | if #targets == 0 then 24 | return 25 | end 26 | local target = targets[math.random(#targets)] 27 | creature:CastSpell(target, 10893) 28 | creature:ClearThreatList() 29 | end 30 | 31 | 32 | 33 | RegisterCreatureEvent(8541, 1, HateShrieker.OnEnterCombat) 34 | RegisterCreatureEvent(8541, 2, HateShrieker.OnLeaveCombat) 35 | RegisterCreatureEvent(8541, 4, HateShrieker.OnDied) -------------------------------------------------------------------------------- /HordeShout.lua: -------------------------------------------------------------------------------- 1 | local WolfRider = {}; 2 | 3 | local dialogues = { 4 | "For the Horde!", 5 | "Victory for the Horde!", 6 | "Our enemies will tremble before the might of the Horde!", 7 | "Lok'tar ogar!", 8 | "Let the winds of war carry us to glory!", 9 | "The Horde will claim what is rightfully ours!", 10 | "We will show the Lich King the power of the Horde!", 11 | "For the glory of the Warchief!", 12 | "None shall stand against the Horde!", 13 | "Our enemies will rue the day they crossed the Horde!", 14 | "With the strength of the Horde, we will triumph!", 15 | "Let us show the Scourge the might of the Horde!", 16 | "We will prove the might of the Horde!", 17 | } 18 | 19 | local function OnSpawn(event, creature) 20 | local randomDialogue = dialogues[math.random(#dialogues)] -- Selects a random dialogue from the "dialogues" table 21 | creature:SendUnitYell(randomDialogue,0) -- Makes the creature yell the selected dialogue 22 | end 23 | 24 | RegisterCreatureEvent(400045, 5, OnSpawn) -- Registers the "OnSpawn" function as a spawn event for the creature with ID 400014 -------------------------------------------------------------------------------- /HordeWarHerald.lua: -------------------------------------------------------------------------------- 1 | local BLESSING_SPELL_ID = 100168 -- replace with the first spell ID 2 | local SOULSTONE_SPELL_ID = 20707 -- replace with the second spell ID 3 | 4 | local function OnGossipHello(event, player, creature) 5 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\achievement_leader_ thrall:50:50:-23:0|tReceive the Warchief's Rage", 0, 1, false, "", 0) 6 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\inv_misc_orb_04:50:50:-23:0|tReceive a Soulstone", 0, 2, false, "", 0) 7 | player:GossipSendMenu(1, creature) 8 | end 9 | 10 | local function OnGossipSelect(event, player, creature, sender, intid, code, menuid) 11 | if intid == 1 then 12 | player:CastSpell(player, BLESSING_SPELL_ID, true) 13 | elseif intid == 2 then 14 | player:CastSpell(player, SOULSTONE_SPELL_ID, true) 15 | end 16 | player:GossipComplete() 17 | end 18 | 19 | local function YellDialogue(event, creature) 20 | creature:SendUnitYell("Adventurers, do not go unprepared! Come speak with me and I will grant you the strength you need!", 0) 21 | end 22 | 23 | RegisterCreatureGossipEvent(400065, 1, OnGossipHello) 24 | RegisterCreatureGossipEvent(400065, 2, OnGossipSelect) 25 | RegisterCreatureEvent(400065, 5, function(event, creature) YellDialogue(event, creature) end) 26 | 27 | -------------------------------------------------------------------------------- /Item.dbc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Day36512/RandomScriptsforAzerothCore/b5a08bde3e0a8b545edd42118dc2c7f401502452/Item.dbc -------------------------------------------------------------------------------- /KeinDK.lua: -------------------------------------------------------------------------------- 1 | -- Just for you, Kein666 2 | -- This script allows dks to equip shields and dw 2h without db edits. 3 | 4 | local ENABLE_SCRIPT = false -- Set to true to enable the script, false to disable it 5 | 6 | local EVENT_ON_LOGIN = 3 7 | local DEATH_KNIGHT_CLASS = 6 8 | local SHIELD_SKILL_ID = 433 9 | 10 | local function SetShieldSkillForDeathKnights(event, player) 11 | if ENABLE_SCRIPT and player:GetClass() == DEATH_KNIGHT_CLASS then 12 | player:SetSkill(SHIELD_SKILL_ID, 1, 1, 1) 13 | player:LearnSpell(46917) -- Titan's Grip spells 14 | player:LearnSpell(49152) 15 | player:LearnSpell(50483) 16 | end 17 | end 18 | 19 | RegisterPlayerEvent(EVENT_ON_LOGIN, SetShieldSkillForDeathKnights) 20 | -------------------------------------------------------------------------------- /KillCred.lua: -------------------------------------------------------------------------------- 1 | local function OnKillCredit(event, killer, killed) 2 | -- Check if the killed unit is a creature 3 | if killed:IsCreature() then 4 | -- Loop through all players in the world 5 | for _, player in pairs(GetPlayersInWorld()) do 6 | -- Check if the player has attacked the creature 7 | if player:GetUnitByGUID(killed):HasAura(2) then 8 | -- Give the player kill credit for the creature 9 | player:KilledMonsterCredit(killed:GetEntry()) 10 | end 11 | end 12 | end 13 | end 14 | 15 | -- Register the event handler 16 | RegisterPlayerEvent(7, OnKillCredit) 17 | -------------------------------------------------------------------------------- /LAkeshireVillagers2.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Day36512/RandomScriptsforAzerothCore/b5a08bde3e0a8b545edd42118dc2c7f401502452/LAkeshireVillagers2.lua -------------------------------------------------------------------------------- /Lakeshire/DarionTur.lua: -------------------------------------------------------------------------------- 1 | local CustomCreature = {} 2 | local NPC_ID = 400081 3 | local MAX_HEALTH = 8432 -- Set the desired max health value 4 | 5 | 6 | local ABILITY_1 = 16856 7 | local ABILITY_2 = 676 8 | 9 | function CustomCreature.OnSpawn(event, creature) 10 | creature:SetMaxHealth(MAX_HEALTH) 11 | creature:SetHealth(MAX_HEALTH) 12 | end 13 | 14 | function CustomCreature.OnCombat(event, creature, target) 15 | creature:RegisterEvent(CustomCreature.Ability1, 7000, 0) 16 | creature:RegisterEvent(CustomCreature.Ability2, 22000, 0) 17 | end 18 | 19 | function CustomCreature.Ability1(event, delay, calls, creature) 20 | creature:CastSpell(creature:GetVictim(), ABILITY_1, true) 21 | end 22 | 23 | function CustomCreature.Ability2(event, delay, calls, creature) 24 | creature:CastSpell(creature:GetVictim(), ABILITY_2, true) 25 | end 26 | 27 | function CustomCreature.OnLeaveCombat(event, creature) 28 | creature:RemoveEvents() 29 | end 30 | 31 | function CustomCreature.OnDeath(event, creature, killer) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(NPC_ID, 5, CustomCreature.OnSpawn) 36 | RegisterCreatureEvent(NPC_ID, 1, CustomCreature.OnCombat) 37 | RegisterCreatureEvent(NPC_ID, 2, CustomCreature.OnLeaveCombat) 38 | RegisterCreatureEvent(NPC_ID, 4, CustomCreature.OnDeath) 39 | -------------------------------------------------------------------------------- /Lakeshire/DarionTur2.lua: -------------------------------------------------------------------------------- 1 | local NPC_ID_DAMION_TUR = 400079 2 | local SOUND_ID = 20436 3 | 4 | local function OnDamionTurSpawn(event, creature) 5 | creature:PlayDirectSound(SOUND_ID) 6 | end 7 | 8 | RegisterCreatureEvent(NPC_ID_DAMION_TUR, 5, OnDamionTurSpawn) 9 | -------------------------------------------------------------------------------- /Lakeshire/DeathStalker.lua: -------------------------------------------------------------------------------- 1 | local DeathStalker = {} 2 | 3 | function DeathStalker.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(DeathStalker.Cripple, 1000, 1) 5 | creature:RegisterEvent(DeathStalker.Cripple, 8000, 0) 6 | end 7 | 8 | function DeathStalker.Cripple(eventId, delay, calls, creature) 9 | local targetList = creature:GetAITargets(5) 10 | local targetCount = #targetList 11 | 12 | if targetCount > 0 then 13 | local randomIndex = math.random(1, targetCount) 14 | local randomTarget = targetList[randomIndex] 15 | creature:CastSpell(randomTarget, 6217, true) 16 | else 17 | creature:CastSpell(creature:GetVictim(), 6217, true) 18 | end 19 | end 20 | 21 | function DeathStalker.OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | function DeathStalker.OnDied(event, creature, killer) 26 | creature:RemoveEvents() 27 | end 28 | 29 | RegisterCreatureEvent(400102, 1, DeathStalker.OnEnterCombat) 30 | RegisterCreatureEvent(400102, 2, DeathStalker.OnLeaveCombat) 31 | RegisterCreatureEvent(400102, 4, DeathStalker.OnDied) 32 | -------------------------------------------------------------------------------- /Lakeshire/Dumbassery.lua: -------------------------------------------------------------------------------- 1 | --I was being dumb. Don't ask. 2 | 3 | local CREATURE_ID = 1069 4 | local ITEM_ID = 65006 5 | local ITEM_COUNT = 1 6 | local REQUIRED_QUEST_ID = 30015 7 | 8 | local function OnCreatureKill(event, player, creature) 9 | if creature:GetEntry() == CREATURE_ID and player:HasQuest(REQUIRED_QUEST_ID) then 10 | player:AddItem(ITEM_ID, ITEM_COUNT) 11 | end 12 | end 13 | 14 | RegisterPlayerEvent(7, OnCreatureKill) 15 | -------------------------------------------------------------------------------- /Lakeshire/LakeshireGuard.lua: -------------------------------------------------------------------------------- 1 | local LakeshireGuard = {}; 2 | 3 | local function CastCleave(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 20605, true) 5 | end 6 | 7 | local function OnEnterCombat(event, creature, target) 8 | creature:RegisterEvent(CastCleave, 9000, 0) 9 | end 10 | 11 | local function OnLeaveCombat(event, creature) 12 | creature:RemoveEvents() 13 | end 14 | 15 | local function OnDied(event, creature, killer) 16 | creature:RemoveEvents() 17 | end 18 | 19 | local function OnSpawn(event, creature) 20 | creature:CastSpell(creature, 17683, true) 21 | end 22 | 23 | RegisterCreatureEvent(400013, 1, OnEnterCombat) 24 | RegisterCreatureEvent(400013, 2, OnLeaveCombat) 25 | RegisterCreatureEvent(400013, 4, OnDied) 26 | RegisterCreatureEvent(400013, 5, OnSpawn) 27 | 28 | -------------------------------------------------------------------------------- /Lakeshire/LakeshireLoremaster1.lua: -------------------------------------------------------------------------------- 1 | -- Creature ID for the creature that gives the quests 2 | local CREATURE_ID = 400096 3 | 4 | -- Quest and sound IDs for the quests that should trigger the sounds 5 | local QUEST_ACCEPT = { 6 | [30015] = 20439, 7 | [30016] = 20441, 8 | [30017] = 20443, 9 | [30018] = 20449 10 | } 11 | 12 | local QUEST_COMPLETE = { 13 | [30014] = 20438, 14 | [30015] = 20440, 15 | [30016] = 20442, 16 | [30017] = 20444, 17 | [30018] = 20450 18 | } 19 | 20 | -- Register the event for quest accept 21 | RegisterCreatureEvent(CREATURE_ID, 31, function(event, player, creature, quest) 22 | local soundID = QUEST_ACCEPT[quest:GetId()] 23 | if soundID then 24 | player:PlayDistanceSound(soundID) 25 | end 26 | end) 27 | 28 | -- Register the event for quest reward 29 | RegisterCreatureEvent(CREATURE_ID, 34, function(event, player, creature, quest) 30 | local soundID = QUEST_COMPLETE[quest:GetId()] 31 | if soundID then 32 | creature:PlayDistanceSound(soundID) 33 | end 34 | end) 35 | -------------------------------------------------------------------------------- /Lakeshire/RefurbishedShredder.lua: -------------------------------------------------------------------------------- 1 | local RShredder = {}; 2 | 3 | function RShredder.OnSpawn(event, creature) 4 | creature:CastSpell(creature, 100169, true) 5 | creature:SetReactState(0) 6 | end 7 | 8 | function RShredder.OnDied(event, creature) 9 | creature:DespawnOrUnsummon(5000) 10 | creature:RemoveEvents() 11 | end 12 | 13 | RegisterCreatureEvent(400044, 4, RShredder.OnDied) 14 | RegisterCreatureEvent(400044, 5, RShredder.OnSpawn) 15 | -------------------------------------------------------------------------------- /Lakeshire/SpiritofThalgorath.lua: -------------------------------------------------------------------------------- 1 | local SpiritofThalgorath = {} 2 | 3 | function SpiritofThalgorath.OnSpawn(event, creature) 4 | creature:SendUnitYell("You will not defeat me so easily!", 0) 5 | end 6 | 7 | function SpiritofThalgorath.OnEnterCombat(event, creature, target) 8 | creature:RegisterEvent(SpiritofThalgorath.Charge, 1000, 1) 9 | creature:RegisterEvent(SpiritofThalgorath.Charge, 8000, 0) 10 | creature:RegisterEvent(SpiritofThalgorath.ShadowBolt, 2000, 1) 11 | creature:RegisterEvent(SpiritofThalgorath.ShadowBolt, 6000, 0) 12 | end 13 | 14 | function SpiritofThalgorath.Charge(eventId, delay, calls, creature) 15 | local targetList = creature:GetAITargets(5) 16 | local targetCount = #targetList 17 | 18 | if targetCount > 0 then 19 | local randomIndex = math.random(1, targetCount) 20 | local randomTarget = targetList[randomIndex] 21 | creature:CastSpell(randomTarget, 100, true) 22 | else 23 | creature:CastSpell(creature:GetVictim(), 100, true) 24 | end 25 | end 26 | 27 | function SpiritofThalgorath.ShadowBolt(eventId, delay, calls, creature) 28 | creature:CastSpell(creature:GetVictim(), 9613, false) 29 | end 30 | 31 | function SpiritofThalgorath.OnLeaveCombat(event, creature) 32 | creature:RemoveEvents() 33 | end 34 | 35 | function SpiritofThalgorath.OnDied(event, creature, killer) 36 | creature:RemoveEvents() 37 | end 38 | 39 | RegisterCreatureEvent(400103, 5, SpiritofThalgorath.OnSpawn) 40 | RegisterCreatureEvent(400103, 1, SpiritofThalgorath.OnEnterCombat) 41 | RegisterCreatureEvent(400103, 2, SpiritofThalgorath.OnLeaveCombat) 42 | RegisterCreatureEvent(400103, 4, SpiritofThalgorath.OnDied) 43 | -------------------------------------------------------------------------------- /Lakeshire/quest_30018_trash_bunnies.lua: -------------------------------------------------------------------------------- 1 | local INVISIBLE_BUNNY_ENTRY = 400099 2 | local SPELL_TO_CAST = 364735 3 | 4 | local InvisibleBunny = {} 5 | 6 | function InvisibleBunny.OnSpawn(event, creature) 7 | creature:RegisterEvent(InvisibleBunny.CastSpellRandomly, math.random(18000, 34000), 4) 8 | end 9 | 10 | function InvisibleBunny.CastSpellRandomly(event, delay, calls, creature) 11 | creature:CastSpell(creature, SPELL_TO_CAST, true) 12 | 13 | end 14 | 15 | RegisterCreatureEvent(INVISIBLE_BUNNY_ENTRY, 5, InvisibleBunny.OnSpawn) 16 | -------------------------------------------------------------------------------- /Lakeshire/quest_30018_undead_bunny.lua: -------------------------------------------------------------------------------- 1 | local UNDEAD_BUNNY_ENTRY = 400100 2 | local SPELL_TO_CAST = 364736 3 | local CAST_DELAY = 120000 4 | 5 | local UndeadBunny = {} 6 | 7 | function UndeadBunny.OnSpawn(event, creature) 8 | creature:RegisterEvent(UndeadBunny.CastSpellAfterDelay, CAST_DELAY, 1) 9 | end 10 | 11 | function UndeadBunny.CastSpellAfterDelay(event, delay, calls, creature) 12 | creature:CastSpell(creature, SPELL_TO_CAST, true) 13 | end 14 | 15 | RegisterCreatureEvent(UNDEAD_BUNNY_ENTRY, 5, UndeadBunny.OnSpawn) -- 5 is the event for creature spawn 16 | -------------------------------------------------------------------------------- /LakeshireGuard.lua: -------------------------------------------------------------------------------- 1 | local LakeshireGuard = {}; 2 | 3 | local function CastCleave(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 20605, true) 5 | end 6 | 7 | local function OnEnterCombat(event, creature, target) 8 | creature:RegisterEvent(CastCleave, 9000, 0) 9 | end 10 | 11 | local function OnLeaveCombat(event, creature) 12 | creature:RemoveEvents() 13 | end 14 | 15 | local function OnDied(event, creature, killer) 16 | creature:RemoveEvents() 17 | end 18 | 19 | local function OnSpawn(event, creature) 20 | creature:CastSpell(creature, 17683, true) 21 | end 22 | 23 | RegisterCreatureEvent(400013, 1, OnEnterCombat) 24 | RegisterCreatureEvent(400013, 2, OnLeaveCombat) 25 | RegisterCreatureEvent(400013, 4, OnDied) 26 | RegisterCreatureEvent(400013, 5, OnSpawn) 27 | 28 | -------------------------------------------------------------------------------- /LakeshireLoremaster1.lua: -------------------------------------------------------------------------------- 1 | -- Creature ID for the creature that gives the quests 2 | local CREATURE_ID = 400096 3 | 4 | -- Quest and sound IDs for the quests that should trigger the sounds 5 | local QUEST_ACCEPT = { 6 | [30015] = 20439, 7 | [30016] = 20441, 8 | [30017] = 20443, 9 | [30018] = 20449 10 | } 11 | 12 | local QUEST_COMPLETE = { 13 | [30014] = 20438, 14 | [30015] = 20440, 15 | [30016] = 20442, 16 | [30017] = 20444, 17 | [30018] = 20450 18 | } 19 | 20 | -- Register the event for quest accept 21 | RegisterCreatureEvent(CREATURE_ID, 31, function(event, player, creature, quest) 22 | local soundID = QUEST_ACCEPT[quest:GetId()] 23 | if soundID then 24 | player:PlayDistanceSound(soundID) 25 | end 26 | end) 27 | 28 | -- Register the event for quest reward 29 | RegisterCreatureEvent(CREATURE_ID, 34, function(event, player, creature, quest) 30 | local soundID = QUEST_COMPLETE[quest:GetId()] 31 | if soundID then 32 | creature:PlayDistanceSound(soundID) 33 | end 34 | end) 35 | -------------------------------------------------------------------------------- /Laurena.lua: -------------------------------------------------------------------------------- 1 | local Laurena = {}; 2 | 3 | local function CastSmite(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 10934, true) 5 | end 6 | 7 | local function OnEnterCombat(event, creature, target) 8 | creature:RegisterEvent(CastSmite, 3000, 0) 9 | end 10 | 11 | local function OnLeaveCombat(event, creature) 12 | creature:RemoveEvents() 13 | end 14 | 15 | local function OnDied(event, creature, killer) 16 | creature:RemoveEvents() 17 | end 18 | 19 | RegisterCreatureEvent(376, 1, OnEnterCombat) 20 | RegisterCreatureEvent(376, 2, OnLeaveCombat) 21 | RegisterCreatureEvent(376, 4, OnDied) -------------------------------------------------------------------------------- /Lithe-Stalker.lua: -------------------------------------------------------------------------------- 1 | local LitheStalker = {}; 2 | 3 | local function CastWhirlingTip(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 24048, true) 5 | end 6 | 7 | local function CastSweepingSlam(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 53399, true) 9 | end 10 | 11 | function LitheStalker.OnEnterCombat(event, creature, target) 12 | creature:SendUnitYell("The Master will have your guts!", 0) 13 | creature:RegisterEvent(CastWhirlingTip, 5000, 0) 14 | creature:RegisterEvent(CastSweepingSlam, 10000, 0) 15 | end 16 | 17 | function LitheStalker.OnLeaveCombat(event, creature) 18 | creature:SendUnitSay("Mmmm....", 0) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function LitheStalker.OnDied(event, creature, killer) 23 | if(killer:GetObjectType() == "Player") then 24 | killer:SendBroadcastMessage("You killed " ..creature:GetName().."!") 25 | end 26 | creature:RemoveEvents() 27 | end 28 | 29 | RegisterCreatureEvent(400015, 1, LitheStalker.OnEnterCombat) 30 | RegisterCreatureEvent(400015, 2, LitheStalker.OnLeaveCombat) 31 | RegisterCreatureEvent(400015, 4, LitheStalker.OnDied) -------------------------------------------------------------------------------- /LowQuestXP.lua: -------------------------------------------------------------------------------- 1 | local g_CustomDiffFactor = 3 2 | 3 | local function OnGossipHello(event, player, object) 4 | for i = 1, 10 do 5 | player:GossipMenuAddItem(0, "Set difficulty factor to " .. i, 0, i) 6 | end 7 | player:GossipSendMenu(1, object) 8 | end 9 | 10 | local function OnGossipSelect(event, player, object, sender, intid, code, menu_id) 11 | SetGlobalVariable("g_CustomDiffFactor", intid) 12 | player:SendBroadcastMessage("Difficulty factor set to " .. intid) 13 | player:GossipComplete() 14 | end 15 | 16 | RegisterCreatureGossipEvent(400031, 1, OnGossipHello) 17 | RegisterCreatureGossipEvent(400031, 2, OnGossipSelect) 18 | -------------------------------------------------------------------------------- /Magmakin.lua: -------------------------------------------------------------------------------- 1 | Magmakin = {} 2 | 3 | function Magmakin.CastFlameBuffet(eventId, delay, calls, creature) 4 | if not creature:IsCasting() then 5 | creature:CastSpell(creature:GetVictim(), 23341, false) 6 | end 7 | end 8 | 9 | function Magmakin.CastMagmaBlast(eventId, delay, calls, creature) 10 | if not creature:IsCasting() then 11 | local targets = creature:GetAITargets(10) 12 | local target = targets[math.random(#targets)] 13 | creature:CastSpell(target, 20565, false) 14 | end 15 | end 16 | 17 | function Magmakin.CastLavaBurst(eventId, delay, calls, creature) 18 | if not creature:IsCasting() then 19 | creature:CastSpell(creature:GetVictim(), 11678, false) 20 | end 21 | end 22 | 23 | function Magmakin.OnEnterCombat(event, creature, target) 24 | creature:RegisterEvent(Magmakin.CastFlameBuffet, 18000, 0) 25 | creature:RegisterEvent(Magmakin.CastMagmaBlast, 16000, 0) 26 | creature:RegisterEvent(Magmakin.CastLavaBurst, 8000, 0) 27 | end 28 | 29 | function Magmakin.OnLeaveCombat(event, creature) 30 | creature:RemoveEvents() 31 | end 32 | 33 | function Magmakin.OnDied(event, creature, killer) 34 | creature:RemoveEvents() 35 | end 36 | 37 | function Magmakin.OnSpawn(event, creature) 38 | creature:SetMaxPower(0, 10000000) 39 | creature:SetMaxHealth(349000) 40 | end 41 | 42 | RegisterCreatureEvent(12806, 1, Magmakin.OnEnterCombat) 43 | RegisterCreatureEvent(12806, 2, Magmakin.OnLeaveCombat) 44 | RegisterCreatureEvent(12806, 4, Magmakin.OnDied) 45 | RegisterCreatureEvent(12806, 5, Magmakin.OnSpawn) -------------------------------------------------------------------------------- /MiscTools/FelRushSoundFix.lua: -------------------------------------------------------------------------------- 1 | local SPELL_ID = 100207 2 | local SOUND_ID = 53774 3 | local ADDITIONAL_SPELL_ID = 200181 4 | 5 | function OnSpellCast(event, player, spell) 6 | if spell:GetEntry() == SPELL_ID then 7 | player:PlayDirectSound(SOUND_ID, player) 8 | player:CastSpell(player, ADDITIONAL_SPELL_ID, true) 9 | end 10 | end 11 | 12 | RegisterPlayerEvent(5, OnSpellCast) -------------------------------------------------------------------------------- /MiscTools/FlightHandler2.lua: -------------------------------------------------------------------------------- 1 | local AURA_ID = 100225 2 | local TRIGGER_SPELLS = {100211, 100213, 100214} 3 | local CAST_SPELLS = {100210, 100218, 100219, 100220} 4 | local CAST_SPELL_ID = 69669 5 | 6 | local function tableContains(table, element) 7 | for _, value in pairs(table) do 8 | if value == element then 9 | return true 10 | end 11 | end 12 | return false 13 | end 14 | 15 | local function CheckAuraStacksAndCast(player, auraId, triggerSpells, castSpellId) 16 | if player:HasAura(auraId) then 17 | local aura = player:GetAura(auraId) 18 | local stacks = aura:GetStackAmount() 19 | if stacks >= 3 then 20 | player:CastSpell(player, castSpellId, true) 21 | end 22 | end 23 | end 24 | 25 | local function OnSpellCast(event, player, spell, skipCheck) 26 | local spellId = spell:GetEntry() 27 | if tableContains(TRIGGER_SPELLS, spellId) then 28 | CheckAuraStacksAndCast(player, AURA_ID, TRIGGER_SPELLS, CAST_SPELL_ID) 29 | elseif tableContains(CAST_SPELLS, spellId) then 30 | if player:HasAura(AURA_ID) then 31 | player:RemoveAura(AURA_ID) 32 | end 33 | end 34 | end 35 | 36 | RegisterPlayerEvent(5, OnSpellCast) 37 | -------------------------------------------------------------------------------- /MiscTools/FlyableWaypoints.lua: -------------------------------------------------------------------------------- 1 | local Waypoint = {}; 2 | 3 | function Waypoint.OnSpawn(event, creature) 4 | creature:CanFly(true) 5 | creature:SetDisableGravity(true) 6 | end 7 | 8 | RegisterCreatureEvent(1, 5, Waypoint.OnSpawn) 9 | -------------------------------------------------------------------------------- /MiscTools/GhoulDust.lua: -------------------------------------------------------------------------------- 1 | local ITEM_ID = 60090 -- The item ID to check for 2 | local SPELL_ID = 46619 -- The spell ID to cast 3 | local CAST_CHANCE = 30 -- The chance percentage to cast the spell 4 | local DELAY = 1000 -- Delay in milliseconds (1000 ms = 1 second) 5 | 6 | local function HasEquippedItem(player, itemID) 7 | for slot = 1, 18 do 8 | local item = player:GetEquippedItemBySlot(slot) 9 | if item and item:GetEntry() == itemID then 10 | return true 11 | end 12 | end 13 | return false 14 | end 15 | 16 | local function CastDelayedSpell(playerGUID) 17 | local player = GetPlayerByGUID(playerGUID) 18 | if player then 19 | player:CastSpell(player, SPELL_ID, true) 20 | end 21 | end 22 | 23 | local function OnPlayerDeath(event, killer, killed) 24 | -- Check if the killed player has the item equipped 25 | if HasEquippedItem(killed, ITEM_ID) then 26 | -- Roll for the chance to cast the spell 27 | if math.random(1, 100) <= CAST_CHANCE then 28 | local killedGUID = killed:GetGUID() 29 | -- Schedule the delayed spell cast 30 | CreateLuaEvent(function() CastDelayedSpell(killedGUID) end, DELAY, 1) 31 | end 32 | end 33 | end 34 | 35 | RegisterPlayerEvent(8, OnPlayerDeath) -- Register the event handler for player death 36 | -------------------------------------------------------------------------------- /MiscTools/SmolderingEmberRestrict.lua: -------------------------------------------------------------------------------- 1 | local ALLOWED_MAPS = { 2 | 0, 3 | 1, 4 | } 5 | 6 | local ALLOWED_SPELLS = {100150, 100160, 100161, 100177, 100186, 100168,} 7 | 8 | function table.indexOf(t, value) 9 | for k, v in ipairs(t) do 10 | if v == value then 11 | return k 12 | end 13 | end 14 | return -1 15 | end 16 | 17 | function OnPlayerCastSpell(event, player, spell) 18 | local spellId = spell:GetEntry() 19 | local mapId = player:GetMapId() 20 | 21 | if table.indexOf(ALLOWED_SPELLS, spellId) ~= -1 then 22 | if table.indexOf(ALLOWED_MAPS, mapId) == -1 then 23 | spell:Cancel() 24 | player:SendBroadcastMessage("You can't use that here.") 25 | else 26 | if spellId == 100150 then 27 | player:PlayDirectSound(20428) 28 | end 29 | end 30 | end 31 | end 32 | 33 | function OnPlayerZoneChange(event, player, newZone, newArea) 34 | local mapId = player:GetMapId() 35 | if table.indexOf(ALLOWED_MAPS, mapId) == -1 then 36 | for i, allowedSpell in ipairs(ALLOWED_SPELLS) do 37 | local aura = player:GetAura(allowedSpell) 38 | if aura then 39 | player:RemoveAura(allowedSpell) 40 | end 41 | end 42 | end 43 | end 44 | 45 | RegisterPlayerEvent(27, OnPlayerZoneChange) 46 | RegisterPlayerEvent(5, OnPlayerCastSpell) -------------------------------------------------------------------------------- /MiscTools/SoL.lua: -------------------------------------------------------------------------------- 1 | -- AzerothCore Eluna script by Dinkledork 2 | local SPELL_SURGE_OF_LIGHT_1 = 33151 3 | local SPELL_CUSTOM = 100205 4 | 5 | local function OnSpellCast(event, player, spell, skipCheck) 6 | local spellId = spell:GetEntry() 7 | if spellId == SPELL_SURGE_OF_LIGHT_1 then 8 | player:CastSpell(player, SPELL_CUSTOM, true) 9 | end 10 | end 11 | 12 | RegisterPlayerEvent(5, OnSpellCast) 13 | -------------------------------------------------------------------------------- /MiscTools/StormwindRezFix.lua: -------------------------------------------------------------------------------- 1 | local Area1 = 5390 2 | local Area2 = 1519 3 | local Area3 = 5148 4 | local Area4 = 5150 5 | local Area5 = 5314 6 | local Area6 = 5346 7 | local Area7 = 5428 8 | local Area8 = 4921 9 | local Area9 = 5157 10 | local TargetMap = 0 11 | local TargetX = -8357.38 12 | local TargetY = 956.383 13 | local TargetZ = 96.329971 14 | local TargetO = 4.262 15 | 16 | local function TeleportAndRevive(eventId, delay, repeats, player) 17 | player:Teleport(TargetMap, TargetX, TargetY, TargetZ, TargetO) 18 | player:ResurrectPlayer(100, false) 19 | end 20 | 21 | local function PlayerReleasesSpirit(event, player) 22 | local playerArea = player:GetAreaId() 23 | if playerArea == Area1 or playerArea == Area2 or playerArea == Area3 or playerArea == Area4 or playerArea == Area5 or playerArea == Area6 or playerArea == Area7 or playerArea == Area8 or playerArea == Area9 then 24 | player:RegisterEvent(TeleportAndRevive, 2000, 1) 25 | end 26 | end 27 | 28 | RegisterPlayerEvent(35, PlayerReleasesSpirit) 29 | -------------------------------------------------------------------------------- /MiscTools/reload_scripts.lua: -------------------------------------------------------------------------------- 1 | function reloadElunaEngine(event, player, command) 2 | if command == "reload scripts" or command == "reloadscripts" then 3 | ReloadEluna() 4 | end 5 | end 6 | 7 | RegisterPlayerEvent(42, reloadElunaEngine) -------------------------------------------------------------------------------- /MoltenCore/CoreRager.lua: -------------------------------------------------------------------------------- 1 | CoreRager = {} 2 | 3 | function CoreRager.CastMangle(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 19820, true) 5 | end 6 | 7 | function CoreRager.OnDamageTaken(event, creature, attacker, damage) 8 | if creature:GetHealthPct() < 50 then 9 | creature:CastSpell(creature, 17683, true) 10 | creature:SendUnitEmote("Core Rager refuses to die while its master is in trouble.", 0) 11 | end 12 | end 13 | 14 | function CoreRager.OnEnterCombat(event, creature, target) 15 | creature:RegisterEvent(CoreRager.CastMangle, 7000, 0) 16 | end 17 | 18 | function CoreRager.OnLeaveCombat(event, creature) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function CoreRager.OnDied(event, creature, killer) 23 | creature:RemoveEvents() 24 | end 25 | 26 | function CoreRager.OnSpawn(event, creature) 27 | creature:SetMaxHealth(200000) 28 | end 29 | 30 | function CoreRager.OnGolemaggDeath(event, creature, boss) 31 | local coreRagers = creature:GetCreaturesInRange(100, 11672) 32 | for _, coreRager in pairs(coreRagers) do 33 | coreRager:CastSpell(coreRager, 13520, true) 34 | end 35 | end 36 | 37 | RegisterCreatureEvent(11672, 1, CoreRager.OnEnterCombat) 38 | RegisterCreatureEvent(11672, 2, CoreRager.OnLeaveCombat) 39 | RegisterCreatureEvent(11672, 4, CoreRager.OnDied) 40 | RegisterCreatureEvent(11672, 5, CoreRager.OnSpawn) 41 | RegisterCreatureEvent(11672, 9, CoreRager.OnDamageTaken) 42 | 43 | RegisterCreatureEvent(11988, 4, CoreRager.OnGolemaggDeath) -------------------------------------------------------------------------------- /MoltenCore/Magmakin.lua: -------------------------------------------------------------------------------- 1 | Magmakin = {} 2 | 3 | function Magmakin.CastFlameBuffet(eventId, delay, calls, creature) 4 | if not creature:IsCasting() then 5 | creature:CastSpell(creature:GetVictim(), 23341, false) 6 | end 7 | end 8 | 9 | function Magmakin.CastMagmaBlast(eventId, delay, calls, creature) 10 | if not creature:IsCasting() then 11 | local targets = creature:GetAITargets(10) 12 | local target = targets[math.random(#targets)] 13 | creature:CastSpell(target, 20565, false) 14 | end 15 | end 16 | 17 | function Magmakin.CastLavaBurst(eventId, delay, calls, creature) 18 | if not creature:IsCasting() then 19 | creature:CastSpell(creature:GetVictim(), 11678, false) 20 | end 21 | end 22 | 23 | function Magmakin.OnEnterCombat(event, creature, target) 24 | creature:RegisterEvent(Magmakin.CastFlameBuffet, 18000, 0) 25 | creature:RegisterEvent(Magmakin.CastMagmaBlast, 16000, 0) 26 | creature:RegisterEvent(Magmakin.CastLavaBurst, 8000, 0) 27 | end 28 | 29 | function Magmakin.OnLeaveCombat(event, creature) 30 | creature:RemoveEvents() 31 | end 32 | 33 | function Magmakin.OnDied(event, creature, killer) 34 | creature:RemoveEvents() 35 | end 36 | 37 | function Magmakin.OnSpawn(event, creature) 38 | creature:SetMaxPower(0, 10000000) 39 | --creature:SetMaxHealth(349000) 40 | end 41 | 42 | RegisterCreatureEvent(12806, 1, Magmakin.OnEnterCombat) 43 | RegisterCreatureEvent(12806, 2, Magmakin.OnLeaveCombat) 44 | RegisterCreatureEvent(12806, 4, Magmakin.OnDied) 45 | RegisterCreatureEvent(12806, 5, Magmakin.OnSpawn) -------------------------------------------------------------------------------- /NPCBrave.lua: -------------------------------------------------------------------------------- 1 | local BRAVE_IDS = {5412, 5614, 5511, 5512, 957, 7798, 11026, 5518, 5510, 5509, 1416, 5514, 29016, 29019, 3518, 1472, 31423, 3314, 3312, 3323, 5188, 3370, 3368, 3371, 3316, 3405, 11046, 3347, 3348, 6986, 31433} 2 | local BRAVERY_DIALOGUE = { 3 | "I fear no enemy!", 4 | "I will fight to the bitter end!", 5 | "This battle is mine!", 6 | "This is MY city!", 7 | "My courage will never falter!", 8 | "I'll show you what true bravery is!", 9 | "I am unbreakable!", 10 | "This fight is mine to win!", 11 | "I'll fight until my last breath!", 12 | "Pfft, you think you can scare the likes of me!?" 13 | } 14 | 15 | local function OnCombat(event, creature, target) 16 | if math.random() < 0.5 then -- 50% chance to trigger dialogue 17 | creature:SendUnitSay(BRAVERY_DIALOGUE[math.random(#BRAVERY_DIALOGUE)], 0) 18 | end 19 | end 20 | 21 | for i, id in ipairs(BRAVE_IDS) do 22 | RegisterCreatureEvent(id, 1, OnCombat) 23 | end 24 | -------------------------------------------------------------------------------- /NPCFreakout.lua: -------------------------------------------------------------------------------- 1 | local FREAKOUT_NPC = { 30217, 4981, 483, 5193, 1402, 70021, 1257, 1286, 1285, 3520, 3513, 1432, 1402, 1444, 7917, 1212, 6173, 5489, 4982, 5484, 14500, 14450, 14496, 14497, 6579, 5519, 6007, 29152, 9977, 1395, 2795, 1320, 1318, 1310, 3399, 7010, 5811, 3351, 400062, 400067 } 2 | 3 | function OnEnterCombat(event, creature, target) 4 | creature:CastSpell(creature, 31358, true) -- fear spell 5 | local yellOptions = { 6 | "Aaahhh! Somebody help!", 7 | "I can't believe this is happening, why is this happening?!", 8 | "I don't know what to do, I don't know what to do!", 9 | "No! Stay away from me!", 10 | "Please, please let this be a nightmare!", 11 | "I can't handle this, I can't handle this!", 12 | "No, no, no!", 13 | "This can't be happening!", 14 | "I'm not ready for this!", 15 | "This is insane, how did we get here?!", 16 | "Why is this happening to me?!", 17 | "I don't want to die!", 18 | "I'm not prepared for this, I'm not prepared for this at all!", 19 | "Please, someone help me!", 20 | "There's no way this is happening!" 21 | } 22 | local randomIndex = math.random(1, 15) 23 | local selectedYell = yellOptions[randomIndex] 24 | creature:SendUnitYell(selectedYell, 0) 25 | end 26 | 27 | for i, id in ipairs(FREAKOUT_NPC) do 28 | RegisterCreatureEvent(id, 1, OnEnterCombat) 29 | end 30 | -------------------------------------------------------------------------------- /Necrofiend.lua: -------------------------------------------------------------------------------- 1 | local Necrofiend = {} 2 | 3 | function Necrofiend.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(Necrofiend.WebSpray, 15000, 0, creature) 5 | creature:RegisterEvent(Necrofiend.CastBanefulPoison, 7000, 0, creature) 6 | creature:RegisterEvent(Necrofiend.SpecialSpell, 1000, 0, creature) 7 | end 8 | 9 | function Necrofiend.SpecialSpell(eventId, delay, calls, creature) 10 | local victim = creature:GetVictim() 11 | if not victim then 12 | return 13 | end 14 | if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then 15 | creature:CastSpell(victim, 5, true) 16 | end 17 | end 18 | 19 | 20 | 21 | function Necrofiend.WebSpray(event, delay, calls, creature) 22 | creature:CastSpell(creature:GetVictim(), 55508, true) 23 | end 24 | 25 | function Necrofiend.CastBanefulPoison(event, delay, calls, creature) 26 | local targets = creature:GetAITargets(10) 27 | if #targets == 0 then 28 | return 29 | end 30 | local target = targets[math.random(#targets)] 31 | creature:CastSpell(target, 15475, true) 32 | end 33 | 34 | function Necrofiend.OnLeaveCombat(event, creature) 35 | creature:RemoveEvents() 36 | end 37 | 38 | function Necrofiend.OnDied(event, creature, killer) 39 | creature:DespawnOrUnsummon(5000) 40 | creature:RemoveEvents() 41 | end 42 | 43 | RegisterCreatureEvent(400055, 1, Necrofiend.OnEnterCombat) 44 | RegisterCreatureEvent(400055, 2, Necrofiend.OnLeaveCombat) 45 | RegisterCreatureEvent(400055, 4, Necrofiend.OnDied) 46 | -------------------------------------------------------------------------------- /Necrofiend2.lua: -------------------------------------------------------------------------------- 1 | local Necrofiend = {} 2 | 3 | function Necrofiend.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(Necrofiend.WebSpray, 12000, 0, creature) 5 | creature:RegisterEvent(Necrofiend.CastBanefulPoison, 7000, 0, creature) 6 | creature:RegisterEvent(Necrofiend.DeadlyPoison, 10000, 0, creature) 7 | end 8 | 9 | function Necrofiend.WebSpray(event, delay, calls, creature) 10 | creature:CastSpell(creature:GetVictim(), 55508, true) 11 | end 12 | 13 | function Necrofiend.DeadlyPoison(event, delay, calls, creature) 14 | creature:CastSpell(creature:GetVictim(), 34616, true) 15 | end 16 | 17 | function Necrofiend.CastBanefulPoison(event, delay, calls, creature) 18 | local targets = creature:GetAITargets(10) 19 | if #targets == 0 then 20 | return 21 | end 22 | local target = targets[math.random(#targets)] 23 | creature:CastSpell(target, 15475, true) 24 | end 25 | 26 | function Necrofiend.OnLeaveCombat(event, creature) 27 | creature:RemoveEvents() 28 | end 29 | 30 | function Necrofiend.OnDied(event, creature, killer) 31 | creature:RemoveEvents() 32 | end 33 | 34 | RegisterCreatureEvent(11551, 1, Necrofiend.OnEnterCombat) 35 | RegisterCreatureEvent(11551, 2, Necrofiend.OnLeaveCombat) 36 | RegisterCreatureEvent(11551, 4, Necrofiend.OnDied) 37 | -------------------------------------------------------------------------------- /OrgArcher.lua: -------------------------------------------------------------------------------- 1 | local OrgArcher = {} 2 | 3 | local function CastShoot(eventId, delay, calls, creature) 4 | creature:CastSpell(target, 37770, true) 5 | end 6 | 7 | local function CastMultiShot(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 30990, true) 9 | end 10 | 11 | local function OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(CastShoot, 850, 0) 13 | creature:RegisterEvent(CastMultiShot, 5000, 0) 14 | end 15 | 16 | local function OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | local function OnDied(event, creature, killer) 21 | creature:RemoveEvents() 22 | end 23 | 24 | RegisterCreatureEvent(400041, 1, OnEnterCombat) 25 | RegisterCreatureEvent(400041, 2, OnLeaveCombat) 26 | RegisterCreatureEvent(400041, 4, OnDied) 27 | 28 | -------------------------------------------------------------------------------- /OrgBerserker.lua: -------------------------------------------------------------------------------- 1 | local OrgBerserker = {}; 2 | 3 | local function CastWhirlWind(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 53361, true) 5 | end 6 | 7 | local function CastEnrage(eventId, delay, calls, creature) 8 | creature:CastSpell(creature, 12880, true) 9 | end 10 | 11 | local function OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(CastWhirlWind, 7000, 0) 13 | creature:RegisterEvent(CastEnrage, 10000, 0) 14 | end 15 | 16 | local function OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | local function OnSpawn(event, creature) 21 | creature:CastSpell(creature, 17683, true) 22 | end 23 | 24 | local function OnDied(event, creature, killer) 25 | creature:RemoveEvents() 26 | end 27 | 28 | RegisterCreatureEvent(400040, 1, OnEnterCombat) 29 | RegisterCreatureEvent(400040, 2, OnLeaveCombat) 30 | RegisterCreatureEvent(400040, 4, OnDied) 31 | RegisterCreatureEvent(400040, 5, OnSpawn) 32 | 33 | RegisterCreatureEvent(400045, 1, OnEnterCombat) 34 | RegisterCreatureEvent(400045, 2, OnLeaveCombat) 35 | RegisterCreatureEvent(400045, 4, OnDied) 36 | RegisterCreatureEvent(400045, 5, OnSpawn) 37 | 38 | RegisterCreatureEvent(14720, 1, OnEnterCombat) 39 | RegisterCreatureEvent(14720, 2, OnLeaveCombat) 40 | RegisterCreatureEvent(14720, 4, OnDied) 41 | RegisterCreatureEvent(14720, 5, OnSpawn) -------------------------------------------------------------------------------- /OrgDefQuest.lua: -------------------------------------------------------------------------------- 1 | local ORG_ID = {3296, 400039, 400040, 400041, 400045, 400059, 400060, 400061, 400070, 400071} 2 | local SPELL_ID = 100193 3 | 4 | function OnSpellCast(event, caster, spell) 5 | local target = spell:GetTarget() 6 | if target and spell:GetEntry() == SPELL_ID then 7 | local isValidTarget = false 8 | for _, orgID in ipairs(ORG_ID) do 9 | if target:GetEntry() == orgID then 10 | isValidTarget = true 11 | break 12 | end 13 | end 14 | if not isValidTarget then 15 | caster:SendBroadcastMessage("That target is not valid.") 16 | spell:Cancel() 17 | elseif target:HasAura(SPELL_ID) then 18 | caster:SendBroadcastMessage("You've already used the Shadow-Drenched Cloth on that defender!") 19 | spell:Cancel() 20 | else 21 | -- give kill credit to NPC ID 3296 22 | caster:KilledMonsterCredit(3296) 23 | end 24 | end 25 | end 26 | 27 | RegisterPlayerEvent(5, OnSpellCast) -------------------------------------------------------------------------------- /Orgrimmar/BoneSentinel.lua: -------------------------------------------------------------------------------- 1 | local BoneSentinel = {}; 2 | 3 | local function CastShadowCleave(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 38226, true) 5 | end 6 | 7 | local function CastEarthquake(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 33919, true) 9 | end 10 | 11 | local function CastSpecialSpell(eventId, delay, calls, creature) 12 | local victim = creature:GetVictim() 13 | if not victim then 14 | return 15 | end 16 | if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then 17 | creature:CastSpell(victim, 5, true) 18 | end 19 | end 20 | 21 | local function OnEnterCombat(event, creature, target) 22 | creature:RegisterEvent(CastShadowCleave, 5000, 0) 23 | creature:RegisterEvent(CastEarthquake, 12000, 0) 24 | creature:RegisterEvent(CastSpecialSpell, 1000, 0) 25 | end 26 | 27 | local function OnLeaveCombat(event, creature) 28 | creature:RemoveEvents() 29 | end 30 | 31 | local function OnDied(event, creature, killer) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(400036, 1, OnEnterCombat) 36 | RegisterCreatureEvent(400036, 2, OnLeaveCombat) 37 | RegisterCreatureEvent(400036, 4, OnDied) 38 | -------------------------------------------------------------------------------- /Orgrimmar/DarkRanger.lua: -------------------------------------------------------------------------------- 1 | local DarkRanger = {} 2 | 3 | local function CastShoot(eventId, delay, calls, creature) 4 | creature:CastSpell(target, 37770, true) -- cast shoot on target 5 | end 6 | 7 | 8 | local function CastBlackArrow(eventId, delay, calls, creature) 9 | creature:CastSpell(creature:GetVictim(), 63671, true) 10 | end 11 | 12 | local function CastExplodingShot(eventId, delay, calls, creature) 13 | creature:CastSpell(creature:GetVictim(), 33792, true) 14 | end 15 | 16 | local function CastBarrage(eventId, delay, calls, creature) 17 | creature:CastSpell(creature:GetVictim(), 10188, true) 18 | end 19 | 20 | local function OnEnterCombat(event, creature, target) 21 | creature:RegisterEvent(CastShoot, 750, 0) 22 | creature:RegisterEvent(CastBlackArrow, 16000, 0) 23 | creature:RegisterEvent(CastBarrage, 10000, 0) 24 | creature:RegisterEvent(CastExplodingShot, 7000, 0) 25 | end 26 | 27 | local function OnLeaveCombat(event, creature) 28 | creature:RemoveEvents() 29 | end 30 | 31 | local function OnDied(event, creature, killer) 32 | creature:RemoveEvents() 33 | end 34 | 35 | RegisterCreatureEvent(400072, 1, OnEnterCombat) 36 | RegisterCreatureEvent(400072, 2, OnLeaveCombat) 37 | RegisterCreatureEvent(400072, 4, OnDied) 38 | 39 | RegisterCreatureEvent(400073, 1, OnEnterCombat) 40 | RegisterCreatureEvent(400073, 2, OnLeaveCombat) 41 | RegisterCreatureEvent(400073, 4, OnDied) 42 | 43 | -------------------------------------------------------------------------------- /Orgrimmar/Draven.lua: -------------------------------------------------------------------------------- 1 | local Draven = {}; 2 | 3 | function Draven.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(Draven.CastFanOfKnives, 10000, 0) 5 | creature:RegisterEvent(Draven.CastSaroniteBomb, 7000, 0) 6 | creature:RegisterEvent(Draven.CastCloakOfShadows, 11500, 0) 7 | creature:RegisterEvent(Draven.CastBladeFlurry, 13000, 0) 8 | end 9 | 10 | function Draven.OnLeaveCombat(event, creature) 11 | creature:RemoveEvents() 12 | end 13 | 14 | function Draven.OnDied(event, creature, killer) 15 | creature:RemoveEvents() 16 | end 17 | 18 | function Draven.CastFanOfKnives(event, delay, calls, creature) 19 | creature:CastSpell(creature:GetVictim(), 51723, true) 20 | end 21 | 22 | function Draven.CastSaroniteBomb(event, delay, calls, creature) 23 | creature:CastSpell(creature:GetVictim(), 56350, true) 24 | end 25 | 26 | function Draven.CastCloakOfShadows(event, delay, calls, creature) 27 | creature:CastSpell(creature, 31224, true) 28 | end 29 | 30 | function Draven.CastBladeFlurry(event, delay, calls, creature) 31 | creature:CastSpell(creature, 13877, true) 32 | end 33 | 34 | RegisterCreatureEvent(400069, 1, Draven.OnEnterCombat) 35 | RegisterCreatureEvent(400069, 2, Draven.OnLeaveCombat) 36 | RegisterCreatureEvent(400069, 4, Draven.OnDied) 37 | 38 | -------------------------------------------------------------------------------- /Orgrimmar/FrostbroodWhelp.lua: -------------------------------------------------------------------------------- 1 | local frostbroodWhelps = {}; 2 | 3 | function frostbroodWhelps.OnSpawn(event, creature) 4 | creature:CanFly(true) 5 | creature:SetDisableGravity(true) 6 | end 7 | 8 | RegisterCreatureEvent(400057, 5, frostbroodWhelps.OnSpawn) 9 | 10 | RegisterCreatureEvent(16531, 5, frostbroodWhelps.OnSpawn) -------------------------------------------------------------------------------- /Orgrimmar/HordeShout.lua: -------------------------------------------------------------------------------- 1 | local WolfRider = {}; 2 | 3 | local dialogues = { 4 | "For the Horde!", 5 | "Victory for the Horde!", 6 | "Our enemies will tremble before the might of the Horde!", 7 | "Lok'tar ogar!", 8 | "Let the winds of war carry us to glory!", 9 | "The Horde will claim what is rightfully ours!", 10 | "We will show the Lich King the power of the Horde!", 11 | "For the glory of the Warchief!", 12 | "None shall stand against the Horde!", 13 | "Our enemies will rue the day they crossed the Horde!", 14 | "With the strength of the Horde, we will triumph!", 15 | "Let us show the Scourge the might of the Horde!", 16 | "We will prove the might of the Horde!", 17 | } 18 | 19 | local function OnSpawn(event, creature) 20 | local randomDialogue = dialogues[math.random(#dialogues)] -- Selects a random dialogue from the "dialogues" table 21 | creature:SendUnitYell(randomDialogue,0) -- Makes the creature yell the selected dialogue 22 | end 23 | 24 | RegisterCreatureEvent(400045, 5, OnSpawn) -- Registers the "OnSpawn" function as a spawn event for the creature with ID 400014 -------------------------------------------------------------------------------- /Orgrimmar/HordeWarHerald.lua: -------------------------------------------------------------------------------- 1 | local BLESSING_SPELL_ID = 100168 -- replace with the first spell ID 2 | local SOULSTONE_SPELL_ID = 20707 -- replace with the second spell ID 3 | 4 | local function OnGossipHello(event, player, creature) 5 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\achievement_leader_ thrall:50:50:-23:0|tReceive the Warchief's Rage", 0, 1, false, "", 0) 6 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\inv_misc_orb_04:50:50:-23:0|tReceive a Soulstone", 0, 2, false, "", 0) 7 | player:GossipSendMenu(1, creature) 8 | end 9 | 10 | local function OnGossipSelect(event, player, creature, sender, intid, code, menuid) 11 | if intid == 1 then 12 | player:CastSpell(player, BLESSING_SPELL_ID, true) 13 | elseif intid == 2 then 14 | player:CastSpell(player, SOULSTONE_SPELL_ID, true) 15 | end 16 | player:GossipComplete() 17 | end 18 | 19 | local function YellDialogue(event, creature) 20 | creature:SendUnitYell("Adventurers, do not go unprepared! Come speak with me and I will grant you the strength you need!", 0) 21 | end 22 | 23 | RegisterCreatureGossipEvent(400065, 1, OnGossipHello) 24 | RegisterCreatureGossipEvent(400065, 2, OnGossipSelect) 25 | RegisterCreatureEvent(400065, 5, function(event, creature) YellDialogue(event, creature) end) 26 | 27 | -------------------------------------------------------------------------------- /Orgrimmar/OrgArcher.lua: -------------------------------------------------------------------------------- 1 | local OrgArcher = {} 2 | 3 | local function CastShoot(eventId, delay, calls, creature) 4 | creature:CastSpell(target, 37770, true) 5 | end 6 | 7 | local function CastMultiShot(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 30990, true) 9 | end 10 | 11 | local function OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(CastShoot, 850, 0) 13 | creature:RegisterEvent(CastMultiShot, 5000, 0) 14 | end 15 | 16 | local function OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | local function OnDied(event, creature, killer) 21 | creature:RemoveEvents() 22 | end 23 | 24 | RegisterCreatureEvent(400041, 1, OnEnterCombat) 25 | RegisterCreatureEvent(400041, 2, OnLeaveCombat) 26 | RegisterCreatureEvent(400041, 4, OnDied) 27 | 28 | -------------------------------------------------------------------------------- /Orgrimmar/OrgBerserker.lua: -------------------------------------------------------------------------------- 1 | local OrgBerserker = {}; 2 | 3 | local function CastWhirlWind(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 53361, true) 5 | end 6 | 7 | local function CastEnrage(eventId, delay, calls, creature) 8 | creature:CastSpell(creature, 12880, true) 9 | end 10 | 11 | local function OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(CastWhirlWind, 7000, 0) 13 | creature:RegisterEvent(CastEnrage, 10000, 0) 14 | end 15 | 16 | local function OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | local function OnSpawn(event, creature) 21 | creature:CastSpell(creature, 17683, true) 22 | end 23 | 24 | local function OnDied(event, creature, killer) 25 | creature:RemoveEvents() 26 | end 27 | 28 | RegisterCreatureEvent(400040, 1, OnEnterCombat) 29 | RegisterCreatureEvent(400040, 2, OnLeaveCombat) 30 | RegisterCreatureEvent(400040, 4, OnDied) 31 | RegisterCreatureEvent(400040, 5, OnSpawn) 32 | 33 | RegisterCreatureEvent(400045, 1, OnEnterCombat) 34 | RegisterCreatureEvent(400045, 2, OnLeaveCombat) 35 | RegisterCreatureEvent(400045, 4, OnDied) 36 | RegisterCreatureEvent(400045, 5, OnSpawn) 37 | 38 | RegisterCreatureEvent(14720, 1, OnEnterCombat) 39 | RegisterCreatureEvent(14720, 2, OnLeaveCombat) 40 | RegisterCreatureEvent(14720, 4, OnDied) 41 | RegisterCreatureEvent(14720, 5, OnSpawn) -------------------------------------------------------------------------------- /Orgrimmar/OrgDefQuest.lua: -------------------------------------------------------------------------------- 1 | local ORG_ID = {3296, 400039, 400040, 400041, 400045, 400059, 400060, 400061, 400070, 400071} 2 | local SPELL_ID = 100193 3 | 4 | function OnSpellCast(event, caster, spell) 5 | local target = spell:GetTarget() 6 | if target and spell:GetEntry() == SPELL_ID then 7 | local isValidTarget = false 8 | for _, orgID in ipairs(ORG_ID) do 9 | if target:GetEntry() == orgID then 10 | isValidTarget = true 11 | break 12 | end 13 | end 14 | if not isValidTarget then 15 | caster:SendBroadcastMessage("That target is not valid.") 16 | spell:Cancel() 17 | elseif target:HasAura(SPELL_ID) then 18 | caster:SendBroadcastMessage("You've already used the Shadow-Drenched Cloth on that defender!") 19 | spell:Cancel() 20 | else 21 | -- give kill credit to NPC ID 3296 22 | caster:KilledMonsterCredit(3296) 23 | end 24 | end 25 | end 26 | 27 | RegisterPlayerEvent(5, OnSpellCast) -------------------------------------------------------------------------------- /Orgrimmar/OrgrimmarVillager.lua: -------------------------------------------------------------------------------- 1 | local npcs = {400068, 400067} 2 | local gossipText = "It's not safe here. I can teleport you to safety." 3 | local itemId = 65002 -- Teleporter 4 | local spellId = 100182 5 | 6 | local function OnGossipHello(event, player, creature) 7 | if (player:HasItem(itemId)) then 8 | player:GossipMenuAddItem(0, gossipText, 0, 1) 9 | player:GossipSendMenu(1, creature) 10 | else 11 | player:SendBroadcastMessage("You should go speak to Putress for help in the Grommash Hold.") 12 | creature:MoveWaypoint() 13 | end 14 | end 15 | 16 | local function OnGossipSelect(event, player, creature, sender, intid, code) 17 | if (intid == 1) then 18 | creature:RemoveAllAuras() 19 | player:CastSpell(creature, spellId, false) 20 | local randomDialogue = math.random(1, 3) 21 | if randomDialogue == 1 then 22 | creature:SendUnitSay("Thank you for helping me adventurer. Your kindness will not be forgotten.", 0) 23 | elseif randomDialogue == 2 then 24 | creature:SendUnitSay("Very well then...Thank you for your help.", 0) 25 | else 26 | creature:SendUnitSay("Anywhere is better than here right now...please go ahead.", 0) 27 | end 28 | player:GossipComplete() 29 | player:KilledMonsterCredit(400067) 30 | creature:DespawnOrUnsummon(4650) 31 | end 32 | end 33 | 34 | for i, npcid in ipairs(npcs) do 35 | RegisterCreatureGossipEvent(npcid, 1, OnGossipHello) 36 | RegisterCreatureGossipEvent(npcid, 2, OnGossipSelect) 37 | end 38 | -------------------------------------------------------------------------------- /Orgrimmar/RunokWildmane.lua: -------------------------------------------------------------------------------- 1 | local function CastFlameShock(eventId, delay, calls, creature) 2 | creature:CastSpell(creature:GetVictim(), 8050, true) 3 | end 4 | 5 | local function CastLightningBolt(eventId, delay, calls, creature) 6 | creature:CastSpell(creature:GetVictim(), 403, false) 7 | end 8 | 9 | local function CastLavaBurst(eventId, delay, calls, creature) 10 | creature:CastSpell(creature:GetVictim(), 51505, false) 11 | end 12 | 13 | local function CastChainLightning(eventId, delay, calls, creature) 14 | creature:CastSpell(creature:GetVictim(), 421, true) 15 | end 16 | 17 | local function OnEnterCombat(event, creature, target) 18 | if not creature:IsCasting() then 19 | creature:RegisterEvent(CastFlameShock, 5000, 0) 20 | creature:RegisterEvent(CastLightningBolt, 6500, 0) 21 | creature:RegisterEvent(CastLavaBurst, 9000, 0) 22 | creature:RegisterEvent(CastChainLightning, 11700, 0) 23 | end 24 | end 25 | 26 | local function OnLeaveCombat(event, creature) 27 | creature:RemoveEvents() 28 | end 29 | 30 | local function OnDied(event, creature, killer) 31 | creature:RemoveEvents() 32 | end 33 | 34 | local function OnSpawn(event, creature) 35 | creature:CastSpell(creature, 17683, true) 36 | end 37 | 38 | RegisterCreatureEvent(400070, 1, OnEnterCombat) 39 | RegisterCreatureEvent(400070, 2, OnLeaveCombat) 40 | RegisterCreatureEvent(400070, 4, OnDied) 41 | RegisterCreatureEvent(400070, 5, OnSpawn) -------------------------------------------------------------------------------- /Orgrimmar/StealthPot.lua: -------------------------------------------------------------------------------- 1 | Draven = {} 2 | 3 | -- Create the item you want to give to the player 4 | Draven.ITEM_ID = 60114 -- replace with the ID of the item you want to give 5 | 6 | -- Register the gossip event for the NPC 7 | function Draven.OnGossipHello(event, player, creature) 8 | player:GossipMenuAddItem(0, "|TInterface\\Icons\\ability_stealth:50:50:-23:0|tPurchase 3 Stealth Potions for 75 Silver.|r", 0, 1) 9 | player:GossipSendMenu(1, creature) 10 | end 11 | 12 | -- Handle the player's selection in the gossip menu 13 | function Draven.OnGossipSelect(event, player, creature, sender, action) 14 | if action == 1 then 15 | if player:GetCoinage() < 7500 then 16 | player:SendBroadcastMessage("You do not have enough coins.") 17 | player:GossipComplete() 18 | else 19 | player:SetCoinage(player:GetCoinage() - 7500) 20 | player:AddItem(Draven.ITEM_ID, 3) 21 | player:SendBroadcastMessage("You have received 3 Stealth Potions.") 22 | player:GossipComplete() 23 | end 24 | end 25 | end 26 | 27 | -- Send a unit yell when the NPC spawns 28 | function Draven.OnSpawn(event, creature) 29 | creature:SendUnitYell("", 0) 30 | creature:CastSpell(creature, 17683, true) 31 | end 32 | 33 | -- Register the gossip events with the NPC 34 | RegisterCreatureGossipEvent(400069, 1, Draven.OnGossipHello) 35 | RegisterCreatureGossipEvent(400069, 2, Draven.OnGossipSelect) 36 | RegisterCreatureEvent(400069, 5, Draven.OnSpawn) -------------------------------------------------------------------------------- /Orgrimmar/TempMount.lua: -------------------------------------------------------------------------------- 1 | Thunderhoof = {} 2 | 3 | -- Create the item you want to give to the player 4 | Thunderhoof.ITEM_ID = 60111 -- replace with the ID of the item you want to give 5 | 6 | -- Register the gossip event for the NPC 7 | function Thunderhoof.OnGossipHello(event, player, creature) 8 | player:GossipMenuAddItem(0, "|TInterface\\Icons\\ability_mount_tawnywindrider:50:50:-13:0|tLoan me a Wind Rider for 25 silver.", 0, 1) 9 | player:GossipSendMenu(1, creature) 10 | end 11 | 12 | -- Handle the player's selection in the gossip menu 13 | function Thunderhoof.OnGossipSelect(event, player, creature, sender, action) 14 | if action == 1 then 15 | if player:GetCoinage() < 2500 then 16 | player:SendBroadcastMessage("You do not have enough silver.") 17 | player:GossipComplete() 18 | else 19 | player:SetCoinage(player:GetCoinage() - 2500) 20 | player:AddItem(Thunderhoof.ITEM_ID, 1) 21 | player:SendBroadcastMessage("You have received a Wind Rider.") 22 | player:GossipComplete() 23 | end 24 | end 25 | end 26 | 27 | -- Send a unit yell when the NPC spawns 28 | function Thunderhoof.OnSpawn(event, creature) 29 | creature:SendUnitYell("Lend yourself a Wind Rider for 25 silver! You won't want to fight the Scourge without one!", 0) 30 | creature:CastSpell(creature, 20374) 31 | end 32 | 33 | -- Register the gossip events with the NPC 34 | RegisterCreatureGossipEvent(400042, 1, Thunderhoof.OnGossipHello) 35 | RegisterCreatureGossipEvent(400042, 2, Thunderhoof.OnGossipSelect) 36 | RegisterCreatureEvent(400042, 5, Thunderhoof.OnSpawn) -------------------------------------------------------------------------------- /Orgrimmar/TurretKillCred.lua: -------------------------------------------------------------------------------- 1 | local TUR_ID = {400038, 400037} 2 | local SPELL_ID = 100181 3 | 4 | function OnSpellCast(event, caster, spell) 5 | local target = spell:GetTarget() 6 | if target and spell:GetEntry() == SPELL_ID then 7 | local isValidTarget = false 8 | for _, TURID in ipairs(TUR_ID) do 9 | if target:GetEntry() == TURID then 10 | isValidTarget = true 11 | break 12 | end 13 | end 14 | if not isValidTarget then 15 | caster:SendBroadcastMessage("Invalid target.") 16 | spell:Cancel() 17 | else 18 | -- 33% chance for the respawn to fizzle 19 | local chance = math.random(1, 3) 20 | if chance == 1 then 21 | caster:SendBroadcastMessage("Attempt to recharge the turret has fizzled.") 22 | else 23 | -- give kill credit 24 | caster:KilledMonsterCredit(400037) 25 | -- respawn the creature 26 | target:Respawn() 27 | end 28 | end 29 | end 30 | end 31 | 32 | RegisterPlayerEvent(5, OnSpellCast) -------------------------------------------------------------------------------- /OrgrimmarVillager.lua: -------------------------------------------------------------------------------- 1 | local npcs = {400068, 400067} 2 | local gossipText = "It's not safe here. I can teleport you to safety." 3 | local itemId = 65002 -- Teleporter 4 | local spellId = 100182 5 | 6 | local function OnGossipHello(event, player, creature) 7 | if (player:HasItem(itemId)) then 8 | player:GossipMenuAddItem(0, gossipText, 0, 1) 9 | player:GossipSendMenu(1, creature) 10 | else 11 | player:SendBroadcastMessage("You should go speak to Putress for help in the Grommash Hold.") 12 | creature:MoveWaypoint() 13 | end 14 | end 15 | 16 | local function OnGossipSelect(event, player, creature, sender, intid, code) 17 | if (intid == 1) then 18 | creature:RemoveAllAuras() 19 | player:CastSpell(creature, spellId, false) 20 | local randomDialogue = math.random(1, 3) 21 | if randomDialogue == 1 then 22 | creature:SendUnitSay("Thank you for helping me adventurer. Your kindness will not be forgotten.", 0) 23 | elseif randomDialogue == 2 then 24 | creature:SendUnitSay("Very well then...Thank you for your help.", 0) 25 | else 26 | creature:SendUnitSay("Anywhere is better than here right now...please go ahead.", 0) 27 | end 28 | player:GossipComplete() 29 | player:KilledMonsterCredit(400067) 30 | creature:DespawnOrUnsummon(4650) 31 | end 32 | end 33 | 34 | for i, npcid in ipairs(npcs) do 35 | RegisterCreatureGossipEvent(npcid, 1, OnGossipHello) 36 | RegisterCreatureGossipEvent(npcid, 2, OnGossipSelect) 37 | end 38 | -------------------------------------------------------------------------------- /PallidHorror.lua: -------------------------------------------------------------------------------- 1 | local PallidHorror = {} 2 | 3 | function PallidHorror.OnDied(event, creature, killer) 4 | creature:CastSpell(creature, 28699, true) 5 | end 6 | 7 | RegisterCreatureEvent(16394, 4, PallidHorror.OnDied) -------------------------------------------------------------------------------- /PatchwerkHorror.lua: -------------------------------------------------------------------------------- 1 | local PatchWorkHorror = {}; 2 | 3 | local function AcidSpit(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 61597, true) 5 | end 6 | 7 | local function CastSpecialSpell(eventId, delay, calls, creature) 8 | local victim = creature:GetVictim() 9 | if not victim then 10 | return 11 | end 12 | if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then 13 | creature:CastSpell(victim, 5, true) 14 | end 15 | end 16 | 17 | 18 | function CastBludgeoningStrike(eventId, delay, calls, creature) 19 | local targets = creature:GetAITargets(10) 20 | if #targets == 0 then 21 | return 22 | end 23 | local target = targets[math.random(#targets)] 24 | creature:CastSpell(target, 60870, true) 25 | end 26 | 27 | 28 | local function OnEnterCombat(event, creature, target) 29 | creature:RegisterEvent(AcidSpit, 7000, 0) 30 | creature:RegisterEvent(CastBludgeoningStrike, 13000, 0) 31 | creature:RegisterEvent(CastSpecialSpell, 1000, 0) 32 | end 33 | 34 | local function OnLeaveCombat(event, creature) 35 | creature:RemoveEvents() 36 | end 37 | 38 | local function OnDied(event, creature, killer) 39 | creature:DespawnOrUnsummon(5000) 40 | creature:RemoveEvents() 41 | end 42 | 43 | RegisterCreatureEvent(400054, 1, OnEnterCombat) 44 | RegisterCreatureEvent(400054, 2, OnLeaveCombat) 45 | RegisterCreatureEvent(400054, 4, OnDied) 46 | 47 | -------------------------------------------------------------------------------- /PatchworkHorror2.lua: -------------------------------------------------------------------------------- 1 | local PatchWorkHorror2 = {}; 2 | 3 | local function AcidSpit(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 61597, true) 5 | end 6 | 7 | local function KnockAway(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 10101, true) 9 | end 10 | 11 | 12 | function CastBludgeoningStrike(eventId, delay, calls, creature) 13 | local targets = creature:GetAITargets(10) 14 | if #targets == 0 then 15 | return 16 | end 17 | local target = targets[math.random(#targets)] 18 | creature:CastSpell(target, 60870, true) 19 | end 20 | 21 | 22 | local function OnEnterCombat(event, creature, target) 23 | creature:RegisterEvent(AcidSpit, 7000, 0) 24 | creature:RegisterEvent(CastBludgeoningStrike, 13000, 0) 25 | creature:RegisterEvent(KnockAway, 16000, 0) 26 | end 27 | 28 | local function OnLeaveCombat(event, creature) 29 | creature:RemoveEvents() 30 | end 31 | 32 | local function OnDied(event, creature, killer) 33 | creature:RemoveEvents() 34 | end 35 | 36 | RegisterCreatureEvent(10414, 1, OnEnterCombat) 37 | RegisterCreatureEvent(10414, 2, OnLeaveCombat) 38 | RegisterCreatureEvent(10414, 4, OnDied) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Look at lua text to see what each does. Most of these are for custom events and are a work in progress. Feel free to use whatever. Not all the scripts here are ones I created myself. 2 | There will be a number of scripts here that are similar with slight variations. 3 | -------------------------------------------------------------------------------- /RefurbishedShredder.lua: -------------------------------------------------------------------------------- 1 | local RShredder = {}; 2 | 3 | function RShredder.OnSpawn(event, creature) 4 | creature:CastSpell(creature, 100169, true) 5 | creature:SetReactState(0) 6 | end 7 | 8 | function RShredder.OnDied(event, creature) 9 | creature:DespawnOrUnsummon(5000) 10 | creature:RemoveEvents() 11 | end 12 | 13 | RegisterCreatureEvent(400044, 4, RShredder.OnDied) 14 | RegisterCreatureEvent(400044, 5, RShredder.OnSpawn) 15 | -------------------------------------------------------------------------------- /RisenConstruct.lua: -------------------------------------------------------------------------------- 1 | local RisenConstruct = {}; 2 | 3 | local function ArcingSmash(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 1619, true) 5 | end 6 | 7 | local function Enrage(eventId, delay, calls, creature) 8 | creature:CastSpell(creature, 15716, true) 9 | end 10 | 11 | local function Thrash(eventId, delay, calls, creature) 12 | creature:CastSpell(creature, 3391, true) 13 | end 14 | 15 | local function SweepingStrikes(eventId, delay, calls, creature) 16 | creature:CastSpell(creature, 18765, true) 17 | end 18 | 19 | function Stun(eventId, delay, calls, creature) 20 | local targets = creature:GetAITargets(10) 21 | if #targets == 0 then 22 | return 23 | end 24 | local target = targets[math.random(#targets)] 25 | creature:CastSpell(target, 17308, true) 26 | end 27 | 28 | local function OnEnterCombat(event, creature, target) 29 | creature:RegisterEvent(ArcingSmash, 7000, 0) 30 | creature:RegisterEvent(Stun, 13000, 0) 31 | creature:RegisterEvent(Thrash, 8500, 0) 32 | creature:RegisterEvent(SweepingStrikes, 100, 1) 33 | end 34 | 35 | local function OnHealthUpdate(event, creature, value) 36 | if (creature:GetHealthPct() <= 20) then 37 | creature:RemoveEvents() 38 | creature:RegisterEvent(Enrage, 100, 1) 39 | end 40 | end 41 | 42 | local function OnLeaveCombat(event, creature) 43 | creature:RemoveEvents() 44 | end 45 | 46 | local function OnDied(event, creature, killer) 47 | creature:RemoveEvents() 48 | end 49 | 50 | RegisterCreatureEvent(10488, 1, OnEnterCombat) 51 | RegisterCreatureEvent(10488, 9, OnHealthUpdate) 52 | RegisterCreatureEvent(10488, 2, OnLeaveCombat) 53 | RegisterCreatureEvent(10488, 4, OnDied) -------------------------------------------------------------------------------- /RisenGuard.lua: -------------------------------------------------------------------------------- 1 | local RisenGuard = {} 2 | 3 | function RisenGuard.OnCombat(event, creature, target) 4 | creature:RegisterEvent(RisenGuard.Ability2, 100, 1) 5 | creature:RegisterEvent(RisenGuard.Ability1, 7000, 0) 6 | creature:RegisterEvent(RisenGuard.Ability2, 12000, 0) 7 | creature:RegisterEvent(RisenGuard.Ability3, 10000, 0) 8 | end 9 | 10 | function RisenGuard.Ability1(event, delay, calls, creature) 11 | creature:CastSpell(creature:GetVictim(), 34113, true) 12 | end 13 | 14 | function RisenGuard.Ability2(event, delay, calls, creature) 15 | creature:CastSpell(creature:GetVictim(), 8380, true) 16 | end 17 | 18 | function RisenGuard.Ability3(event, delay, calls, creature) 19 | creature:CastSpell(creature:GetVictim(), 5164, true) 20 | end 21 | 22 | function RisenGuard.OnLeaveCombat(event, creature) 23 | creature:RemoveEvents() 24 | end 25 | 26 | function RisenGuard.OnDeath(event, creature, killer) 27 | creature:RemoveEvents() 28 | end 29 | 30 | RegisterCreatureEvent(10489, 1, RisenGuard.OnCombat) 31 | RegisterCreatureEvent(10489, 2, RisenGuard.OnLeaveCombat) 32 | RegisterCreatureEvent(10489, 4, RisenGuard.OnDeath) 33 | 34 | -------------------------------------------------------------------------------- /RunokWildmane.lua: -------------------------------------------------------------------------------- 1 | local function CastFlameShock(eventId, delay, calls, creature) 2 | creature:CastSpell(creature:GetVictim(), 8050, true) 3 | end 4 | 5 | local function CastLightningBolt(eventId, delay, calls, creature) 6 | creature:CastSpell(creature:GetVictim(), 403, false) 7 | end 8 | 9 | local function CastLavaBurst(eventId, delay, calls, creature) 10 | creature:CastSpell(creature:GetVictim(), 51505, false) 11 | end 12 | 13 | local function CastChainLightning(eventId, delay, calls, creature) 14 | creature:CastSpell(creature:GetVictim(), 421, true) 15 | end 16 | 17 | local function OnEnterCombat(event, creature, target) 18 | if not creature:IsCasting() then 19 | creature:RegisterEvent(CastFlameShock, 5000, 0) 20 | creature:RegisterEvent(CastLightningBolt, 6500, 0) 21 | creature:RegisterEvent(CastLavaBurst, 9000, 0) 22 | creature:RegisterEvent(CastChainLightning, 11700, 0) 23 | end 24 | end 25 | 26 | local function OnLeaveCombat(event, creature) 27 | creature:RemoveEvents() 28 | end 29 | 30 | local function OnDied(event, creature, killer) 31 | creature:RemoveEvents() 32 | end 33 | 34 | local function OnSpawn(event, creature) 35 | creature:CastSpell(creature, 17683, true) 36 | end 37 | 38 | RegisterCreatureEvent(400070, 1, OnEnterCombat) 39 | RegisterCreatureEvent(400070, 2, OnLeaveCombat) 40 | RegisterCreatureEvent(400070, 4, OnDied) 41 | RegisterCreatureEvent(400070, 5, OnSpawn) -------------------------------------------------------------------------------- /SW-Archer.lua: -------------------------------------------------------------------------------- 1 | local Archer = {}; 2 | 3 | local function CastShoot(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 37770, true) 5 | end 6 | 7 | local function CastSerpentSting(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 36984, true) 9 | end 10 | 11 | local function CastMultiShot(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 30990, true) 13 | end 14 | 15 | local function OnEnterCombat(event, creature, target) 16 | creature:RegisterEvent(CastShoot, 750, 0) 17 | creature:RegisterEvent(CastShoot, 15000, 0) 18 | creature:RegisterEvent(CastMultiShot, 5000, 0) 19 | end 20 | 21 | local function OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | local function OnDied(event, creature, killer) 26 | creature:RemoveEvents() 27 | end 28 | 29 | RegisterCreatureEvent(400033, 1, OnEnterCombat) 30 | RegisterCreatureEvent(400033, 2, OnLeaveCombat) 31 | RegisterCreatureEvent(400033, 4, OnDied) -------------------------------------------------------------------------------- /SW-GuardCleave.lua: -------------------------------------------------------------------------------- 1 | local Stormwind = {}; 2 | 3 | local function CastCleave(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 20677, true) 5 | end 6 | 7 | local function CastSunderArmor(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 8380, true) 9 | end 10 | 11 | local function OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(CastCleave, 5000, 0) 13 | creature:RegisterEvent(CastSunderArmor, 7000, 0) 14 | end 15 | 16 | local function OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | local function OnDied(event, creature, killer) 21 | creature:RemoveEvents() 22 | end 23 | 24 | local function OnSpawn(event, creature) 25 | creature:CastSpell(creature, 17683, true) 26 | end 27 | 28 | RegisterCreatureEvent(400013, 1, OnEnterCombat) 29 | RegisterCreatureEvent(400013, 2, OnLeaveCombat) 30 | RegisterCreatureEvent(400013, 4, OnDied) 31 | RegisterCreatureEvent(400013, 5, OnSpawn) 32 | 33 | RegisterCreatureEvent(400039, 1, OnEnterCombat) 34 | RegisterCreatureEvent(400039, 2, OnLeaveCombat) 35 | RegisterCreatureEvent(400039, 4, OnDied) 36 | RegisterCreatureEvent(400039, 5, OnSpawn) -------------------------------------------------------------------------------- /SWDefenders.lua: -------------------------------------------------------------------------------- 1 | local NPC_ENTRY_ID_1 = 400022 2 | local NPC_ENTRY_ID_2 = 400023 3 | local NPC_ENTRY_ID_3 = 400024 4 | local NPC_ENTRY_ID_4 = 400025 5 | 6 | function OnSpawn(event, creature) 7 | local npcEntry = creature:GetEntry() 8 | if npcEntry == NPC_ENTRY_ID_1 or npcEntry == NPC_ENTRY_ID_2 or npcEntry == NPC_ENTRY_ID_3 or npcEntry == NPC_ENTRY_ID_4 then 9 | creature:SetWalk(false) -- Set movement type to run 10 | creature:MoveWaypoint() 11 | end 12 | end 13 | 14 | RegisterCreatureEvent(NPC_ENTRY_ID_1, 5, OnSpawn) 15 | RegisterCreatureEvent(NPC_ENTRY_ID_2, 5, OnSpawn) 16 | RegisterCreatureEvent(NPC_ENTRY_ID_3, 5, OnSpawn) 17 | RegisterCreatureEvent(NPC_ENTRY_ID_4, 5, OnSpawn) -------------------------------------------------------------------------------- /SWGKillCred.lua: -------------------------------------------------------------------------------- 1 | local SWG_ID = {68, 400013, 400033, 400014, 1976} 2 | local SPELL_ID = 100141 3 | 4 | function OnSpellCast(event, caster, spell) 5 | local target = spell:GetTarget() 6 | if target and spell:GetEntry() == SPELL_ID then 7 | local isValidTarget = false 8 | for _, swgID in ipairs(SWG_ID) do 9 | if target:GetEntry() == swgID then 10 | isValidTarget = true 11 | break 12 | end 13 | end 14 | if not isValidTarget then 15 | caster:SendBroadcastMessage("That target is not valid.") 16 | spell:Cancel() 17 | elseif target:HasAura(SPELL_ID) then 18 | caster:SendBroadcastMessage("Target has already been empowered.") 19 | spell:Cancel() 20 | else 21 | -- give kill credit to NPC ID 68 22 | caster:KilledMonsterCredit(68) 23 | end 24 | end 25 | end 26 | 27 | RegisterPlayerEvent(5, OnSpellCast) -------------------------------------------------------------------------------- /SWTrapCredit.lua: -------------------------------------------------------------------------------- 1 | local NPC_ID = 400034 -- The ID of the NPC you want players to get kill credit for 2 | 3 | -- List of allowed zones (use zone ID) 4 | local ALLOWED_ZONES = { 5 | 1519, -- SW City 6 | 12, 7 | } 8 | 9 | -- List of allowed spell IDs 10 | local ALLOWED_SPELLS = { 11 | 100144, -- Spell 1 12 | 100142, 13 | 100143, 14 | 100145, 15 | -- Add more spells here as needed 16 | } 17 | 18 | -- Define the indexOf function for tables 19 | function table.indexOf(t, value) 20 | for k, v in ipairs(t) do 21 | if v == value then 22 | return k 23 | end 24 | end 25 | return -1 26 | end 27 | 28 | function OnPlayerCastSpell(event, player, spell) 29 | local spellId = spell:GetEntry() 30 | local zoneId = player:GetZoneId() 31 | 32 | if table.indexOf(ALLOWED_SPELLS, spellId) ~= -1 then 33 | if table.indexOf(ALLOWED_ZONES, zoneId) == -1 then 34 | spell:Cancel() 35 | player:SendBroadcastMessage("You cannot cast this spell in this area.") 36 | else 37 | player:KilledMonsterCredit(NPC_ID) 38 | player:SendBroadcastMessage("You have successfuly placed a trap!") 39 | end 40 | end 41 | end 42 | 43 | RegisterPlayerEvent(5, OnPlayerCastSpell) 44 | -------------------------------------------------------------------------------- /SWTrapQuestR.lua: -------------------------------------------------------------------------------- 1 | -- Quest ID for the quest that should trigger the sound 2 | local QUEST_ID = 30004 3 | 4 | -- Creature ID for the creature that gives the quest 5 | local CREATURE_ID = 12480 6 | 7 | -- Sound ID for the sound that should play when the quest is rewarded 8 | local SOUND_ID = 20427 9 | 10 | -- Emote ID for the emote that should play when the quest is rewarded 11 | local EMOTE_ID = 113 12 | 13 | -- Register the event for quest reward 14 | RegisterCreatureEvent(CREATURE_ID, 34, function(event, player, creature, quest) 15 | if quest:GetId() == QUEST_ID then 16 | creature:PlayDistanceSound(SOUND_ID) 17 | creature:PerformEmote(EMOTE_ID) 18 | end 19 | end) 20 | -------------------------------------------------------------------------------- /ScourgeBuffs.lua: -------------------------------------------------------------------------------- 1 | local NPC_ID = 35200 -- replace with the NPC's ID 2 | local BLESSING_SPELL_ID = 100003 -- replace with the first spell ID 3 | local SOULSTONE_SPELL_ID = 20707 -- replace with the second spell ID 4 | 5 | local function OnGossipHello(event, player, creature) 6 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\Spell_Holy_ReviveChampion:50:50:-43:0|tReceive the King's blessing", 0, 1, false, "", 0) 7 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\inv_misc_orb_04:50:50:-43:0|tReceive a Soulstone", 0, 2, false, "", 0) 8 | player:GossipSendMenu(1, creature) 9 | end 10 | 11 | local function OnGossipSelect(event, player, creature, sender, intid, code, menuid) 12 | if intid == 1 then 13 | player:CastSpell(player, BLESSING_SPELL_ID, true) 14 | elseif intid == 2 then 15 | player:CastSpell(player, SOULSTONE_SPELL_ID, true) 16 | end 17 | player:GossipComplete() 18 | end 19 | 20 | local function YellDialogue(event, creature) 21 | creature:SendUnitYell("Adventurers, do not go unprepared! Come speak with me and I will grant you a blessing!", 0) 22 | end 23 | 24 | RegisterCreatureGossipEvent(NPC_ID, 1, OnGossipHello) 25 | RegisterCreatureGossipEvent(NPC_ID, 2, OnGossipSelect) 26 | 27 | -- triggers the yell function on spawn 28 | RegisterCreatureEvent(NPC_ID, 5, function(event, creature) YellDialogue(event, creature) end) 29 | 30 | -------------------------------------------------------------------------------- /ScourgeQuestsWorkAround.lua: -------------------------------------------------------------------------------- 1 | local questIds = {9265, 9264, 9263, 9262, 9261, 9260} 2 | local itemId = 22892 3 | local itemCount = 3 4 | local totalLooted = {} 5 | 6 | local function OnLootItem(event, player, item, count) 7 | if item:GetEntry() == itemId then 8 | for _, questId in pairs(questIds) do 9 | if player:HasQuest(questId) then 10 | if not totalLooted[questId] then 11 | totalLooted[questId] = 0 12 | end 13 | totalLooted[questId] = totalLooted[questId] + count 14 | if totalLooted[questId] >= itemCount then 15 | player:CompleteQuest(questId) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | 22 | RegisterPlayerEvent(32, OnLootItem) 23 | -------------------------------------------------------------------------------- /Sever.lua: -------------------------------------------------------------------------------- 1 | local Sever = {} 2 | 3 | function Sever.CastDiseasedSpit(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 17745, true) 5 | end 6 | 7 | function Sever.CastIntimidatingRoar(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 16508, true) 9 | end 10 | 11 | function Sever.OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(Sever.CastDiseasedSpit, 10000, 0) 13 | creature:RegisterEvent(Sever.CastIntimidatingRoar, 30000, 0) 14 | end 15 | 16 | function Sever.OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | function Sever.OnDied(event, creature, killer) 21 | creature:RemoveEvents() 22 | end 23 | 24 | function Sever.OnDamageTaken(event, creature, attacker, damage) 25 | if (creature:HealthBelowPct(50) and not creature:HasAura(41305)) then 26 | creature:CastSpell(creature, 41305, true) 27 | creature:SendUnitYell("", 0) 28 | end 29 | end 30 | 31 | RegisterCreatureEvent(14682, 1, Sever.OnEnterCombat) 32 | RegisterCreatureEvent(14682, 2, Sever.OnLeaveCombat) 33 | RegisterCreatureEvent(14682, 4, Sever.OnDied) 34 | RegisterCreatureEvent(14682, 9, Sever.OnDamageTaken) 35 | 36 | -------------------------------------------------------------------------------- /SkeletalWarlord.lua: -------------------------------------------------------------------------------- 1 | local SkeletalWarlord = {} 2 | SkeletalWarlord.minChargeRange = 10 3 | 4 | function SkeletalWarlord.OnEnterCombat(event, creature, target) 5 | creature:RegisterEvent(SkeletalWarlord.Whirlwind, 15000, 0) 6 | creature:RegisterEvent(SkeletalWarlord.MortalStrike, 7000, 0) 7 | creature:RegisterEvent(SkeletalWarlord.Charge, 10000, 0) 8 | end 9 | 10 | function SkeletalWarlord.Whirlwind(eventId, delay, calls, creature) 11 | creature:CastSpell(creature:GetVictim(), 36982, true) 12 | end 13 | 14 | function SkeletalWarlord.MortalStrike(eventId, delay, calls, creature) 15 | creature:CastSpell(creature:GetVictim(), 21553, true) 16 | end 17 | 18 | function SkeletalWarlord.OnLeaveCombat(event, creature) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function SkeletalWarlord.OnDied(event, creature, killer) 23 | creature:DespawnOrUnsummon(15000) 24 | creature:RemoveEvents() 25 | end 26 | 27 | function SkeletalWarlord.Charge(eventId, delay, calls, creature) 28 | local targets = creature:GetAITargets(SkeletalWarlord.minChargeRange) 29 | if #targets == 0 then 30 | return 31 | end 32 | local target = targets[math.random(#targets)] 33 | creature:CastSpell(target, 19471, true) 34 | end 35 | 36 | 37 | 38 | RegisterCreatureEvent(400056, 1, SkeletalWarlord.OnEnterCombat) 39 | RegisterCreatureEvent(400056, 2, SkeletalWarlord.OnLeaveCombat) 40 | RegisterCreatureEvent(400056, 4, SkeletalWarlord.OnDied) 41 | 42 | 43 | RegisterCreatureEvent(1788, 1, SkeletalWarlord.OnEnterCombat) 44 | RegisterCreatureEvent(1788, 2, SkeletalWarlord.OnLeaveCombat) 45 | RegisterCreatureEvent(1788, 4, SkeletalWarlord.OnDied) 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /SkeletalWarrior.lua: -------------------------------------------------------------------------------- 1 | local SkeletalWarrior = {} 2 | 3 | function SkeletalWarrior.OnSpawn(event, creature) 4 | creature:SetMaxHealth(7720) 5 | creature:CastSpell(creature:GetVictim(), 17683, true) 6 | end 7 | 8 | function SkeletalWarrior.OnCombat(event, creature, target) 9 | creature:RegisterEvent(SkeletalWarrior.Ability1, 10000, 0) 10 | end 11 | 12 | function SkeletalWarrior.Ability1(event, delay, calls, creature) 13 | creature:CastSpell(creature:GetVictim(), 6547, true) 14 | end 15 | 16 | function SkeletalWarrior.OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | function SkeletalWarrior.OnDeath(event, creature, killer) 21 | creature:DespawnOrUnsummon(10000) 22 | creature:RemoveEvents() 23 | end 24 | 25 | RegisterCreatureEvent(400016, 1, SkeletalWarrior.OnCombat) 26 | RegisterCreatureEvent(400016, 2, SkeletalWarrior.OnLeaveCombat) 27 | RegisterCreatureEvent(400016, 4, SkeletalWarrior.OnDeath) 28 | RegisterCreatureEvent(400016, 5, SkeletalWarrior.OnSpawn) 29 | -------------------------------------------------------------------------------- /SmolderingEmberRestrict.lua: -------------------------------------------------------------------------------- 1 | local ALLOWED_MAPS = { 2 | 0, 3 | 1, 4 | } 5 | 6 | local ALLOWED_SPELLS = {100150, 100160, 100161, 100177, 100186, 100168,} 7 | 8 | function table.indexOf(t, value) 9 | for k, v in ipairs(t) do 10 | if v == value then 11 | return k 12 | end 13 | end 14 | return -1 15 | end 16 | 17 | function OnPlayerCastSpell(event, player, spell) 18 | local spellId = spell:GetEntry() 19 | local mapId = player:GetMapId() 20 | 21 | if table.indexOf(ALLOWED_SPELLS, spellId) ~= -1 then 22 | if table.indexOf(ALLOWED_MAPS, mapId) == -1 then 23 | spell:Cancel() 24 | player:SendBroadcastMessage("You can't use that here.") 25 | else 26 | if spellId == 100150 then 27 | player:PlayDirectSound(20428) 28 | end 29 | end 30 | end 31 | end 32 | 33 | function OnPlayerZoneChange(event, player, newZone, newArea) 34 | local mapId = player:GetMapId() 35 | if table.indexOf(ALLOWED_MAPS, mapId) == -1 then 36 | for i, allowedSpell in ipairs(ALLOWED_SPELLS) do 37 | local aura = player:GetAura(allowedSpell) 38 | if aura then 39 | player:RemoveAura(allowedSpell) 40 | end 41 | end 42 | end 43 | end 44 | 45 | RegisterPlayerEvent(27, OnPlayerZoneChange) 46 | RegisterPlayerEvent(5, OnPlayerCastSpell) -------------------------------------------------------------------------------- /SoL.lua: -------------------------------------------------------------------------------- 1 | -- AzerothCore Eluna script by Dinkledork 2 | local SPELL_SURGE_OF_LIGHT_1 = 33151 3 | local SPELL_CUSTOM = 100205 4 | 5 | local function OnSpellCast(event, player, spell, skipCheck) 6 | local spellId = spell:GetEntry() 7 | if spellId == SPELL_SURGE_OF_LIGHT_1 then 8 | player:CastSpell(player, SPELL_CUSTOM, true) 9 | end 10 | end 11 | 12 | RegisterPlayerEvent(5, OnSpellCast) 13 | -------------------------------------------------------------------------------- /SpectralAttendant (2).lua: -------------------------------------------------------------------------------- 1 | local SpectralAttendant = {} 2 | 3 | function SpectralAttendant.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(SpectralAttendant.Cripple, 6000, 0) 5 | creature:RegisterEvent(SpectralAttendant.AOEFear, 13000, 0) 6 | creature:RegisterEvent(SpectralAttendant.Teleport, math.random(14000,16000), 0) 7 | end 8 | 9 | 10 | function SpectralAttendant.Cripple(eventId, delay, calls, creature) 11 | creature:CastSpell(creature:GetVictim(), 11443, true) 12 | end 13 | 14 | function SpectralAttendant.AOEFear(eventId, delay, calls, creature) 15 | creature:CastSpell(creature, 8122) 16 | end 17 | 18 | function SpectralAttendant.OnLeaveCombat(event, creature) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function SpectralAttendant.OnDied(event, creature, killer) 23 | creature:RemoveEvents() 24 | end 25 | 26 | function SpectralAttendant.Teleport(eventId, delay, calls, creature) 27 | local targets = creature:GetAITargets(10) 28 | if #targets == 0 then 29 | return 30 | end 31 | local target = targets[math.random(#targets)] 32 | creature:CastSpell(target, 69904) 33 | creature:ClearThreatList() 34 | end 35 | 36 | 37 | 38 | RegisterCreatureEvent(11873, 1, SpectralAttendant.OnEnterCombat) 39 | RegisterCreatureEvent(11873, 2, SpectralAttendant.OnLeaveCombat) 40 | RegisterCreatureEvent(11873, 4, SpectralAttendant.OnDied) -------------------------------------------------------------------------------- /SpectralAttendant2.lua: -------------------------------------------------------------------------------- 1 | local SpectralAttendant = {} 2 | 3 | function SpectralAttendant.OnEnterCombat(event, creature, target) 4 | creature:RegisterEvent(SpectralAttendant.Cripple, 6000, 0) 5 | creature:RegisterEvent(SpectralAttendant.AOEFear, 13000, 0) 6 | creature:RegisterEvent(SpectralAttendant.Teleport, math.random(14000,16000), 0) 7 | end 8 | 9 | 10 | function SpectralAttendant.Cripple(eventId, delay, calls, creature) 11 | creature:CastSpell(creature:GetVictim(), 11443, true) 12 | end 13 | 14 | function SpectralAttendant.AOEFear(eventId, delay, calls, creature) 15 | creature:CastSpell(creature, 8122) 16 | end 17 | 18 | function SpectralAttendant.OnLeaveCombat(event, creature) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function SpectralAttendant.OnDied(event, creature, killer) 23 | creature:RemoveEvents() 24 | end 25 | 26 | function SpectralAttendant.Teleport(eventId, delay, calls, creature) 27 | local targets = creature:GetAITargets(10) 28 | if #targets == 0 then 29 | return 30 | end 31 | local target = targets[math.random(#targets)] 32 | creature:CastSpell(target, 69904) 33 | creature:ClearThreatList() 34 | end 35 | 36 | 37 | 38 | RegisterCreatureEvent(11873, 1, SpectralAttendant.OnEnterCombat) 39 | RegisterCreatureEvent(11873, 2, SpectralAttendant.OnLeaveCombat) 40 | RegisterCreatureEvent(11873, 4, SpectralAttendant.OnDied) -------------------------------------------------------------------------------- /SpiritofThalgorath.lua: -------------------------------------------------------------------------------- 1 | local SpiritofThalgorath = {} 2 | 3 | function SpiritofThalgorath.OnSpawn(event, creature) 4 | creature:SendUnitYell("You will not defeat me so easily!", 0) 5 | end 6 | 7 | function SpiritofThalgorath.OnEnterCombat(event, creature, target) 8 | creature:RegisterEvent(SpiritofThalgorath.Charge, 1000, 1) 9 | creature:RegisterEvent(SpiritofThalgorath.Charge, 8000, 0) 10 | creature:RegisterEvent(SpiritofThalgorath.ShadowBolt, 2000, 1) 11 | creature:RegisterEvent(SpiritofThalgorath.ShadowBolt, 6000, 0) 12 | end 13 | 14 | function SpiritofThalgorath.Charge(eventId, delay, calls, creature) 15 | local targetList = creature:GetAITargets(5) 16 | local targetCount = #targetList 17 | 18 | if targetCount > 0 then 19 | local randomIndex = math.random(1, targetCount) 20 | local randomTarget = targetList[randomIndex] 21 | creature:CastSpell(randomTarget, 100, true) 22 | else 23 | creature:CastSpell(creature:GetVictim(), 100, true) 24 | end 25 | end 26 | 27 | function SpiritofThalgorath.ShadowBolt(eventId, delay, calls, creature) 28 | creature:CastSpell(creature:GetVictim(), 9613, false) 29 | end 30 | 31 | function SpiritofThalgorath.OnLeaveCombat(event, creature) 32 | creature:RemoveEvents() 33 | end 34 | 35 | function SpiritofThalgorath.OnDied(event, creature, killer) 36 | creature:RemoveEvents() 37 | end 38 | 39 | RegisterCreatureEvent(400103, 5, SpiritofThalgorath.OnSpawn) 40 | RegisterCreatureEvent(400103, 1, SpiritofThalgorath.OnEnterCombat) 41 | RegisterCreatureEvent(400103, 2, SpiritofThalgorath.OnLeaveCombat) 42 | RegisterCreatureEvent(400103, 4, SpiritofThalgorath.OnDied) 43 | -------------------------------------------------------------------------------- /Startstop.lua: -------------------------------------------------------------------------------- 1 | --DO NOT DELETE ME! FIXES AN ANNOYING AF BUG 2 | 3 | local holidayEventIds = {17, 91} 4 | 5 | local function OnPlayerLogin(event, player) 6 | if not player:IsInWorld() then 7 | return 8 | end 9 | 10 | for _, eventId in ipairs(holidayEventIds) do 11 | local isHolidayActive = IsGameEventActive(eventId) 12 | 13 | if isHolidayActive then 14 | StopGameEvent(eventId) 15 | StartGameEvent(eventId) 16 | end 17 | end 18 | end 19 | 20 | RegisterPlayerEvent(3, OnPlayerLogin) 21 | -------------------------------------------------------------------------------- /StealthPot.lua: -------------------------------------------------------------------------------- 1 | Draven = {} 2 | 3 | -- Create the item you want to give to the player 4 | Draven.ITEM_ID = 60114 -- replace with the ID of the item you want to give 5 | 6 | -- Register the gossip event for the NPC 7 | function Draven.OnGossipHello(event, player, creature) 8 | player:GossipMenuAddItem(0, "|TInterface\\Icons\\ability_stealth:50:50:-23:0|tPurchase 3 Stealth Potions for 75 Silver.|r", 0, 1) 9 | player:GossipSendMenu(1, creature) 10 | end 11 | 12 | -- Handle the player's selection in the gossip menu 13 | function Draven.OnGossipSelect(event, player, creature, sender, action) 14 | if action == 1 then 15 | if player:GetCoinage() < 7500 then 16 | player:SendBroadcastMessage("You do not have enough coins.") 17 | player:GossipComplete() 18 | else 19 | player:SetCoinage(player:GetCoinage() - 7500) 20 | player:AddItem(Draven.ITEM_ID, 3) 21 | player:SendBroadcastMessage("You have received 3 Stealth Potions.") 22 | player:GossipComplete() 23 | end 24 | end 25 | end 26 | 27 | -- Send a unit yell when the NPC spawns 28 | function Draven.OnSpawn(event, creature) 29 | creature:SendUnitYell("", 0) 30 | creature:CastSpell(creature, 17683, true) 31 | end 32 | 33 | -- Register the gossip events with the NPC 34 | RegisterCreatureGossipEvent(400069, 1, Draven.OnGossipHello) 35 | RegisterCreatureGossipEvent(400069, 2, Draven.OnGossipSelect) 36 | RegisterCreatureEvent(400069, 5, Draven.OnSpawn) -------------------------------------------------------------------------------- /StoneSkinGargoyle.lua: -------------------------------------------------------------------------------- 1 | local StoneskinGargoyle = {} 2 | 3 | local function GustOfWind(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 61663, true) 5 | end 6 | 7 | local function StoneStomp(eventId, delay, calls, creature) 8 | local targets = creature:GetAITargets(10) 9 | if #targets == 0 then 10 | return 11 | end 12 | local target = targets[math.random(#targets)] 13 | creature:CastSpell(target, 49675, true) 14 | end 15 | 16 | local function OnEnterCombat(event, creature, target) 17 | creature:RegisterEvent(GustOfWind, 15000, 0) 18 | creature:RegisterEvent(StoneStomp, 8000, 0) 19 | end 20 | 21 | local function OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | local function OnDied(event, creature, killer) 26 | creature:DespawnOrUnsummon(5000) 27 | creature:RemoveEvents() 28 | end 29 | 30 | RegisterCreatureEvent(400053, 1, OnEnterCombat) 31 | RegisterCreatureEvent(400053, 2, OnLeaveCombat) 32 | RegisterCreatureEvent(400053, 4, OnDied) -------------------------------------------------------------------------------- /Stormwind/Alleria1.lua: -------------------------------------------------------------------------------- 1 | local npcid = 400019 2 | 3 | function OnSpawn(event, creature) 4 | creature:SetWalk(true) 5 | creature:MoveWaypoint() 6 | creature:SetReactState(0) 7 | end 8 | 9 | RegisterCreatureEvent(npcid, 5, OnSpawn) -------------------------------------------------------------------------------- /Stormwind/AllianceMage2.lua: -------------------------------------------------------------------------------- 1 | local AMage = {} 2 | 3 | local function CastFireball(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 38692, true) 5 | end 6 | 7 | local function CastFrostbolt(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 27071, true) 9 | end 10 | 11 | local function CastBlizzard(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 42213, true) 13 | end 14 | 15 | local function CastArcaneExplosion(eventId, delay, calls, creature) 16 | creature:CastSpell(creature:GetVictim(), 19712, true) 17 | end 18 | 19 | local function OnEnterCombat(event, creature, target) 20 | creature:RegisterEvent(CastFireball, 3600, 0) 21 | creature:RegisterEvent(CastFrostbolt, 7200, 0) 22 | creature:RegisterEvent(CastBlizzard, 9000, 0) 23 | creature:RegisterEvent(CastArcaneExplosion, 10800, 0) 24 | end 25 | 26 | local function OnLeaveCombat(event, creature) 27 | creature:RemoveEvents() 28 | end 29 | 30 | local function OnDied(event, creature, killer) 31 | creature:RemoveEvents() 32 | end 33 | 34 | RegisterCreatureEvent(400027, 1, OnEnterCombat) 35 | RegisterCreatureEvent(400027, 2, OnLeaveCombat) 36 | RegisterCreatureEvent(400027, 4, OnDied) -------------------------------------------------------------------------------- /Stormwind/AlliancePaladin.lua: -------------------------------------------------------------------------------- 1 | local AlliancePaladin = 400030 2 | local kingsSpell = 25898 3 | local wisdomSpell = 25918 4 | local mightSpell = 25916 5 | 6 | local function OnSpawn(event, creature) 7 | creature:CastSpell(creature, kingsSpell, true) 8 | end 9 | 10 | local function OnGossipHello(event, player, creature) 11 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_magic_magearmor:50:50:-13:0|tGrant me a Blessing of Kings", 0, 1, false, "", 0) 12 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_holy_sealofwisdom:50:50:-13:0|tGrant me a Blessing of Wisdom", 0, 2, false, "", 0) 13 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_holy_fistofjustice:50:50:-13:0|tGrant me a Blessing of Might", 0, 3, false, "", 0) 14 | player:GossipSendMenu(1, creature) 15 | end 16 | 17 | local function OnGossipSelect(event, player, creature, sender, intid, code, menuid) 18 | if intid == 1 then 19 | player:CastSpell(player, kingsSpell, true) 20 | elseif intid == 2 then 21 | player:CastSpell(player, wisdomSpell, true) 22 | elseif intid == 3 then 23 | player:CastSpell(player, mightSpell, true) 24 | end 25 | player:GossipComplete() 26 | end 27 | 28 | RegisterCreatureEvent(AlliancePaladin, 5, OnSpawn) 29 | RegisterCreatureGossipEvent(AlliancePaladin, 1, OnGossipHello) 30 | RegisterCreatureGossipEvent(AlliancePaladin, 2, OnGossipSelect) -------------------------------------------------------------------------------- /Stormwind/AlliancePaladin2.lua: -------------------------------------------------------------------------------- 1 | local AlliancePaladin = {} 2 | 3 | local function CastCS(eventId, delay, calls, creature) 4 | creature:CastSpell(creature, 35395, true) 5 | end 6 | 7 | local function CastCons(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 20924, true) 9 | end 10 | 11 | local function CastDS(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 53385, true) 13 | end 14 | 15 | local function CastJOL(eventId, delay, calls, creature) 16 | creature:CastSpell(creature:GetVictim(), 20271, true) 17 | end 18 | 19 | local function CastAvengingWrath(event, creature) 20 | creature:CastSpell(creature, 31884, true) 21 | end 22 | 23 | local function CastKings(event, creature) 24 | creature:CastSpell(creature, 20217, true) 25 | end 26 | 27 | local function OnEnterCombat(event, creature, target) 28 | creature:RegisterEvent(CastCS, 6000, 0) 29 | creature:RegisterEvent(CastCons, 8000, 0) 30 | creature:RegisterEvent(CastDS, 10000, 0) 31 | creature:RegisterEvent(CastJOL, 11000, 0) 32 | end 33 | 34 | local function OnLeaveCombat(event, creature) 35 | creature:RemoveEvents() 36 | end 37 | 38 | local function OnDied(event, creature, killer) 39 | creature:RemoveEvents() 40 | end 41 | 42 | local function OnSpawn(event, creature) 43 | creature:CastSpell(creature, 20217, true) 44 | end 45 | 46 | RegisterCreatureEvent(400030, 1, OnEnterCombat) 47 | RegisterCreatureEvent(400030, 2, OnLeaveCombat) 48 | RegisterCreatureEvent(400030, 4, OnDied) 49 | RegisterCreatureEvent(400030, 5, OnSpawn) 50 | 51 | -------------------------------------------------------------------------------- /Stormwind/AlliancePriest2.lua: -------------------------------------------------------------------------------- 1 | local APriest = {}; 2 | 3 | local function CastSmite(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 48122, true) 5 | end 6 | 7 | local function CastHolyFire(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 48134, true) 9 | end 10 | 11 | local function CastSWP(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 27605, true) 13 | end 14 | 15 | local function OnEnterCombat(event, creature, target) 16 | creature:RegisterEvent(CastSmite, 2600, 0) 17 | creature:RegisterEvent(CastHolyFire, 5000, 0) 18 | creature:RegisterEvent(CastSWP, 15000, 0) 19 | end 20 | 21 | local function OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | local function OnDied(event, creature, killer) 26 | creature:RemoveEvents() 27 | end 28 | 29 | RegisterCreatureEvent(400026, 1, OnEnterCombat) 30 | RegisterCreatureEvent(400026, 2, OnLeaveCombat) 31 | RegisterCreatureEvent(400026, 4, OnDied) -------------------------------------------------------------------------------- /Stormwind/AllianceWarHerald.lua: -------------------------------------------------------------------------------- 1 | local NPC_ID = 35200 -- replace with the NPC's ID 2 | local BLESSING_SPELL_ID = 100003 -- replace with the first spell ID 3 | local SOULSTONE_SPELL_ID = 20707 -- replace with the second spell ID 4 | 5 | local function OnGossipHello(event, player, creature) 6 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\Spell_Holy_ReviveChampion:50:50:-43:0|tReceive the King's blessing", 0, 1, false, "", 0) 7 | player:GossipMenuAddItem(9, "|TInterface\\Icons\\inv_misc_orb_04:50:50:-43:0|tReceive a Soulstone", 0, 2, false, "", 0) 8 | player:GossipSendMenu(1, creature) 9 | end 10 | 11 | local function OnGossipSelect(event, player, creature, sender, intid, code, menuid) 12 | if intid == 1 then 13 | player:CastSpell(player, BLESSING_SPELL_ID, true) 14 | elseif intid == 2 then 15 | player:CastSpell(player, SOULSTONE_SPELL_ID, true) 16 | end 17 | player:GossipComplete() 18 | end 19 | 20 | local function YellDialogue(event, creature) 21 | creature:SendUnitYell("Adventurers, do not go unprepared! Come speak with me and I will grant you a blessing!", 0) 22 | end 23 | 24 | RegisterCreatureGossipEvent(NPC_ID, 1, OnGossipHello) 25 | RegisterCreatureGossipEvent(NPC_ID, 2, OnGossipSelect) 26 | 27 | -- triggers the yell function on spawn 28 | RegisterCreatureEvent(NPC_ID, 5, function(event, creature) YellDialogue(event, creature) end) 29 | 30 | -------------------------------------------------------------------------------- /Stormwind/Bolvar.lua: -------------------------------------------------------------------------------- 1 | local Bolvar = {} 2 | 3 | local function CastAS(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 32699, true) 5 | end 6 | 7 | local function CastHOR(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 53595, true) 9 | end 10 | 11 | local function CastSunder(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 58461, true) 13 | end 14 | 15 | local function CastAvengingWrath(event, creature) 16 | creature:CastSpell(creature, 31884, true) 17 | end 18 | 19 | local function CastKings(event, creature) 20 | creature:CastSpell(creature, 20217, true) 21 | end 22 | 23 | local function OnEnterCombat(event, creature, target) 24 | creature:RegisterEvent(CastAS, 12600, 0) 25 | creature:RegisterEvent(CastHOR, 5000, 0) 26 | creature:RegisterEvent(CastSunder, 10000, 0) 27 | creature:RegisterEvent(CastAvengingWrath, 1, 1) 28 | end 29 | 30 | local function OnLeaveCombat(event, creature) 31 | creature:RemoveEvents() 32 | end 33 | 34 | local function OnDied(event, creature, killer) 35 | creature:RemoveEvents() 36 | end 37 | 38 | local function OnSpawn(event, creature) 39 | creature:CastSpell(creature, 20217, true) 40 | end 41 | 42 | RegisterCreatureEvent(1748, 1, OnEnterCombat) 43 | RegisterCreatureEvent(1748, 2, OnLeaveCombat) 44 | RegisterCreatureEvent(1748, 4, OnDied) 45 | RegisterCreatureEvent(1748, 5, OnSpawn) 46 | 47 | -------------------------------------------------------------------------------- /Stormwind/Duthorian.lua: -------------------------------------------------------------------------------- 1 | local DuthorianRall = {}; 2 | 3 | local function CastJoL(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 20185, true) 5 | end 6 | 7 | local function OnEnterCombat(event, creature, target) 8 | creature:RegisterEvent(CastJoL, 5000, 0) 9 | end 10 | 11 | local function OnLeaveCombat(event, creature) 12 | creature:RemoveEvents() 13 | end 14 | 15 | local function OnDied(event, creature, killer) 16 | creature:RemoveEvents() 17 | end 18 | 19 | RegisterCreatureEvent(6171, 1, OnEnterCombat) 20 | RegisterCreatureEvent(6171, 2, OnLeaveCombat) 21 | RegisterCreatureEvent(6171, 4, OnDied) -------------------------------------------------------------------------------- /Stormwind/Laurena.lua: -------------------------------------------------------------------------------- 1 | local Laurena = {}; 2 | 3 | local function CastSmite(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 10934, true) 5 | end 6 | 7 | local function OnEnterCombat(event, creature, target) 8 | creature:RegisterEvent(CastSmite, 3000, 0) 9 | end 10 | 11 | local function OnLeaveCombat(event, creature) 12 | creature:RemoveEvents() 13 | end 14 | 15 | local function OnDied(event, creature, killer) 16 | creature:RemoveEvents() 17 | end 18 | 19 | RegisterCreatureEvent(376, 1, OnEnterCombat) 20 | RegisterCreatureEvent(376, 2, OnLeaveCombat) 21 | RegisterCreatureEvent(376, 4, OnDied) -------------------------------------------------------------------------------- /Stormwind/PatchwerkHorror.lua: -------------------------------------------------------------------------------- 1 | local PatchWorkHorror = {}; 2 | 3 | local function AcidSpit(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 61597, true) 5 | end 6 | 7 | local function CastSpecialSpell(eventId, delay, calls, creature) 8 | local victim = creature:GetVictim() 9 | if not victim then 10 | return 11 | end 12 | if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then 13 | creature:CastSpell(victim, 5, true) 14 | end 15 | end 16 | 17 | 18 | function CastBludgeoningStrike(eventId, delay, calls, creature) 19 | local targets = creature:GetAITargets(10) 20 | if #targets == 0 then 21 | return 22 | end 23 | local target = targets[math.random(#targets)] 24 | creature:CastSpell(target, 60870, true) 25 | end 26 | 27 | 28 | local function OnEnterCombat(event, creature, target) 29 | creature:RegisterEvent(AcidSpit, 7000, 0) 30 | creature:RegisterEvent(CastBludgeoningStrike, 13000, 0) 31 | creature:RegisterEvent(CastSpecialSpell, 1000, 0) 32 | end 33 | 34 | local function OnLeaveCombat(event, creature) 35 | creature:RemoveEvents() 36 | end 37 | 38 | local function OnDied(event, creature, killer) 39 | creature:DespawnOrUnsummon(5000) 40 | creature:RemoveEvents() 41 | end 42 | 43 | RegisterCreatureEvent(400054, 1, OnEnterCombat) 44 | RegisterCreatureEvent(400054, 2, OnLeaveCombat) 45 | RegisterCreatureEvent(400054, 4, OnDied) 46 | 47 | -------------------------------------------------------------------------------- /Stormwind/PatchworkHorror2.lua: -------------------------------------------------------------------------------- 1 | local PatchWorkHorror2 = {}; 2 | 3 | local function AcidSpit(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 61597, true) 5 | end 6 | 7 | local function KnockAway(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 10101, true) 9 | end 10 | 11 | 12 | function CastBludgeoningStrike(eventId, delay, calls, creature) 13 | local targets = creature:GetAITargets(10) 14 | if #targets == 0 then 15 | return 16 | end 17 | local target = targets[math.random(#targets)] 18 | creature:CastSpell(target, 60870, true) 19 | end 20 | 21 | 22 | local function OnEnterCombat(event, creature, target) 23 | creature:RegisterEvent(AcidSpit, 7000, 0) 24 | creature:RegisterEvent(CastBludgeoningStrike, 13000, 0) 25 | creature:RegisterEvent(KnockAway, 16000, 0) 26 | end 27 | 28 | local function OnLeaveCombat(event, creature) 29 | creature:RemoveEvents() 30 | end 31 | 32 | local function OnDied(event, creature, killer) 33 | creature:RemoveEvents() 34 | end 35 | 36 | RegisterCreatureEvent(10414, 1, OnEnterCombat) 37 | RegisterCreatureEvent(10414, 2, OnLeaveCombat) 38 | RegisterCreatureEvent(10414, 4, OnDied) -------------------------------------------------------------------------------- /Stormwind/SW-Archer.lua: -------------------------------------------------------------------------------- 1 | local Archer = {}; 2 | 3 | local function CastShoot(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 37770, true) 5 | end 6 | 7 | local function CastSerpentSting(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 36984, true) 9 | end 10 | 11 | local function CastMultiShot(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 30990, true) 13 | end 14 | 15 | local function OnEnterCombat(event, creature, target) 16 | creature:RegisterEvent(CastShoot, 750, 0) 17 | creature:RegisterEvent(CastShoot, 15000, 0) 18 | creature:RegisterEvent(CastMultiShot, 5000, 0) 19 | end 20 | 21 | local function OnLeaveCombat(event, creature) 22 | creature:RemoveEvents() 23 | end 24 | 25 | local function OnDied(event, creature, killer) 26 | creature:RemoveEvents() 27 | end 28 | 29 | RegisterCreatureEvent(400033, 1, OnEnterCombat) 30 | RegisterCreatureEvent(400033, 2, OnLeaveCombat) 31 | RegisterCreatureEvent(400033, 4, OnDied) -------------------------------------------------------------------------------- /Stormwind/SW-GuardCleave.lua: -------------------------------------------------------------------------------- 1 | local Stormwind = {}; 2 | 3 | local function CastCleave(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 20677, true) 5 | end 6 | 7 | local function CastSunderArmor(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 8380, true) 9 | end 10 | 11 | local function OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(CastCleave, 5000, 0) 13 | creature:RegisterEvent(CastSunderArmor, 7000, 0) 14 | end 15 | 16 | local function OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | local function OnDied(event, creature, killer) 21 | creature:RemoveEvents() 22 | end 23 | 24 | local function OnSpawn(event, creature) 25 | creature:CastSpell(creature, 17683, true) 26 | end 27 | 28 | RegisterCreatureEvent(400013, 1, OnEnterCombat) 29 | RegisterCreatureEvent(400013, 2, OnLeaveCombat) 30 | RegisterCreatureEvent(400013, 4, OnDied) 31 | RegisterCreatureEvent(400013, 5, OnSpawn) 32 | 33 | RegisterCreatureEvent(400039, 1, OnEnterCombat) 34 | RegisterCreatureEvent(400039, 2, OnLeaveCombat) 35 | RegisterCreatureEvent(400039, 4, OnDied) 36 | RegisterCreatureEvent(400039, 5, OnSpawn) -------------------------------------------------------------------------------- /Stormwind/SWDefenders.lua: -------------------------------------------------------------------------------- 1 | local NPC_ENTRY_ID_1 = 400022 2 | local NPC_ENTRY_ID_2 = 400023 3 | local NPC_ENTRY_ID_3 = 400024 4 | local NPC_ENTRY_ID_4 = 400025 5 | 6 | function OnSpawn(event, creature) 7 | local npcEntry = creature:GetEntry() 8 | if npcEntry == NPC_ENTRY_ID_1 or npcEntry == NPC_ENTRY_ID_2 or npcEntry == NPC_ENTRY_ID_3 or npcEntry == NPC_ENTRY_ID_4 then 9 | creature:SetWalk(false) -- Set movement type to run 10 | creature:MoveWaypoint() 11 | end 12 | end 13 | 14 | RegisterCreatureEvent(NPC_ENTRY_ID_1, 5, OnSpawn) 15 | RegisterCreatureEvent(NPC_ENTRY_ID_2, 5, OnSpawn) 16 | RegisterCreatureEvent(NPC_ENTRY_ID_3, 5, OnSpawn) 17 | RegisterCreatureEvent(NPC_ENTRY_ID_4, 5, OnSpawn) -------------------------------------------------------------------------------- /Stormwind/SWGKillCred.lua: -------------------------------------------------------------------------------- 1 | local SWG_ID = {68, 400013, 400033, 400014, 1976} 2 | local SPELL_ID = 100141 3 | 4 | function OnSpellCast(event, caster, spell) 5 | local target = spell:GetTarget() 6 | if target and spell:GetEntry() == SPELL_ID then 7 | local isValidTarget = false 8 | for _, swgID in ipairs(SWG_ID) do 9 | if target:GetEntry() == swgID then 10 | isValidTarget = true 11 | break 12 | end 13 | end 14 | if not isValidTarget then 15 | caster:SendBroadcastMessage("That target is not valid.") 16 | spell:Cancel() 17 | elseif target:HasAura(SPELL_ID) then 18 | caster:SendBroadcastMessage("Target has already been empowered.") 19 | spell:Cancel() 20 | else 21 | -- give kill credit to NPC ID 68 22 | caster:KilledMonsterCredit(68) 23 | end 24 | end 25 | end 26 | 27 | RegisterPlayerEvent(5, OnSpellCast) -------------------------------------------------------------------------------- /Stormwind/TrapQuestA.lua: -------------------------------------------------------------------------------- 1 | -- Quest ID for the quest that should trigger the sound 2 | local QUEST_ID = 30004 3 | 4 | -- Creature ID for the creature that gives the quest 5 | local CREATURE_ID = 12480 6 | 7 | -- Sound ID for the sound that should play when the quest is accepted 8 | local SOUND_ID = 20426 9 | 10 | -- Emote ID for the emote that should play when the quest is accepted 11 | local EMOTE_ID = 113 12 | 13 | -- Register the event for quest acceptance 14 | RegisterCreatureEvent(CREATURE_ID, 31, function(event, player, creature, quest) 15 | if quest:GetId() == QUEST_ID then 16 | creature:PlayDistanceSound(SOUND_ID) 17 | creature:PerformEmote(EMOTE_ID) 18 | end 19 | end) 20 | -------------------------------------------------------------------------------- /Stormwind/TrapQuestR.lua: -------------------------------------------------------------------------------- 1 | -- Quest ID for the quest that should trigger the sound 2 | local QUEST_ID = 30004 3 | 4 | -- Creature ID for the creature that gives the quest 5 | local CREATURE_ID = 12480 6 | 7 | -- Sound ID for the sound that should play when the quest is rewarded 8 | local SOUND_ID = 20427 9 | 10 | -- Emote ID for the emote that should play when the quest is rewarded 11 | local EMOTE_ID = 113 12 | 13 | -- Register the event for quest reward 14 | RegisterCreatureEvent(CREATURE_ID, 34, function(event, player, creature, quest) 15 | if quest:GetId() == QUEST_ID then 16 | creature:PlayDistanceSound(SOUND_ID) 17 | creature:PerformEmote(EMOTE_ID) 18 | end 19 | end) 20 | -------------------------------------------------------------------------------- /Stormwind/Turalyon1.lua: -------------------------------------------------------------------------------- 1 | local npcid = 400018 2 | local spellid1 = 100138 3 | local spellid2 = 69930 4 | local spellid3 = 52386 5 | local yelltext = { 6 | "Defenders, forward! We end this beast here and now!", 7 | "We fight the Scourge to protect our homes, our families...I only hope we are not too late.", 8 | "", 9 | "Alleria...perfect timing as always.", 10 | } 11 | local waypointIndex = 0 12 | 13 | function OnReachWp(event, creature, waypoint) 14 | if waypointIndex >= #yelltext then 15 | return 16 | end 17 | creature:CastSpell(creature, spellid1, true) 18 | creature:CastSpell(creature, spellid2, true) 19 | creature:CastSpell(creature, spellid3, true) 20 | creature:SendUnitSay(yelltext[waypointIndex + 1], 0) 21 | waypointIndex = waypointIndex + 1 22 | end 23 | 24 | function OnSpawn(event, creature) 25 | waypointIndex = 0 26 | creature:MoveWaypoint() 27 | creature:SetReactState(0) 28 | end 29 | 30 | RegisterCreatureEvent(npcid, 5, OnSpawn) 31 | RegisterCreatureEvent(npcid, 6, OnReachWp) -------------------------------------------------------------------------------- /Stormwind/Turalyon2.lua: -------------------------------------------------------------------------------- 1 | local Turalyon = {}; 2 | 3 | local function CastCharge(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 22911, true) 5 | end 6 | 7 | local function CastCrusaderStrike(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 66003, true) 9 | end 10 | 11 | local function CastDivineStorm(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 53385, true) 13 | end 14 | 15 | local function CastConsecration(eventId, delay, calls, creature) 16 | creature:CastSpell(creature, 69930, true) 17 | end 18 | 19 | local function CastChallengingShout(eventId, delay, calls, creature) 20 | creature:CastSpell(creature, 1161, true) 21 | end 22 | 23 | 24 | local function ForceDespawn(eventId, delay, calls, creature) 25 | creature:DespawnOrUnsummon(1) 26 | end 27 | 28 | local function OnEnterCombat(event, creature, target) 29 | creature:RegisterEvent(CastCharge, 250, 1) 30 | creature:RegisterEvent(CastCrusaderStrike, 5000, 0) 31 | creature:RegisterEvent(CastDivineStorm, 10000, 0) 32 | creature:RegisterEvent(CastConsecration, 15000, 0) 33 | creature:RegisterEvent(CastChallengingShout, 6500, 0) 34 | creature:RegisterEvent(ForceDespawn, 90000, 1) 35 | end 36 | 37 | local function OnLeaveCombat(event, creature) 38 | creature:RemoveEvents() 39 | end 40 | 41 | local function OnDied(event, creature, killer) 42 | creature:RemoveEvents() 43 | end 44 | 45 | RegisterCreatureEvent(400020, 1, OnEnterCombat) 46 | RegisterCreatureEvent(400020, 2, OnLeaveCombat) 47 | RegisterCreatureEvent(400020, 4, OnDied) -------------------------------------------------------------------------------- /TempMount.lua: -------------------------------------------------------------------------------- 1 | Thunderhoof = {} 2 | 3 | -- Create the item you want to give to the player 4 | Thunderhoof.ITEM_ID = 60111 -- replace with the ID of the item you want to give 5 | 6 | -- Register the gossip event for the NPC 7 | function Thunderhoof.OnGossipHello(event, player, creature) 8 | player:GossipMenuAddItem(0, "|TInterface\\Icons\\ability_mount_tawnywindrider:50:50:-13:0|tLoan me a Wind Rider for 25 silver.", 0, 1) 9 | player:GossipSendMenu(1, creature) 10 | end 11 | 12 | -- Handle the player's selection in the gossip menu 13 | function Thunderhoof.OnGossipSelect(event, player, creature, sender, action) 14 | if action == 1 then 15 | if player:GetCoinage() < 2500 then 16 | player:SendBroadcastMessage("You do not have enough silver.") 17 | player:GossipComplete() 18 | else 19 | player:SetCoinage(player:GetCoinage() - 2500) 20 | player:AddItem(Thunderhoof.ITEM_ID, 1) 21 | player:SendBroadcastMessage("You have received a Wind Rider.") 22 | player:GossipComplete() 23 | end 24 | end 25 | end 26 | 27 | -- Send a unit yell when the NPC spawns 28 | function Thunderhoof.OnSpawn(event, creature) 29 | creature:SendUnitYell("Lend yourself a Wind Rider for 25 silver! You won't want to fight the Scourge without one!", 0) 30 | creature:CastSpell(creature, 20374) 31 | end 32 | 33 | -- Register the gossip events with the NPC 34 | RegisterCreatureGossipEvent(400042, 1, Thunderhoof.OnGossipHello) 35 | RegisterCreatureGossipEvent(400042, 2, Thunderhoof.OnGossipSelect) 36 | RegisterCreatureEvent(400042, 5, Thunderhoof.OnSpawn) -------------------------------------------------------------------------------- /TrapCredit.lua: -------------------------------------------------------------------------------- 1 | local NPC_ID = 400034 -- The ID of the NPC you want players to get kill credit for 2 | 3 | -- List of allowed zones (use zone ID) 4 | local ALLOWED_ZONES = { 5 | 1519, -- SW City 6 | 12, 7 | 14, 8 | 1637 9 | } 10 | 11 | -- List of allowed spell IDs 12 | local ALLOWED_SPELLS = { 13 | 100144, -- Spell 1 14 | 100142, 15 | 100143, 16 | 100145, 17 | -- Add more spells here as needed 18 | } 19 | 20 | -- Define the indexOf function for tables 21 | function table.indexOf(t, value) 22 | for k, v in ipairs(t) do 23 | if v == value then 24 | return k 25 | end 26 | end 27 | return -1 28 | end 29 | 30 | function OnPlayerCastSpell(event, player, spell) 31 | local spellId = spell:GetEntry() 32 | local zoneId = player:GetZoneId() 33 | 34 | if table.indexOf(ALLOWED_SPELLS, spellId) ~= -1 then 35 | if table.indexOf(ALLOWED_ZONES, zoneId) == -1 then 36 | spell:Cancel() 37 | player:SendBroadcastMessage("You cannot use that here.") 38 | else 39 | player:KilledMonsterCredit(NPC_ID) 40 | player:SendBroadcastMessage("You have successfuly placed a trap!") 41 | end 42 | end 43 | end 44 | 45 | RegisterPlayerEvent(5, OnPlayerCastSpell) 46 | -------------------------------------------------------------------------------- /TrapQuestA.lua: -------------------------------------------------------------------------------- 1 | -- Quest ID for the quest that should trigger the sound 2 | local QUEST_ID = 30004 3 | 4 | -- Creature ID for the creature that gives the quest 5 | local CREATURE_ID = 12480 6 | 7 | -- Sound ID for the sound that should play when the quest is accepted 8 | local SOUND_ID = 20426 9 | 10 | -- Emote ID for the emote that should play when the quest is accepted 11 | local EMOTE_ID = 113 12 | 13 | -- Register the event for quest acceptance 14 | RegisterCreatureEvent(CREATURE_ID, 31, function(event, player, creature, quest) 15 | if quest:GetId() == QUEST_ID then 16 | creature:PlayDistanceSound(SOUND_ID) 17 | creature:PerformEmote(EMOTE_ID) 18 | end 19 | end) 20 | -------------------------------------------------------------------------------- /TrapQuestR.lua: -------------------------------------------------------------------------------- 1 | -- Quest ID for the quest that should trigger the sound 2 | local QUEST_ID = 30004 3 | 4 | -- Creature ID for the creature that gives the quest 5 | local CREATURE_ID = 12480 6 | 7 | -- Sound ID for the sound that should play when the quest is rewarded 8 | local SOUND_ID = 20427 9 | 10 | -- Emote ID for the emote that should play when the quest is rewarded 11 | local EMOTE_ID = 113 12 | 13 | -- Register the event for quest reward 14 | RegisterCreatureEvent(CREATURE_ID, 34, function(event, player, creature, quest) 15 | if quest:GetId() == QUEST_ID then 16 | creature:PlayDistanceSound(SOUND_ID) 17 | creature:PerformEmote(EMOTE_ID) 18 | end 19 | end) 20 | -------------------------------------------------------------------------------- /Trash_Earthborer.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | EmuDevs 3 | Eluna Lua Engine 4 | Eluna Scripts 5 | Eluna Wiki 6 | 7 | -= Script Information =- 8 | * Script Type: Trash Mob 9 | * Npc: Earthborer <11320> 10 | --]] 11 | 12 | local Earthborer = {}; 13 | 14 | function Earthborer.OnEnterCombat(event, creature, target) 15 | creature:RegisterEvent(Earthborer.Earthborer_Acid, 6000, 0) 16 | end 17 | 18 | function Earthborer.Earthborer_Acid(event, delay, pCall, creature) 19 | if (math.random(1, 100) <= 70) then 20 | creature:CastSpell(creature:GetVictim(), 18070) 21 | end 22 | end 23 | 24 | function Earthborer.Reset(event, creature) 25 | creature:RemoveEvents() 26 | end 27 | 28 | RegisterCreatureEvent(11320, 1, Earthborer.OnEnterCombat) 29 | RegisterCreatureEvent(11320, 2, Earthborer.Reset) -- OnLeaveCombat 30 | RegisterCreatureEvent(11320, 4, Earthborer.Reset) -- OnDied -------------------------------------------------------------------------------- /Trash_RagefireTrogg.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | EmuDevs 3 | Eluna Lua Engine 4 | Eluna Scripts 5 | Eluna Wiki 6 | 7 | -= Script Information =- 8 | * Script Type: Trash Mob 9 | * Npc: Ragefire Trogg <11318> 10 | --]] 11 | 12 | local Ragefire_Trogg = {}; 13 | 14 | function Ragefire_Trogg.OnEnterCombat(event, creature, target) 15 | creature:RegisterEvent(Ragefire_Trogg.Strike, 5000, 0) 16 | end 17 | 18 | function Ragefire_Trogg.Strike(event, delay, pCall, creature) 19 | creature:CastSpell(creature:GetVictim(), 11976) 20 | end 21 | 22 | function Ragefire_Trogg.Reset(event, creature) 23 | creature:RemoveEvents() 24 | end 25 | 26 | RegisterCreatureEvent(11318, 1, Ragefire_Trogg.OnEnterCombat) 27 | RegisterCreatureEvent(11318, 2, Ragefire_Trogg.Reset) -- OnLeaveCombat 28 | RegisterCreatureEvent(11318, 4, Ragefire_Trogg.Reset) -- OnDied -------------------------------------------------------------------------------- /Trash_SearingBlaceCultist.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | EmuDevs 3 | Eluna Lua Engine 4 | Eluna Scripts 5 | Eluna Wiki 6 | 7 | -= Script Information =- 8 | * Script Type: Trash Mob 9 | * Npc: Searing Blade Cultist <11322> 10 | --]] 11 | 12 | local Searing_Blade_Cultist = {}; 13 | 14 | function Searing_Blade_Cultist.OnEnterCombat(event, creature, target) 15 | creature:RegisterEvent(Searing_Blade_Cultist.Curse_of_Agony, 12000, 0) 16 | end 17 | 18 | function Searing_Blade_Cultist.Curse_of_Agony(event, delay, pCall, creature) 19 | if (math.random(1, 100) <= 85) then 20 | local players = creature:GetPlayersInRange() 21 | creature:CastSpell(players[math.random(1, #players)], 18266) 22 | end 23 | end 24 | 25 | function Searing_Blade_Cultist.Reset(event, creature) 26 | creature:RemoveEvents() 27 | end 28 | 29 | RegisterCreatureEvent(11322, 1, Searing_Blade_Cultist.OnEnterCombat) 30 | RegisterCreatureEvent(11322, 2, Searing_Blade_Cultist.Reset) -- OnLeaveCombat 31 | RegisterCreatureEvent(11322, 4, Searing_Blade_Cultist.Reset) -- OnDied -------------------------------------------------------------------------------- /Turalyon.lua: -------------------------------------------------------------------------------- 1 | local npcid = 400018 2 | local spellid1 = 100135 3 | local spellid2 = 69930 4 | local yelltext = { 5 | "This world is ours, and by the Holy Light we will keep it safe, now and forever.", 6 | "We will stand tall, and we will fight on, in the name of the Light!", 7 | "Let the shadows flee before the blazing light of justice!", 8 | "For the Alliance! For the Light!", 9 | } 10 | local waypointIndex = 0 11 | 12 | function OnReachWp(event, creature, waypoint) 13 | if waypointIndex >= #yelltext then 14 | waypointIndex = 0 15 | end 16 | creature:CastSpell(creature, spellid1, true) 17 | creature:CastSpell(creature, spellid2, true) 18 | creature:SendUnitYell(yelltext[waypointIndex + 1], 0) 19 | waypointIndex = waypointIndex + 1 20 | end 21 | 22 | function OnSpawn(event, creature) 23 | waypointIndex = 0 24 | creature:MoveWaypoint() 25 | creature:SetReactState(0) 26 | end 27 | 28 | RegisterCreatureEvent(npcid, 5, OnSpawn) 29 | RegisterCreatureEvent(npcid, 6, OnReachWp) 30 | -------------------------------------------------------------------------------- /Turalyon1.lua: -------------------------------------------------------------------------------- 1 | local npcid = 400018 2 | local spellid1 = 100138 3 | local spellid2 = 69930 4 | local spellid3 = 52386 5 | local yelltext = { 6 | "Defenders, forward! We end this beast here and now!", 7 | "We fight the Scourge to protect our homes, our families...I only hope we are not too late.", 8 | "", 9 | "Alleria...perfect timing as always.", 10 | } 11 | local waypointIndex = 0 12 | 13 | function OnReachWp(event, creature, waypoint) 14 | if waypointIndex >= #yelltext then 15 | return 16 | end 17 | creature:CastSpell(creature, spellid1, true) 18 | creature:CastSpell(creature, spellid2, true) 19 | creature:CastSpell(creature, spellid3, true) 20 | creature:SendUnitSay(yelltext[waypointIndex + 1], 0) 21 | waypointIndex = waypointIndex + 1 22 | end 23 | 24 | function OnSpawn(event, creature) 25 | waypointIndex = 0 26 | creature:MoveWaypoint() 27 | creature:SetReactState(0) 28 | end 29 | 30 | RegisterCreatureEvent(npcid, 5, OnSpawn) 31 | RegisterCreatureEvent(npcid, 6, OnReachWp) -------------------------------------------------------------------------------- /Turalyon2.lua: -------------------------------------------------------------------------------- 1 | local Turalyon = {}; 2 | 3 | local function CastCharge(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 22911, true) 5 | end 6 | 7 | local function CastCrusaderStrike(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 66003, true) 9 | end 10 | 11 | local function CastDivineStorm(eventId, delay, calls, creature) 12 | creature:CastSpell(creature:GetVictim(), 53385, true) 13 | end 14 | 15 | local function CastConsecration(eventId, delay, calls, creature) 16 | creature:CastSpell(creature, 69930, true) 17 | end 18 | 19 | local function CastChallengingShout(eventId, delay, calls, creature) 20 | creature:CastSpell(creature, 1161, true) 21 | end 22 | 23 | 24 | local function ForceDespawn(eventId, delay, calls, creature) 25 | creature:DespawnOrUnsummon(1) 26 | end 27 | 28 | local function OnEnterCombat(event, creature, target) 29 | creature:RegisterEvent(CastCharge, 250, 1) 30 | creature:RegisterEvent(CastCrusaderStrike, 5000, 0) 31 | creature:RegisterEvent(CastDivineStorm, 10000, 0) 32 | creature:RegisterEvent(CastConsecration, 15000, 0) 33 | creature:RegisterEvent(CastChallengingShout, 6500, 0) 34 | creature:RegisterEvent(ForceDespawn, 90000, 1) 35 | end 36 | 37 | local function OnLeaveCombat(event, creature) 38 | creature:RemoveEvents() 39 | end 40 | 41 | local function OnDied(event, creature, killer) 42 | creature:RemoveEvents() 43 | end 44 | 45 | RegisterCreatureEvent(400020, 1, OnEnterCombat) 46 | RegisterCreatureEvent(400020, 2, OnLeaveCombat) 47 | RegisterCreatureEvent(400020, 4, OnDied) -------------------------------------------------------------------------------- /TurretKillCred.lua: -------------------------------------------------------------------------------- 1 | local TUR_ID = {400038, 400037} 2 | local SPELL_ID = 100181 3 | 4 | function OnSpellCast(event, caster, spell) 5 | local target = spell:GetTarget() 6 | if target and spell:GetEntry() == SPELL_ID then 7 | local isValidTarget = false 8 | for _, TURID in ipairs(TUR_ID) do 9 | if target:GetEntry() == TURID then 10 | isValidTarget = true 11 | break 12 | end 13 | end 14 | if not isValidTarget then 15 | caster:SendBroadcastMessage("Invalid target.") 16 | spell:Cancel() 17 | else 18 | -- 33% chance for the respawn to fizzle 19 | local chance = math.random(1, 3) 20 | if chance == 1 then 21 | caster:SendBroadcastMessage("Attempt to recharge the turret has fizzled.") 22 | else 23 | -- give kill credit 24 | caster:KilledMonsterCredit(400037) 25 | -- respawn the creature 26 | target:Respawn() 27 | end 28 | end 29 | end 30 | end 31 | 32 | RegisterPlayerEvent(5, OnSpellCast) -------------------------------------------------------------------------------- /Unbind.lua: -------------------------------------------------------------------------------- 1 | local UnbindCommand = {} 2 | local MSG_UNBIND = "#unbind" 3 | 4 | local function UnbindInstances(event, player, msg, Type, lang) 5 | if (msg:find(MSG_UNBIND)) then 6 | player:UnbindAllInstances() 7 | player:SendBroadcastMessage("All instances unbound.") 8 | end 9 | end 10 | 11 | RegisterPlayerEvent(18, UnbindInstances) -------------------------------------------------------------------------------- /UnlimitedAmmo.lua: -------------------------------------------------------------------------------- 1 | -- This script was made by Dinkledork 2 | -- Fun fact: I'm too lazy to finish this script right now 3 | -- Make sure you only have one type of ammo on your character 4 | 5 | local ENABLED = false -- Set this to false to disable the script 6 | 7 | local ARROW_ITEM_IDS = {2516, 2519} -- Replace these with actual ammo IDs 8 | local SPELL_IDS = {75} -- Add more spell IDs to this table such as serpent sting arcane shot etc, separated by commas. Right now it triggers on auto shot. 9 | 10 | local function GetArrowItemId(player) 11 | for _, arrowId in ipairs(ARROW_ITEM_IDS) do 12 | if player:HasItem(arrowId) then 13 | return arrowId 14 | end 15 | end 16 | return nil 17 | end 18 | 19 | local function IsRelevantSpell(spellId) 20 | for _, id in ipairs(SPELL_IDS) do 21 | if spellId == id then 22 | return true 23 | end 24 | end 25 | return false 26 | end 27 | 28 | local function OnPlayerSpellCast(event, player, spell, skipCheck) 29 | if not ENABLED then 30 | return 31 | end 32 | 33 | local spellId = spell:GetEntry() 34 | if IsRelevantSpell(spellId) then 35 | local arrowItemId = GetArrowItemId(player) 36 | if arrowItemId then 37 | player:AddItem(arrowItemId, 1) --can change this number to 2 or 3 or whatever if you're too lazy to add spells in. 38 | end 39 | end 40 | end 41 | 42 | RegisterPlayerEvent(5, OnPlayerSpellCast) -------------------------------------------------------------------------------- /VanillaDungeonScourge/Sever.lua: -------------------------------------------------------------------------------- 1 | local Sever = {} 2 | 3 | function Sever.CastDiseasedSpit(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 17745, true) 5 | end 6 | 7 | function Sever.CastIntimidatingRoar(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 16508, true) 9 | end 10 | 11 | function Sever.OnEnterCombat(event, creature, target) 12 | creature:RegisterEvent(Sever.CastDiseasedSpit, 10000, 0) 13 | creature:RegisterEvent(Sever.CastIntimidatingRoar, 30000, 0) 14 | end 15 | 16 | function Sever.OnLeaveCombat(event, creature) 17 | creature:RemoveEvents() 18 | end 19 | 20 | function Sever.OnDied(event, creature, killer) 21 | creature:RemoveEvents() 22 | end 23 | 24 | function Sever.OnDamageTaken(event, creature, attacker, damage) 25 | if (creature:HealthBelowPct(50) and not creature:HasAura(41305)) then 26 | creature:CastSpell(creature, 41305, true) 27 | creature:SendUnitYell("", 0) 28 | end 29 | end 30 | 31 | RegisterCreatureEvent(14682, 1, Sever.OnEnterCombat) 32 | RegisterCreatureEvent(14682, 2, Sever.OnLeaveCombat) 33 | RegisterCreatureEvent(14682, 4, Sever.OnDied) 34 | RegisterCreatureEvent(14682, 9, Sever.OnDamageTaken) 35 | 36 | -------------------------------------------------------------------------------- /VenomBelcher.lua: -------------------------------------------------------------------------------- 1 | local VenomBelcher = {}; 2 | 3 | local function VenomSpit(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 24011, true) 5 | end 6 | 7 | local function SlowingPoison(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 14897, true) 9 | end 10 | 11 | 12 | function CastRetchingPlague(eventId, delay, calls, creature) 13 | local targets = creature:GetAITargets(10) 14 | if #targets == 0 then 15 | return 16 | end 17 | local target = targets[math.random(#targets)] 18 | creature:CastSpell(target, 30080, true) 19 | end 20 | 21 | 22 | local function OnEnterCombat(event, creature, target) 23 | creature:RegisterEvent(VenomSpit, 7000, 0) 24 | creature:RegisterEvent(CastRetchingPlague, 13000, 0) 25 | creature:RegisterEvent(SlowingPoison, 16000, 0) 26 | end 27 | 28 | local function OnLeaveCombat(event, creature) 29 | creature:RemoveEvents() 30 | end 31 | 32 | local function OnDied(event, creature, killer) 33 | creature:RemoveEvents() 34 | end 35 | 36 | RegisterCreatureEvent(10417, 1, OnEnterCombat) 37 | RegisterCreatureEvent(10417, 2, OnLeaveCombat) 38 | RegisterCreatureEvent(10417, 4, OnDied) -------------------------------------------------------------------------------- /VincentADKMorph.lua: -------------------------------------------------------------------------------- 1 | local morph_commands = { 2 | ["#sally"] = 2043, 3 | ["#newthrall"] = 4527, 4 | ["#oldthrall"] = 27656, 5 | ["#cairne"] = 4307, 6 | ["#velen"] = 17822, 7 | ["#sylvanas"] = 28213, 8 | ["#voljin"] = 10357, 9 | ["#anduin"] = 11655, 10 | ["#magni"] = 3597, 11 | ["#tyrande"] = 7274, 12 | ["#jaina"] = 2970, 13 | ["#varian"] = 28127, 14 | ["#bolvar"] = 5566, 15 | ["#oldtirion"] = 9477, 16 | ["#newtirion"] = 31011, 17 | ["#vereesa"] = 28222, 18 | ["#rhonin"] = 16024, 19 | ["#putress"] = 27611, 20 | ["#alexstraza"] = 28227, 21 | ["#chromie"] = 24877, 22 | ["#arthas"] = 24949, 23 | ["#lk"] = 22234, 24 | ["#saurfang"] = 14732, 25 | ["#onyxia"] = 8570, 26 | ["#nefarian"] = 9472, 27 | ["#darkranger"] = 30073, 28 | ["#millhouse"] = 19942, 29 | } 30 | 31 | local demorph_commands = { 32 | ["#demorph"] = true, 33 | ["#vincent"] = true, 34 | } 35 | 36 | local function MorphPlayer(event, player, message, type, language) 37 | local lower_message = string.lower(message) 38 | local morph_id = morph_commands[lower_message] 39 | 40 | if morph_id then 41 | player:SetDisplayId(morph_id) 42 | player:CastSpell(player, 51908, true) -- Added visual transform spell 43 | player:SendBroadcastMessage("You have been morphed into " .. lower_message:sub(2) .. "!") 44 | return false 45 | elseif demorph_commands[lower_message] then 46 | player:DeMorph() 47 | player:CastSpell(player, 51908, true) -- Added visual transform spell 48 | player:SendBroadcastMessage("Your morph has been reset to your original appearance.") 49 | return false 50 | end 51 | end 52 | 53 | RegisterPlayerEvent(18, MorphPlayer) -------------------------------------------------------------------------------- /Westfall/FOEREAPER.lua: -------------------------------------------------------------------------------- 1 | local FoeReaper = {}; 2 | 3 | local function CastTrample(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 5568, true) 5 | end 6 | 7 | local function CastKnockback(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 49398, true) 9 | end 10 | 11 | function FoeReaper.OnEnterCombat(event, creature, target) 12 | creature:SendUnitYell("You like me, you really like me!", 0) 13 | creature:RegisterEvent(CastTrample, 5000, 0) 14 | creature:RegisterEvent(CastKnockback, 15000, 0) 15 | end 16 | 17 | function FoeReaper.OnLeaveCombat(event, creature) 18 | creature:SendUnitYell("Haha, you lose!", 0) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function FoeReaper.OnDied(event, creature, killer) 23 | if(killer:GetObjectType() == "Player") then 24 | killer:SendBroadcastMessage("You killed " ..creature:GetName().."!") 25 | end 26 | creature:RemoveEvents() 27 | end 28 | 29 | function FoeReaper.OnSpawn(event, creature) 30 | creature:SendUnitYell("I'm baaaaaaaaack!!!", 0) 31 | end 32 | 33 | RegisterCreatureEvent(900003, 1, FoeReaper.OnEnterCombat) 34 | RegisterCreatureEvent(900003, 2, FoeReaper.OnLeaveCombat) 35 | RegisterCreatureEvent(900003, 4, FoeReaper.OnDied) 36 | RegisterCreatureEvent(900003, 5, FoeReaper.OnSpawn) -------------------------------------------------------------------------------- /Westfall/Lithe-Stalker.lua: -------------------------------------------------------------------------------- 1 | local LitheStalker = {}; 2 | 3 | local function CastWhirlingTip(eventId, delay, calls, creature) 4 | creature:CastSpell(creature:GetVictim(), 24048, true) 5 | end 6 | 7 | local function CastSweepingSlam(eventId, delay, calls, creature) 8 | creature:CastSpell(creature:GetVictim(), 53399, true) 9 | end 10 | 11 | function LitheStalker.OnEnterCombat(event, creature, target) 12 | creature:SendUnitYell("The Master will have your guts!", 0) 13 | creature:RegisterEvent(CastWhirlingTip, 5000, 0) 14 | creature:RegisterEvent(CastSweepingSlam, 10000, 0) 15 | end 16 | 17 | function LitheStalker.OnLeaveCombat(event, creature) 18 | creature:SendUnitSay("Mmmm....", 0) 19 | creature:RemoveEvents() 20 | end 21 | 22 | function LitheStalker.OnDied(event, creature, killer) 23 | if(killer:GetObjectType() == "Player") then 24 | killer:SendBroadcastMessage("You killed " ..creature:GetName().."!") 25 | end 26 | creature:RemoveEvents() 27 | end 28 | 29 | RegisterCreatureEvent(400015, 1, LitheStalker.OnEnterCombat) 30 | RegisterCreatureEvent(400015, 2, LitheStalker.OnLeaveCombat) 31 | RegisterCreatureEvent(400015, 4, LitheStalker.OnDied) -------------------------------------------------------------------------------- /Yelmek.lua: -------------------------------------------------------------------------------- 1 | local Yelmek = {}; 2 | 3 | function Yelmek.OnGossipHello(event, player, object) 4 | player:GossipClearMenu() 5 | player:GossipMenuAddItem(0, "What happened here?", 0, 0) 6 | player:GossipSendMenu(1, object) 7 | end 8 | 9 | function Yelmek.OnGossipSelect(event, player, object, sender, intid, code, menuid) 10 | if (intid == 0) then 11 | object:SendUnitSay("Man...I really overdid it this time. I don't really want to go into detail...You can see the results for yourself...", 0) 12 | end 13 | end 14 | 15 | RegisterCreatureGossipEvent(400062, 1, Yelmek.OnGossipHello) 16 | RegisterCreatureGossipEvent(400062, 2, Yelmek.OnGossipSelect) -------------------------------------------------------------------------------- /allweapons.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Day36512/RandomScriptsforAzerothCore/b5a08bde3e0a8b545edd42118dc2c7f401502452/allweapons.zip -------------------------------------------------------------------------------- /buff.lua: -------------------------------------------------------------------------------- 1 | local cmd = "buff" 2 | 3 | local auras = { 71954 } 4 | 5 | local function OnCommand(event, player, command) 6 | if command == cmd then 7 | if not player:IsInCombat() then 8 | for i = 2, #auras, 1 do 9 | player:AddAura(auras[i], player) 10 | end 11 | player:CastSpell(player, auras[1], true) 12 | else 13 | player:SendNotification("You're on combat!") 14 | end 15 | return false 16 | end 17 | end 18 | RegisterPlayerEvent(42, OnCommand) 19 | -------------------------------------------------------------------------------- /quest_30018_trash_bunnies.lua: -------------------------------------------------------------------------------- 1 | local INVISIBLE_BUNNY_ENTRY = 400099 2 | local SPELL_TO_CAST = 364735 3 | 4 | local InvisibleBunny = {} 5 | 6 | function InvisibleBunny.OnSpawn(event, creature) 7 | creature:RegisterEvent(InvisibleBunny.CastSpellRandomly, math.random(18000, 34000), 4) 8 | end 9 | 10 | function InvisibleBunny.CastSpellRandomly(event, delay, calls, creature) 11 | creature:CastSpell(creature, SPELL_TO_CAST, true) 12 | 13 | end 14 | 15 | RegisterCreatureEvent(INVISIBLE_BUNNY_ENTRY, 5, InvisibleBunny.OnSpawn) 16 | -------------------------------------------------------------------------------- /quest_30018_undead_bunny.lua: -------------------------------------------------------------------------------- 1 | local UNDEAD_BUNNY_ENTRY = 400100 2 | local SPELL_TO_CAST = 364736 3 | local CAST_DELAY = 120000 4 | 5 | local UndeadBunny = {} 6 | 7 | function UndeadBunny.OnSpawn(event, creature) 8 | creature:RegisterEvent(UndeadBunny.CastSpellAfterDelay, CAST_DELAY, 1) 9 | end 10 | 11 | function UndeadBunny.CastSpellAfterDelay(event, delay, calls, creature) 12 | creature:CastSpell(creature, SPELL_TO_CAST, true) 13 | end 14 | 15 | RegisterCreatureEvent(UNDEAD_BUNNY_ENTRY, 5, UndeadBunny.OnSpawn) -- 5 is the event for creature spawn 16 | -------------------------------------------------------------------------------- /reload_scripts.lua: -------------------------------------------------------------------------------- 1 | function reloadElunaEngine(event, player, command) 2 | if command == "reload scripts" or command == "reloadscripts" then 3 | ReloadEluna() 4 | end 5 | end 6 | 7 | RegisterPlayerEvent(42, reloadElunaEngine) -------------------------------------------------------------------------------- /repair.lua: -------------------------------------------------------------------------------- 1 | local cmd = "repairall" 2 | 3 | local function OnCommand(event, player, command) 4 | if command == cmd then 5 | if not player:IsInCombat() then 6 | player:DurabilityRepairAll( false ) 7 | player:SendBroadcastMessage("Your equipment has been repaired.") 8 | end 9 | return false 10 | end 11 | end 12 | RegisterPlayerEvent(42, OnCommand) -------------------------------------------------------------------------------- /reset_instances.lua: -------------------------------------------------------------------------------- 1 | local cmd = "resetid" 2 | 3 | local function OnCommand(event, player, command) 4 | if command == cmd then 5 | if not player:IsInCombat() then 6 | player:UnbindAllInstances() 7 | player:SendBroadcastMessage("Your instance ID's have been reset.") 8 | end 9 | return false 10 | end 11 | end 12 | RegisterPlayerEvent(42, OnCommand) --------------------------------------------------------------------------------