Advertisement
uDev

Buff - Tokens ~ Fixed

Dec 17th, 2013
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local TOKEN_ID = 95000 -- Change this to your token id.
  2. local BUFFIDS = {48074, 48170, 43223, 36880, 467, 48469, 48162} -- add/remove spell IDs for buffs (used in the buff command).    
  3. local POWERBUFFIDS = {48074, 48170, 43223, 36880, 467, 48469, 48162, 26662} -- add/remove spell IDs for buffs (used in the buff command).    
  4.      
  5. function Buff(event, player, message, type, language)
  6.     if(message:lower() == "~buff") then
  7.     if (player:HasItem(TOKEN_ID)) then
  8.     player:RemoveItem(TOKEN_ID, 1) -- Remove this line if you don't want player to loose token.
  9.         for k, v in pairs(POWERBUFFIDS) do
  10.             player:AddAura(v, player)
  11.             end
  12.     else
  13.     for k, v in pairs(BUFFIDS) do
  14.             player:AddAura(v, player)
  15.             end
  16.             end
  17.         player:SendBroadcastMessage("|cFFFF0000You have been buffed, enjoy!|r")
  18.     return false
  19.     end
  20. end
  21.  
  22. RegisterServerHook(18, Buff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement