/* Made by: aaddss A.K.A Deathsoul tested in combat untested in arena */ #include "ScriptMgr.h" #include "Chat.h" uint32 auras[] = { 48074, 47440, 53307, 132, 48170, 23737, 48470, 43002, 26393, 48162 }; class Vip_commands : public CommandScript { public: Vip_commands() : CommandScript("Vip_commands") { } ChatCommand* GetCommands() const { static ChatCommand vipCommandTable[] = { {"Buff", SEC_PLAYER, true, &HandleBuffCommand, "",}, {"Reset cooldowns", SEC_PLAYER, true, &HandleResetCooldownsCommand, "",}, {"Repair", SEC_PLAYER, true, &HandleRepairCommand, "",}, {"Heal", SEC_PLAYER, true, &HandleHealCommand, "",}, { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { { "vip", 0, true, NULL, "", vipCommandTable}, { NULL, 0, false, NULL, "", NULL } }; return commandTable; } static bool HandleBuffCommand(ChatHandler * handler, const char * args) { Player * player = handler->GetSession()->GetPlayer(); if (player->InArena()) { player->GetSession()->SendNotification("You can't use this command in arena!"); return false; } if (player->IsInCombat()) { player->GetSession()->SendNotification("You can't use in combat!"); return false; } for(int i = 0; i < 10; i++) player->AddAura(auras[i], player); handler->GetSession()->SendNotification("You have been buffed!"); return true; } static bool HandleResetCooldownsCommand(ChatHandler * handler, const char * args) { Player * player = handler->GetSession()->GetPlayer(); player->RemoveAllSpellCooldown(); handler->GetSession()->SendNotification("your cooldowns has been reseted!"); return true; } static bool HandleRepairCommand(ChatHandler * handler, const char * args) { Player * player = handler->GetSession()->GetPlayer(); if (player->InArena()) { player->GetSession()->SendNotification("You can't use this command in arena!"); return false; } if (player->IsInCombat()) { player->GetSession()->SendNotification("You can't use in combat!"); return false; } player->DurabilityRepairAll(false, 0, false); handler->GetSession()->SendNotification("your items has been repaired"); return true; } static bool HandleHealCommand(ChatHandler * handler, const char * args) { Player * player = handler->GetSession()->GetPlayer(); if (player->InArena()) { player->GetSession()->SendNotification("You can't use this command in arena!"); return false; } if (player->IsInCombat()) { player->GetSession()->SendNotification("You can't use in combat!"); return false; } player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA)); player->SetHealth(player->GetMaxHealth()); player->SendTalentsInfoData(false); handler->GetSession()->SendNotification("your health and mana get restored!"); return true; } }; void AddSC_Vip_commands() { new Vip_commands(); }