Add files via upload

This commit is contained in:
Dinkledork
2023-02-08 11:34:43 -07:00
committed by GitHub
parent 973cb1afaf
commit 8a0525c464
15 changed files with 1422 additions and 109 deletions

80
AUndeadWarlord.lua Normal file
View File

@@ -0,0 +1,80 @@
local UndeadWarlord = {};
local function CastShadowStrike(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 33914, true)
end
local function CastFear(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 5782, true)
end
local function CastSummonSkeleton(eventId, delay, calls, creature)
creature:CastSpell(creature, 59711, true)
end
local enterCombatDialogue = {
"Your end has come. I will feast on your bones.",
"You are no match for me!",
"Your death will be swift.",
"You dare challenge me?"
}
local leaveCombatDialogue = {
"Coward!",
"You won't escape next time!",
"I'll be back for more!",
"You are lucky to leave this place alive."
}
local killTargetDialogue = {
"Another soul for the taking!",
"Your life is mine!",
"You were no match for me!",
"Your death was inevitable."
}
local deathDialogue = {
"You... How?",
"I'll be back!",
"This is not the end!",
"I'll haunt your dreams!"
}
function UndeadWarlord.OnEnterCombat(event, creature, target)
local randomDialogue = enterCombatDialogue[math.random(4)]
creature:SendUnitYell(randomDialogue, 0)
creature:RegisterEvent(CastShadowStrike, 5000, 0)
creature:RegisterEvent(CastFear, 7000, 0)
creature:RegisterEvent(CastSummonSkeleton, 15000, 0)
end
function UndeadWarlord.OnLeaveCombat(event, creature)
local randomDialogue = leaveCombatDialogue[math.random(4)]
creature:SendUnitYell(randomDialogue, 0)
creature:RemoveEvents()
end
function UndeadWarlord.OnKilledTarget(event, creature, victim)
local randomDialogue = killTargetDialogue[math.random(4)]
creature:SendUnitYell(randomDialogue, 0)
end
function UndeadWarlord.OnDied(event, creature, killer)
local randomDialogue = deathDialogue[math.random(4)]
creature:SendUnitYell(randomDialogue, 0)
creature:RemoveEvents()
end
function UndeadWarlord.OnSpawn(event, creature)
if creature == nil or not creature:IsInWorld() then return end
creature:SendUnitYell("Quickly servants! The Master expects swift results.", 0)
creature:CastSpell(creature, 59711, true)
creature:RegisterEvent(function () creature:CastSpell(creature, 59711, true) end, 5000, 0)
end
RegisterCreatureEvent(300018, 1, UndeadWarlord.OnEnterCombat)
RegisterCreatureEvent(300018, 2, UndeadWarlord.OnLeaveCombat)
RegisterCreatureEvent(300018, 3, UndeadWarlord.OnKilledTarget)
RegisterCreatureEvent(300018, 4, UndeadWarlord.OnDied)
RegisterCreatureEvent(300018, 5, UndeadWarlord.OnSpawn)

514
AccountMounts.lua Normal file
View File

