mirror of
https://github.com/araxiaonline/RandomScriptsforAzerothCore.git
synced 2026-06-13 02:22:19 -04:00
Add files via upload
This commit is contained in:
9
Stormwind/Alleria1.lua
Normal file
9
Stormwind/Alleria1.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
local npcid = 400019
|
||||
|
||||
function OnSpawn(event, creature)
|
||||
creature:SetWalk(true)
|
||||
creature:MoveWaypoint()
|
||||
creature:SetReactState(0)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(npcid, 5, OnSpawn)
|
||||
84
Stormwind/Alleria2.lua
Normal file
84
Stormwind/Alleria2.lua
Normal file
@@ -0,0 +1,84 @@
|
||||
local Alleria = {};
|
||||
|
||||
function Alleria.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Alleria.CastFD, 1, 1)
|
||||
creature:RegisterEvent(Alleria.CastRoot, 10300, 1)
|
||||
creature:RegisterEvent(Alleria.CastDisengage, 10400, 1)
|
||||
creature:RegisterEvent(Alleria.CastRapidShot, 7100, 0)
|
||||
creature:RegisterEvent(Alleria.CastMultiShot, 6100, 0)
|
||||
creature:RegisterEvent(Alleria.CastExplosiveShot, 6600, 0)
|
||||
creature:RegisterEvent(Alleria.CastBlackArrow, 15300, 0)
|
||||
creature:RegisterEvent(Alleria.CastShoot, 499, 0)
|
||||
creature:RegisterEvent(Alleria.ForceDespawn, 90000, 1)
|
||||
end
|
||||
|
||||
function Alleria.OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function Alleria.OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function Alleria.CastRapidShot(event, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
if not creature:IsCasting() or creature:IsCastingSpell(71251) then
|
||||
creature:CastSpell(victim, 71251, true)
|
||||
end
|
||||
end
|
||||
|
||||
function Alleria.CastShoot(event, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
if not creature:IsCasting() or not creature:IsCastingSpell(71251) then
|
||||
creature:CastSpell(victim, 39079, true)
|
||||
end
|
||||
end
|
||||
|
||||
function Alleria.CastMultiShot(event, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
if not creature:IsCasting() or not creature:IsCastingSpell(71251) then
|
||||
creature:CastSpell(victim, 59713, false)
|
||||
end
|
||||
end
|
||||
|
||||
function Alleria.CastExplosiveShot(event, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
if not creature:IsCasting() or not creature:IsCastingSpell(71251) then
|
||||
creature:CastSpell(victim, 60053, false)
|
||||
end
|
||||
end
|
||||
|
||||
function Alleria.CastBlackArrow(event, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
if not creature:IsCasting() or not creature:IsCastingSpell(71251) then
|
||||
creature:CastSpell(victim, 63672, false)
|
||||
end
|
||||
end
|
||||
|
||||
function Alleria.CastDisengage(event, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
if not creature:IsCasting() or not creature:IsCastingSpell(71251) then
|
||||
creature:CastSpell(victim, 57635, false)
|
||||
end
|
||||
end
|
||||
|
||||
function Alleria.CastFD(event, delay, calls, creature)
|
||||
if not creature:IsCasting() or not creature:IsCastingSpell(71251) then
|
||||
creature:CastSpell(creature, 23604, false)
|
||||
end
|
||||
end
|
||||
|
||||
function Alleria.CastRoot(event, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
if not creature:IsCasting() or not creature:IsCastingSpell(71251) then
|
||||
creature:CastSpell(victim, 50762, false)
|
||||
end
|
||||
end
|
||||
|
||||
function Alleria.ForceDespawn(event, delay, calls, creature)
|
||||
creature:DespawnOrUnsummon(1)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400021, 1, Alleria.OnEnterCombat)
|
||||
RegisterCreatureEvent(400021, 2, Alleria.OnLeaveCombat)
|
||||
RegisterCreatureEvent(400021, 4, Alleria.OnDied)
|
||||
41
Stormwind/AllianceMage.lua
Normal file
41
Stormwind/AllianceMage.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
local mageNPC = 400027
|
||||
local conjuredCinnamonRolls = 22895
|
||||
local arcaneIntellect = 10157
|
||||
|
||||
local function OnGossipHello(event, player, creature)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\inv_misc_food_73cinnamonroll:50:50:-13:0|tTake some Conjured Cinnamon Rolls", 0, 1, false, "", 0)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\Spell_Holy_Magicalsentry:50:50:-13:0|tCast Arcane Intellect", 0, 2, false, "", 0)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
|
||||
local function OnGossipSelect(event, player, creature, sender, intid, code, menuid)
|
||||
if intid == 1 then
|
||||
player:AddItem(conjuredCinnamonRolls, 5)
|
||||
player:SendBroadcastMessage("Enjoy the sweet taste of magic! Here are 5 Conjured Cinnamon Rolls.")
|
||||
elseif intid == 2 then
|
||||
player:CastSpell(player, arcaneIntellect, true)
|
||||
player:SendBroadcastMessage("You feel your mind become more focused as Arcane Intellect takes hold.")
|
||||
end
|
||||
player:GossipComplete()
|
||||
end
|
||||
|
||||
local function YellDialogue(event, creature)
|
||||
-- List of unit say options
|
||||
local unitSayOptions = {
|
||||
"Greetings, adventurer! Would you like some refreshment?",
|
||||
"Welcome traveler! Are you in need of some sustenance?",
|
||||
"Let me offer you some conjured treats and a bit of intellectual enhancement.",
|
||||
"You look like you could use a boost. How about some Conjured Cinnamon Rolls and Arcane Intellect?",
|
||||
"Good day! I have some delectable Conjured Cinnamon Rolls and the power of Arcane Intellect for you.",
|
||||
"Step right up! I have some of the finest Conjured Cinnamon Rolls and a touch of Arcane Intellect for you."
|
||||
}
|
||||
-- Choose a random unit say option
|
||||
local randomOption = unitSayOptions[math.random(#unitSayOptions)]
|
||||
creature:SendUnitSay(randomOption, 0)
|
||||
end
|
||||
|
||||
RegisterCreatureGossipEvent(mageNPC, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(mageNPC, 2, OnGossipSelect)
|
||||
|
||||
-- triggers the yell function on spawn
|
||||
RegisterCreatureEvent(mageNPC, 5, function(event, creature) YellDialogue(event, creature) end)
|
||||
36
Stormwind/AllianceMage2.lua
Normal file
36
Stormwind/AllianceMage2.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
local AMage = {}
|
||||
|
||||
local function CastFireball(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 38692, true)
|
||||
end
|
||||
|
||||
local function CastFrostbolt(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 27071, true)
|
||||
end
|
||||
|
||||
local function CastBlizzard(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 42213, true)
|
||||
end
|
||||
|
||||
local function CastArcaneExplosion(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 19712, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastFireball, 3600, 0)
|
||||
creature:RegisterEvent(CastFrostbolt, 7200, 0)
|
||||
creature:RegisterEvent(CastBlizzard, 9000, 0)
|
||||
creature:RegisterEvent(CastArcaneExplosion, 10800, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400027, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400027, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400027, 4, OnDied)
|
||||
30
Stormwind/AlliancePaladin.lua
Normal file
30
Stormwind/AlliancePaladin.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
local AlliancePaladin = 400030
|
||||
local kingsSpell = 25898
|
||||
local wisdomSpell = 25918
|
||||
local mightSpell = 25916
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:CastSpell(creature, kingsSpell, true)
|
||||
end
|
||||
|
||||
local function OnGossipHello(event, player, creature)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_magic_magearmor:50:50:-13:0|tGrant me a Blessing of Kings", 0, 1, false, "", 0)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_holy_sealofwisdom:50:50:-13:0|tGrant me a Blessing of Wisdom", 0, 2, false, "", 0)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_holy_fistofjustice:50:50:-13:0|tGrant me a Blessing of Might", 0, 3, false, "", 0)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
|
||||
local function OnGossipSelect(event, player, creature, sender, intid, code, menuid)
|
||||
if intid == 1 then
|
||||
player:CastSpell(player, kingsSpell, true)
|
||||
elseif intid == 2 then
|
||||
player:CastSpell(player, wisdomSpell, true)
|
||||
elseif intid == 3 then
|
||||
player:CastSpell(player, mightSpell, true)
|
||||
end
|
||||
player:GossipComplete()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(AlliancePaladin, 5, OnSpawn)
|
||||
RegisterCreatureGossipEvent(AlliancePaladin, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(AlliancePaladin, 2, OnGossipSelect)
|
||||
50
Stormwind/AlliancePaladin2.lua
Normal file
50
Stormwind/AlliancePaladin2.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
local AlliancePaladin = {}
|
||||
|
||||
local function CastCS(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 35395, true)
|
||||
end
|
||||
|
||||
local function CastCons(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 20924, true)
|
||||
end
|
||||
|
||||
local function CastDS(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 53385, true)
|
||||
end
|
||||
|
||||
local function CastJOL(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 20271, true)
|
||||
end
|
||||
|
||||
local function CastAvengingWrath(event, creature)
|
||||
creature:CastSpell(creature, 31884, true)
|
||||
end
|
||||
|
||||
local function CastKings(event, creature)
|
||||
creature:CastSpell(creature, 20217, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastCS, 6000, 0)
|
||||
creature:RegisterEvent(CastCons, 8000, 0)
|
||||
creature:RegisterEvent(CastDS, 10000, 0)
|
||||
creature:RegisterEvent(CastJOL, 11000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:CastSpell(creature, 20217, true)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400030, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400030, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400030, 4, OnDied)
|
||||
RegisterCreatureEvent(400030, 5, OnSpawn)
|
||||
|
||||
48
Stormwind/AlliancePriest.lua
Normal file
48
Stormwind/AlliancePriest.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
local lightwellNPC = 400026
|
||||
local lightwellSpell = 27870
|
||||
local fortitudeSpell = 10938
|
||||
local divineSpiritSpell = 27841
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:CastSpell(creature, lightwellSpell, true)
|
||||
end
|
||||
|
||||
local function OnGossipHello(event, player, creature)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\Spell_Holy_SummonLightwell:50:50:-13:0|tCast Lightwell", 0, 1, false, "", 0)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\Spell_Holy_WordFortitude:50:50:-13:0|tCast Power Word: Fortitude", 0, 2, false, "", 0)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\Spell_Holy_DivineSpirit:50:50:-13:0|tCast Divine Spirit", 0, 3, false, "", 0)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
|
||||
local function OnGossipSelect(event, player, creature, sender, intid, code, menuid)
|
||||
if intid == 1 then
|
||||
player:CastSpell(player, lightwellSpell, true)
|
||||
elseif intid == 2 then
|
||||
player:CastSpell(player, fortitudeSpell, true)
|
||||
elseif intid == 3 then
|
||||
player:CastSpell(player, divineSpiritSpell, true)
|
||||
end
|
||||
player:GossipComplete()
|
||||
end
|
||||
|
||||
local function YellDialogue(event, creature)
|
||||
-- List of unit say options
|
||||
local unitSayOptions = {
|
||||
"May the light guide your paths.",
|
||||
"Blessings upon you, traveler.",
|
||||
"The light is always with you. Come, let me grant you a blessing.",
|
||||
"May the light guide you on your journey.",
|
||||
"The power of the light is yours for the asking.",
|
||||
"Let me bring the light to your path."
|
||||
}
|
||||
-- Choose a random unit say option
|
||||
local randomOption = unitSayOptions[math.random(#unitSayOptions)]
|
||||
creature:SendUnitSay(randomOption, 0)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(lightwellNPC, 5, OnSpawn)
|
||||
RegisterCreatureGossipEvent(lightwellNPC, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(lightwellNPC, 2, OnGossipSelect)
|
||||
|
||||
-- triggers the yell function on spawn
|
||||
RegisterCreatureEvent(lightwellNPC, 5, function(event, creature) YellDialogue(event, creature) end)
|
||||
31
Stormwind/AlliancePriest2.lua
Normal file
31
Stormwind/AlliancePriest2.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
local APriest = {};
|
||||
|
||||
local function CastSmite(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 48122, true)
|
||||
end
|
||||
|
||||
local function CastHolyFire(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 48134, true)
|
||||
end
|
||||
|
||||
local function CastSWP(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 27605, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastSmite, 2600, 0)
|
||||
creature:RegisterEvent(CastHolyFire, 5000, 0)
|
||||
creature:RegisterEvent(CastSWP, 15000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400026, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400026, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400026, 4, OnDied)
|
||||
29
Stormwind/AllianceWarHerald.lua
Normal file
29
Stormwind/AllianceWarHerald.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
local NPC_ID = 35200 -- replace with the NPC's ID
|
||||
local BLESSING_SPELL_ID = 100003 -- replace with the first spell ID
|
||||
local SOULSTONE_SPELL_ID = 20707 -- replace with the second spell ID
|
||||
|
||||
local function OnGossipHello(event, player, creature)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\Spell_Holy_ReviveChampion:50:50:-43:0|tReceive the King's blessing", 0, 1, false, "", 0)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\inv_misc_orb_04:50:50:-43:0|tReceive a Soulstone", 0, 2, false, "", 0)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
|
||||
local function OnGossipSelect(event, player, creature, sender, intid, code, menuid)
|
||||
if intid == 1 then
|
||||
player:CastSpell(player, BLESSING_SPELL_ID, true)
|
||||
elseif intid == 2 then
|
||||
player:CastSpell(player, SOULSTONE_SPELL_ID, true)
|
||||
end
|
||||
player:GossipComplete()
|
||||
end
|
||||
|
||||
local function YellDialogue(event, creature)
|
||||
creature:SendUnitYell("Adventurers, do not go unprepared! Come speak with me and I will grant you a blessing!", 0)
|
||||
end
|
||||
|
||||
RegisterCreatureGossipEvent(NPC_ID, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(NPC_ID, 2, OnGossipSelect)
|
||||
|
||||
-- triggers the yell function on spawn
|
||||
RegisterCreatureEvent(NPC_ID, 5, function(event, creature) YellDialogue(event, creature) end)
|
||||
|
||||
57
Stormwind/ArchBishopBen.lua
Normal file
57
Stormwind/ArchBishopBen.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
local ABishop = {}
|
||||
|
||||
local function CastHolyB(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
creature:CastSpell(creature:GetVictim(), 59700, false)
|
||||
end
|
||||
end
|
||||
|
||||
local function CastHolyFire(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
creature:CastSpell(creature:GetVictim(), 48134, false)
|
||||
end
|
||||
end
|
||||
|
||||
local function CastSWP(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
creature:CastSpell(creature:GetVictim(), 27605, false)
|
||||
end
|
||||
end
|
||||
|
||||
local function CastHV(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
creature:CastSpell(creature:GetVictim(), 37959, false)
|
||||
end
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:PlayDirectSound(20417)
|
||||
creature:RegisterEvent(CastHolyB, 4600, 0)
|
||||
creature:RegisterEvent(CastHolyFire, 1500, 0)
|
||||
creature:RegisterEvent(CastSWP, 15000, 0)
|
||||
creature:RegisterEvent(CastHV, 25000, 0)
|
||||
|
||||
local yellOptions = { "I am the Light's instrument of justice!", "I shall smite the unholy!", "The Light will purify you!", "For the glory of the holy Light!", "In the name of the Light, I will crush you!", "The Light shall guide my every strike!", "You stand no chance against the holy power within me!", "I am the Light's chosen champion!" }
|
||||
local randomIndex = math.random(1, 8)
|
||||
local selectedYell = yellOptions[randomIndex]
|
||||
creature:SendUnitYell(selectedYell, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function OnSpawn(event, creature)
|
||||
creature:SetMaxHealth(1321000)
|
||||
creature:SetMaxPower(0, 13400000)
|
||||
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(1284, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(1284, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(1284, 4, OnDied)
|
||||
RegisterCreatureEvent(1284, 5, OnSpawn)
|
||||
46
Stormwind/Bolvar.lua
Normal file
46
Stormwind/Bolvar.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
local Bolvar = {}
|
||||
|
||||
local function CastAS(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 32699, true)
|
||||
end
|
||||
|
||||
local function CastHOR(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 53595, true)
|
||||
end
|
||||
|
||||
local function CastSunder(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 58461, true)
|
||||
end
|
||||
|
||||
local function CastAvengingWrath(event, creature)
|
||||
creature:CastSpell(creature, 31884, true)
|
||||
end
|
||||
|
||||
local function CastKings(event, creature)
|
||||
creature:CastSpell(creature, 20217, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastAS, 12600, 0)
|
||||
creature:RegisterEvent(CastHOR, 5000, 0)
|
||||
creature:RegisterEvent(CastSunder, 10000, 0)
|
||||
creature:RegisterEvent(CastAvengingWrath, 1, 1)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:CastSpell(creature, 20217, true)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(1748, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(1748, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(1748, 4, OnDied)
|
||||
RegisterCreatureEvent(1748, 5, OnSpawn)
|
||||
|
||||
49
Stormwind/Bolvar2.lua
Normal file
49
Stormwind/Bolvar2.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
local Bolvar = 1748
|
||||
local kingsSpell = 25898
|
||||
local wisdomSpell = 25918
|
||||
local mightSpell = 25916
|
||||
|
||||
-- Sound ID for the blessing of kings
|
||||
local KINGS_SOUND_ID = 20423
|
||||
|
||||
-- Emote ID for the blessing of kings
|
||||
local KINGS_EMOTE_ID = 113
|
||||
|
||||
-- Sound ID for the blessing of wisdom
|
||||
local WISDOM_SOUND_ID = 20424
|
||||
|
||||
-- Emote ID for the blessing of wisdom
|
||||
local WISDOM_EMOTE_ID = 153
|
||||
|
||||
local MIGHT_SOUND_ID = 20425
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:CastSpell(creature, kingsSpell, true)
|
||||
end
|
||||
|
||||
local function OnGossipHello(event, player, creature)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_magic_magearmor:50:50:-23:0|tGrant me a Blessing of Kings", 0, 1, false, "", 0)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_holy_sealofwisdom:50:50:-23:0|tGrant me a Blessing of Wisdom", 0, 2, false, "", 0)
|
||||
player:GossipMenuAddItem(9, "|TInterface\\Icons\\spell_holy_fistofjustice:50:50:-23:0|tGrant me a Blessing of Might", 0, 3, false, "", 0)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
|
||||
local function OnGossipSelect(event, player, creature, sender, intid, code, menuid)
|
||||
if intid == 1 then
|
||||
player:CastSpell(player, kingsSpell, true)
|
||||
creature:PlayDistanceSound(KINGS_SOUND_ID)
|
||||
creature:PerformEmote(KINGS_EMOTE_ID)
|
||||
elseif intid == 2 then
|
||||
player:CastSpell(player, wisdomSpell, true)
|
||||
creature:PlayDistanceSound(WISDOM_SOUND_ID)
|
||||
creature:PerformEmote(WISDOM_EMOTE_ID)
|
||||
elseif intid == 3 then
|
||||
player:CastSpell(player, mightSpell, true)
|
||||
creature:PlayDistanceSound(MIGHT_SOUND_ID)
|
||||
end
|
||||
player:GossipComplete()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(Bolvar, 5, OnSpawn)
|
||||
RegisterCreatureGossipEvent(Bolvar, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(Bolvar, 2, OnGossipSelect)
|
||||
21
Stormwind/Duthorian.lua
Normal file
21
Stormwind/Duthorian.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
local DuthorianRall = {};
|
||||
|
||||
local function CastJoL(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 20185, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastJoL, 5000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(6171, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(6171, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(6171, 4, OnDied)
|
||||
21
Stormwind/Laurena.lua
Normal file
21
Stormwind/Laurena.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
local Laurena = {};
|
||||
|
||||
local function CastSmite(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 10934, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastSmite, 3000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(376, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(376, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(376, 4, OnDied)
|
||||
68
Stormwind/Patchqwerk.lua
Normal file
68
Stormwind/Patchqwerk.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
local Patchqwerk = {};
|
||||
|
||||
function Patchqwerk.OnSpawn(event, creature)
|
||||
creature:SendUnitYell("Patchqwerk make Lich King proud! You die now!",0)
|
||||
creature:CastSpell(creature, 46587, true)
|
||||
end
|
||||
|
||||
function Patchqwerk.PoisonBoltVolley(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 40095, true)
|
||||
end
|
||||
|
||||
function Patchqwerk.SummonOozeling(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 12250, true)
|
||||
end
|
||||
|
||||
function Patchqwerk.CastHatefulStrike(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 28308, true)
|
||||
end
|
||||
|
||||
function Patchqwerk.CastGore(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 48130, true)
|
||||
end
|
||||
|
||||
function Patchqwerk.OnEnterCombat(event, creature, target)
|
||||
if (math.random(1, 100) <= 25) then
|
||||
local yellOptions = { "Patchqwerk huuuuungry!", "Time for a snack!", "You're mine now!", "You look delicious. Patchqwerk eat you now!", "I not eat in days, time to feast!", "Me smash and eat you now!", "Me so hungry, me eat anything... even you!" }
|
||||
local randomIndex = math.random(1, 7)
|
||||
local selectedYell = yellOptions[randomIndex]
|
||||
creature:SendUnitYell(selectedYell, 0)
|
||||
end
|
||||
creature:RegisterEvent(Patchqwerk.PoisonBoltVolley, 7000, 0)
|
||||
creature:RegisterEvent(Patchqwerk.CastHatefulStrike, 15000, 0)
|
||||
creature:RegisterEvent(Patchqwerk.CastGore, 20000, 0)
|
||||
creature:RegisterEvent(Patchqwerk.SummonOozeling, 10000, 0)
|
||||
end
|
||||
|
||||
function Patchqwerk.OnLeaveCombat(event, creature)
|
||||
if (math.random(1, 100) <= 25) then
|
||||
local yellOptions = { "You not so tasty afterall...", "I be back for seconds!", "No more play? Too bad...", "Maybe next time you taste better!","Me still hungry, come back later!","You not enough food, me go find more!", "Aww...You no stay for dinner? You make Patchqwerk sad." }
|
||||
local randomIndex = math.random(1, 7)
|
||||
local selectedYell = yellOptions[randomIndex]
|
||||
creature:SendUnitYell(selectedYell, 0)
|
||||
end
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function Patchqwerk.OnDied(event, creature, killer)
|
||||
creature:SendUnitYell("Patchqwerk forget to chew...", 0)
|
||||
if(killer:GetObjectType() == "Player") then
|
||||
killer:SendBroadcastMessage("You killed " ..creature:GetName().."!")
|
||||
end
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function Patchqwerk.CheckHealth(event, creature)
|
||||
if (creature:HealthBelowPct(20)) then
|
||||
creature:SendUnitYell("Patchqwerk go berserk!", 0)
|
||||
creature:CastSpell(creature, 41305, true)
|
||||
elseif (creature:HealthAbovePct(95)) then
|
||||
creature:CastSpell(creature, 46587, true)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400012, 1, Patchqwerk.OnEnterCombat)
|
||||
RegisterCreatureEvent(400012, 2, Patchqwerk.OnLeaveCombat)
|
||||
RegisterCreatureEvent(400012, 4, Patchqwerk.OnDied)
|
||||
RegisterCreatureEvent(400012, 5, Patchqwerk.OnSpawn)
|
||||
RegisterCreatureEvent(400012, 6, Patchqwerk.CheckHealth)
|
||||
46
Stormwind/PatchwerkHorror.lua
Normal file
46
Stormwind/PatchwerkHorror.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
local PatchWorkHorror = {};
|
||||
|
||||
local function AcidSpit(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 61597, true)
|
||||
end
|
||||
|
||||
local function CastSpecialSpell(eventId, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
if not victim then
|
||||
return
|
||||
end
|
||||
if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then
|
||||
creature:CastSpell(victim, 5, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function CastBludgeoningStrike(eventId, delay, calls, creature)
|
||||
local targets = creature:GetAITargets(10)
|
||||
if #targets == 0 then
|
||||
return
|
||||
end
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 60870, true)
|
||||
end
|
||||
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(AcidSpit, 7000, 0)
|
||||
creature:RegisterEvent(CastBludgeoningStrike, 13000, 0)
|
||||
creature:RegisterEvent(CastSpecialSpell, 1000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:DespawnOrUnsummon(5000)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400054, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400054, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400054, 4, OnDied)
|
||||
|
||||
38
Stormwind/PatchworkHorror2.lua
Normal file
38
Stormwind/PatchworkHorror2.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
local PatchWorkHorror2 = {};
|
||||
|
||||
local function AcidSpit(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 61597, true)
|
||||
end
|
||||
|
||||
local function KnockAway(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 10101, true)
|
||||
end
|
||||
|
||||
|
||||
function CastBludgeoningStrike(eventId, delay, calls, creature)
|
||||
local targets = creature:GetAITargets(10)
|
||||
if #targets == 0 then
|
||||
return
|
||||
end
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 60870, true)
|
||||
end
|
||||
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(AcidSpit, 7000, 0)
|
||||
creature:RegisterEvent(CastBludgeoningStrike, 13000, 0)
|
||||
creature:RegisterEvent(KnockAway, 16000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(10414, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(10414, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(10414, 4, OnDied)
|
||||
31
Stormwind/SW-Archer.lua
Normal file
31
Stormwind/SW-Archer.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
local Archer = {};
|
||||
|
||||
local function CastShoot(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 37770, true)
|
||||
end
|
||||
|
||||
local function CastSerpentSting(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 36984, true)
|
||||
end
|
||||
|
||||
local function CastMultiShot(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 30990, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastShoot, 750, 0)
|
||||
creature:RegisterEvent(CastShoot, 15000, 0)
|
||||
creature:RegisterEvent(CastMultiShot, 5000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400033, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400033, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400033, 4, OnDied)
|
||||
40
Stormwind/SW-Guard.lua
Normal file
40
Stormwind/SW-Guard.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
--Made by Dinkledork. This script defines a table of 26 battle cries for a creature with ID 400014. When the creature spawns, it will randomly select one of the 26 dialogues and use it in a yell.
|
||||
|
||||
local SwHorse = {}; --ID from creature_template
|
||||
|
||||
local dialogues = {
|
||||
"Defend our lands with all you've got!",
|
||||
"Victory is ours, if we stand together!",
|
||||
"We are the shield that protects our people!",
|
||||
"Show no mercy to those who would harm us!",
|
||||
"Justice for our fallen!",
|
||||
"Stand firm, for the future of our kingdom!",
|
||||
"Today, we fight for everything we hold dear!",
|
||||
"Let our enemies know that we will not be broken!",
|
||||
"With honor and bravery, we will triumph!",
|
||||
"We will not bow down to tyranny!",
|
||||
"Rise up and defend our way of life!",
|
||||
"In the face of danger, we stand strong!",
|
||||
"For our families, for our friends, we fight!",
|
||||
"Our cause is just, our resolve unbreakable!",
|
||||
"Glory awaits those who face the fray!",
|
||||
"No quarter for the enemy!",
|
||||
"Hold the line, for the sake of all!",
|
||||
"Today, we make history with our bravery!",
|
||||
"The battle is upon us!",
|
||||
"We fight for the defense of our homeland!",
|
||||
"Make them pay for every inch they gain!",
|
||||
"For the Alliance!",
|
||||
"Ready yourselves for battle!",
|
||||
"Prepare yourselves for the oncoming assault!",
|
||||
"Steady yourselves, men. A terrible enemy approaches!",
|
||||
"Don't let the enemy make it to the castle!"
|
||||
}
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
local randomDialogue = dialogues[math.random(26)] -- Selects a random dialogue from the "dialogues" table
|
||||
creature:SendUnitYell(randomDialogue,0) -- Makes the creature yell the selected dialogue
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400014, 5, OnSpawn) -- Registers the "OnSpawn" function as a spawn event for the creature with ID 400014
|
||||
|
||||
36
Stormwind/SW-GuardCleave.lua
Normal file
36
Stormwind/SW-GuardCleave.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
local Stormwind = {};
|
||||
|
||||
local function CastCleave(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 20677, true)
|
||||
end
|
||||
|
||||
local function CastSunderArmor(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 8380, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastCleave, 5000, 0)
|
||||
creature:RegisterEvent(CastSunderArmor, 7000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:CastSpell(creature, 17683, true)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400013, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400013, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400013, 4, OnDied)
|
||||
RegisterCreatureEvent(400013, 5, OnSpawn)
|
||||
|
||||
RegisterCreatureEvent(400039, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400039, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400039, 4, OnDied)
|
||||
RegisterCreatureEvent(400039, 5, OnSpawn)
|
||||
17
Stormwind/SWDefenders.lua
Normal file
17
Stormwind/SWDefenders.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local NPC_ENTRY_ID_1 = 400022
|
||||
local NPC_ENTRY_ID_2 = 400023
|
||||
local NPC_ENTRY_ID_3 = 400024
|
||||
local NPC_ENTRY_ID_4 = 400025
|
||||
|
||||
function OnSpawn(event, creature)
|
||||
local npcEntry = creature:GetEntry()
|
||||
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
|
||||
creature:SetWalk(false) -- Set movement type to run
|
||||
creature:MoveWaypoint()
|
||||
end
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(NPC_ENTRY_ID_1, 5, OnSpawn)
|
||||
RegisterCreatureEvent(NPC_ENTRY_ID_2, 5, OnSpawn)
|
||||
RegisterCreatureEvent(NPC_ENTRY_ID_3, 5, OnSpawn)
|
||||
RegisterCreatureEvent(NPC_ENTRY_ID_4, 5, OnSpawn)
|
||||
27
Stormwind/SWGKillCred.lua
Normal file
27
Stormwind/SWGKillCred.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
local SWG_ID = {68, 400013, 400033, 400014, 1976}
|
||||
local SPELL_ID = 100141
|
||||
|
||||
function OnSpellCast(event, caster, spell)
|
||||
local target = spell:GetTarget()
|
||||
if target and spell:GetEntry() == SPELL_ID then
|
||||
local isValidTarget = false
|
||||
for _, swgID in ipairs(SWG_ID) do
|
||||
if target:GetEntry() == swgID then
|
||||
isValidTarget = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not isValidTarget then
|
||||
caster:SendBroadcastMessage("That target is not valid.")
|
||||
spell:Cancel()
|
||||
elseif target:HasAura(SPELL_ID) then
|
||||
caster:SendBroadcastMessage("Target has already been empowered.")
|
||||
spell:Cancel()
|
||||
else
|
||||
-- give kill credit to NPC ID 68
|
||||
caster:KilledMonsterCredit(68)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RegisterPlayerEvent(5, OnSpellCast)
|
||||
53
Stormwind/SWVillager.lua
Normal file
53
Stormwind/SWVillager.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
--Credits to Dinkledork.
|
||||
--I created this script to be used in a quest to calm down some frantic stormwind citizens.
|
||||
|
||||
local npcid = 400028
|
||||
local gossipText = "Get the Stormwind Citizen to calm down..."
|
||||
local itemId = 60083 -- Soothing spices as a test, required to interact with the npc. Can set to a given quest item.
|
||||
local spellId = 139
|
||||
|
||||
-- This function is called when the player first interacts with the NPC
|
||||
local function OnGossipHello(event, player, creature)
|
||||
-- Check if the player has the necessary item
|
||||
if (player:HasItem(itemId)) then
|
||||
-- Add the option to the gossip menu
|
||||
player:GossipMenuAddItem(0, gossipText, 0, 1)
|
||||
-- Send the gossip menu to the player
|
||||
player:GossipSendMenu(1, creature)
|
||||
else
|
||||
-- Send an error message to the player if they don't have the necessary item
|
||||
player:SendBroadcastMessage("They aren't responding to anything...Maybe you should go ask Arch Bishop Benedictus for help in the Cathedral of Light.")
|
||||
end
|
||||
end
|
||||
|
||||
-- This function is called when the player selects an option from the gossip menu
|
||||
local function OnGossipSelect(event, player, creature, sender, intid, code)
|
||||
-- Check if the selected option is the one we added in OnGossipHello
|
||||
if (intid == 1) then
|
||||
-- Remove the item from the player's inventory
|
||||
player:RemoveItem(itemId, 1)
|
||||
-- Remove all auras from the NPC. Important since they have a fear aura.
|
||||
creature:RemoveAllAuras()
|
||||
-- Give credit to the player for killing the NPC. Important for quest credit. The NPC literally dies.
|
||||
player:KilledMonsterCredit(npcid)
|
||||
-- Cast the spell on the NPC for visual effect.
|
||||
creature:CastSpell(creature, spellId, true)
|
||||
-- Choose a random dialogue for the NPC to say after interacting
|
||||
local randomDialogue = math.random(1, 3)
|
||||
if randomDialogue == 1 then
|
||||
creature:SendUnitSay("Oh, thank you for helping me come to my senses...I should be going now...", 0)
|
||||
elseif randomDialogue == 2 then
|
||||
creature:SendUnitSay("Thank you so much! I feel much better now...", 0)
|
||||
else
|
||||
creature:SendUnitSay("I can finally think clearly again, thank you!", 0)
|
||||
end
|
||||
-- Close the gossip menu
|
||||
player:GossipComplete()
|
||||
-- Despawn the NPC after a 5 second delay
|
||||
creature:DespawnOrUnsummon(5000)
|
||||
end
|
||||
end
|
||||
|
||||
-- Register the gossip events for the NPC
|
||||
RegisterCreatureGossipEvent(npcid, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(npcid, 2, OnGossipSelect)
|
||||
78
Stormwind/Shailiea.lua
Normal file
78
Stormwind/Shailiea.lua
Normal file
@@ -0,0 +1,78 @@
|
||||
local Hunter = {};
|
||||
|
||||
local function CastRapidShot(eventId, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
creature:CastSpell(victim, 71251, true)
|
||||
end
|
||||
|
||||
local function CastSummonTamedBear(eventId, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
creature:CastSpell(victim, 7903, true)
|
||||
end
|
||||
|
||||
local function CastWhirlwind(eventId, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
creature:CastSpell(victim, 1680, false)
|
||||
end
|
||||
|
||||
local function CastExplosiveTrap(eventId, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
creature:CastSpell(victim, 49066, false)
|
||||
end
|
||||
|
||||
local function CastMortalStrike(eventId, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
creature:CastSpell(victim, 30330, false)
|
||||
end
|
||||
|
||||
local function CastDisengage(eventId, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
creature:CastSpell(victim, 57635, false)
|
||||
end
|
||||
|
||||
local function CastRoot(eventId, delay, calls, creature)
|
||||
local victim = creature:GetVictim()
|
||||
creature:CastSpell(victim, 50762, false)
|
||||
end
|
||||
|
||||
local function CastFD(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 23604, false)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
local sayings = {
|
||||
"You dare enter my territory?",
|
||||
"I'll make sure you never come back!",
|
||||
"You won't make it out of here alive!",
|
||||
"You're nothing but prey to me!"
|
||||
}
|
||||
local index = math.random(1, #sayings)
|
||||
creature:SendUnitSay(sayings[index], 0)
|
||||
creature:RegisterEvent(CastFD, 100, 1)
|
||||
creature:RegisterEvent(CastRoot, 10300, 0)
|
||||
creature:RegisterEvent(CastDisengage, 10400, 0)
|
||||
creature:RegisterEvent(CastRapidShot, 11000, 0)
|
||||
creature:RegisterEvent(CastWhirlwind, 6100, 0)
|
||||
creature:RegisterEvent(CastExplosiveTrap, 12600, 0)
|
||||
creature:RegisterEvent(CastMortalStrike, 5300, 0)
|
||||
creature:RegisterEvent(CastSummonTamedBear, 5, 1)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:SendUnitSay("You are not worth my time.", 0)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:SendUnitSay("You may have defeated me, but the hunt continues.", 0)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:SendUnitSay("The hunt begins.", 0)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(7295, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(7295, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(7295, 4, OnDied)
|
||||
RegisterCreatureEvent(7295, 5, OnSpawn)
|
||||
19
Stormwind/TrapQuestA.lua
Normal file
19
Stormwind/TrapQuestA.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Quest ID for the quest that should trigger the sound
|
||||
local QUEST_ID = 30004
|
||||
|
||||
-- Creature ID for the creature that gives the quest
|
||||
local CREATURE_ID = 12480
|
||||
|
||||
-- Sound ID for the sound that should play when the quest is accepted
|
||||
local SOUND_ID = 20426
|
||||
|
||||
-- Emote ID for the emote that should play when the quest is accepted
|
||||
local EMOTE_ID = 113
|
||||
|
||||
-- Register the event for quest acceptance
|
||||
RegisterCreatureEvent(CREATURE_ID, 31, function(event, player, creature, quest)
|
||||
if quest:GetId() == QUEST_ID then
|
||||
creature:PlayDistanceSound(SOUND_ID)
|
||||
creature:PerformEmote(EMOTE_ID)
|
||||
end
|
||||
end)
|
||||
19
Stormwind/TrapQuestR.lua
Normal file
19
Stormwind/TrapQuestR.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Quest ID for the quest that should trigger the sound
|
||||
local QUEST_ID = 30004
|
||||
|
||||
-- Creature ID for the creature that gives the quest
|
||||
local CREATURE_ID = 12480
|
||||
|
||||
-- Sound ID for the sound that should play when the quest is rewarded
|
||||
local SOUND_ID = 20427
|
||||
|
||||
-- Emote ID for the emote that should play when the quest is rewarded
|
||||
local EMOTE_ID = 113
|
||||
|
||||
-- Register the event for quest reward
|
||||
RegisterCreatureEvent(CREATURE_ID, 34, function(event, player, creature, quest)
|
||||
if quest:GetId() == QUEST_ID then
|
||||
creature:PlayDistanceSound(SOUND_ID)
|
||||
creature:PerformEmote(EMOTE_ID)
|
||||
end
|
||||
end)
|
||||
31
Stormwind/Turalyon1.lua
Normal file
31
Stormwind/Turalyon1.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
local npcid = 400018
|
||||
local spellid1 = 100138
|
||||
local spellid2 = 69930
|
||||
local spellid3 = 52386
|
||||
local yelltext = {
|
||||
"Defenders, forward! We end this beast here and now!",
|
||||
"We fight the Scourge to protect our homes, our families...I only hope we are not too late.",
|
||||
"",
|
||||
"Alleria...perfect timing as always.",
|
||||
}
|
||||
local waypointIndex = 0
|
||||
|
||||
function OnReachWp(event, creature, waypoint)
|
||||
if waypointIndex >= #yelltext then
|
||||
return
|
||||
end
|
||||
creature:CastSpell(creature, spellid1, true)
|
||||
creature:CastSpell(creature, spellid2, true)
|
||||
creature:CastSpell(creature, spellid3, true)
|
||||
creature:SendUnitSay(yelltext[waypointIndex + 1], 0)
|
||||
waypointIndex = waypointIndex + 1
|
||||
end
|
||||
|
||||
function OnSpawn(event, creature)
|
||||
waypointIndex = 0
|
||||
creature:MoveWaypoint()
|
||||
creature:SetReactState(0)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(npcid, 5, OnSpawn)
|
||||
RegisterCreatureEvent(npcid, 6, OnReachWp)
|
||||
47
Stormwind/Turalyon2.lua
Normal file
47
Stormwind/Turalyon2.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
local Turalyon = {};
|
||||
|
||||
local function CastCharge(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 22911, true)
|
||||
end
|
||||
|
||||
local function CastCrusaderStrike(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 66003, true)
|
||||
end
|
||||
|
||||
local function CastDivineStorm(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 53385, true)
|
||||
end
|
||||
|
||||
local function CastConsecration(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 69930, true)
|
||||
end
|
||||
|
||||
local function CastChallengingShout(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 1161, true)
|
||||
end
|
||||
|
||||
|
||||
local function ForceDespawn(eventId, delay, calls, creature)
|
||||
creature:DespawnOrUnsummon(1)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastCharge, 250, 1)
|
||||
creature:RegisterEvent(CastCrusaderStrike, 5000, 0)
|
||||
creature:RegisterEvent(CastDivineStorm, 10000, 0)
|
||||
creature:RegisterEvent(CastConsecration, 15000, 0)
|
||||
creature:RegisterEvent(CastChallengingShout, 6500, 0)
|
||||
creature:RegisterEvent(ForceDespawn, 90000, 1)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400020, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400020, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400020, 4, OnDied)
|
||||
Reference in New Issue
Block a user