Add files via upload

This commit is contained in:
Dinkledork
2023-03-21 02:26:56 -06:00
committed by GitHub
parent 2b50ae9df0
commit bd7b2fd4bb
26 changed files with 3354 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
local NPC_CAPTAIN_RATTLEBONES = 400115
local SPELL_SHADOW_BOLT = 20791
local SPELL_CURSE_OF_THE_PIRATE_KING = 70542
local SPELL_PIRATES_CLEAVE = 40505
local SPELL_CANNONBALL_BARRAGE = 6251
local YELL_AGGRO_DIALOGUE = {
"Ye be treadin' on dangerous waters!",
"Yarr, ye landlubbers be meetin' yer doom!",
"Arrr, ye won't leave me ship alive!",
"I be sendin' ye to the depths of the sea!",
"Ye be facin' the wrath of Captain Rattlebones!"
}
local YELL_DEATH_DIALOGUE = "Me ship...me crew...I be joinin' ye soon..."
local function CastShadowBolt(creature)
creature:CastSpell(creature:GetVictim(), SPELL_SHADOW_BOLT, false)
end
local function CastCurseOfThePirateKing(creature)
creature:CastSpell(creature:GetVictim(), SPELL_CURSE_OF_THE_PIRATE_KING, false)
end
local function CastPiratesCleave(creature)
creature:CastSpell(creature:GetVictim(), SPELL_PIRATES_CLEAVE, false)
end
local function CastCannonballBarrage(creature)
creature:CastSpell(creature:GetVictim(), SPELL_CANNONBALL_BARRAGE, false)
end
local function CaptainRattlebones_OnEnterCombat(event, creature, target)
creature:SendUnitYell(YELL_AGGRO_DIALOGUE[math.random(1, #YELL_AGGRO_DIALOGUE)], 0)
creature:RegisterEvent(CastShadowBolt, math.random(2000, 4000), 0)
creature:RegisterEvent(CastCurseOfThePirateKing, math.random(10000, 15000), 0)
creature:RegisterEvent(CastPiratesCleave, math.random(6000, 10000), 0)
creature:RegisterEvent(CastCannonballBarrage, math.random(15000, 20000), 0)
end
local function CaptainRattlebones_OnLeaveCombat(event, creature)
creature:RemoveEvents() -- Remove events when leaving combat
end
local function CaptainRattlebones_OnDied(event, creature, killer)
creature:RemoveEvents() -- Remove events when died
creature:SendUnitSay(YELL_DEATH_DIALOGUE, 0)
end
RegisterCreatureEvent(NPC_CAPTAIN_RATTLEBONES, 1, CaptainRattlebones_OnEnterCombat)
RegisterCreatureEvent(NPC_CAPTAIN_RATTLEBONES, 2, CaptainRattlebones_OnLeaveCombat)
RegisterCreatureEvent(NPC_CAPTAIN_RATTLEBONES, 4, CaptainRattlebones_OnDied)

60
HardcoreMode/Hardcore.lua Normal file
View File

@@ -0,0 +1,60 @@
--NPC id
local hcNPC = 90000
--This is how long the character is locked for - default is 32 years.
local banTimer = 999999999
--on death function - checks if player has token and bans character if it does.
local function PlayerDeath(event, killer, killed)
if killed:HasItem(90000,1) and killed:GetLevel() == 1 then
print(killed:GetName() .. " was killed by " .. killer:GetName())
SendWorldMessage(killed:GetName() .. " was killed by " .. killer:GetName())
Ban(1,killed:GetName(),banTimer)
end
end
--First Gossip Screen for NPC
function OnFirstTalk(event, player, unit)
if player:GetLevel() == 1 then
player:PlayDistanceSound(20431)
player:GossipMenuAddItem(0, "Looking for a challenge? Click here to try hardcore mode!", 0, 1)
player:GossipSendMenu(1, unit)
else
player:SendBroadcastMessage("You must be level 1 to access hardcore mode.")
player:PlayDistanceSound(20432)
player:GossipComplete()
end
end
--Selection for NPC gossip
function OnSelect(event, player, unit, sender, intid, code)
if intid == 1 then
player:PlayDistanceSound(20433)
player:GossipMenuAddItem(0, "Just double checking to make sure that you want to turn on hardcore mode. This will lock the character after death to be no longer playable, remove all your current gold, remove bonus starter items and Murky will no longer be with you! I will likely be adding rewards for reaching certain stages of the game later...", 0, 2)
player:GossipMenuAddItem(0, "NO TAKE ME BACK!", 0, 3)
player:GossipSendMenu(2, unit)
end
end
--if player chooses to do hardcore they receive the token and have custom items and Murky removed
function OnHardCore(event, player, unit, sender, intid, code)
if intid == 2 then
player:PlayDistanceSound(20434)
player:AddItem(90000, 1)
player:SetCoinage(0)
player:RemoveItem(60002, player:GetItemCount(60002))
player:RemoveItem(10594, player:GetItemCount(10594))
player:RemoveItem(65000, player:GetItemCount(65000))
player:RemoveSpell(24939)
player:RemoveSpell(100117)
player:RemoveSpell(100118)
--else gossip ends
else
player:GossipComplete()
player:PlayDistanceSound(20434)
end
end
RegisterCreatureGossipEvent(hcNPC, 1 , OnFirstTalk)
RegisterCreatureGossipEvent(hcNPC, 2, OnSelect)
RegisterCreatureGossipEvent(hcNPC, 2, OnHardCore)
RegisterPlayerEvent(8, PlayerDeath)

View File

@@ -0,0 +1,39 @@
local function hasItem90000(player)
return player:GetItemCount(90000) > 0
end
-- Remove custom starter items
local function removeItems(player)
local removed = false
local items = {60002, 10594, 65000}
for _, entry in ipairs(items) do
local itemCount = player:GetItemCount(entry)
if itemCount > 0 then
for i = 0, itemCount - 1 do
player:RemoveItem(entry, 1)
end
removed = true
end
end
return removed
end
-- Remove Murky
local function removeSpell(player)
player:RemoveSpell(24939)
player:RemoveSpell(100117)
player:RemoveSpell(100118)
end
-- Script body
local function onLogin(event, player)
if hasItem90000(player) then
if removeItems(player) then
player:SendBroadcastMessage("Welcome to Hardcore Mode. Please watch your step!")
end
removeSpell(player)
end
end
-- Register the script to be triggered on player login
RegisterPlayerEvent(3, onLogin)

View File

@@ -0,0 +1,38 @@
--Needs lots and lots of work. Register health check to event 9.
--Add true false statements to check if he's reached below 50.
--Don't remove events unnecessarily
local AbominableGreench = {};
function AbominableGreench.OnDie(event, creature)
creature:SendUnitYell("Argh... I'll be back!", 0)
end
function AbominableGreench.Enrage(event, delay, calls, creature)
if (creature:GetHealthPct() <= 50) then
creature:RemoveEvents()
creature:CastSpell(creature, 61369, true)
creature:RegisterEvent(AbominableGreench.FrostAttack, 4000, 0)
end
end
function AbominableGreench.FrostAttack(event, delay, calls, creature)
local TARGET = creature:GetAITarget(1, true, 0, 45)
creature:CastSpell(TARGET, 35263, true)
end
function AbominableGreench.OnEnterCombat(event, creature, target)
local TARGET = creature:GetAITarget(1, true, 0, 45)
creature:CastSpell(TARGET, 33547, true)
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)
creature:RegisterEvent(AbominableGreench.Enrage, 1000, 0)
end
function AbominableGreench.OnLeaveCombat(event, creature)
creature:SendUnitYell("What's the matter? Don't you like my holiday spirit?", 0)
creature:RemoveEvents()
end
RegisterCreatureEvent(13602, 1, AbominableGreench.OnEnterCombat)
RegisterCreatureEvent(13602, 2, AbominableGreench.OnLeaveCombat)
RegisterCreatureEvent(13602, 4, AbominableGreench.OnDie)

57
Kara/PrinceTenris.lua Normal file
View File

@@ -0,0 +1,57 @@
local PRINCE_TENRIS_MIRKBLOOD = 28194 -- The id of Prince Tenris Mirkblood
local BLOOD_MIRROR = 70838
local SUMMON_SANGUINE_SPIRIT = 51280
local SANGUINE_STRIKE = 51285
local BLOOD_SWOOP = 50923
local function CastBloodMirror(eventId, delay, calls, creature)
local raidMembers = creature:GetAITargets(10) -- Get up to 10 raid members
if #raidMembers > 0 then
local targetIndex = math.random(1, #raidMembers)
local randomTarget = raidMembers[targetIndex]
if randomTarget then
creature:CastSpell(randomTarget, BLOOD_MIRROR)
end
end
end
local function CastSanguineSpirit(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), SUMMON_SANGUINE_SPIRIT, true)
end
local function CastSanguineStrike(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), SANGUINE_STRIKE)
end
local function CastBloodSwoop(eventId, delay, calls, creature)
local raidMembers = creature:GetAITargets(10) -- Get up to 10 raid members
if #raidMembers > 0 then
local targetIndex = math.random(1, #raidMembers)
local randomTarget = raidMembers[targetIndex]
if randomTarget then
creature:CastSpell(randomTarget, BLOOD_SWOOP)
end
end
end
local function OnEnterCombat(event, creature, target)
creature:RegisterEvent(CastBloodMirror, math.random(26000, 42000), 0)
creature:RegisterEvent(CastSanguineSpirit, math.random(3000, 6000), 0)
creature:RegisterEvent(CastSanguineStrike, math.random(11000, 19000), 0)
creature:RegisterEvent(CastBloodSwoop, 23000, 0)
end
local function OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
local function OnDied(event, creature, killer)
creature:RemoveEvents()
end
RegisterCreatureEvent(PRINCE_TENRIS_MIRKBLOOD, 1, OnEnterCombat)
RegisterCreatureEvent(PRINCE_TENRIS_MIRKBLOOD, 2, OnLeaveCombat)
RegisterCreatureEvent(PRINCE_TENRIS_MIRKBLOOD, 4, OnDied)

File diff suppressed because it is too large Load Diff

102
MiscTools/DinkleStone1.lua Normal file
View File

@@ -0,0 +1,102 @@
local ItemEntry = 65000 -- Hearthstone. You can change this item ID to whatever.
local T = {
[1] = { "|TInterface\\icons\\achievement_pvp_h_h:37:37:-23|t|cff610B0BHorde Cities|r", 1,
{"|TInterface\\icons\\achievement_zone_durotar:37:37:-23|t|cff610B0BOrgrimmar|r", 1, 1503, -4415.5, 22, 0},
{"|TInterface\\icons\\achievement_zone_tirisfalglades_01:37:37:-23|t|cff610B0BUndercity|r", 0, 1831, 238.5, 61.6, 0},
{"|TInterface\\icons\\achievement_zone_mulgore_01:37:37:-23|t|cff610B0BThunderbluff|r", 1, -1278, 122, 132, 0},
{"|TInterface\\icons\\achievement_zone_bloodmystisle_01:37:37:-23|t|cff610B0BSilvermoon|r", 530, 9487.69, -7279.2, 14.2866, 0},
{"|TInterface\\icons\\achievement_reputation_wyrmresttemple:37:37:-23|t|cff642EFEShattrath|r", 530, -1838.16, 5301.79, -12.428, 0},
{"|TInterface\\icons\\achievement_reputation_kirintor:37:37:-23|t|cff642EFEDalaran|r", 571, 5804.15, 624.771, 647.767, 0},
},
[2] = {"|TInterface\\icons\\achievement_pvp_a_a:37:37:-23|t|cff0101DFAlliance Cities|r", 0,
{"|TInterface\\icons\\achievement_zone_elwynnforest:37:37:-23|t|cff0101DFStormwind|r", 0, -8905, 560, 94, 0.62},
{"|TInterface\\icons\\achievement_zone_dunmorogh:37:37:-23|t|cff0101DFIronforge|r", 0, -4795, -1117, 499, 0},
{"|TInterface\\icons\\achievement_zone_ashenvale_01:37:37:-23|t|cff0101DFDarnassus|r", 1, 9952, 2280.5, 1342, 1.6},
{"|TInterface\\icons\\achievement_zone_zangarmarsh:37:37:-23|t|cff0101DFThe Exodar|r", 530, -3965.7, -11653.6, -138.844, 0},
{"|TInterface\\icons\\achievement_reputation_wyrmresttemple:37:37:-23|t|cff642EFEShattrath|r", 530, -1838.16, 5301.79, -12.428, 0},
{"|TInterface\\icons\\achievement_reputation_kirintor:37:37:-23|t|cff642EFEDalaran|r", 571, 5804.15, 624.771, 647.767, 0},
},
[3] = { "|TInterface\\icons\\achievement_bg_winwsg:37:37:-23|t|cffC41F3BPvP Locations|r", 2,
{"Gurubashi Arena", 0, -13229, 226, 33, 1},
{"Dire Maul Arena", 1, -3669, 1094, 160, 3},
{"Nagrand Arena", 530, -1983, 6562, 12, 2},
{"Blade's Edge Arena", 530, 2910, 5976, 2, 4},
},
[4] = {"|TInterface\\icons\\achievement_zone_elwynnforest:37:37:-23|t|cff0101DFAlliance Starter Areas|r", 0,
{"Northshire Valley", 0, -8921.09, -119.13, 82.2, 6},
{"Coldridge", 0, -6231.77, 333, 383.17, 0},
{"Shadowglen", 1, 10322.26, 831.4, 1326.37, 0},
{"Ammen Vale", 530, -3961.64, -13931.2, 100.615, 0},
},
[5] = { "|TInterface\\icons\\achievement_zone_durotar:37:37:-23|t|cff610B0BHorde Starter Areas|r", 1,
{"Valley of Trials", 1, -618.518, -4251.67, 38.718, 0},
{"Camp Narache", 1, -2917.58, -257.98, 52.9968, 0},
{"Death Knell", 0, 1676.71, 1678.31, 121.67, 0},
{"Sunstrider Isle", 530, 10349.6, -6357.29, 33.4026, 0},
},
[6] = {"|TInterface\\icons\\achievement_boss_ragnaros:37:37:-23|t|cff0101DFRaids|r", 2,
{"Molten Core", 230, 1126.64, -459.94, -102.535, 3.46095},
{"Onyxia's Lair", 1, -4708.27, -3727.64, 54.5589, 3.72786},
{"Blackwing Lair", 469, -7664.76, -1100.87,399.679, 0},
{"Zul'Gurub", 309, -11916.9, -1248.36, 92.5334, 4.72417},
{"Ahn'Qiraj", 1, -8253.067, 1538.91, -4.797, 3.065894},
{"Naxx 40", 0, 3082.924316, -3746.725830, 133.52, 0},
{"Karazhan", 0, -11118.9, -2010.33,47.0819, 0.649895},
{"Magtheridon's Lair", 530, -312.7, 3087.26, -116.52, 5.19026},
{"Gruul's Lair", 530, 3530.06, 5104.08, 3.50861, 5.51117},
{"Zul'Aman", 530, 6851.78, -7972.57, 179.242, 4.64691},
{"Serpentshrine Caverns", 530, 748.984436, 6870.443359, -68, 6.246},
{"Tempest Keep", 530, 3088.49, 1381.57, 184.863, 4.61973},
{"Hyjal Summit", 1, -8177.5, -4183, -168, 1},
{"Black Temple", 530, -3649.92, 317.469, 35.2827, 2.94285},
{"Sunwell Plateau", 530, 12574.1, -6774.81, 15.0904, 3.13788},
{"Naxx Wotlk", 571, 3670.268066, -1263.276367, 243.52, 4.61},
{"Obsidian Sanctum", 571, 3457.11, 262.394, -113.819, 3.28258},
{"Eye of Eternity", 571, 3859.44, 6989.85, 152.041, 5.79635},
{"Vault of Archavon", 571, 5453.72, 2840.79, 421.28, 0},
{"Ulduar", 571, 9251.101562, -1112.424072, 1216.115479, 6.26},
{"Trial of the Crusader", 571, 8515.68, 716.982, 558.248, 1.57315},
{"Icecrown Citadel", 571, 5873.82, 2110.98, 636.011, 3.5523},
{"Ruby Sanctum", 571, 3600.5, 197.34, -113.76, 5.29905},
},
}
local function OnGossipHello(event, player, item)
-- Show main menu
for i, v in ipairs(T) do
if (v[2] == 2 or v[2] == player:GetTeam()) then
player:GossipMenuAddItem(0, v[1], i, 0)
end
end
player:GossipSendMenu(1, item)
end
local function OnGossipSelect(event, player, item, sender, intid, code)
if (sender == 0) then
-- return to main menu
OnGossipHello(event, player, item)
return
end
if (intid == 0) then
-- Show teleport menu
for i, v in ipairs(T[sender]) do
if (i > 2) then
player:GossipMenuAddItem(0, v[1], sender, i)
end
end
player:GossipMenuAddItem(0, "Back", 0, 0)
player:GossipSendMenu(1, item)
return
else
-- teleport
local name, map, x, y, z, o = table.unpack(T[sender][intid])
player:Teleport(map, x, y, z, o)
end
player:GossipComplete()
end
RegisterItemGossipEvent(ItemEntry, 1, OnGossipHello)
RegisterItemGossipEvent(ItemEntry, 2, OnGossipSelect)

View File

@@ -0,0 +1,51 @@
function OnGossipHello(event, player, item)
if player:GetLevel() < 15 then
player:SendBroadcastMessage("You need to be level 15 or higher to use this item.")
return
end
player:GossipMenuAddItem(0, "|TInterface\\icons\\achievement_boss_lichking:37:37:-23|t|cff007d45Scourge Event|r", 150, 0)
player:GossipSendMenu(1, item)
end
local function OnGossipSelect(event, player, item, sender, intid, code)
if (sender == 150) then
-- Show Scourge Event menu
player:GossipMenuAddItem(0, "|TInterface\\icons\\spell_misc_emotionhappy:37:37:-23|t|cff007d45Start Event for Bonus Lich Runes|r", 100, 0)
player:GossipMenuAddItem(0, "|TInterface\\icons\\spell_misc_emotionsad:37:37:-23|t|cffC41F3BStop Event but Suffer|r", 101, 0)
player:GossipMenuAddItem(0, "Back", 0, 0)
player:GossipSendMenu(1, item)
return
elseif (sender == 100) then
-- Start the event
if IsGameEventActive(17) then
player:SendBroadcastMessage("The Scourge event is already active.")
else
player:AddItem(43949, 2)
StartGameEvent(17, true)
player:PlayDirectSound(14797)
end
player:GossipComplete()
elseif (sender == 101) then
-- Stop the event
if not IsGameEventActive(17) then
player:SendBroadcastMessage("The Scourge event is not currently active.")
else
StopGameEvent(17, true)
player:CastSpell(player, 15007, true)
player:RemoveItem(43949, 2)
player:SetLevel(player:GetLevel())
player:SendBroadcastMessage("2 Lich Runes have been removed, you've been given Resurrection Sickness and have lost your current level's experience progress. So sad :(")
player:PlayDirectSound(14776)
end
player:GossipComplete()
elseif (sender == 0) then
-- return to main menu
OnGossipHello(event, player, item)
return
end
player:GossipComplete()
end
RegisterItemGossipEvent(65001, 1, OnGossipHello)
RegisterItemGossipEvent(65001, 2, OnGossipSelect)

View File

@@ -0,0 +1,12 @@
local SPELL_ID = 100207
local SOUND_ID = 53774
local ADDITIONAL_SPELL_ID = 200181
function OnSpellCast(event, player, spell)
if spell:GetEntry() == SPELL_ID then
player:PlayDirectSound(SOUND_ID, player)
player:CastSpell(player, ADDITIONAL_SPELL_ID, true)
end
end
RegisterPlayerEvent(5, OnSpellCast)

View File

@@ -0,0 +1,8 @@
local Waypoint = {};
function Waypoint.OnSpawn(event, creature)
creature:CanFly(true)
creature:SetDisableGravity(true)
end
RegisterCreatureEvent(1, 5, Waypoint.OnSpawn)

28
MiscTools/Murky.lua Normal file
View File

@@ -0,0 +1,28 @@
function MurkyOnSpawn(event, creature)
local playerName = creature:GetOwner():GetName()
local dialogue = {
"Mrglglglgl! Murky here, reporting for duty!",
"Mrrrrrrrglglglgl! Murky happy to serve you, " .. playerName .. "!",
"Mrglgl! Murloc Murky at your service! Let's conquer Azeroth together!",
"Mrrrglglgl! Murky ready to take on any challenge with you, " .. playerName .. "!",
"Mrglglglglgl! Reporting for duty! Let's make some waves, " .. playerName .. "!",
"Mrrglglgl! Murky is excited to join your team, " .. playerName .. "! Let's show everyone what we're made of!",
"Mrglglgl! Murloc warrior Murky at your command, " .. playerName .. "! Let's make our enemies quake with fear!",
"Mrrrglglgl! Murky is eager to prove his worth to you, " .. playerName .. "! Let's take on the world together!",
"Mrglglglgl! This Murloc is ready to make some noise with you, " .. playerName .. "! Let's show them who's boss!",
"Mrrrglgl! Murky honored to be your loyal companion, " .. playerName .. "! Let's take on any challenge that comes our way!",
"Greetings, adventurer! The one and only Murky has arrived to join you on your quest!",
"Mrglgl! Murky is here to lend a fin and help you conquer the land, " .. playerName .. "!",
"Mrrglgl! Murky is thrilled to serve such a worthy leader as yourself, " .. playerName .. "!",
"Mrglglglgl! Murky reporting for duty! Let's make some mischief and have some fun, " .. playerName .. "!",
"Mrrglgl! Murky is honored to be fighting by your side, " .. playerName .. "! Let's take on our foes with all we've got!",
"Mrglglgl! Murky is eager to explore the land and see what adventures await us, " .. playerName .. "!",
"Mrrrglglgl! Murky is always up for a challenge, " .. playerName .. "! Let's go forth and conquer!",
"Mrglglglgl! Murky is ready to make some waves and take on the world, " .. playerName .. "! Let's do this!",
"Mrrrglgl! Murky will be your trusty sidekick on this journey, " .. playerName .. "! Let's make some memories!",
"Mrglglglgl! Murky is thrilled to be part of your team, " .. playerName .. "! Let's show them what we're made of and come out on top!"
}
creature:SendUnitSay(dialogue[math.random(#dialogue)], 0)
end
RegisterCreatureEvent(15186, 5, MurkyOnSpawn) -- register the function to be called on Murky's spawn

View File

@@ -0,0 +1,46 @@
local ALLOWED_MAPS = {
0,
1,
}
local ALLOWED_SPELLS = {100150, 100160, 100161, 100177, 100186, 100168,}
function table.indexOf(t, value)
for k, v in ipairs(t) do
if v == value then
return k
end
end
return -1
end
function OnPlayerCastSpell(event, player, spell)
local spellId = spell:GetEntry()
local mapId = player:GetMapId()
if table.indexOf(ALLOWED_SPELLS, spellId) ~= -1 then
if table.indexOf(ALLOWED_MAPS, mapId) == -1 then
spell:Cancel()
player:SendBroadcastMessage("You can't use that here.")
else
if spellId == 100150 then
player:PlayDirectSound(20428)
end
end
end
end
function OnPlayerZoneChange(event, player, newZone, newArea)
local mapId = player:GetMapId()
if table.indexOf(ALLOWED_MAPS, mapId) == -1 then
for i, allowedSpell in ipairs(ALLOWED_SPELLS) do
local aura = player:GetAura(allowedSpell)
if aura then
player:RemoveAura(allowedSpell)
end
end
end
end
RegisterPlayerEvent(27, OnPlayerZoneChange)
RegisterPlayerEvent(5, OnPlayerCastSpell)

12
MiscTools/SoL.lua Normal file
View File

@@ -0,0 +1,12 @@
-- AzerothCore Eluna script by Dinkledork
local SPELL_SURGE_OF_LIGHT_1 = 33151
local SPELL_CUSTOM = 100205
local function OnSpellCast(event, player, spell, skipCheck)
local spellId = spell:GetEntry()
if spellId == SPELL_SURGE_OF_LIGHT_1 then
player:CastSpell(player, SPELL_CUSTOM, true)
end
end
RegisterPlayerEvent(5, OnSpellCast)

View File

@@ -0,0 +1,7 @@
function reloadElunaEngine(event, player, command)
if command == "reload scripts" or command == "reloadscripts" then
ReloadEluna()
end
end
RegisterPlayerEvent(42, reloadElunaEngine)

43
MoltenCore/CoreRager.lua Normal file
View File

@@ -0,0 +1,43 @@
CoreRager = {}
function CoreRager.CastMangle(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 19820, true)
end
function CoreRager.OnDamageTaken(event, creature, attacker, damage)
if creature:GetHealthPct() < 50 then
creature:CastSpell(creature, 17683, true)
creature:SendUnitEmote("Core Rager refuses to die while its master is in trouble.", 0)
end
end
function CoreRager.OnEnterCombat(event, creature, target)
creature:RegisterEvent(CoreRager.CastMangle, 7000, 0)
end
function CoreRager.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function CoreRager.OnDied(event, creature, killer)
creature:RemoveEvents()
end
function CoreRager.OnSpawn(event, creature)
creature:SetMaxHealth(200000)
end
function CoreRager.OnGolemaggDeath(event, creature, boss)
local coreRagers = creature:GetCreaturesInRange(100, 11672)
for _, coreRager in pairs(coreRagers) do
coreRager:CastSpell(coreRager, 13520, true)
end
end
RegisterCreatureEvent(11672, 1, CoreRager.OnEnterCombat)
RegisterCreatureEvent(11672, 2, CoreRager.OnLeaveCombat)
RegisterCreatureEvent(11672, 4, CoreRager.OnDied)
RegisterCreatureEvent(11672, 5, CoreRager.OnSpawn)
RegisterCreatureEvent(11672, 9, CoreRager.OnDamageTaken)
RegisterCreatureEvent(11988, 4, CoreRager.OnGolemaggDeath)

50
MoltenCore/Gehennas.lua Normal file
View File

@@ -0,0 +1,50 @@
Gehennas = {}
function Gehennas.CastGehennasCurse(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 19716, true)
end
function Gehennas.CastRainOfFire(eventId, delay, calls, creature)
local targets = creature:GetAITargets(10)
local target = targets[math.random(#targets)]
creature:CastSpell(target, 19717, true)
end
function Gehennas.CastShadowBolt(eventId, delay, calls, creature)
local random = math.random(0,1)
if random == 0 then
creature:CastSpell(creature:GetVictim(), 19729, true)
else
local targets = creature:GetAITargets(10)
local target = targets[math.random(#targets)]
creature:CastSpell(target, 19728, true)
end
end
function Gehennas.CastShadowboltVolley(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 36275, true)
end
function Gehennas.OnEnterCombat(event, creature, target)
creature:RegisterEvent(Gehennas.CastGehennasCurse, math.random(25000, 30000), 0)
creature:RegisterEvent(Gehennas.CastRainOfFire, 6000, 0)
creature:RegisterEvent(Gehennas.CastShadowBolt, 5000, 0)
creature:RegisterEvent(Gehennas.CastShadowboltVolley, 15000, 0)
end
function Gehennas.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function Gehennas.OnDied(event, creature, killer)
creature:RemoveEvents()
end
function Gehennas.OnSpawn(event, creature)
creature:SetMaxHealth(648000)
end
RegisterCreatureEvent(12259, 1, Gehennas.OnEnterCombat)
RegisterCreatureEvent(12259, 2, Gehennas.OnLeaveCombat)
RegisterCreatureEvent(12259, 4, Gehennas.OnDied)
RegisterCreatureEvent(12259, 5, Gehennas.OnSpawn)

185
MoltenCore/GemVendor.lua Normal file
View File

@@ -0,0 +1,185 @@
local npcid = 190016
local lavacore = 17011
local Red = {28458, 28459, 28461, 28462}
local Blue = {28464, 28465, 28466}
local Yellow = {28467, 28468, 28470}
local function PurchaseRedGem(event, player, creature, sender, intid, code, menu_id)
if (intid == 1) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Red[1], 1)
creature:SendUnitSay("Your +4 Strength Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
if (intid == 2) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Red[2], 1)
creature:SendUnitSay("Your +4 Agility Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
if (intid == 3) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Red[3], 1)
creature:SendUnitSay("Your +5 Spell Power Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
if (intid == 4) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Red[4], 1)
creature:SendUnitSay("Your +8 Attack Power Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
end
local function PurchaseBlueGem(event, player, creature, sender, intid, code, menu_id)
if (intid == 1) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Blue[1], 1)
creature:SendUnitSay("Your +6 Stamina Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
if (intid == 2) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Blue[2], 1)
creature:SendUnitSay("Your +4 Spirit Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
if (intid == 3) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Blue[3], 1)
creature:SendUnitSay("Your +2 Mp5 Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
end
local function PurchaseYellowGem(event, player, creature, sender, intid, code, menu_id)
if (intid == 1) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Yellow[1], 1)
creature:SendUnitSay("Your +4 Intellect Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
if (intid == 2) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Yellow[2], 1)
creature:SendUnitSay("Your +4 Crit Rating Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
if (intid == 3) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Yellow[3], 1)
creature:SendUnitSay("Your +4 Hit Rating Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
if (intid == 4) then
if (player:GetItemCount(lavacore) >= 3) then
player:RemoveItem(lavacore, 3)
player:AddItem(Yellow[4], 1)
creature:SendUnitSay("Your +4 Defense Rating Gem has been added to your inventory.", 0)
else
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
end
end
end
local function OnGossipHello(event, player, creature)
creature:SendUnitSay("Greetings " .. player:GetName() .. ", For 3 Lava Cores you can have any gem of your choosing.", 0)
player:GossipMenuAddItem(1, "|TInterface\\Icons\\inv_misc_gem_ruby_03:50:50:-43:0|tPurchase Red Gems", 0, 1)
player:GossipMenuAddItem(1, "|TInterface\\Icons\\inv_misc_gem_crystal_03:50:50:-43:0|tPurchase Blue Gems", 0, 2)
player:GossipMenuAddItem(1, "|TInterface\\Icons\\inv_misc_gem_topaz_03:50:50:-43:0|tPurchase Yellow Gems", 0, 3)
player:GossipSendMenu(1, creature)
end
function OnGossipSelect(event, player, creature, sender, intid, code, menu_id)
if (intid == 1) then
player:GossipMenuAddItem(0, "+4 Strength Gem", 0, 11)
player:GossipMenuAddItem(0, "+4 Agility Gem", 0, 12)
player:GossipMenuAddItem(0, "+5 Spell Power Gem", 0, 13)
player:GossipMenuAddItem(0, "+8 Attack Power Gem", 0, 14)
player:GossipSendMenu(1, creature)
end
if (intid == 2) then
player:GossipMenuAddItem(0, "+6 Stamina Gem", 0, 21)
player:GossipMenuAddItem(0, "+4 Spirit Gem", 0, 22)
player:GossipMenuAddItem(0, "+2 Mp5 Gem", 0, 23)
player:GossipSendMenu(1, creature)
end
if (intid == 3) then
player:GossipMenuAddItem(0, "+4 Intellect Gem", 0, 31)
player:GossipMenuAddItem(0, "+4 Crit Rating Gem", 0, 32)
player:GossipMenuAddItem(0, "+4 Hit Rating Gem", 0, 33)
player:GossipMenuAddItem(0, "+4 Defense Rating Gem", 0, 34)
player:GossipSendMenu(1, creature)
end
if (intid == 11) then
PurchaseRedGem(event, player, creature, sender, 1, code, menu_id)
end
if (intid == 12) then
PurchaseRedGem(event, player, creature, sender, 2, code, menu_id)
end
if (intid == 13) then
PurchaseRedGem(event, player, creature, sender, 3, code, menu_id)
end
if (intid == 14) then
PurchaseRedGem(event, player, creature, sender, 4, code, menu_id)
end
if (intid == 21) then
PurchaseBlueGem(event, player, creature, sender, 1, code, menu_id)
end
if (intid == 22) then
PurchaseBlueGem(event, player, creature, sender, 2, code, menu_id)
end
if (intid == 23) then
PurchaseBlueGem(event, player, creature, sender, 3, code, menu_id)
end
if (intid == 31) then
PurchaseYellowGem(event, player, creature, sender, 1, code, menu_id)
end
if (intid == 32) then
PurchaseYellowGem(event, player, creature, sender, 2, code, menu_id)
end
if (intid == 33) then
PurchaseYellowGem(event, player, creature, sender, 3, code, menu_id)
end
if (intid == 34) then
PurchaseYellowGem(event, player, creature, sender, 4, code, menu_id)
end
end
RegisterCreatureGossipEvent(npcid, 1, OnGossipHello)
RegisterCreatureGossipEvent(npcid, 2, OnGossipSelect)

49
MoltenCore/Golemagg.lua Normal file
View File

@@ -0,0 +1,49 @@
Golemagg = {}
Golemagg.enraged = {}
function Golemagg.CastPyroblast(eventId, delay, calls, creature)
local targets = creature:GetAITargets()
local target = targets[math.random(#targets)]
creature:CastSpell(target, 20228, true)
end
function Golemagg.CastEarthquake(eventId, delay, calls, creature)
creature:CastSpell(creature, 19798, false)
creature:RegisterEvent(Golemagg.CastEarthquake, 17000, 0)
end
function Golemagg.DamageTaken(event, creature, attacker, damage)
if not Golemagg.enraged[creature:GetGUID()] and creature:GetHealthPct() < 10 then
creature:CastSpell(creature, 20544, true)
creature:CastSpell(creature, 19798, true)
creature:RegisterEvent(Golemagg.CastEarthquake, 5300, 1)
Golemagg.enraged[creature:GetGUID()] = true
end
end
function Golemagg.OnEnterCombat(event, creature, target)
creature:RegisterEvent(Golemagg.CastPyroblast, math.random(3000, 7000), 0)
creature:CastSpell(creature, 13879, true)
creature:CastSpell(creature, 20556, true)
creature:CastSpell(creature, 18943, true)
end
function Golemagg.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function Golemagg.OnDied(event, creature, killer)
creature:RemoveEvents()
Golemagg.enraged[creature:GetGUID()] = nil
end
function Golemagg.OnSpawn(event, creature)
creature:SetMaxHealth(1652176)
Golemagg.enraged[creature:GetGUID()] = false
end
RegisterCreatureEvent(11988, 1, Golemagg.OnEnterCombat)
RegisterCreatureEvent(11988, 2, Golemagg.OnLeaveCombat)
RegisterCreatureEvent(11988, 4, Golemagg.OnDied)
RegisterCreatureEvent(11988, 5, Golemagg.OnSpawn)
RegisterCreatureEvent(11988, 9, Golemagg.DamageTaken)

59
MoltenCore/Hazzrash.lua Normal file
View File

@@ -0,0 +1,59 @@
Hazzrash = {};
function Hazzrash.CastArcaneBarage(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 44425, false)
end
function Hazzrash.CastArcaneBlast(eventId, delay, calls, creature)
local targets = creature:GetAITargets(10)
local target = targets[math.random(#targets)]
creature:CastSpell(target, 30451, false)
end
function Hazzrash.CastChainBurn(eventId, delay, calls, creature)
local targets = creature:GetAITargets(10)
local target = targets[math.random(#targets)]
creature:CastSpell(target, 8211, false)
end
function Hazzrash.CastCrystalFlash(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 5106, false)
end
function Hazzrash.CastEvocation(eventId, delay, calls, creature)
creature:CastSpell(creature, 30254, true)
creature:RemoveEvents()
creature:RegisterEvent(Hazzrash.ResumeCasts, 20000, 1)
end
function Hazzrash.ResumeCasts(eventId, delay, calls, creature)
creature:RegisterEvent(Hazzrash.CastArcaneBarage, 6000, 0)
creature:RegisterEvent(Hazzrash.CastArcaneBlast, 16000, 0)
creature:RegisterEvent(Hazzrash.CastCrystalFlash, 25000, 0)
creature:RegisterEvent(Hazzrash.CastChainBurn, 29000, 0)
end
function Hazzrash.OnEnterCombat(event, creature, target)
creature:RegisterEvent(Hazzrash.CastArcaneBarage, 6000, 0)
creature:RegisterEvent(Hazzrash.CastArcaneBlast, 18000, 0)
creature:RegisterEvent(Hazzrash.CastCrystalFlash, 25000, 0)
creature:RegisterEvent(Hazzrash.CastChainBurn, 44000, 0)
creature:RegisterEvent(Hazzrash.CastEvocation, 60000, 1)
end
function Hazzrash.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function Hazzrash.OnDied(event, creature, killer)
creature:RemoveEvents()
end
function Hazzrash.OnSpawn(event, creature)
creature:SetMaxHealth(563000)
end
RegisterCreatureEvent(83000, 1, Hazzrash.OnEnterCombat)
RegisterCreatureEvent(83000, 2, Hazzrash.OnLeaveCombat)
RegisterCreatureEvent(83000, 4, Hazzrash.OnDied)
RegisterCreatureEvent(83000, 5, Hazzrash.OnSpawn)

53
MoltenCore/Lucifron.lua Normal file
View File

@@ -0,0 +1,53 @@
local Lucifron = {}
Lucifron.enrageCasted = false
function Lucifron.CastImpendingDoom(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 19702, false)
end
function Lucifron.CastLucifronCurse(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 19703, false)
end
function Lucifron.CastShadowShock(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 20603, false)
end
function Lucifron.CastFlamestrike(eventId, delay, calls, creature)
local targets = creature:GetAITargets()
local targetCount = creature:GetAITargetsCount()
local randomTarget = targets[math.random(1, targetCount)]
creature:CastSpell(randomTarget, 10216, true)
end
function Lucifron.OnEnterCombat(event, creature, target)
creature:RegisterEvent(Lucifron.CastImpendingDoom, math.random(6000, 11000), 0)
creature:RegisterEvent(Lucifron.CastLucifronCurse, math.random(11000, 14000), 0)
creature:RegisterEvent(Lucifron.CastShadowShock, 5000, 0)
creature:RegisterEvent(Lucifron.CastFlamestrike, 15000, 0)
end
function Lucifron.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function Lucifron.OnDied(event, creature, killer)
creature:RemoveEvents()
end
function Lucifron.OnDamageTaken(event, creature, attacker, damage)
if(not Lucifron.enrageCasted and creature:HealthBelowPct(20)) then
creature:CastSpell(creature, 38166, true)
Lucifron.enrageCasted = true
end
end
function Lucifron.OnSpawn(event, creature)
creature:SetMaxHealth(748000)
end
RegisterCreatureEvent(12118, 1, Lucifron.OnEnterCombat)
RegisterCreatureEvent(12118, 2, Lucifron.OnLeaveCombat)
RegisterCreatureEvent(12118, 4, Lucifron.OnDied)
RegisterCreatureEvent(12118, 9, Lucifron.OnDamageTaken)
RegisterCreatureEvent(12118, 5, Lucifron.OnSpawn)

66
MoltenCore/Magmadar.lua Normal file
View File

@@ -0,0 +1,66 @@
--fixed stupidity
local Magmadar = {};
local SPELL_FRENZY = 19451
local SPELL_PANIC = 19408
local SPELL_LAVA_BOMB = 19411
local SPELL_LAVA_BOMB_RANGED = 20474
local SPELL_SUMMON_CORE_HOUND = 364726
local MELEE_TARGET_LOOKUP_DIST = 10.0
function Magmadar.OnEnterCombat(event, creature, target)
creature:RegisterEvent(Magmadar.Frenzy, math.random(14000, 18000), 0)
creature:RegisterEvent(Magmadar.Panic, math.random(28000, 35000), 0)
creature:RegisterEvent(Magmadar.LavaBomb, math.random(10000, 12000), 0)
creature:RegisterEvent(Magmadar.LavaBombRanged, math.random(9000, 15000), 0)
creature:RegisterEvent(Magmadar.CastSummonCoreHound, 45000, 0)
end
function Magmadar.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function Magmadar.OnDied(event, creature, killer)
creature:RemoveEvents()
end
function Magmadar.Frenzy(event, delay, calls, creature)
creature:CastSpell(creature, SPELL_FRENZY, false)
creature:SendUnitEmote("Magmadar goes into a killing Frenzy!")
end
function Magmadar.Panic(event, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), SPELL_PANIC, false)
end
function Magmadar.LavaBomb(event, delay, calls, creature)
local targets = creature:GetAITargets()
local targetCount = creature:GetAITargetsCount()
if targetCount > 0 then
local targetIndex = math.random(1, targetCount)
local target = targets[targetIndex]
if target:GetDistance(creature) <= MELEE_TARGET_LOOKUP_DIST then
creature:CastSpell(target, SPELL_LAVA_BOMB, false)
end
end
end
function Magmadar.LavaBombRanged(event, delay, calls, creature)
local targets = creature:GetPlayersInRange(100.0)
for _, target in pairs(targets) do
if target:GetDistance(creature) > MELEE_TARGET_LOOKUP_DIST then
creature:CastSpell(target, SPELL_LAVA_BOMB_RANGED, false)
break
end
end
end
function Magmadar.CastSummonCoreHound(event, delay, calls, creature)
creature:CastSpell(creature, SPELL_SUMMON_CORE_HOUND, true)
end
RegisterCreatureEvent(11982, 1, Magmadar.OnEnterCombat)
RegisterCreatureEvent(11982, 2, Magmadar.OnLeaveCombat)
RegisterCreatureEvent(11982, 4, Magmadar.OnDied)

45
MoltenCore/Magmakin.lua Normal file
View File

@@ -0,0 +1,45 @@
Magmakin = {}
function Magmakin.CastFlameBuffet(eventId, delay, calls, creature)
if not creature:IsCasting() then
creature:CastSpell(creature:GetVictim(), 23341, false)
end
end
function Magmakin.CastMagmaBlast(eventId, delay, calls, creature)
if not creature:IsCasting() then
local targets = creature:GetAITargets(10)
local target = targets[math.random(#targets)]
creature:CastSpell(target, 20565, false)
end
end
function Magmakin.CastLavaBurst(eventId, delay, calls, creature)
if not creature:IsCasting() then
creature:CastSpell(creature:GetVictim(), 11678, false)
end
end
function Magmakin.OnEnterCombat(event, creature, target)
creature:RegisterEvent(Magmakin.CastFlameBuffet, 18000, 0)
creature:RegisterEvent(Magmakin.CastMagmaBlast, 16000, 0)
creature:RegisterEvent(Magmakin.CastLavaBurst, 8000, 0)
end
function Magmakin.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function Magmakin.OnDied(event, creature, killer)
creature:RemoveEvents()
end
function Magmakin.OnSpawn(event, creature)
creature:SetMaxPower(0, 10000000)
creature:SetMaxHealth(349000)
end
RegisterCreatureEvent(12806, 1, Magmakin.OnEnterCombat)
RegisterCreatureEvent(12806, 2, Magmakin.OnLeaveCombat)
RegisterCreatureEvent(12806, 4, Magmakin.OnDied)
RegisterCreatureEvent(12806, 5, Magmakin.OnSpawn)

103
MoltenCore/Smolder.lua Normal file
View File

@@ -0,0 +1,103 @@
local Smolder = {};
local healthCheck = false;
local isCastingSummonElemental = false;
local function CastFlameBreath(eventId, delay, calls, creature)
if isCastingSummonElemental then return end
if creature:HealthBelowPct(15) and not creature:IsCasting() then
creature:CastSpell(creature:GetVictim(), 23341, false)
end
end
local function CastCharredEarth(eventId, delay, calls, creature)
if isCastingSummonElemental then return end
local targetCount = creature:GetAITargetsCount()
local randomTarget = math.random(1, targetCount)
local target = creature:GetAITargets()
creature:CastSpell(target[randomTarget], 100148, false)
end
local function CastPyroblast(eventId, delay, calls, creature)
if isCastingSummonElemental then return end
local targets = {}
for i = 1, 3 do
local targetCount = creature:GetAITargetsCount()
local randomTarget = math.random(1, targetCount)
local target = creature:GetAITargets()
table.insert(targets, target[randomTarget])
end
for k, v in pairs(targets) do
creature:CastSpell(v, 27132, true)
end
end
local function CastSummonElemental(eventId, delay, calls, creature)
isCastingSummonElemental = true
creature:SendUnitYell("Minions of fire, rise and serve your master!", 0)
creature:PlayDirectSound(20422)
creature:CastSpell(creature, 364728, true)
isCastingSummonElemental = false
end
local function CastTailSweep(eventId, delay, calls, creature)
if isCastingSummonElemental then return end
creature:CastSpell(creature:GetVictim(), 52144, true)
end
local function CastScorch(eventId, delay, calls, creature)
if isCastingSummonElemental then return end
if not creature:IsCasting() then
creature:CastSpell(creature:GetVictim(), 42858, false)
end
end
local function CastBellowingRoar(eventId, delay, calls, creature)
if isCastingSummonElemental then return end
creature:SendUnitYell("Feel the power of my roar!", 0)
creature:PlayDirectSound(20421)
creature:CastSpell(creature, 22686, false)
end
local function OnEnterCombat(event, creature, target)
creature:SendUnitYell("Feel the heat of my flame and know your end is near!", 0)
creature:PlayDirectSound(20419)
creature:RegisterEvent(CastScorch, 6000, 0)
creature:RegisterEvent(CastFlameBreath, 13000, 0)
creature:RegisterEvent(CastCharredEarth, 12000, 0)
creature:RegisterEvent(CastPyroblast, 10000, 0)
creature:RegisterEvent(CastSummonElemental, 63500, 0)
creature:RegisterEvent(CastTailSweep, 8000, 0)
creature:RegisterEvent(CastBellowingRoar, 33000, 0)
end
local function OnLeaveCombat(event, creature)
healthCheck = false
creature:RemoveEvents()
end
local function OnDied(event, creature, killer)
creature:SendUnitYell("My fire...extinguished...", 0)
creature:PlayDirectSound(20420)
creature:RemoveEvents()
end
local function OnDamageTaken(event, creature, attacker, damage)
if (creature:HealthBelowPct(15) and not healthCheck) then
creature:SendUnitYell("My power is waning, but I will fight until my last flame burnsout!", 0)
creature:PlayDirectSound(20423)
healthCheck = true
end
end
function OnSpawn(event, creature)
creature:SetMaxPower(0, 14379003)
end
RegisterCreatureEvent(83001, 1, OnEnterCombat)
RegisterCreatureEvent(83001, 2, OnLeaveCombat)
RegisterCreatureEvent(83001, 4, OnDied)
RegisterCreatureEvent(83001, 9, OnDamageTaken)
RegisterCreatureEvent(83001, 5, OnSpawn)

View File

@@ -0,0 +1,39 @@
local SocketEnchant = 37430 -- Socket Enchant Item ID
local RequiredItem = 17010 -- Fiery Cores ID. Can set this to whatever Item ID.
local RequiredAmount = 10 -- Example required Item amount
local ExchangeCount = 0 -- Keep track of the number of successful exchanges
local function OnGossipHello(event, player, creature)
player:GossipMenuAddItem(0, "|TInterface\\Icons\\inv_misc_gem_variety_01:50:50:-43:0|tPurchase gem sockets for your gear?", 0, 1) --can change "Fiery Cores" to whatever if you change requireditemid. Same with the dialogue below.
player:GossipSendMenu(1, creature)
end
local function OnGossipSelect(event, player, creature, sender, intid, code, menuid)
if (intid == 1) then
local requiredAmount = RequiredAmount
creature:SendUnitSay("Exchanging " .. requiredAmount .. " Fiery Cores for a socket enchant. Are you sure, " .. player:GetName() .. "?", 0)
player:GossipMenuAddItem(0, "Yes", 0, 2)
player:GossipMenuAddItem(0, "No", 0, 3)
player:GossipSendMenu(1, creature)
elseif (intid == 2) then
if (player:GetItemCount(RequiredItem) >= RequiredAmount) then
player:RemoveItem(RequiredItem, RequiredAmount)
player:AddItem(SocketEnchant, 1)
creature:SendUnitSay("The socket enchant has been added to your inventory.", 0)
ExchangeCount = ExchangeCount + 1 -- Increase the number of successful exchanges
if (ExchangeCount >= 3) then -- If the number of successful exchanges is 3 or more
creature:SendUnitSay("Thanks a bunch! See you next week!", 0)
creature:DespawnOrUnsummon(1000) -- Despawn the creature with a 1 second delay
end
player:GossipComplete()
else
creature:SendUnitSay("You do not have enough Fiery Cores.", 0)
player:GossipComplete()
end
elseif (intid == 3) then
player:GossipComplete()
end
end
RegisterCreatureGossipEvent(190015, 1, OnGossipHello)
RegisterCreatureGossipEvent(190015, 2, OnGossipSelect)

View File

@@ -0,0 +1,76 @@
local Scorn = {};
local function LichSlap(eventId, delay, calls, creature)
if not creature:IsCasting() then
creature:CastSpell(creature:GetVictim(), 28873, true)
end
end
local function Enrage(eventId, delay, calls, creature)
if not creature:IsCasting() then
creature:CastSpell(creature, 15716, true)
end
end
local function FrostboltVolley(eventId, delay, calls, creature)
if not creature:IsCasting() then
creature:CastSpell(creature, 22643, true)
end
end
local function FrostNova(eventId, delay, calls, creature)
if not creature:IsCasting() then
creature:CastSpell(creature, 15531, true)
end
end
function MindFlay(eventId, delay, calls, creature)
if not creature:IsCasting() then
local targets = creature:GetAITargets(5)
if #targets == 0 then
return
end
local target = targets[math.random(#targets)]
creature:CastSpell(target, 17318, true)
end
end
function ManaBurn(eventId, delay, calls, creature)
if not creature:IsCasting() then
local targets = creature:GetAITargets(5)
if #targets == 0 then
return
end
local target = targets[math.random(#targets)]
creature:CastSpell(target, 8129, true)
end
end
local function OnEnterCombat(event, creature, target)
creature:RegisterEvent(LichSlap, math.random(8000,12000), 0)
creature:RegisterEvent(MindFlay, math.random(14000,18000), 0)
creature:RegisterEvent(FrostboltVolley, math.random(7000,11000), 0)
creature:RegisterEvent(FrostNova, 1000, 1)
creature:RegisterEvent(FrostNova, math.random(6000,9000), 0)
creature:RegisterEvent(ManaBurn, math.random(17000,24000), 0)
end
local function OnHealthUpdate(event, creature, value)
if (creature:GetHealthPct() <= 20) then
creature:RemoveEvents()
creature:RegisterEvent(Enrage, 100, 1)
end
end
local function OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
local function OnDied(event, creature, killer)
creature:RemoveEvents()
end
RegisterCreatureEvent(400075, 1, OnEnterCombat)
RegisterCreatureEvent(400075, 9, OnHealthUpdate)
RegisterCreatureEvent(400075, 2, OnLeaveCombat)
RegisterCreatureEvent(400075, 4, OnDied)

View File

@@ -0,0 +1,35 @@
local Sever = {}
function Sever.CastDiseasedSpit(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 17745, true)
end
function Sever.CastIntimidatingRoar(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 16508, true)
end
function Sever.OnEnterCombat(event, creature, target)
creature:RegisterEvent(Sever.CastDiseasedSpit, 10000, 0)
creature:RegisterEvent(Sever.CastIntimidatingRoar, 30000, 0)
end
function Sever.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function Sever.OnDied(event, creature, killer)
creature:RemoveEvents()
end
function Sever.OnDamageTaken(event, creature, attacker, damage)
if (creature:HealthBelowPct(50) and not creature:HasAura(41305)) then
creature:CastSpell(creature, 41305, true)
creature:SendUnitYell("", 0)
end
end
RegisterCreatureEvent(14682, 1, Sever.OnEnterCombat)
RegisterCreatureEvent(14682, 2, Sever.OnLeaveCombat)
RegisterCreatureEvent(14682, 4, Sever.OnDied)
RegisterCreatureEvent(14682, 9, Sever.OnDamageTaken)