Btw.
A recent addition was a command hook.
You can add a .asd kind of command.
The part after the dot will be available as well as the player if the command was not used from console
-- Working in trinity so u knowhttps://github.com/eluna-dev-mangos/ElunaCoreWotlk/blob/master/src/game/LuaEngine/HookMgr.h#L183
If you use return false, the command wont say unexisting command or incorrect syntax or anything.
Note that you cant overwrite existing commands. Also the command system does the job of getting the command for you. This means that you can use . and ! for commands.
The command part in the hook is without the beginning dot.
thanks, gana whip up a command or two soon..
rewrote it for you bums,
http://paste.emudevs.com/?paste=114
this allows the gm formatted commands, aka ".buff"
EDIT:
any command not in the db will buff you atm, gana fix that asap.
works with or without it there on TC ELuna, also. any command like ".tet" buffs you and sends the message, if u know the fix for that please share, im working on one atm
[COLOR="#808080"]
--[[
- Developer(s): Ghostcrawler336
- Thanks to: Tommy && Laurea
- Complete: %100
- ScriptName: 'Buff Command'
- Comment: N/A
]]--
function Buffcommand(event, player, msg, _, lang)
if(msg:lower() == "#buff") then
player:AddAura(48074, player)
player:AddAura(48170, player)
player:AddAura(43223, player)
player:AddAura(36880, player)
player:AddAura(467, player)
player:AddAura(48469, player)
player:AddAura(48162, player)
player:SendBroadcastMessage("You have been buffed, enjoy!")
end
return false
end
RegisterServerHook(18, Buffcommand)
[/COLOR]
I'll add a few of your lines to this script and see how it works outfunction buff(event, player, message, Type, lang)
if(message:lower() == "buff")then
player:CastSpell(player, 33077, true)
player:CastSpell(player, 33078, true)
player:CastSpell(player, 33079, true)
player:CastSpell(player, 33080, true)
player:CastSpell(player, 33081, true)
player:CastSpell(player, 33082, true)
player:CastSpell(player, 42995, true)
player:CastSpell(player, 48161, true)
player:CastSpell(player, 25898, true)
player:SendBroadcastMessage("Buffed!")
end
end
RegisterPlayerEvent(42, buff)
[COLOR="#808080"]
--[[
- Developer(s): Ghostcrawler336
- Thanks to: Tommy && Laurea
- Complete: %100
- ScriptName: 'Buff Command'
- Comment: N/A
]]--
local function BuffPlayer(player)
player:AddAura(48074, player);
player:AddAura(48170, player);
player:AddAura(43223, player);
player:AddAura(36880, player);
player:AddAura(467, player);
player:AddAura(48469, player);
player:AddAura(48162, player);
player:SendBroadcastMessage("You have been buffed, enjoy!");
end
local function BuffCommand(event, player, command)
-- Grumbo was Here!
if(command:lower() == "buff") then
BuffPlayer(player);
return false;
end
end
RegisterPlayerEvent(42, BuffCommand)
[/COLOR]