@@ -0,0 +1,514 @@
------------------------------------------------------------------------------------------------
-- ACCOUNT MOUNTS MOD
------------------------------------------------------------------------------------------------
local EnableModule = true
local AnnounceModule = true -- Announce module on player login ?
local StrictFactions = false -- Disallow learning mounts from opposing faction
local GM_LearnAllCmd = false -- enable ".learn all mounts" command for GM (debug)
------------------------------------------------------------------------------------------------
-- END CONFIG
------------------------------------------------------------------------------------------------
if (not EnableModule) then return end
local FILE_NAME = string.match(debug.getinfo(1,'S').source, "[^/\\]*.lua$")
-- [spellID] = { ridingSkillRank, class, team+1, extraSkillId, extraSkillRank }
-- list containts every single mount (396 total) in version 3.3.5.12340
local mount_listing = {
[458] = {75,0,1,0,0}, -- Brown Horse
[470] = {75,0,1,0,0}, -- Black Stallion
[472] = {75,0,1,0,0}, -- Pinto
[580] = {75,0,2,0,0}, -- Timber Wolf
[3363] = {300,0,0,0,0}, -- Nether Drake
[6648] = {75,0,1,0,0}, -- Chestnut Mare
[6653] = {75,0,2,0,0}, -- Dire Wolf
[6654] = {75,0,2,0,0}, -- Brown Wolf
[6777] = {75,0,1,0,0}, -- Gray Ram
[6898] = {75,0,1,0,0}, -- White Ram
[6899] = {75,0,1,0,0}, -- Brown Ram
[8394] = {75,0,1,0,0}, -- Striped Frostsaber
[8395] = {75,0,2,0,0}, -- Emerald Raptor
[8396] = {0,0,0,0,0}, -- Summon Ivory Tallstrider
[10789] = {75,0,1,0,0}, -- Spotted Frostsaber
[10793] = {75,0,1,0,0}, -- Striped Nightsaber
[10796] = {75,0,2,0,0}, -- Turquoise Raptor
[10799] = {75,0,2,0,0}, -- Violet Raptor
[10800] = {0,0,0,0,0}, -- Summon Brown Tallstrider
[10801] = {0,0,0,0,0}, -- Summon Gray Tallstrider
[10802] = {0,0,0,0,0}, -- Summon Pink Tallstrider
[10803] = {0,0,0,0,0}, -- Summon Purple Tallstrider
[10804] = {0,0,0,0,0}, -- Summon Turquoise Tallstrider
[10873] = {75,0,1,0,0}, -- Red Mechanostrider
[10969] = {75,0,1,0,0}, -- Blue Mechanostrider
[15779] = {150,0,1,0,0}, -- White Mechanostrider Mod B
[15780] = {75,0,1,0,0}, -- Green Mechanostrider
[15781] = {75,0,1,0,0}, -- Steel Mechanostrider
[16055] = {150,0,1,0,0}, -- Black Nightsaber
[16056] = {150,0,1,0,0}, -- Ancient Frostsaber
[16058] = {75,0,1,0,0}, -- Primal Leopard
[16059] = {75,0,1,0,0}, -- Tawny Sabercat
[16060] = {75,0,1,0,0}, -- Golden Sabercat
[16080] = {150,0,2,0,0}, -- Red Wolf
[16081] = {150,0,2,0,0}, -- Winter Wolf
[16082] = {150,0,1,0,0}, -- Palomino
[16083] = {150,0,1,0,0}, -- White Stallion
[16084] = {150,0,2,0,0}, -- Mottled Red Raptor
[17229] = {150,0,1,0,0}, -- Winterspring Frostsaber
[17450] = {150,0,2,0,0}, -- Ivory Raptor
[17453] = {75,0,1,0,0}, -- Green Mechanostrider
[17454] = {75,0,1,0,0}, -- Unpainted Mechanostrider
[17455] = {75,0,1,0,0}, -- Purple Mechanostrider
[17456] = {75,0,1,0,0}, -- Red and Blue Mechanostrider
[17459] = {150,0,1,0,0}, -- Icy Blue Mechanostrider Mod A
[17460] = {150,0,1,0,0}, -- Frost Ram
[17461] = {150,0,1,0,0}, -- Black Ram
[17462] = {75,0,2,0,0}, -- Red Skeletal Horse
[17463] = {75,0,2,0,0}, -- Blue Skeletal Horse
[17464] = {75,0,2,0,0}, -- Brown Skeletal Horse
[17465] = {150,0,2,0,0}, -- Green Skeletal Warhorse
[17481] = {150,0,0,0,0}, -- Rivendare's Deathcharger
[18363] = {75,0,0,0,0}, -- Riding Kodo
[18989] = {75,0,2,0,0}, -- Gray Kodo
[18990] = {75,0,2,0,0}, -- Brown Kodo
[18991] = {150,0,2,0,0}, -- Green Kodo
[18992] = {150,0,2,0,0}, -- Teal Kodo
[22717] = {150,0,1,0,0}, -- Black War Steed
[22718] = {150,0,2,0,0}, -- Black War Kodo
[22719] = {150,0,1,0,0}, -- Black Battlestrider
[22720] = {150,0,1,0,0}, -- Black War Ram
[22721] = {150,0,2,0,0}, -- Black War Raptor
[22722] = {150,0,2,0,0}, -- Red Skeletal Warhorse
[22723] = {150,0,1,0,0}, -- Black War Tiger
[22724] = {150,0,2,0,0}, -- Black War Wolf
[23219] = {150,0,1,0,0}, -- Swift Mistsaber
[23220] = {150,0,1,0,0}, -- Swift Dawnsaber
[23221] = {150,0,1,0,0}, -- Swift Frostsaber
[23222] = {150,0,1,0,0}, -- Swift Yellow Mechanostrider
[23223] = {150,0,1,0,0}, -- Swift White Mechanostrider
[23225] = {150,0,1,0,0}, -- Swift Green Mechanostrider
[23227] = {150,0,1,0,0}, -- Swift Palomino
[23228] = {150,0,1,0,0}, -- Swift White Steed
[23229] = {150,0,1,0,0}, -- Swift Brown Steed
[23238] = {150,0,1,0,0}, -- Swift Brown Ram
[23239] = {150,0,1,0,0}, -- Swift Gray Ram
[23240] = {150,0,1,0,0}, -- Swift White Ram
[23241] = {150,0,2,0,0}, -- Swift Blue Raptor
[23242] = {150,0,2,0,0}, -- Swift Olive Raptor
[23243] = {150,0,2,0,0}, -- Swift Orange Raptor
[23246] = {150,0,2,0,0}, -- Purple Skeletal Warhorse
[23247] = {150,0,2,0,0}, -- Great White Kodo
[23248] = {150,0,2,0,0}, -- Great Gray Kodo
[23249] = {150,0,2,0,0}, -- Great Brown Kodo
[23250] = {150,0,2,0,0}, -- Swift Brown Wolf
[23251] = {150,0,2,0,0}, -- Swift Timber Wolf
[23252] = {150,0,2,0,0}, -- Swift Gray Wolf
[23338] = {150,0,1,0,0}, -- Swift Stormsaber
[23509] = {150,0,0,0,0}, -- Frostwolf Howler
[23510] = {150,0,0,0,0}, -- Stormpike Battle Charger
[24242] = {150,0,0,0,0}, -- Swift Razzashi Raptor
[24252] = {150,0,0,0,0}, -- Swift Zulian Tiger
[24576] = {150,0,0,0,0}, -- Chromatic Mount
[25675] = {75,0,0,0,0}, -- Reindeer
[25858] = {75,0,0,0,0}, -- Reindeer
[25859] = {150,0,0,0,0}, -- Reindeer
[25863] = {150,0,0,0,0}, -- Black Qiraji Battle Tank
[25953] = {150,0,0,0,0}, -- Blue Qiraji Battle Tank
[26054] = {150,0,0,0,0}, -- Red Qiraji Battle Tank
[26055] = {150,0,0,0,0}, -- Yellow Qiraji Battle Tank
[26056] = {150,0,0,0,0}, -- Green Qiraji Battle Tank
[26655] = {150,0,0,0,0}, -- Black Qiraji Battle Tank
[26656] = {150,0,0,0,0}, -- Black Qiraji Battle Tank
[28828] = {0,0,0,0,0}, -- Nether Drake
[29059] = {150,0,0,0,0}, -- Naxxramas Deathcharger
[30174] = {0,0,0,0,0}, -- Riding Turtle
[31700] = {0,0,0,0,0}, -- Black Qiraji Battle Tank
[31973] = {150,0,0,0,0}, -- Kessel's Elekk
[32235] = {225,0,1,0,0}, -- Golden Gryphon
[32239] = {225,0,1,0,0}, -- Ebon Gryphon
[32240] = {225,0,1,0,0}, -- Snowy Gryphon
[32242] = {300,0,1,0,0}, -- Swift Blue Gryphon
[32243] = {225,0,2,0,0}, -- Tawny Wind Rider
[32244] = {225,0,2,0,0}, -- Blue Wind Rider
[32245] = {225,0,2,0,0}, -- Green Wind Rider
[32246] = {300,0,2,0,0}, -- Swift Red Wind Rider
[32289] = {300,0,1,0,0}, -- Swift Red Gryphon
[32290] = {300,0,1,0,0}, -- Swift Green Gryphon
[32292] = {300,0,1,0,0}, -- Swift Purple Gryphon
[32295] = {300,0,2,0,0}, -- Swift Green Wind Rider
[32296] = {300,0,2,0,0}, -- Swift Yellow Wind Rider
[32297] = {300,0,2,0,0}, -- Swift Purple Wind Rider
[32345] = {0,0,0,0,0}, -- Peep the Phoenix Mount
[32420] = {0,0,0,0,0}, -- Old Crappy McWeakSauce
[33630] = {75,0,1,0,0}, -- Blue Mechanostrider
[33631] = {0,0,0,0,0}, -- Video Mount
[33660] = {150,0,2,0,0}, -- Swift Pink Hawkstrider
[34068] = {0,0,0,0,0}, -- Summon Dodostrider
[34406] = {75,0,1,0,0}, -- Brown Elekk
[34407] = {150,0,1,0,0}, -- Great Elite Elekk
[34790] = {150,0,0,0,0}, -- Dark War Talbuk
[34795] = {75,0,2,0,0}, -- Red Hawkstrider
[34896] = {150,0,2,0,0}, -- Cobalt War Talbuk
[34897] = {150,0,2,0,0}, -- White War Talbuk
[34898] = {150,0,2,0,0}, -- Silver War Talbuk
[34899] = {150,0,2,0,0}, -- Tan War Talbuk
[35018] = {75,0,2,0,0}, -- Purple Hawkstrider
[35020] = {75,0,2,0,0}, -- Blue Hawkstrider
[35022] = {75,0,2,0,0}, -- Black Hawkstrider
[35025] = {150,0,2,0,0}, -- Swift Green Hawkstrider
[35027] = {150,0,2,0,0}, -- Swift Purple Hawkstrider
[35028] = {150,0,2,0,0}, -- Swift Warstrider
[35710] = {75,0,1,0,0}, -- Gray Elekk
[35711] = {75,0,1,0,0}, -- Purple Elekk
[35712] = {150,0,1,0,0}, -- Great Green Elekk
[35713] = {150,0,1,0,0}, -- Great Blue Elekk
[35714] = {150,0,1,0,0}, -- Great Purple Elekk
[36702] = {150,0,0,0,0}, -- Fiery Warhorse
[37015] = {300,0,0,0,0}, -- Swift Nether Drake
[39315] = {150,0,2,0,0}, -- Cobalt Riding Talbuk
[39316] = {150,0,0,0,0}, -- Dark Riding Talbuk
[39317] = {150,0,2,0,0}, -- Silver Riding Talbuk
[39318] = {150,0,2,0,0}, -- Tan Riding Talbuk
[39319] = {150,0,2,0,0}, -- White Riding Talbuk
[39450] = {150,0,0,0,0}, -- Tallstrider
[39798] = {300,0,0,0,0}, -- Green Riding Nether Ray
[39800] = {300,0,0,0,0}, -- Red Riding Nether Ray
[39801] = {300,0,0,0,0}, -- Purple Riding Nether Ray
[39802] = {300,0,0,0,0}, -- Silver Riding Nether Ray
[39803] = {300,0,0,0,0}, -- Blue Riding Nether Ray
[39910] = {150,0,0,0,0}, -- Riding Clefthoof
[39949] = {300,0,0,0,0}, -- Mount (Test Anim)
[40192] = {300,0,0,0,0}, -- Ashes of Al'ar
[40212] = {300,0,0,0,0}, -- Dragonmaw Nether Drake
[41252] = {150,0,0,0,0}, -- Raven Lord
[41513] = {300,0,0,0,0}, -- Onyx Netherwing Drake
[41514] = {300,0,0,0,0}, -- Azure Netherwing Drake
[41515] = {300,0,0,0,0}, -- Cobalt Netherwing Drake
[41516] = {300,0,0,0,0}, -- Purple Netherwing Drake
[41517] = {300,0,0,0,0}, -- Veridian Netherwing Drake
[41518] = {300,0,0,0,0}, -- Violet Netherwing Drake
[42363] = {0,0,0,0,0}, -- Dan's Steam Tank Form
[42387] = {0,0,0,0,0}, -- Dan's Steam Tank Form (Self)
[42776] = {75,0,0,0,0}, -- Spectral Tiger
[42777] = {150,0,0,0,0}, -- Swift Spectral Tiger
[42929] = {75,0,0,0,0}, -- [DNT] Test Mount
[43688] = {150,0,0,0,0}, -- Amani War Bear
[43810] = {300,0,0,0,0}, -- Frost Wyrm
[43880] = {0,0,0,0,0}, -- Ramstein's Swift Work Ram
[43883] = {0,0,0,0,0}, -- Rental Racing Ram
[43899] = {75,0,0,0,0}, -- Brewfest Ram
[43900] = {150,0,0,0,0}, -- Swift Brewfest Ram
[43927] = {300,0,0,0,0}, -- Cenarion War Hippogryph
[44317] = {300,0,0,0,0}, -- Merciless Nether Drake
[44655] = {300,0,0,0,0}, -- Flying Reindeer
[44744] = {300,0,0,0,0}, -- Merciless Nether Drake
[44824] = {225,0,0,0,0}, -- Flying Reindeer
[44825] = {300,0,0,0,0}, -- Flying Reindeer
[44827] = {300,0,0,0,0}, -- Flying Reindeer
[45177] = {0,0,0,0,0}, -- Copy of Riding Turtle
[46197] = {225,0,0,0,0}, -- X-51 Nether-Rocket
[46199] = {300,0,0,0,0}, -- X-51 Nether-Rocket X-TREME
[46628] = {150,0,0,0,0}, -- Swift White Hawkstrider
[46980] = {150,0,0,0,0}, -- Northrend Nerubian Mount (Test)
[47037] = {150,0,0,0,0}, -- Swift War Elekk
[48023] = {75,0,0,0,0}, -- Headless Horseman's Mount
[48024] = {75,0,0,0,0}, -- Headless Horseman's Mount
[48025] = {75,0,0,0,0}, -- Headless Horseman's Mount
[48027] = {150,0,1,0,0}, -- Black War Elekk
[48954] = {150,0,0,0,0}, -- Swift Zhevra
[49193] = {300,0,0,0,0}, -- Vengeful Nether Drake
[49322] = {150,0,0,0,0}, -- Swift Zhevra
[49378] = {75,0,0,0,0}, -- Brewfest Riding Kodo
[49379] = {150,0,0,0,0}, -- Great Brewfest Kodo
[49908] = {0,0,0,0,0}, -- Pink Elekk
[50281] = {150,0,1,0,0}, -- Black Warp Stalker
[50869] = {75,0,0,0,0}, -- Brewfest Kodo
[50870] = {75,0,0,0,0}, -- Brewfest Ram
[51412] = {150,0,0,0,0}, -- Big Battle Bear
[51617] = {75,0,0,0,0}, -- Headless Horseman's Mount
[51621] = {75,0,0,0,0}, -- Headless Horseman's Mount
[51960] = {300,0,0,0,0}, -- Frost Wyrm Mount
[54753] = {150,0,0,0,0}, -- White Polar Bear
[55164] = {300,0,0,0,0}, -- Swift Spectral Gryphon
[55293] = {150,0,0,0,0}, -- Amani War Bear
[55531] = {150,0,2,0,0}, -- Mechano-hog
[58615] = {300,0,0,0,0}, -- Brutal Nether Drake
[58819] = {150,0,1,0,0}, -- Swift Brown Steed
[58983] = {75,0,0,0,0}, -- Big Blizzard Bear
[58997] = {75,0,0,0,0}, -- Big Blizzard Bear
[58999] = {75,0,0,0,0}, -- Big Blizzard Bear
[59567] = {300,0,0,0,0}, -- Azure Drake
[59568] = {300,0,0,0,0}, -- Blue Drake
[59569] = {300,0,0,0,0}, -- Bronze Drake
[59570] = {300,0,0,0,0}, -- Red Drake
[59571] = {300,0,0,0,0}, -- Twilight Drake
[59572] = {150,0,0,0,0}, -- Black Polar Bear
[59573] = {150,0,0,0,0}, -- Brown Polar Bear
[59650] = {300,0,0,0,0}, -- Black Drake
[59785] = {150,0,1,0,0}, -- Black War Mammoth
[59788] = {150,0,2,0,0}, -- Black War Mammoth
[59791] = {150,0,1,0,0}, -- Wooly Mammoth
[59793] = {150,0,2,0,0}, -- Wooly Mammoth
[59797] = {150,0,2,0,0}, -- Ice Mammoth
[59799] = {150,0,1,0,0}, -- Ice Mammoth
[59802] = {150,0,0,0,0}, -- Grand Ice Mammoth
[59804] = {150,0,0,0,0}, -- Grand Ice Mammoth
[59961] = {300,0,0,0,0}, -- Red Proto-Drake
[59976] = {300,0,0,0,0}, -- Black Proto-Drake
[59996] = {300,0,0,0,0}, -- Blue Proto-Drake
[60002] = {300,0,0,0,0}, -- Time-Lost Proto-Drake
[60021] = {300,0,0,0,0}, -- Plagued Proto-Drake
[60024] = {300,0,0,0,0}, -- Violet Proto-Drake
[60025] = {300,0,0,0,0}, -- Albino Drake
[60114] = {150,0,1,0,0}, -- Armored Brown Bear
[60116] = {150,0,2,0,0}, -- Armored Brown Bear
[60118] = {150,0,1,0,0}, -- Black War Bear
[60119] = {150,0,2,0,0}, -- Black War Bear
[60136] = {150,0,0,0,0}, -- Grand Caravan Mammoth
[60140] = {150,0,0,0,0}, -- Grand Caravan Mammoth
[60424] = {150,0,1,0,0}, -- Mekgineer's Chopper
[61229] = {300,0,1,0,0}, -- Armored Snowy Gryphon
[61230] = {300,0,2,0,0}, -- Armored Blue Wind Rider
[61294] = {300,0,0,0,0}, -- Green Proto-Drake
[61425] = {150,0,1,0,0}, -- Traveler's Tundra Mammoth (Alliance)
[61447] = {150,0,2,0,0}, -- Traveler's Tundra Mammoth (Horde)
[61465] = {150,0,1,0,0}, -- Grand Black War Mammoth
[61467] = {150,0,2,0,0}, -- Grand Black War Mammoth
[61469] = {150,0,2,0,0}, -- Grand Ice Mammoth
[61470] = {150,0,1,0,0}, -- Grand Ice Mammoth
[61983] = {150,0,0,0,0}, -- Dan's Test Mount
[61996] = {300,0,0,0,0}, -- Blue Dragonhawk
[61997] = {300,0,0,0,0}, -- Red Dragonhawk
[62048] = {300,0,0,0,0}, -- Black Dragonhawk Mount
[63232] = {150,0,1,0,0}, -- Stormwind Steed
[63635] = {150,0,2,0,0}, -- Darkspear Raptor
[63636] = {150,0,1,0,0}, -- Ironforge Ram
[63637] = {150,0,1,0,0}, -- Darnassian Nightsaber
[63638] = {150,0,1,0,0}, -- Gnomeregan Mechanostrider
[63639] = {150,0,1,0,0}, -- Exodar Elekk
[63640] = {150,0,2,0,0}, -- Orgrimmar Wolf
[63641] = {150,0,2,0,0}, -- Thunder Bluff Kodo
[63642] = {150,0,2,0,0}, -- Silvermoon Hawkstrider
[63643] = {150,0,2,0,0}, -- Forsaken Warhorse
[63796] = {300,0,0,0,0}, -- Mimiron's Head
[63844] = {300,0,0,0,0}, -- Argent Hippogryph
[63956] = {300,0,0,0,0}, -- Ironbound Proto-Drake
[63963] = {300,0,0,0,0}, -- Rusted Proto-Drake
[64656] = {150,0,2,0,0}, -- Blue Skeletal Warhorse
[64657] = {75,0,2,0,0}, -- White Kodo
[64658] = {75,0,2,0,0}, -- Black Wolf
[64659] = {150,0,2,0,0}, -- Venomhide Ravasaur
[64681] = {225,0,0,0,0}, -- Loaned Gryphon
[64731] = {75,0,0,0,0}, -- Sea Turtle
[64761] = {225,0,0,0,0}, -- Loaned Wind Rider
[64927] = {300,0,0,0,0}, -- Deadly Gladiator's Frost Wyrm
[64977] = {75,0,2,0,0}, -- Black Skeletal Horse
[64992] = {75,0,0,0,0}, -- Big Blizzard Bear [PH]
[64993] = {75,0,0,0,0}, -- Big Blizzard Bear [PH]
[65439] = {300,0,0,0,0}, -- Furious Gladiator's Frost Wyrm
[65637] = {150,0,1,0,0}, -- Great Red Elekk
[65638] = {150,0,1,0,0}, -- Swift Moonsaber
[65639] = {150,0,2,0,0}, -- Swift Red Hawkstrider
[65640] = {150,0,1,0,0}, -- Swift Gray Steed
[65641] = {150,0,2,0,0}, -- Great Golden Kodo
[65642] = {150,0,1,0,0}, -- Turbostrider
[65643] = {150,0,1,0,0}, -- Swift Violet Ram
[65644] = {150,0,2,0,0}, -- Swift Purple Raptor
[65645] = {150,0,2,0,0}, -- White Skeletal Warhorse
[65646] = {150,0,2,0,0}, -- Swift Burgundy Wolf
[65917] = {150,0,0,0,0}, -- Magic Rooster
[66087] = {300,0,0,0,0}, -- Silver Covenant Hippogryph
[66088] = {300,0,0,0,0}, -- Sunreaver Dragonhawk
[66090] = {150,0,1,0,0}, -- Quel'dorei Steed
[66091] = {150,0,2,0,0}, -- Sunreaver Hawkstrider
[66122] = {150,0,0,0,0}, -- Magic Rooster
[66123] = {150,0,0,0,0}, -- Magic Rooster
[66124] = {150,0,0,0,0}, -- Magic Rooster
[66846] = {150,0,2,0,0}, -- Ochre Skeletal Warhorse
[66847] = {75,0,1,0,0}, -- Striped Dawnsaber
[67336] = {300,0,0,0,0}, -- Relentless Gladiator's Frost Wyrm
[67466] = {150,0,0,0,0}, -- Argent Warhorse
[68056] = {150,0,2,0,0}, -- Swift Horde Wolf
[68057] = {150,0,1,0,0}, -- Swift Alliance Steed
[68187] = {150,0,1,0,0}, -- Crusader's White Warhorse
[68188] = {150,0,2,0,0}, -- Crusader's Black Warhorse
[68768] = {0,0,1,0,0}, -- Little White Stallion
[68769] = {0,0,2,0,0}, -- Little Ivory Raptor
[69395] = {300,0,0,0,0}, -- Onyxian Drake
[71342] = {150,0,0,0,0}, -- Big Love Rocket
[71343] = {150,0,0,0,0}, -- Big Love Rocket
[71344] = {75,0,0,0,0}, -- Big Love Rocket
[71345] = {150,0,0,0,0}, -- Big Love Rocket
[71346] = {150,0,0,0,0}, -- Big Love Rocket
[71347] = {150,0,0,0,0}, -- Big Love Rocket
[71810] = {300,0,0,0,0}, -- Wrathful Gladiator's Frost Wyrm
[72281] = {75,0,0,0,0}, -- Invincible
[72282] = {75,0,0,0,0}, -- Invincible
[72283] = {75,0,0,0,0}, -- Invincible
[72284] = {75,0,0,0,0}, -- Invincible
[72286] = {75,0,0,0,0}, -- Invincible
[72807] = {300,0,0,0,0}, -- Icebound Frostbrood Vanquisher
[72808] = {300,0,0,0,0}, -- Bloodbathed Frostbrood Vanquisher
[74854] = {225,0,0,0,0}, -- Blazing Hippogryph
[74855] = {300,0,0,0,0}, -- Blazing Hippogryph
[74856] = {225,0,0,0,0}, -- Blazing Hippogryph
[74918] = {150,0,0,0,0}, -- Wooly White Rhino
[75614] = {75,0,0,0,0}, -- Celestial Steed
[75617] = {75,0,0,0,0}, -- Celestial Steed
[75618] = {75,0,0,0,0}, -- Celestial Steed
[75619] = {75,0,0,0,0}, -- Celestial Steed
[75620] = {75,0,0,0,0}, -- Celestial Steed
[75957] = {225,0,0,0,0}, -- X-53 Touring Rocket
[75972] = {225,0,0,0,0}, -- X-53 Touring Rocket
[75973] = {225,0,0,0,0}, -- X-53 Touring Rocket
[76153] = {75,0,0,0,0}, -- Celestial Steed
[76154] = {225,0,0,0,0}, -- X-53 Touring Rocket
[10792] = {75,0,0,0,0}, -- Spotted Panther
[17458] = {75,0,0,0,0}, -- Fluorescent Green Mechanostrider
-- class mounts
[66906] = {150,2,0,0,0}, -- Argent Charger
[66907] = {75,2,0,0,0}, -- Argent Warhorse
[13819] = {75,2,1,0,0}, -- Warhorse
[23214] = {150,2,1,0,0}, -- Charger
[34769] = {75,2,2,0,0}, -- Summon Warhorse
[34767] = {150,2,2,0,0}, -- Summon Charger
[48778] = {150,6,0,0,0}, -- Acherus Deathcharger
[54726] = {225,6,0,0,0}, -- Winged Steed of the Ebon Blade
[54727] = {300,6,0,0,0}, -- Winged Steed of the Ebon Blade
[54729] = {225,6,0,0,0}, -- Winged Steed of the Ebon Blade
[73313] = {150,6,0,0,0}, -- Crimson Deathcharger
[23161] = {150,9,0,0,0}, -- Dreadsteed
[5784] = {75,9,0,0,0}, -- Felsteed
-- profession mounts
[75387] = {300,0,0,197,425}, -- Tiny Mooncloth Carpet
[75596] = {300,0,0,197,425}, -- Frosty Flying Carpet
[61451] = {225,0,0,197,300}, -- Flying Carpet
[61442] = {300,0,0,197,450}, -- Swift Mooncloth Carpet
[61444] = {300,0,0,197,450}, -- Swift Shadoweave Carpet
[61446] = {300,0,0,197,450}, -- Swift Spellfire Carpet
[61309] = {300,0,0,197,425}, -- Magnificent Flying Carpet
[44151] = {300,0,0,202,375}, -- Turbo-Charged Flying Machine
[44153] = {225,0,0,202,300}, -- Flying Machine
-- old vanilla faction mounts, used to need special skills
-- A: Horse Riding (148), Tiger Riding (150), Ram Riding(152)
-- H: Wolf Riding (149), Raptor Riding (533), Undead Horsemanship (554)
-- req can probably be safely ignored
[459] = {75,0,2,149,1}, -- Gray Wolf
[468] = {75,0,1,148,1}, -- White Stallion
[471] = {75,0,1,148,1}, -- Palamino
[578] = {75,0,2,149,1}, -- Black Wolf
[579] = {150,0,2,149,1}, -- Red Wolf
[581] = {75,0,2,149,1}, -- Winter Wolf
[6896] = {75,0,1,152,1}, -- Black Ram
[6897] = {75,0,1,152,1}, -- Blue Ram
[10788] = {75,0,1,150,1}, -- Leopard
[10790] = {75,0,1,150,1}, -- Tiger
[8980] = {75,0,2,554,1}, -- Skeletal Horse
[10787] = {75,0,1,150,1}, -- Black Nightsaber
[10795] = {75,0,2,533,1}, -- Ivory Raptor
[10798] = {75,0,2,533,1}, -- Obsidian Raptor
-- mounts from items with duration
[42667] = {225,0,0,0,0}, -- Flying Broom
[42668] = {300,0,0,0,0}, -- Swift Flying Broom
[42680] = {75,0,0,0,0}, -- Magic Broom
[42683] = {150,0,0,0,0}, -- Swift Magic Broom
[42692] = {0,0,0,0,0}, -- Rickety Magic Broom
[47977] = {300,0,0,0,0}, -- Magic Broom
[61289] = {150,0,0,0,0}, -- Borrowed Broom
-- disabled
-- [60120] = {0,0,0,0,0}, -- Summon Loaner Wind Rider
-- [26332] = {0,0,0,0,0}, -- Summon Mouth Tentacle
-- [30829] = {150,0,0,0,0}, -- Summon Kessel's Elekk
-- [30837] = {150,0,0,0,0}, -- Summon Kessel's Elekk
}
--local RIDING_SPELL = {
-- [75] = 33388, -- Apprentince Riding (75)
-- [150] = 33391, -- Journeyman Riding (150)
-- [225] = 34090, -- Expert Riding (225)
-- [300] = 34091, -- Artisan Riding (300)
--}
local function OnLogin(event, player)
if (AnnounceModule and event) then
player:SendBroadcastMessage("This server is running the |cff4CFF00AccountMounts|r module.")
end
local pGUID = player:GetGUIDLow()
local pAccountId = player:GetAccountId()
local results = CharDBQuery("SELECT guid FROM characters WHERE account = "..pAccountId.." and guid <> "..pGUID)
local guids = {}
if (results) then
repeat
table.insert(guids, results:GetUInt32(0))
until not results:NextRow()
end
if (#guids > 0) then
local guidstr = guids[1]
for i = 2, #guids do
guidstr = guidstr .. ",".. guids[i]
end
results = CharDBQuery("SELECT DISTINCT spell FROM character_spell WHERE guid IN("..guidstr..")")
if (results) then
local skill = player:GetSkillValue(762)
local class = player:GetClass()
local team = player:GetTeam()
repeat
local spellId = results:GetUInt32(0)
local mount = mount_listing[spellId]
if (mount) then
if ((skill >= mount[1]) and
((mount[2]==0) or (mount[2]==class)) and
((not StrictFactions) or (mount[3]==0) or (mount[3]==(team+1))) and
((mount[4]==0) or (mount[4]==148) or (mount[4]==149) or (mount[4]==150) or (mount[4]==152) or (mount[4]==533) or (mount[4]==554) or (player:GetSkillValue(mount[4]) >= mount[5]))) then
if ((spellId == 61425) and (team == 2)) then -- if StrictFactions=false, have to check and replace traveler mammoth special case, to not spawn enemy vendors
spellId = 61447
elseif ((spellId == 61447) and (team == 1)) then
spellId = 61425
end
if (not player:HasSpell(spellId)) then
player:LearnSpell(spellId)
end
end
end
until not results:NextRow()
end
end
end
local function OnCommand(event, player, command)
if (GM_LearnAllCmd and (command:lower() == "learn all mounts") and (player:GetGMRank() >= 1)) then
player:LearnSpell(33388) -- Apprentince Riding (75)
player:LearnSpell(33391) -- Journeyman Riding (150)
player:LearnSpell(34090) -- Expert Riding (225)
player:LearnSpell(34091) -- Artisan Riding (300)
for k,_ in pairs(mount_listing) do
player:LearnSpell(k)
end
return false
end
end
local function OnSendLearnedSpell(event, packet, player)
local spellId = packet:ReadULong() -- spellId(SMSG_LEARNED_SPELL) / oldSpellId (SMSG_SUPERCEDED_SPELL)
if(spellId == 33388 or spellId == 33391 or spellId == 34090 or spellId == 34091) then
player:RegisterEvent((function(_,_,_,p) OnLogin(nil, p) end), 100)
end
end
RegisterPlayerEvent(3, OnLogin)
RegisterPlayerEvent(42, OnCommand)
RegisterPacketEvent(299, 7, OnSendLearnedSpell) -- PACKET_EVENT_ON_PACKET_SEND (SMSG_LEARNED_SPELL)
RegisterPacketEvent(300, 7, OnSendLearnedSpell) -- PACKET_EVENT_ON_PACKET_SEND (SMSG_SUPERCEDED_SPELL)

9
Auto91.lua Normal file
View File

@@ -0,0 +1,9 @@
--Custom Content Auto-loader. If you don't see custom content in Azeroth or unscripted creatures, it's because it's December 31st. Just .event stop 91 and .event start 91 again.
local eventId = 91
function OnStartup()
StartGameEvent(eventId, true)
end
RegisterServerEvent(14, OnStartup)

View File

@@ -1,4 +1,4 @@
local AbominableGreench = {}
local AbominableGreench = {};
function AbominableGreench.OnDie(event, creature)
creature:SendUnitYell("Argh... I'll be back!", 0)

View File

@@ -1,60 +1,400 @@
local enabled = true
local spawnslist = {2260,14281,14221,2244,2261} -- npcid's
local hpmultiplier = 0.85 -- Spawned npc hp will be multiplied by players hp.
local despawntime = 25 --seconds before npc despawns
local rnumb = false --output rolled number for testing purposes
local GMonly = false --.xp works opens for GM
local function SpawnEnemy(event, player, killed)
local x = player:GetX()
local y = player:GetY()
local z = player:GetZ()
local o = player:GetO()
local map = player:GetMap()
local mapID = map:GetMapId()
local areaId = map:GetAreaId( x, y, z )
local faction = player:GetFaction()
local Target = player:GetSelection()
local playername = player:GetName()
local isDungeon = map:IsDungeon()
local playerHP = player:GetMaxHealth()
local spawnedCreature
local xp01 = "xp 0.1"
local xp02 = "xp 0.2"
local xp03 = "xp 0.3"
local xp04 = "xp 0.4"
local xp05 = "xp 0.5"
local xp06 = "xp 0.6"
local xp07 = "xp 0.7"
local xp08 = "xp 0.8"
local xp09 = "xp 0.9"
local xp1 = "xp 1"
local xp2 = "xp 2"
local xp3 = "xp 3"
local xp4 = "xp 4"
local xp5 = "xp 5"
local xp6 = "xp 6"
local xp7 = "xp 7"
local xp8 = "xp 8"
local xp9 = "xp 9"
local xp10 = "xp 10"
local xpq = "xp ?"
local xpd = "xp reset" -- only gm can use, it will wipe all custom xp rates.
local XPSQL = [[ CREATE TABLE IF NOT EXISTS Custom_XP ( CharID int(10) unsigned NOT NULL, Rate float unsigned NOT NULL DEFAULT 1) ENGINE=InnoDB DEFAULT CHARSET=utf8;]]
WorldDBExecute(XPSQL)
local function getPlayerCharacterGUID(player)
if player ~= nil then
query = CharDBQuery(string.format("SELECT guid FROM characters WHERE name='%s'", player:GetName()))
end
if query then
local row = query:GetRow()
return tonumber(row["guid"])
end
return nil
end
local function SKULY(eventid, delay, repeats, player)
player:SendBroadcastMessage("|cff3399FF You can change your XP by typing |cff00cc00 .xp 0.1-0.9 |cff3399FF or |cff00cc00 .xp 1-10 |cff3399FF in chat.")
player:SendBroadcastMessage("|cff3399FF You can check your current XP rate by typing |cff00cc00 .xp ? |cff3399FF in chat.")
end
local function OnLogin(event, player)
local mingmrank = 3
local PUID = getPlayerCharacterGUID(player)
if (not GMonly and player:GetGMRank() < mingmrank) then
player:RegisterEvent(SKULY, 10000, 1, player)
end
local Taunts = {
"Hey "..playername.." u r so uglaaaay!!!! LMAO",
"Hey "..playername.."! It's game over for you!",
"Hey "..playername.." What's up now!?",
"Hey "..playername.." Ready when you are!",
"Hey "..playername.." You'll get no sympathy from me!",
"Victory or Death!!!",
""..playername.." is about to cry like a baby.",
"Run "..playername.." run!",
"Hey "..playername.." whats that on ur head? oh yea my weapon.",
"Hey "..playername.." why don't apple jacks taste like apples?"
}
if (GMonly and player:GetGMRank() >= mingmrank) then
player:RegisterEvent(SKULY, 10000, 1, player)
end
if (GMonly and player:GetGMRank() < mingmrank) then
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
end
end
local function GMONLY(player)
player:SendBroadcastMessage("|cff5af304Only a GM can use this command.|r")
end
local chosen = spawnslist[math.random(1, #spawnslist)]
local healammount = playerHP * hpmultiplier
local r = math.random(1,100)
local level = player:GetLevel()
if r <= 50 and not isDungeon then
local EnemyNear = player:GetNearestCreature( 80, chosen )
if EnemyNear == nil then
spawnedCreature = player:SpawnCreature( chosen, x-5, y, z, o, 3, despawntime )
spawnedCreature:SetLevel(level)
spawnedCreature:SetMaxHealth(playerHP * hpmultiplier)
spawnedCreature:DealHeal( spawnedCreature, 39334, healammount )
spawnedCreature:SendUnitSay(Taunts[math.random(1, #Taunts)], 0)
spawnedCreature:AttackStart(player)
local function SetRate(event, player, msg)
--local function SetRate(event, player, message, Type, lang)
local PUID = getPlayerCharacterGUID(player)
if PUID ~= nil then
local Q = WorldDBQuery(string.format("SELECT * FROM custom_xp WHERE CharID=%i", PUID))
end
local mingmrank = 3
if msg == xp01 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 0.1)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 0.1x|r")
return false
end
end
if rnumb then
player:SendBroadcastMessage("|cff3399FF (Randomly Attacked script) number: |cff00cc00"..r.."|cff3399FF")
if msg == xp02 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 0.2)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 0.2x|r")
return false
end
end
if msg == xp03 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 0.3)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 0.3x|r")
return false
end
end
if msg == xp04 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 0.4)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 0.4x|r")
return false
end
end
if msg == xp05 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 0.5)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 0.5x|r")
return false
end
end
if msg == xp06 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 0.6)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 0.6x|r")
return false
end
end
if msg == xp07 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 0.7)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 0.7x|r")
return false
end
end
if msg == xp08 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 0.8)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 0.8x|r")
return false
end
end
if msg == xp09 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 0.9)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 0.9x|r")
return false
end
end
if msg == xp1 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 1)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 1x|r")
return false
end
end
if msg == xp2 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 2)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 2x|r")
return false
end
end
if msg == xp3 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 3)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 3x|r")
return false
end
end
if msg == xp4 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 4)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 4x|r")
return false
end
end
if msg == xp5 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 5)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 5x|r")
return false
end
end
if msg == xp6 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 6)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 6x|r")
return false
end
end
if msg == xp7 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 7)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 7x|r")
return false
end
end
if msg == xp8 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 8)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 8x|r")
return false
end
end
if msg == xp9 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 9)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 9x|r")
return false
end
end
if msg == xp10 then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
WorldDBExecute(string.format("DELETE FROM custom_xp WHERE CharID = %i", PUID))
WorldDBExecute(string.format("INSERT INTO custom_xp VALUES (%i, 10)", PUID))
player:SendBroadcastMessage("|cff5af304You changed your XP rate to 10x|r")
return false
end
end
if msg == xpq then
if (GMonly and player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
if Q then
local CharID, Rate = Q:GetUInt32(0), Q:GetFloat(1)
player:SendBroadcastMessage(string.format("|cff5af304Your XP rate is curently set to %.1f|r", Rate))
return false
else
player:SendBroadcastMessage(string.format("|cff5af304You haven't set a custom rate yet.|r"))
return false
end
end
end
if msg == xpd then
if (player:GetGMRank() < mingmrank) then
GMONLY(player)
return false
else
local XPSQLDEL = [[ DROP TABLE IF EXISTS Custom_XP]]
WorldDBExecute(XPSQLDEL)
local XPSQL2 = [[ CREATE TABLE IF NOT EXISTS Custom_XP ( CharID int(10) unsigned NOT NULL, Rate float unsigned NOT NULL DEFAULT 1) ENGINE=InnoDB DEFAULT CHARSET=utf8;]]
WorldDBExecute(XPSQL2)
player:SendBroadcastMessage("|cff5af304You reset XP table|r")
return false
end
end
end
local function OnXP(event, player, amount, victim)
local PUID = getPlayerCharacterGUID(player)
local Q = WorldDBQuery(string.format("SELECT * FROM custom_xp WHERE CharID=%i", PUID))
local mingmrank = 3
if Q then
local CharID, Rate = Q:GetUInt32(0), Q:GetFloat(1)
Rate = tonumber(string.format("%.1f", Rate))
if (GMonly and player:GetGMRank() < mingmrank) then
return amount
end
if (GMonly and player:GetGMRank() >= mingmrank) then
return amount * Rate
end
if (not GMonly) then
return amount * Rate
end
else
return amount
end
end
if enabled then
RegisterPlayerEvent(7, SpawnEnemy)
RegisterPlayerEvent(3, OnLogin)
RegisterPlayerEvent(12, OnXP)
RegisterPlayerEvent(42, SetRate)
end

View File

@@ -1,25 +1,30 @@
local npcId = 900003
local FoeReaper = {};
local function CastTrample(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 5568, true)
creature:CastSpell(creature:GetVictim(), 5568, true)
end
local function OnEnterCombat(event, creature, target)
creature:RegisterEvent(CastTrample, 5000, 0)
end
local function OnLeaveCombat(event, creature)
creature:SendUnitYell("Haha, you lose!", 0)
creature:RemoveEvents()
function FoeReaper.OnEnterCombat(event, creature, target)
creature:RegisterEvent(CastTrample, 5000, 0)
end
local function OnDied(event, creature, killer)
if(killer:GetObjectType() == "Player") then
killer:SendBroadcastMessage("You killed " ..creature:GetName().."!")
end
creature:RemoveEvents()
function FoeReaper.OnLeaveCombat(event, creature)
creature:SendUnitYell("Haha, you lose!", 0)
creature:RemoveEvents()
end
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
RegisterCreatureEvent(npcId, 4, OnDied)
function FoeReaper.OnDied(event, creature, killer)
if(killer:GetObjectType() == "Player") then
killer:SendBroadcastMessage("You killed " ..creature:GetName().."!")
end
creature:RemoveEvents()
end
function FoeReaper.OnSpawn(event, creature)
creature:SendUnitYell("I'm baaaaaaaaack!!!", 0)
end
RegisterCreatureEvent(900003, 1, FoeReaper.OnEnterCombat)
RegisterCreatureEvent(900003, 2, FoeReaper.OnLeaveCombat)
RegisterCreatureEvent(900003, 4, FoeReaper.OnDied)
RegisterCreatureEvent(900003, 5, FoeReaper.OnSpawn)

203
LevelUpReward.lua Normal file
View File

@@ -0,0 +1,203 @@
--
-- Created by IntelliJ IDEA.
-- User: Silvia
-- Date: 28/02/2021
-- Time: 23:16
-- To change this template use File | Settings | File Templates.
-- Originally created by Honey for Azerothcore
-- requires ElunaLua module
-- Updated By: Ragundah
-- Date: 13/05/2021
--Players will receive rewards when their characters reach the levels in brackets.
------------------------------------------------------------------------------------------------
-- ADMIN GUIDE: - compile the core with ElunaLua module
-- - adjust config in this file
-- - create a character who appears as sender of the mails with senderGUID
-- - add this script to ../lua_scripts/
------------------------------------------------------------------------------------------------
local Config_Gold = {}
local Config_ItemId = {}
local Config_ItemAmount = {}
local LUR_playerCounter = {}
Config_Gold[10] = 20000 -- gold granted when reaching level [10] in copper. 10000 = 1 gold. Cost for spells 10-18 (mage): ~1g50s
Config_Gold[20] = 140000 -- Cost for spells 20-28 (mage): ~11g
Config_Gold[30] = 360000 -- Cost for spells 30-38 (mage): ~27g
Config_Gold[40] = 700000 -- Cost for spells 40-48 (mage): ~50g
Config_Gold[50] = 1000000 -- Cost for spells 50-58 (mage): ~93g
Config_Gold[61] = 1250000
Config_Gold[65] = 1600000
Config_Gold[71] = 2000000
Config_Gold[75] = 3000000
Config_Gold[80] = 7000000
Config_ItemId[29] = 34492 -- item granted when reaching level [29] / 5740 is a cosmetic red rocket
Config_ItemAmount[29] = 1 -- amount of items to be granted when reaching level [29]. Missing amounts are automatically set to 1 if an ItemId is given
Config_ItemId[35] = 45706
Config_ItemAmount[35] = 1
Config_ItemId[40] = 46109
Config_ItemAmount[40] = 1
Config_ItemId[43] = 52001
Config_ItemAmount[43] = 1
Config_ItemId[46] = 45706
Config_ItemAmount[46] = 1
Config_ItemId[50] = 52002
Config_ItemAmount[50] = 1
Config_ItemId[59] = 33223
Config_ItemAmount[59] = 1
Config_ItemId[60] = 49646
Config_ItemAmount[60] = 1
Config_ItemId[64] = 9312
Config_ItemAmount[64] = 5
Config_ItemId[69] = 9313
Config_ItemAmount[69] = 5
Config_ItemId[70] = 9314
Config_ItemAmount[70] = 5
-- General Settings Config
local Config_mailText = 2 -- Which text to send in the mail to the player.
local Config_senderGUID = 1 -- GUID/ID of the Player/Creature. If Config_preventReturn = true then you need to put Creature ID. If it's false Player GUID. 0 = No sender aka "From: Unknown".
local Config_mailStationery = 41 -- Stationary used in the mail sent to the player. (41 Normal Mail, 61 GM/Blizzard Support, 62 Auction, 64 Valentines, 65 Christmas) Note: Use 62, 64, and 65 At your own risk.
local Config_maxGMRank = 3 -- Checks the player's assigned GM rank. Anything above the assigned default will not receive mail/be counted for the player counter. Default 0 - Players Only. Max 3 - All GMS/Mods/Etc will receive as well.
local Config_preventReturn = true -- Modify's the Mail database to prevent returning of rewards. Note: If you are experiencing server lag after installing this module please disable this option to see if it helps.
-- Config_mailText == 1 Config
local Config_mailSubject1 = "Dinkle's reward for You!"
local Config_mailText1 = "!\n\nYou've done well while advancing on Dinkle's Server. Here is a small reward to celebrate your heroic deeds. Go forth!\n\nKind regards,\nDinkle"
-- Config_mailText == 2 Config
local Config_mailSubject2 = "Dinkle's reward for You!"
local Config_mailText2A = " and congratulations! \n\nThe bronze Dragonflight would like to inform you that you were the "
local Config_mailText2B = " adventurer to reach the "
local Config_mailText2C = " level of mastery.\nYour adventures have made me take notice of you, take this small reward as a token of my appreciation.\nGo forth!\n\nKind regards,\nDinkle"
-- Name of Eluna dB scheme
local Config_customDbName = 'ac_eluna';
------------------------------------------
-- NO ADJUSTMENTS REQUIRED BELOW THIS LINE
------------------------------------------
CharDBQuery('CREATE DATABASE IF NOT EXISTS `'..Config_customDbName..'`;');
CharDBQuery('CREATE TABLE IF NOT EXISTS `'..Config_customDbName..'`.`levelup_reward` (`level` INT NOT NULL, `counter` INT DEFAULT 0, PRIMARY KEY (`level`) );');
local n
for n = 2,80,1 do
LUR_playerCounter[n] = 0
end
Data_SQL = CharDBQuery('SELECT `level`, `counter` FROM `'..Config_customDbName..'`.`levelup_reward`;');
if Data_SQL ~= nil then
local levelRow
repeat
levelRow = Data_SQL:GetUInt32(0)
LUR_playerCounter[levelRow] = Data_SQL:GetUInt32(1)
until not Data_SQL:NextRow()
end
local PLAYER_EVENT_ON_LEVEL_CHANGE = 13
local function PreventReturn(playerGUID)
if Config_preventReturn == true then
CharDBExecute('UPDATE `mail` SET `messageType` = 3 WHERE `sender` = '..Config_senderGUID..' AND `receiver` = '..playerGUID..' AND `messageType` = 0;')
end
end
local function GrantReward(event, player, oldLevel)
if oldLevel ~= nil and player:GetGMRank() <= Config_maxGMRank then
if Config_mailText == 1 then
if Config_ItemId[oldLevel + 1] ~= nil then
local playerName = player:GetName()
local playerGUID = tostring(player:GetGUID())
local itemAmount
if Config_ItemAmount[oldLevel + 1] ~= nil then
itemAmount = Config_ItemAmount[oldLevel + 1]
else
itemAmount = 1
end
if Config_Gold[oldLevel + 1] == nil then
Config_Gold[oldLevel + 1] = 0
end
SendMail(Config_mailSubject1, "Hello "..playerName..Config_mailText1, playerGUID, Config_senderGUID, Config_mailStationery, 0, Config_Gold[oldLevel + 1],0,Config_ItemId[oldLevel + 1], Config_ItemAmount[oldLevel + 1])
print("LevelUpReward has granted "..Config_Gold[oldLevel + 1].." copper and "..Config_ItemAmount[oldLevel + 1].." of item "..Config_ItemId[oldLevel + 1].." to character "..playerName.." with guid "..playerGUID..".")
PreventReturn(playerGUID)
playerName = nil
playerGUID = nil
return false
elseif Config_Gold[oldLevel + 1] ~= nil then
local playerName = player:GetName()
local playerGUID = tostring(player:GetGUID())
SendMail(Config_mailSubject1, "Hello "..playerName..Config_mailText1, playerGUID, Config_senderGUID, Config_mailStationery, 0, Config_Gold[oldLevel + 1])
print("LevelUpReward has granted "..Config_Gold[oldLevel + 1].." copper to character "..playerName.." with guid "..playerGUID..".")
PreventReturn(playerGUID)
playerName = nil
playerGUID = nil
return false
end
end
local playerCounterStr
local currentLevelStr
local currentLevel = oldLevel + 1
LUR_playerCounter[currentLevel] = LUR_playerCounter[currentLevel] + 1
CharDBExecute('REPLACE INTO `'..Config_customDbName..'`.`levelup_reward` VALUES ('..currentLevel..', '..LUR_playerCounter[currentLevel]..');');
playerCounterStr = tostring(LUR_playerCounter[currentLevel])
if string.sub(playerCounterStr, -1) == "1" then
playerCounterStr = playerCounterStr.."st"
elseif string.sub(playerCounterStr, -1) == "2" then
playerCounterStr = playerCounterStr.."nd"
elseif string.sub(playerCounterStr, -1) == "3" then
playerCounterStr = playerCounterStr.."rd"
else
playerCounterStr = playerCounterStr.."th"
end
currentLevelStr = tostring(currentLevel)
if string.sub(currentLevelStr, -1) == "1" then
currentLevelStr = currentLevelStr.."st"
elseif string.sub(currentLevelStr, -1) == "2" then
currentLevelStr = currentLevelStr.."nd"
elseif string.sub(currentLevelStr, -1) == "3" then
currentLevelStr = currentLevelStr.."rd"
else
currentLevelStr = currentLevelStr.."th"
end
if Config_mailText == 2 then
if Config_ItemId[oldLevel + 1] ~= nil and Config_mailText == 2 then
local playerName = player:GetName()
local playerGUID = tostring(player:GetGUID())
local itemAmount
if Config_ItemAmount[oldLevel + 1] ~= nil then
itemAmount = Config_ItemAmount[oldLevel + 1]
else
itemAmount = 1
end
if Config_Gold[oldLevel + 1] == nil then
Config_Gold[oldLevel + 1] = 0
end
SendMail(Config_mailSubject2, "Hello "..playerName..Config_mailText2A..playerCounterStr..Config_mailText2B..currentLevelStr..Config_mailText2C, playerGUID, Config_senderGUID, Config_mailStationery, 0, Config_Gold[oldLevel + 1],0,Config_ItemId[oldLevel + 1], Config_ItemAmount[oldLevel + 1])
print("LevelUpReward has granted "..Config_Gold[oldLevel + 1].." copper and "..Config_ItemAmount[oldLevel + 1].." of item "..Config_ItemId[oldLevel + 1].." to character "..playerName.." with guid "..playerGUID..".")
PreventReturn(playerGUID)
playerName = nil
playerGUID = nil
return false
elseif Config_Gold[oldLevel + 1] ~= nil and Config_mailText == 2 then
local playerName = player:GetName()
local playerGUID = tostring(player:GetGUID())
SendMail(Config_mailSubject2, "Hello "..playerName..Config_mailText2A..playerCounterStr..Config_mailText2B..currentLevelStr..Config_mailText2C, playerGUID, Config_senderGUID, Config_mailStationery, 0, Config_Gold[oldLevel + 1])
print("LevelUpReward has granted "..Config_Gold[oldLevel + 1].." copper to character "..playerName.." with guid "..playerGUID..".")
PreventReturn(playerGUID)
playerName = nil
playerGUID = nil
return false
end
end
end
end
RegisterPlayerEvent(PLAYER_EVENT_ON_LEVEL_CHANGE, GrantReward)

31
Lithe-Stalker.lua Normal file
View File

@@ -0,0 +1,31 @@
local LitheStalker = {};
local function CastWhirlingTip(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 24048, true)
end
local function CastSweepingSlam(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 53399, true)
end
function LitheStalker.OnEnterCombat(event, creature, target)
creature:SendUnitYell("The Master will have your guts!", 0)
creature:RegisterEvent(CastWhirlingTip, 5000, 0)
creature:RegisterEvent(CastSweepingSlam, 10000, 0)
end
function LitheStalker.OnLeaveCombat(event, creature)
creature:SendUnitSay("Mmmm....", 0)
creature:RemoveEvents()
end
function LitheStalker.OnDied(event, creature, killer)
if(killer:GetObjectType() == "Player") then
killer:SendBroadcastMessage("You killed " ..creature:GetName().."!")
end
creature:RemoveEvents()
end
RegisterCreatureEvent(400015, 1, LitheStalker.OnEnterCombat)
RegisterCreatureEvent(400015, 2, LitheStalker.OnLeaveCombat)
RegisterCreatureEvent(400015, 4, LitheStalker.OnDied)

View File

@@ -1,52 +1,49 @@
local npcId = 400012
local Patchqwerk = {}
local function OnSpawn(event, creature)
local function OnSpawn(event, creature)
creature:SendUnitYell("Patchqwerk make Lich King proud! You die now!",0)
creature:SetMaxHealth(46664000)
end
function Patchqwerk.OnSpawn(event, creature)
creature:SendUnitYell("Patchqwerk make Lich King proud! You die now!",0)
creature:SetMaxHealth(4664000)
end
local function PoisonBoltVolley(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 40095, true)
function Patchqwerk.PoisonBoltVolley(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 40095, true)
end
local function CastHatefulStrike(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 28308, true)
function Patchqwerk.CastHatefulStrike(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 28308, true)
end
local function CastGore(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 48130, true)
function Patchqwerk.CastGore(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 48130, true)
end
local function OnEnterCombat(event, creature, target)
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] --script pulls one dialogue option from above upon entering combat.
creature:SendUnitYell(selectedYell, 0)
creature:RegisterEvent(PoisonBoltVolley, 10000, 0) --The 0 in creature:RegisterEvent(PoisonBoltVolley, 10000, 0) is the number of times the event will be called. In this case, 0 means the event will be called an unlimited number of times until the creature is killed or leaves combat. If you set it to 1, for example, the event will only be called once and then stop.
creature:RegisterEvent(CastHatefulStrike, 15000, 0)
creature:RegisterEvent(CastGore, 20000, 0)
end
local function OnLeaveCombat(event, creature) --Stuff the creature will do upon leaving combat, in this case yell
local yellOptions = { "You not so tasty afterall...", "I'll be back for seconds!", "No more play? Too bad...", "Maybe next time you'll taste better!","Me still hungry, come back later!","You not enough food, me go find more!" }
local randomIndex = math.random(1, 6)
local selectedYell = yellOptions[randomIndex]
creature:SendUnitYell(selectedYell, 0)
creature:RemoveEvents()
function Patchqwerk.OnEnterCombat(event, creature, target)
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] --script pulls one dialogue option from above upon entering combat.
creature:SendUnitYell(selectedYell, 0)
creature:RegisterEvent(Patchqwerk.PoisonBoltVolley, 7000, 0)
creature:RegisterEvent(Patchqwerk.CastHatefulStrike, 15000, 0)
creature:RegisterEvent(Patchqwerk.CastGore, 20000, 0)
end
local function OnDied(event, creature, killer) --OnDied is a function that is triggered when the creature dies. Creature sends Yell and broadcast message. If the killer is a player, it sends a broadcast message to the player with the text "You killed <creature name>!". The function also removes all registered events.
creature:SendUnitYell("Patchqwerk forget to chew...", 0)
if(killer:GetObjectType() == "Player") then
killer:SendBroadcastMessage("You killed " ..creature:GetName().."!")
end
creature:RemoveEvents()
function Patchqwerk.OnLeaveCombat(event, creature)
local yellOptions = { "You not so tasty afterall...", "I'll be back for seconds!", "No more play? Too bad...", "Maybe next time you'll taste better!","Me still hungry, come back later!","You not enough food, me go find more!" }
local randomIndex = math.random(1, 6)
local selectedYell = yellOptions[randomIndex]
creature:SendUnitYell(selectedYell, 0)
creature:RemoveEvents()
end
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
RegisterCreatureEvent(npcId, 4, OnDied)
RegisterCreatureEvent(npcId, 5, OnSpawn)
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
RegisterCreatureEvent(400012, 1, Patchqwerk.OnEnterCombat)
RegisterCreatureEvent(400012, 2, Patchqwerk.OnLeaveCombat)
RegisterCreatureEvent(400012, 4, Patchqwerk.OnDied)
RegisterCreatureEvent(400012, 5, Patchqwerk.OnSpawn)

