Diyvol

Untitled

Apr 22nd, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. <--------------------------------------------------------------------------->
  3.  - Developer(s): Ghostcrawler336
  4.  - Made By: privatedonut edited by warchief foufos to work for latect TC 62db
  5.  - Complete: 100%
  6.  - ScriptName: 'Buff Command'
  7.  - Comment: Tested & Working
  8. <--------------------------------------------------------------------------->
  9. */
  10. #include "ScriptPCH.h"
  11. #include "Chat.h"
  12.  
  13.  
  14. uint32 auras[] = { 23735, 23736, 23737, 23738, 23766, 23767, 23768, 23769 };
  15.  
  16. class buffcommand : public CommandScript
  17. {
  18. public:
  19.     buffcommand() : CommandScript("buffcommand") { }
  20.  
  21.     std::vector<ChatCommand> GetCommands() const override
  22.     {
  23.         static std::vector<ChatCommand> IngameCommandTable =
  24.         {
  25.             { "buff",           rbac::RBAC_PERM_COMMAND_BUFF,         true,  &HandleBuffCommand,                "" },
  26.         };
  27.        
  28.         return IngameCommandTable;
  29.     }
  30.  
  31.     static bool HandleBuffCommand(ChatHandler * handler, const char * args)
  32.     {
  33.         Player * pl = handler->GetSession()->GetPlayer();
  34.        
  35.         if (pl->InArena())
  36.         {
  37.             pl->GetSession()->SendNotification("You can't use that item in an arena match!");
  38.             return false;
  39.         }
  40.        
  41.         pl->RemoveAurasByType(SPELL_AURA_MOUNTED);
  42.        
  43.         for (int i = 0; i < 7; i++)
  44.             pl->AddAura(auras[i], pl);
  45.        
  46.         handler->PSendSysMessage("|cffB400B4You have been buffed, enjoy!");
  47.         return true;
  48.     }
  49. };
  50.  
  51. void AddSC_buffcommand()
  52. {
  53.     new buffcommand();
  54. }
Add Comment
Please, Sign In to add comment