View difference between Paste ID: 7vLZQiAu and qDabEUcL
SHOW: | | - or go back to the newest paste.
1-
local buff_msg = "#buff"
1+
local Command = "#buff"
2-
local buffs =
2+
local Buffs = {48161,48073,43223,48469,16609,15366}
3-
{
3+
4-
	["buffsids"] = {48161,48073,43223,48469,16609,15366},
4+
local function OnChat(event, pPlayer, message, pType, language, pMisc)
5-
}
5+
	if(message == Command) then
6
		if (pPlayer:HasAura(48161)) then
7-
function BuffsOnChat(event, pPlayer, message, type, language)
7+
8-
	if(message == buff_msg) then
8+
		else
9-
			if (pPlayer:HasAura(48161)) then
9+
			for _, spell in ipairs(Buffs) do
10
				pPlayer:CastSpell(spell)
11-
			else
11+
12-
			pPlayer:CastSpell(buffsids[i])
12+
13
		end
14
	end
15
end
16
17
RegisterServerHook(16, OnChat)