85
QuestComplete.lua Normal file
View File

@@ -0,0 +1,85 @@
--[[
Added status to check if COMPLETE or INCOMPLETE should not take gold if already completed
Aswell as added LogTitle and ID to the broadcast message
]]
local MSGQC = "#qc" -- Command
local rankCommand = 3 -- GM Rank
local takeMoney = 0.10 -- Set the amount of gold you want to take from the player (0.025 = 2.5%)
local Quest = {}
local QUEST_STATUS_COMPLETE = 1
local QUEST_STATUS_INCOMPLETE = 3
function Quest.Update(player)
local query = CharDBQuery("SELECT name, Money FROM characters")
if query then
repeat
local row = query:GetRow()
local CurrentName = (row["name"]) -- Get the name of the player
local Gold = tonumber(row["Money"]) -- Get the amount of gold of the player
local Gold_new = math.floor(Gold * takeMoney) -- Calculate the amount of gold to take
if (CurrentName == player:GetName()) then
player:SaveToDB()
local query1 = WorldDBQuery(
"SELECT ID, LogTitle FROM quest_template")
if query1 then
repeat
local Entry = query1:GetRow() -- Get the row
local QuestTitle = query1:GetRow() -- Get the name of the player
local QuestID = tonumber(Entry["ID"]) -- Get the ID of the quest
local LogTitle = string.format(QuestTitle["LogTitle"])
-- check if already completed if so skip it
local isCompleted = player:GetQuestStatus(QuestID)
if isCompleted == QUEST_STATUS_COMPLETE then
player:SendBroadcastMessage(
"|cFFffffff|cFF00ff00The World |r|cFFffffff already completed |cFFffffff|cFF00ff00" ..
LogTitle .. "|r|cFFffffff for you")
end
if isCompleted == QUEST_STATUS_INCOMPLETE then
if player:HasQuest(QuestID) then
player:CompleteQuest(QuestID)
player:SendBroadcastMessage(
"|cFFffffff|cFF00ff00Quest: |r|cFFffffff" ..
LogTitle ..
"|cFFffffff|cFF00ff00 ID:|r |cFFffffff" ..
QuestID ..
"|cFFffffff|cFFffffff completed for you")
player:ModifyMoney(-Gold_new)
player:SendBroadcastMessage(
"|cFFffffff|cFF00ff00The World |r|cFFffffff has taken |cFFffffff|cFF00ff00" ..
takeMoney ..
"%|r|cFFffffff of the |cFF00ff00" ..
Gold_new .. "|r|cFFffffff coins")
end
end
until not query1:NextRow()
end
end
until not query:NextRow()
end
end
function Quest.Complete(_, player, msg, _, _)
if msg:find(MSGQC) then
local gmRank = player:GetGMRank()
if (gmRank < rankCommand) then
player:SendBroadcastMessage(
"|cFFffffff|cFF00ff00The World |r|cFFffffff Don't have access. |cFF00ff00")
return
end
Quest.Update(player)
return false
end
end
RegisterPlayerEvent(18, Quest.Complete)

