Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //THIS SCRIPT IS NOT MINE, I'VE ONLY EDITED IT!!!
- //FULL CREDIT FOR MAKING THIS GOES TO: http://www.ac-web.org/forums/showthread.php?143075-trintity-c-commands-buff-mall-heal
- #include "ScriptPCH.h"
- #include "Chat.h"
- uint32 auras[] = { 15366, 16609, 48162, 48074, 48170, 43223, 36880, 467, 69994, 33081, 24705, 26035, 48469 };
- 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 },
- { "vip", SEC_VIP, false, &HandleVipCommand, "", NULL },
- { "heal", SEC_PLAYER, false, &HandleHealCommand, "", NULL },
- { "cd", SEC_PLAYER, false, &HandleCooldownCommand, "", NULL },
- { "lvl", SEC_PLAYER, false, &HandleLevelCommand, "", 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 < 11; i++)
- me->AddAura(auras[i], me);
- handler->PSendSysMessage("|cffff6060You're buffed now! Use it well to kill others!"); // available for everyone!
- return true;
- }
- static bool HandleMallCommand(ChatHandler * handler, const char * args) //MALL COMMAND
- {
- Player * me = handler->GetSession()->GetPlayer();
- if(me->IsInCombat())
- handler->PSendSysMessage("|cff00ff00You're in combat. When it's gone you can use this command.");
- else
- me-> TeleportTo(1, 7337.972168f, -1541.647705f, 161.172668f, 5.585654f), //if not in combat - teleport
- me->SetHealth(18000), //set health when reaching the location
- handler->PSendSysMessage("|cff00E5EEYou have been teleported to the mall and your health has been set to 18000!!"); //send message
- return true;
- }
- static bool HandleVipCommand(ChatHandler * handler, const char * args) //VIP COMMAND
- {
- Player * me = handler->GetSession()->GetPlayer();
- if(me->IsInCombat())
- handler->PSendSysMessage("|cff00ff00You're in combat. When it's gone you can use this command.");
- else
- me-> TeleportTo(0, -7370.899414f, 1062.117920f, 131.407379f, 4.726033f), //teleport
- me->SetHealth(18000), //set hp to 18k
- handler->PSendSysMessage("|cff00ff00You have been teleported to the VIP mall!");
- return true;
- }
- static bool HandleHealCommand(ChatHandler * handler, const char * args) //HEAL COMMAND
- {
- Player * me = handler->GetSession()->GetPlayer();
- if(me->HasItemCount(159787,1,true)) //require the Healing Coin
- me->DestroyItemCount(159787,1,true,false), //Deleting the Healing Coin
- me-> SetHealth(me->GetMaxHealth()), handler->PSendSysMessage("|cffffcc00You've been healed!!");
- else
- handler->PSendSysMessage("|cffffcc00You need the Healing Coin first!"); //missing coin - fail
- return true;
- }
- static bool HandleCooldownCommand(ChatHandler * handler, const char * args) //CD COMMAND
- {
- Player * me = handler->GetSession()->GetPlayer();
- if(me->HasItemCount(159788,1,true)) //check if the player has the item
- me->DestroyItemCount(159788,1,true,false), //delete the item
- me-> RemoveAllSpellCooldown(), //remove CDs
- handler->PSendSysMessage("|cffFF4500Your cooldowns are now clear!!"); //remove item Cooldown Coin - for all
- else
- handler->PSendSysMessage("|cffFF4500You need the Cooldown Coin first!"); //if he doesn't have the Cooldown Coin - fail
- return true;
- }
- static bool HandleLevelCommand(ChatHandler * handler, const char * args) //LEVEL COMMAND
- {
- Player * me = handler->GetSession()->GetPlayer();
- if(me->HasItemCount(159786,1,true)) //require the Leveling Coin
- me->DestroyItemCount(159786,1,true,false), //deleting the Leveling Coin
- me->SetLevel(80), handler->PSendSysMessage("|cffffcc00You've been leveled!!!"); //level 80
- else
- handler->PSendSysMessage("|cffffcc00You need the Leveling Coin first!"); //missing coin - fail
- return true;
- }
- };
- void AddSC_Ingame_commandscript()
- {
- new buff_commandscript();
- }
Advertisement
Add Comment
Please, Sign In to add comment