• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Buff Command - Eluna

Rochet2

Moderator / Eluna Dev
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 :)
 
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 :)

ill look into it, whats the hook? or just leave as is and change the command in quotes?

From what i just tested its not just editing inside the quotes.
 
Last edited:
https://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.
-- Working in trinity so u know
thanks, gana whip up a command or two soon..
rewrote it for you bums,
http://paste.emudevs.com/?paste=115
this allows the gm formatted commands, aka ".buff"
EDIT:
any command not in the db will buff you atm, gana fix that asap.
 
Last edited:
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
 

slp13at420

Mad Scientist
The script was posted 6 messages down on first page :doh: .....


Code:
[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 did update the Original post to contain the raw script and marked the link dead.
 
Last edited:

Marko

Enthusiast
Thanx man, missed it somehow while doing 3 things at once + breakfast. But have found later another similar script that works with .buff command and has name reset but when character resets his name, he on login can not speak any language. Interesting, must be because my realm is classless
In any case here is the working part of another script for .buff
it works with player:CastSpell
function 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)
I'll add a few of your lines to this script and see how it works out :D
 

slp13at420

Mad Scientist
Event 42 // (event, player, command) - player is nil if command used from console. Can return false

I will whip something together as an example ;P

Code:
[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]
 
Last edited:
Top