View File

@@ -1,4 +1,4 @@
local npcId = 400014 --ID from creature_template
local SwHorse = {}; --ID from creature_template
local dialogues = {
"Defend our lands with all you've got!",
@@ -34,5 +34,5 @@ local randomDialogue = dialogues[math.random(26)]
creature:SendUnitYell(randomDialogue,0)
end
RegisterCreatureEvent(npcId, 5, OnSpawn)
RegisterCreatureEvent(400014, 5, OnSpawn)

View File

@@ -1,4 +1,4 @@
local npcId = 400013
local Stormwind = {};
local function CastCleave(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 20677, true)
@@ -16,6 +16,6 @@ local function OnDied(event, creature, killer)
creature:RemoveEvents()
end
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
RegisterCreatureEvent(npcId, 4, OnDied)
RegisterCreatureEvent(400013, 1, OnEnterCombat)
RegisterCreatureEvent(400013, 2, OnLeaveCombat)
RegisterCreatureEvent(400013, 4, OnDied)

View File

@@ -12,7 +12,9 @@ local npcIds1 = {
10407,
400010,
400011,
400015
400015,
400016,
300018
}
-- Table to store NPC IDs for group 2
@@ -22,6 +24,7 @@ local npcIds2 = {
68,
1976,
466,
400018
}
-- Boolean to enable or disable modifying health and level

29
Turalyon.lua Normal file
View File

@@ -0,0 +1,29 @@
local npcid = 400018
local spellid1 = 100135
local spellid2 = 69930
local yelltext = {
"This world is ours, and by the Holy Light we will keep it safe, now and forever.",
"We will stand tall, and we will fight on, in the name of the Light!",
"Let the shadows flee before the blazing light of justice!",
"For the Alliance! For the Light!",
}
local waypointIndex = 0
function OnReachWp(event, creature, waypoint)
if waypointIndex >= #yelltext then
waypointIndex = 0
end
creature:CastSpell(creature, spellid1, true)
creature:CastSpell(creature, spellid2, true)
creature:SendUnitYell(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)

17
reload_scripts.lua Normal file
View File

@@ -0,0 +1,17 @@
-- Name: Reload Scripts
-- Details: Reloads lua scripts for faster development.
-- Usage: Type "reload scripts" in the mangosd console or in-game.
-- Website: https://github.com/RStijn
-- Functions
function reloadElunaEngine(event, player, command)
if command == "reload scripts" or command == "reloadscripts" then
if player == nil or player:IsGM() then -- console or gm
ReloadEluna()
else
player:SendBroadcastMessage("Turn <GM> mode on for access to this command")
end
end
end
RegisterPlayerEvent(42, reloadElunaEngine)