mirror of
https://github.com/araxiaonline/RandomScriptsforAzerothCore.git
synced 2026-06-13 02:22:19 -04:00
Add files via upload
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
------------------------------------------------------------------------------------------------
|
||||
-- AUTO LEARN SKILLS MOD
|
||||
------------------------------------------------------------------------------------------------
|
||||
local EnableModule = false
|
||||
local AnnounceModule = true -- Announce module on player login ?
|
||||
local EnableModule = false -- Set to true to enable
|
||||
local AnnounceModule = false -- Announce module on player login ?
|
||||
|
||||
local MaxLevel = false -- Set to true to enable max level skills instantly when login
|
||||
local MaxPlayerLevel = 80 -- Max player level change to your liking.
|
||||
|
||||
local AutoDualSpec = true -- Auto learn Dual Specialization
|
||||
local AutoRiding = true -- Auto learn Riding
|
||||
local AutoDualSpec = false -- Auto learn Dual Specialization
|
||||
local AutoRiding = false -- Auto learn Riding
|
||||
|
||||
local NorthrendFlyLevel = 68 -- Which level to learn Cold Weather Flying
|
||||
--
|
||||
|
||||
209
BufferNPC.lua
Normal file
209
BufferNPC.lua
Normal file
@@ -0,0 +1,209 @@
|
||||
-- place in game with .npc add 400117
|
||||
|
||||
local NPCID = 400117
|
||||
local ANNOUNCE_MODULE = true
|
||||
local BUFF_BY_LEVEL = true
|
||||
local BUFF_CURE_RES = true
|
||||
local BUFF_NUM_PHRASES = 19
|
||||
local BUFF_NUM_WHISPERS = 14
|
||||
local BUFF_MESSAGE_TIMER = 60000
|
||||
local BUFF_EMOTE_SPELL = 44940
|
||||
local ENABLE_BUFF_EMOTE_SPELL = false -- shoots off a firework periodically to grab attention
|
||||
|
||||
|
||||
local phrases = {
|
||||
"It's no fluff, you'll be tough, with these buffs!",
|
||||
"Get empowered, not devoured, in this crucial hour!",
|
||||
"Strength and might, for the fight, buffs that'll make you feel right!",
|
||||
"You'll be spry, don't be shy, with these buffs you'll touch the sky!",
|
||||
"Grab a buff, no need to bluff, you'll be rough and tough enough!",
|
||||
"In this fray, don't delay, buffs to brighten up your day, %s!",
|
||||
"Come get buffed, taste my stuff, the elven females can't get enuff!",
|
||||
"With these charms, flex your arms, no more worries, no more qualms!",
|
||||
"Be the talk, take a walk, show your prowess, let them gawk!",
|
||||
"Power up, be the champ, with these buffs you'll break the camp!",
|
||||
"Buffs are here, have no fear, you'll be strong from ear to ear!",
|
||||
"Take your fill, prove your skill, let these buffs your courage instill!",
|
||||
"No more stress, you'll impress, with these buffs you're sure to progress!",
|
||||
"Feel the surge, let it merge, with these buffs you'll surely emerge!",
|
||||
"You're no pawn, time to dawn, buffs that make you strong like brawn!",
|
||||
"Rise above, like a dove, with these buffs that fit like a glove!",
|
||||
"Buff your way, seize the day, show the world your strength's at play!",
|
||||
"Be the bane, no more pain, with these buffs your power will gain!",
|
||||
"With great cheer, have no fear, buffs are here, your path is clear!"
|
||||
}
|
||||
|
||||
|
||||
local whispers = {
|
||||
"With this boost, cut them loose, show them all your inner moose, %s!",
|
||||
"You'll shine bright, like a light, let your power take its flight, %s!",
|
||||
"A buff for you, strong and true, in your quest, they'll see you through, %s!",
|
||||
"These buffs I share, for those who dare, to face the world without despair, %s!",
|
||||
"Go with grace, win the race, let these buffs keep up your pace, %s!",
|
||||
"Fare thee well, give 'em hell, let your victories ring like a bell, %s!",
|
||||
"Forge ahead, show your stead, with these buffs, you'll be well-fed, %s!",
|
||||
"Stride with pride, side by side, let these buffs be your guide, %s!",
|
||||
"Off you go, steal the show, these buffs will help your power grow, %s!",
|
||||
"Now's your chance, take a stance, with these buffs, you'll enhance, %s!",
|
||||
"Buffed and ready, keep it steady, face the world with blade unsteady, %s!",
|
||||
"On your way, don't delay, let these buffs keep foes at bay, %s!",
|
||||
"Stay brave, ride the wave, with these buffs, you're sure to save, %s!",
|
||||
"Set to soar, ready for more, buffs that'll make your power roar, %s!"
|
||||
|
||||
}
|
||||
|
||||
local function Replace(str, from, to)
|
||||
str = string.gsub(str, from, to)
|
||||
return str
|
||||
end
|
||||
|
||||
local function PickWhisper(Name)
|
||||
local WhisperNum = math.random(1, #whispers)
|
||||
local whisper = whispers[WhisperNum]
|
||||
local randMsg = Replace(whisper, "%%s", Name)
|
||||
return randMsg
|
||||
end
|
||||
|
||||
local function PickPhrase()
|
||||
local PhraseNum = math.random(1, #phrases)
|
||||
local phrase = phrases[PhraseNum]
|
||||
return phrase
|
||||
end
|
||||
|
||||
local function OnGossipSelect(event, player, creature, sender, intid)
|
||||
local PlayerName = player:GetName()
|
||||
local PlayerLevel = player:GetLevel()
|
||||
|
||||
|
||||
local vecBuffs = {48162, 43223, 48469, 48470, 48170, 43002}
|
||||
|
||||
|
||||
if BUFF_CURE_RES and player:HasAura(15007) then
|
||||
player:RemoveAura(15007)
|
||||
creature:SendUnitSay("The aura of death has been lifted from you " .. PlayerName .. ". Watch yourself out there!", 0, player)
|
||||
end
|
||||
|
||||
if PlayerLevel >= 1 and PlayerLevel < 10 then
|
||||
player:CastSpell(player, 21562, true)
|
||||
player:CastSpell(player, 1126, true)
|
||||
player:CastSpell(player, 27683, true)
|
||||
elseif PlayerLevel >= 10 and PlayerLevel < 20 then
|
||||
player:CastSpell(player, 21562, true)
|
||||
player:CastSpell(player, 1126, true)
|
||||
player:CastSpell(player, 27683, true)
|
||||
elseif PlayerLevel >= 20 and PlayerLevel < 30 then
|
||||
player:CastSpell(player, 21562, true)
|
||||
player:CastSpell(player, 1126, true)
|
||||
player:CastSpell(player, 27683, true)
|
||||
player:CastSpell(player, 13326, true)
|
||||
elseif PlayerLevel >= 30 and PlayerLevel < 40 then
|
||||
player:CastSpell(player, 21562, true)
|
||||
player:CastSpell(player, 25898, true)
|
||||
player:CastSpell(player, 1126, true)
|
||||
player:CastSpell(player, 27681, true)
|
||||
player:CastSpell(player, 27683, true)
|
||||
player:CastSpell(player, 13326, true)
|
||||
elseif PlayerLevel >= 40 and PlayerLevel < 50 then
|
||||
player:CastSpell(player, 21562, true)
|
||||
player:CastSpell(player, 48469, true)
|
||||
player:CastSpell(player, 27681, true)
|
||||
player:CastSpell(player, 48170, true)
|
||||
player:CastSpell(player, 13326, true)
|
||||
elseif PlayerLevel >= 50 and PlayerLevel < 60 then
|
||||
player:CastSpell(player, 48162, true)
|
||||
player:CastSpell(player, 43223, true)
|
||||
player:CastSpell(player, 48469, true)
|
||||
player:CastSpell(player, 48074, true)
|
||||
player:CastSpell(player, 48170, true)
|
||||
player:CastSpell(player, 36880, true)
|
||||
elseif PlayerLevel >= 60 and PlayerLevel < 70 then
|
||||
player:CastSpell(player, 48162, true)
|
||||
player:CastSpell(player, 43223, true)
|
||||
player:CastSpell(player, 48469, true)
|
||||
player:CastSpell(player, 48074, true)
|
||||
player:CastSpell(player, 48170, true)
|
||||
player:CastSpell(player, 36880, true)
|
||||
elseif PlayerLevel >= 70 and PlayerLevel < 80 then
|
||||
player:CastSpell(player, 48162, true)
|
||||
player:CastSpell(player, 43223, true)
|
||||
player:CastSpell(player, 48469, true)
|
||||
player:CastSpell(player, 48074, true)
|
||||
player:CastSpell(player, 48170, true)
|
||||
player:CastSpell(player, 36880, true)
|
||||
else
|
||||
for _, buff in ipairs(vecBuffs) do
|
||||
player:CastSpell(player, buff, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
creature:SendUnitSay(PickWhisper(PlayerName), 0)
|
||||
creature:PerformEmote(71)
|
||||
player:GossipComplete()
|
||||
end
|
||||
|
||||
local function OnGossipHello(event, player, creature)
|
||||
player:GossipMenuAddItem(0, "|TInterface\\icons\\spell_misc_emotionhappy:43:43:-33|t|cff007d45Buff me!|r", 1, 1)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function OnTimerEmote(eventID, delay, pCall, creature)
|
||||
creature:PerformEmote(71)
|
||||
if ENABLE_BUFF_EMOTE_SPELL then
|
||||
creature:CastSpell(creature, BUFF_EMOTE_SPELL, true)
|
||||
end
|
||||
creature:SendUnitSay(PickPhrase(), 0)
|
||||
creature:RegisterEvent(OnTimerEmote, BUFF_MESSAGE_TIMER, 1, creature)
|
||||
end
|
||||
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:RegisterEvent(OnTimerEmote, BUFF_MESSAGE_TIMER, 1, creature)
|
||||
if BUFF_EMOTE_SPELL ~= 0 then
|
||||
creature:AddAura(BUFF_EMOTE_SPELL, creature)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function WrappedOnTimerEmote(eventID, delay, pCall)
|
||||
local anyCreature = nil
|
||||
|
||||
for _, player in ipairs(GetPlayersInWorld()) do
|
||||
anyCreature = player:GetNearestCreature(30, NPCID)
|
||||
if anyCreature then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if anyCreature then
|
||||
local playersInRange = anyCreature:GetPlayersInRange(100000)
|
||||
for _, player in ipairs(playersInRange) do
|
||||
local creature = player:GetNearestCreature(100000, NPCID)
|
||||
if creature then
|
||||
OnTimerEmote(eventID, delay, pCall, creature)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local eventId = CreateLuaEvent(WrappedOnTimerEmote, BUFF_MESSAGE_TIMER, 1)
|
||||
if eventId then
|
||||
RegisterCreatureEvent(NPCID, 5, OnSpawn)
|
||||
end
|
||||
|
||||
local function OnLogin(event, player)
|
||||
if ANNOUNCE_MODULE then
|
||||
player:SendBroadcastMessage("This server is running the |cff4CFF00BufferNPC |rmodule.")
|
||||
end
|
||||
local creature = player:GetNearestCreature(30, NPCID)
|
||||
if creature then
|
||||
creature:SetEquipmentSlots(27937, 27937, 0) -- Weapon slots. Change to whatever.
|
||||
end
|
||||
end
|
||||
|
||||
RegisterPlayerEvent(3, OnLogin)
|
||||
RegisterCreatureGossipEvent(NPCID, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(NPCID, 2, OnGossipSelect)
|
||||
141
FlightHandler.lua
Normal file
141
FlightHandler.lua
Normal file
@@ -0,0 +1,141 @@
|
||||
local spellIds = {100209, 100211, 100210, 100213, 100214, 100215, 100216, 100217, 100218, 100219, 100220, 100180, 100221, 100222}
|
||||
local restrictedSpellIds = {100209, 100211, 100210, 100213, 100214, 100215, 100216, 100217, 100218, 100219, 100220, 100180, 100221, 100222} -- remove if you want to have all spells available in raids/dungeons. Just change to {}
|
||||
local requiredAuraRange = {200049, 200181}
|
||||
local requiredLevel = 1 --change me if you want lower level restriction. Don't touch anything else (other than Outland level)
|
||||
local emoteId = 68 -- obsolete
|
||||
local soundId = 53774
|
||||
|
||||
function CreateDelayedEmoteFunction(playerGuid, emoteId)
|
||||
return function()
|
||||
local player = GetPlayerByGUID(playerGuid)
|
||||
if player then
|
||||
player:PerformEmote(emoteId)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function OnSpellCast(event, player, spell, skipCheck)
|
||||
for i, spellId in ipairs(spellIds) do
|
||||
if (spell:GetEntry() == spellId) then
|
||||
local hasRequiredAura = false
|
||||
for j = requiredAuraRange[1], requiredAuraRange[2] do
|
||||
if (player:HasAura(j)) then
|
||||
hasRequiredAura = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
local map = player:GetMap()
|
||||
local mapId = map:GetMapId()
|
||||
local restrictionMessage = "You cannot cast this spell in battlegrounds, dungeons, or raids."
|
||||
|
||||
if (mapId == 530 and player:GetLevel() < 70) then -- change 70 to 1
|
||||
restrictionMessage = "You must be level 70 to cast this spell in Outland."
|
||||
elseif (mapId == 571 and not player:HasSpell(54197)) then -- .learn 54197
|
||||
restrictionMessage = "You must have Cold Weather Flying to cast this spell in Northrend."
|
||||
end
|
||||
|
||||
local isRestrictedSpell = false
|
||||
for _, restrictedSpellId in ipairs(restrictedSpellIds) do
|
||||
if (spell:GetEntry() == restrictedSpellId) then
|
||||
isRestrictedSpell = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if isRestrictedSpell and (player:InBattleground() or map:IsDungeon() or map:IsRaid() or (mapId == 530 and player:GetLevel() < 70) or (mapId == 571 and not player:HasSpell(54197))) then
|
||||
player:SendAreaTriggerMessage(restrictionMessage)
|
||||
spell:Cancel()
|
||||
return false
|
||||
elseif (not hasRequiredAura and player:GetLevel() >= requiredLevel) then
|
||||
player:SendAreaTriggerMessage("You must have wings equipped to cast this spell.")
|
||||
spell:Cancel()
|
||||
return false
|
||||
elseif (hasRequiredAura and player:GetLevel() < requiredLevel) then
|
||||
player:SendAreaTriggerMessage("You must be at least level 40 to cast this spell.")
|
||||
spell:Cancel()
|
||||
return false
|
||||
elseif (not hasRequiredAura and player:GetLevel() < requiredLevel) then
|
||||
player:SendAreaTriggerMessage("You must be at least level 40 and have wings equipped to cast this spell.")
|
||||
spell:Cancel()
|
||||
return false
|
||||
elseif (spell:GetEntry() == 100210 or spell:GetEntry() == 100218 or spell:GetEntry() == 100219 or spell:GetEntry() == 100220) then
|
||||
--player:PerformEmote(emoteId)
|
||||
player:PlayDirectSound(soundId)
|
||||
local maxHealth = player:GetMaxHealth()
|
||||
local healthToReduce = maxHealth * 0.10 -- 10% of max health
|
||||
local newHealth = player:GetHealth() - healthToReduce
|
||||
local healthPct = (newHealth / maxHealth) * 100
|
||||
if healthPct <= 5 then
|
||||
player:Kill(player)
|
||||
else
|
||||
player:SetHealth(newHealth)
|
||||
end
|
||||
|
||||
elseif (spell:GetEntry() == 100209) then
|
||||
player:CastSpell(player, 71495, true)
|
||||
player:CastSpell(player, 34602, true)
|
||||
player:CastSpell(player, 75459, true)
|
||||
|
||||
|
||||
local playerRace = player:GetRace()
|
||||
if playerRace ~= 10 and playerRace ~= 11 then
|
||||
local playerGuid = player:GetGUID()
|
||||
CreateLuaEvent(CreateDelayedSpellFunction(playerGuid, 100223), 100, 1)
|
||||
CreateLuaEvent(function()
|
||||
RemoveAuraIfNotFalling(playerGuid, 100223)
|
||||
end, 1400, 1)
|
||||
end
|
||||
|
||||
elseif (spell:GetEntry() == 100216) then
|
||||
player:CastSpell(player, 75459, true)
|
||||
player:CastSpell(player, 34602, true)
|
||||
|
||||
local playerRace = player:GetRace()
|
||||
if playerRace ~= 10 and playerRace ~= 11 then
|
||||
local playerGuid = player:GetGUID()
|
||||
CreateLuaEvent(CreateDelayedSpellFunction(playerGuid, 100223), 100, 1)
|
||||
CreateLuaEvent(function()
|
||||
RemoveAuraIfNotFalling(playerGuid, 100223)
|
||||
end, 1400, 1)
|
||||
end
|
||||
|
||||
elseif (spell:GetEntry() == 100217) then
|
||||
player:CastSpell(player, 71495, true)
|
||||
player:CastSpell(player, 34602, true)
|
||||
player:CastSpell(player, 75459, true)
|
||||
|
||||
local playerRace = player:GetRace()
|
||||
if playerRace ~= 10 and playerRace ~= 11 then
|
||||
local playerGuid = player:GetGUID()
|
||||
CreateLuaEvent(CreateDelayedSpellFunction(playerGuid, 100223), 100, 1)
|
||||
CreateLuaEvent(function()
|
||||
RemoveAuraIfNotFalling(playerGuid, 100223)
|
||||
end, 1400, 1)
|
||||
end
|
||||
|
||||
elseif (spell:GetEntry() == 100221) then
|
||||
player:CastSpell(player, 71495, true)
|
||||
player:CastSpell(player, 34602, true)
|
||||
|
||||
local playerRace = player:GetRace()
|
||||
if playerRace ~= 10 and playerRace ~= 11 then
|
||||
local playerGuid = player:GetGUID()
|
||||
CreateLuaEvent(CreateDelayedSpellFunction(playerGuid, 100223), 100, 1)
|
||||
CreateLuaEvent(function()
|
||||
RemoveAuraIfNotFalling(playerGuid, 100223)
|
||||
end, 1400, 1)
|
||||
end
|
||||
|
||||
elseif (spell:GetEntry() == 100211 or spell:GetEntry() == 100213 or spell:GetEntry() == 100214 or spell:GetEntry() == 100215) then
|
||||
player:CastSpell(player, 34602, true)
|
||||
player:CastSpell(player, 75459, true)
|
||||
|
||||
local playerGuid = player:GetGUID()
|
||||
CreateLuaEvent(CreateDelayedEmoteFunction(playerGuid, 53), 100, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RegisterPlayerEvent(5, OnSpellCast)
|
||||
38
FlightHandler2.lua
Normal file
38
FlightHandler2.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
-- Don't touch without consulting me first. Don't want you to screw up your game.
|
||||
|
||||
local AURA_ID = 100225
|
||||
local TRIGGER_SPELLS = {100211, 100213, 100214}
|
||||
local CAST_SPELLS = {100210, 100218, 100219, 100220}
|
||||
local CAST_SPELL_ID = 69669
|
||||
|
||||
local function tableContains(table, element)
|
||||
for _, value in pairs(table) do
|
||||
if value == element then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function CheckAuraStacksAndCast(player, auraId, triggerSpells, castSpellId)
|
||||
if player:HasAura(auraId) then
|
||||
local aura = player:GetAura(auraId)
|
||||
local stacks = aura:GetStackAmount()
|
||||
if stacks >= 3 then
|
||||
player:CastSpell(player, castSpellId, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function OnSpellCast(event, player, spell, skipCheck)
|
||||
local spellId = spell:GetEntry()
|
||||
if tableContains(TRIGGER_SPELLS, spellId) then
|
||||
CheckAuraStacksAndCast(player, AURA_ID, TRIGGER_SPELLS, CAST_SPELL_ID)
|
||||
elseif tableContains(CAST_SPELLS, spellId) then
|
||||
if player:HasAura(AURA_ID) then
|
||||
player:RemoveAura(AURA_ID)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RegisterPlayerEvent(5, OnSpellCast)
|
||||
42
FlyForFree.lua
Normal file
42
FlyForFree.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
--This script is for people who want to remove the cooldowns for Up, Up and Away and Skyburst spells
|
||||
--Up, Up and Away will still have a CD but is reset when you cast Skyburst
|
||||
--The script will also teach characters specified spells on login if enabled set to true
|
||||
|
||||
local teachSpells = false -- Set to true to enable learning all flight related spells on login
|
||||
local resetCooldown = false -- Set to true to enable no CD
|
||||
local castFullHeal = false -- Set to true to enable. This will remove the damage caused to the player by Skyburst, except while in combat
|
||||
|
||||
local function LearnSpellsOnLogin(event, player)
|
||||
if teachSpells then
|
||||
player:LearnSpell(100210)
|
||||
player:LearnSpell(100218)
|
||||
player:LearnSpell(100219)
|
||||
player:LearnSpell(100220)
|
||||
player:LearnSpell(100211)
|
||||
player:LearnSpell(100213)
|
||||
player:LearnSpell(100214)
|
||||
player:LearnSpell(100215)
|
||||
player:LearnSpell(100222)
|
||||
player:LearnSpell(200049) -- Wing spell
|
||||
end
|
||||
end
|
||||
|
||||
local function ResetCooldowns(event, player, spell)
|
||||
local spellId = spell:GetEntry()
|
||||
|
||||
if resetCooldown and (spellId == 100209 or spellId == 100217 or spellId == 100216 or spellId == 100221) then
|
||||
player:ResetSpellCooldown(100210)
|
||||
player:ResetSpellCooldown(100211)
|
||||
player:ResetSpellCooldown(100218)
|
||||
player:ResetSpellCooldown(100219)
|
||||
player:ResetSpellCooldown(100214)
|
||||
player:ResetSpellCooldown(100213)
|
||||
player:ResetSpellCooldown(100215)
|
||||
player:ResetSpellCooldown(100220)
|
||||
elseif castFullHeal and not player:IsInCombat() and (spellId == 100210 or spellId == 100211 or spellId == 100218 or spellId == 100219 or spellId == 100214 or spellId == 100213 or spellId == 100215 or spellId == 100220) then
|
||||
player:CastSpell(player, 17683, true)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterPlayerEvent(5, ResetCooldowns)
|
||||
RegisterPlayerEvent(3, LearnSpellsOnLogin)
|
||||
53
VincentADKMorph.lua
Normal file
53
VincentADKMorph.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
local morph_commands = {
|
||||
["#sally"] = 2043,
|
||||
["#newthrall"] = 4527,
|
||||
["#oldthrall"] = 27656,
|
||||
["#cairne"] = 4307,
|
||||
["#velen"] = 17822,
|
||||
["#sylvanas"] = 28213,
|
||||
["#voljin"] = 10357,
|
||||
["#anduin"] = 11655,
|
||||
["#magni"] = 3597,
|
||||
["#tyrande"] = 7274,
|
||||
["#jaina"] = 2970,
|
||||
["#varian"] = 28127,
|
||||
["#bolvar"] = 5566,
|
||||
["#oldtirion"] = 9477,
|
||||
["#newtirion"] = 31011,
|
||||
["#vereesa"] = 28222,
|
||||
["#rhonin"] = 16024,
|
||||
["#putress"] = 27611,
|
||||
["#alexstraza"] = 28227,
|
||||
["#chromie"] = 24877,
|
||||
["#arthas"] = 24949,
|
||||
["#lk"] = 22234,
|
||||
["#saurfang"] = 14732,
|
||||
["#onyxia"] = 8570,
|
||||
["#nefarian"] = 9472,
|
||||
["#darkranger"] = 30073,
|
||||
["#millhouse"] = 19942,
|
||||
}
|
||||
|
||||
local demorph_commands = {
|
||||
["#demorph"] = true,
|
||||
["#vincent"] = true,
|
||||
}
|
||||
|
||||
local function MorphPlayer(event, player, message, type, language)
|
||||
local lower_message = string.lower(message)
|
||||
local morph_id = morph_commands[lower_message]
|
||||
|
||||
if morph_id then
|
||||
player:SetDisplayId(morph_id)
|
||||
player:CastSpell(player, 51908, true) -- Added visual transform spell
|
||||
player:SendBroadcastMessage("You have been morphed into " .. lower_message:sub(2) .. "!")
|
||||
return false
|
||||
elseif demorph_commands[lower_message] then
|
||||
player:DeMorph()
|
||||
player:CastSpell(player, 51908, true) -- Added visual transform spell
|
||||
player:SendBroadcastMessage("Your morph has been reset to your original appearance.")
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
RegisterPlayerEvent(18, MorphPlayer)
|
||||
Reference in New Issue
Block a user