Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- #include "Chat.h"
- uint32 auras[] = { 15366, 16609, 48073, 48162, 48074, 48170, 43223, 48934, 48938, 25899, 36880, 43015, 43017, 9381, 467, 69994, 3077, 78, 33080, 33081, 33082, 24705, 26035, 48161, 48073, 48469, 16609, 15366 };
- class buff_commandscript : public CommandScript
- {
- public:
- buff_commandscript() : CommandScript("buff_commandscript") { }
- ChatCommand* GetCommands() const
- {
- static ChatCommand IngameCommandTable[] =
- {
- { "buff", SEC_PLAYER, false, &HandleBuffCommand, "", NULL },
- { "mall", SEC_PLAYER, false, &HandleMallCommand, "", NULL },
- { "heal", SEC_PLAYER, false, &HandleHealCommand, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
- };
- return IngameCommandTable;
- }
- static bool HandleBuffCommand(ChatHandler * handler, const char * args)
- {
- Player * me = handler->GetSession()->GetPlayer();
- me->RemoveAurasByType(SPELL_AURA_MOUNTED);
- for(int i = 0; i < 30; i++)
- me->AddAura(auras[i], me);
- handler->PSendSysMessage("You're buffed now!");
- return true;
- }
- static bool HandleMallCommand(ChatHandler * handler, const char * args)
- {
- Player * me = handler->GetSession()->GetPlayer();
- me-> TeleportTo(530, -1850.209961f, 5435.821777f, -10.961435f, 3.403913f);
- handler->PSendSysMessage("You Have Been Teleported!");
- return true;
- }
- static bool HandleHealCommand(ChatHandler * handler, const char * args)
- {
- Player * me = handler->GetSession()->GetPlayer();
- me-> SetHealth(me->GetMaxHealth());
- handler->PSendSysMessage("You Have Been Healed!");
- return true;
- }
- };
- void AddSC_Ingame_commandscript()
- {
- new buff_commandscript();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement