• 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

Ghostcrawler336

Epic Member
Hello,

I'm releasing a buff command, which is a version of my buff command I made in C++.

Buffs-
  • Mark Of The Wild
  • Prayer Of Shadow Protection
  • Prayer Of Fortitude
  • Prayer Of Spirit
  • Greater Blessing Of Kings
  • Arcane Intellect
  • Thorns

The command to do this is #buff


Lua script - LINK DEAD

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]
 
Last edited by a moderator:

Tommy

Founder
You're right, it works with whatever word :( do you have any idea how to fix it?

You don't have the other methods in the if statement:

Code:
--[[
    - 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)
 

Ghostcrawler336

Epic Member
You don't have the other methods in the if statement:

Code:
--[[
    - 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)

Oh I see, I actually had it written that way at first... but thought it looked wrong... But thank you!
 

Foereaper

Founder
Move the return false to inside the if statement, else you won't be able to say anything at all in game
 

Noven

Exalted Member
I get this; attempt to call global RegisterServerHook ( a nil value)

When I try to use RegisterServerEvent, I do not get any errors when I reload, but nothing happens when I type #buff
 

Rochet2

Moderator / Eluna Dev
Haha, the script doesnt have a register :D
Use RegisterPlayerEvent

We separated the player events and server events and so on.
Chat is player event. (ID 18)
 

Noven

Exalted Member
Well if I have to re compile and everything, won't all my custom items, bosses, currencies, extendecosts creature spawns and where they stand, disappear?
 

Rochet2

Moderator / Eluna Dev
Well if I have to re compile and everything, won't all my custom items, bosses, currencies, extendecosts creature spawns and where they stand, disappear?

Not if you do it right.
You need to update your DB and your source, not re install everything.

Backups are obviously suggested if you are afraid of losing something.
 
I updated the code, it works too. command can be changed where it says "#buff", "You have been buffed, enjoy!" edit that to what it says after the buffs are casted on the player.
--[[
- Developer(s): Ghostcrawler336
- Thanks to: Tommy && Laurea
- Applied an update to code: shotsofdeath98
- Complete: %100
- ScriptName: 'Buff Command'
- Comment: N/A
]]--


function Buffcommand(event, player, msg, Type, 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

RegisterPlayerEvent(18, Buffcommand)
 
Top