Advertisement
Guest User

[trinitycore c++] commands .buff .mall .heal

a guest
Jun 7th, 2012
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.75 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2. #include "Chat.h"
  3.  
  4.  
  5. uint32 auras[] = { 15366, 16609, 48162, 48074, 48170, 43223, 36880, 467, 69994, 33081, 24705, 26035, 48469 };
  6.  
  7. class buff_commandscript : public CommandScript
  8. {
  9. public:
  10.     buff_commandscript() : CommandScript("buff_commandscript") { }
  11.  
  12.     ChatCommand* GetCommands() const
  13.     {
  14.         static ChatCommand IngameCommandTable[] =
  15.         {
  16.             { "buff",            SEC_PLAYER,  false, &HandleBuffCommand,             "", NULL },
  17.             { "mall",            SEC_PLAYER,  false, &HandleMallCommand,             "", NULL },
  18.             { "heal",            SEC_PLAYER,  false, &HandleHealCommand,             "", NULL },
  19.             { NULL,             0,                  false, NULL,                              "", NULL }
  20.         };
  21.          return IngameCommandTable;
  22.     }
  23.  
  24.     static bool HandleBuffCommand(ChatHandler * handler, const char * args)
  25.     {
  26.         Player * me = handler->GetSession()->GetPlayer();
  27.    
  28.         me->RemoveAurasByType(SPELL_AURA_MOUNTED);
  29.         for(int i = 0; i < 11; i++)
  30.             me->AddAura(auras[i], me);
  31.         handler->PSendSysMessage("You're buffed now!");
  32.         return true;
  33.     }
  34.    
  35.     static bool HandleMallCommand(ChatHandler * handler, const char * args)
  36.     {
  37.         Player * me = handler->GetSession()->GetPlayer();
  38.    
  39.          me-> TeleportTo(530, -1850.209961f, 5435.821777f, -10.961435f, 3.403913f);
  40.          handler->PSendSysMessage("You Have Been Teleported!");
  41.         return true;
  42.     }
  43.    
  44.     static bool HandleHealCommand(ChatHandler * handler, const char * args)
  45.     {
  46.         Player * me = handler->GetSession()->GetPlayer();
  47.    
  48.          me-> SetHealth(me->GetMaxHealth());
  49.          handler->PSendSysMessage("You Have Been Healed!");
  50.         return true;
  51.     }
  52. };
  53.  
  54. void AddSC_Ingame_commandscript()
  55. {
  56.     new buff_commandscript();
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement