Add files via upload

This commit is contained in:
Dinkledork
2023-03-05 05:24:52 -07:00
committed by GitHub
parent 0d72389bca
commit 52fb4a8941
3 changed files with 1168 additions and 0 deletions

1009
AbilitiesOnLevelUp.lua Normal file

File diff suppressed because it is too large Load Diff

91
RaidBuffs.lua Normal file
View File

@@ -0,0 +1,91 @@
------------------------------------------------------------------------------------------------
-- COMMAND GUIDE
-- .raidbuff ony
-- .raidbuff rend
-- .raidbuff fengus
-- .raidbuff moldar
-- .raidbuff slipkik
-- .raidbuff zg
-- .raidbuff serenade
------------------------------------------------------------------------------------------------
------------------------------------------
-- Begin of config section
------------------------------------------
local TEAM_ALLIANCE = 0
local TEAM_HORDE = 1
local TEAM_NEUTRAL = 2
local message = 'Hope you guys enjoy the repack!'
local function splitString(inputstr, seperator)
if seperator == nil then
seperator = "%s"
end
local t={}
for str in string.gmatch(inputstr, "([^"..seperator.."]+)") do
table.insert(t, str)
end
return t
end
local function buffPlayers(event, player, command)
local commandArray = splitString(command)
if commandArray[1] ~= 'raidbuff' then
return
end
if player ~= nil then
if player:GetGMRank() < 3 then
return
end
end
local allyPlayers = GetPlayersInWorld(TEAM_ALLIANCE)
local hordePlayers = GetPlayersInWorld(TEAM_HORDE)
local spell
if commandArray[2] == nil then
return false
elseif commandArray[2] == 'ony' then
spell = 22888
elseif commandArray[2] == 'rend' then
spell = 16609
elseif commandArray[2] == 'fengus' then
spell = 22817
elseif commandArray[2] == 'moldar' then
spell = 22818
elseif commandArray[2] == 'slipkik' then
spell = 22820
elseif commandArray[2] == 'zg' then
spell = 24425
elseif commandArray[2] == 'serenade' then
spell = 15366
end
for n = 1, #allyPlayers do
if allyPlayers[n]:IsAlive() then
allyPlayers[n]:CastSpell(allyPlayers[n], spell)
allyPlayers[n]:AddAura(spell, allyPlayers[n])
allyPlayers[n]:PlayDirectSound(2847, allyPlayers[n])
allyPlayers[n]:SendBroadcastMessage( message )
end
end
for n = 1, #hordePlayers do
if hordePlayers[n]:IsAlive() then
hordePlayers[n]:CastSpell(hordePlayers[n], spell)
hordePlayers[n]:AddAura(spell, hordePlayers[n])
hordePlayers[n]:PlayDirectSound(2847, hordePlayers[n])
hordePlayers[n]:SendBroadcastMessage( message )
end
end
return false
end
local PLAYER_EVENT_ON_COMMAND = 42 -- (event, player, command) - player is nil if command used from console. Can return false
RegisterPlayerEvent(PLAYER_EVENT_ON_COMMAND, buffPlayers)

68
SummonAll.lua Normal file
View File

@@ -0,0 +1,68 @@
--command = .summonall
--
-- Created by IntelliJ IDEA.
-- User: Silvia
-- Date: 29/01/2021
-- Time: 21:34
-- To change this template use File | Settings | File Templates.
-- Originally created by Honey for Azerothcore
-- requires ElunaLua module
maps = {}
-- Summoning your party is allowed on the maps listed below. You can add more by providing
-- the related map id in its own line. Find map ids e.g. in ./data/map.dbc
-- Eastern kingdoms
table.insert(maps, 0)
-- Kalimdor
table.insert(maps, 1)
-- Outland
table.insert(maps, 530)
-- Northrend
table.insert(maps, 571)
------------------------------------------
-- NO ADJUSTMENTS REQUIRED BELOW THIS LINE
------------------------------------------
local function has_value (tab, val)
for index, value in ipairs(tab) do
if value == val then
return true
end
end
return false
end
local function summonAll(event, player, command, chatHandler)
if command == 'summonall' then
if player == nil then
chatHandler:SendSysMessage('summonall can not be used from the console.')
end
mapId = player:GetMapId()
--allow to proceed if the player is on one of the maps listed above
if has_value(maps, mapId) then
--allow to proceed if the player is not in combat
if not player:IsInCombat() then
group = player:GetGroup()
groupPlayers = group:GetMembers()
for _, v in pairs(groupPlayers) do
if v ~= player then
v:SummonPlayer(player)
end
end
else
chatHandler:SendSysMessage("Summoning is not possible in combat.")
end
return false
else
chatHandler:SendSysMessage("Summoning is not possible here.")
end
return false
end
end
RegisterPlayerEvent(42, summonAll)