Advertisement
randy336

[Trinity] Buff Command

Oct 12th, 2012
2,407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.60 KB | None | 0 0
  1. /*
  2. <--------------------------------------------------------------------------->
  3.  - Developer(s): Ghostcrawler336
  4.  - Made By: ??
  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[] = { 48162, 48074, 48170, 43223, 36880, 467, 48469 };
  15.  
  16. class buffcommand : public CommandScript
  17. {
  18. public:
  19.     buffcommand() : CommandScript("buffcommand") { }
  20.  
  21.         ChatCommand* GetCommands() const
  22.     {
  23.         static ChatCommand IngameCommandTable[] =
  24.         {
  25.         { "buff",           rbac::RBAC_PERM_COMMAND_BUFF,         true,  &HandleBuffCommand,                "", NULL },
  26.         { NULL,             0,                  false, NULL,                              "", NULL }
  27.         };
  28.                  return IngameCommandTable;
  29.     }
  30.  
  31.         static bool HandleBuffCommand(ChatHandler * handler, const char * args)
  32.     {
  33.         Player * pl = handler->GetSession()->GetPlayer();
  34.                 if(pl->InArena())
  35.                 {
  36.                         pl->GetSession()->SendNotification("You can't use that item in an arena match!");
  37.                         return false;
  38.                 }
  39.        
  40.                 pl->RemoveAurasByType(SPELL_AURA_MOUNTED);
  41.                 for(int i = 0; i < 7; i++)
  42.                     pl->AddAura(auras[i], pl);
  43.                 handler->PSendSysMessage("|cffB400B4You have been buffed, enjoy!");
  44.                 return true;
  45.  
  46.     }
  47. };
  48.  
  49. void AddSC_buffcommand()
  50. {
  51.     new buffcommand();
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement