ابزار سرور  WoW | World Of WarCraft  | Scirpt

ابزار سرور WoW | World Of WarCraft | Scirpt

ابزار سرور | ابزار WOW | ابزار بازی های انلاین | ابزار گیم سرور ها | رفع مشکلات | رتبه بندی | تبلیغات | اموزش | هک | کتاب های اموزشی | خرید و فروش
ابزار سرور  WoW | World Of WarCraft  | Scirpt

ابزار سرور WoW | World Of WarCraft | Scirpt

ابزار سرور | ابزار WOW | ابزار بازی های انلاین | ابزار گیم سرور ها | رفع مشکلات | رتبه بندی | تبلیغات | اموزش | هک | کتاب های اموزشی | خرید و فروش

اسکریبت vip command + account premium

اسکریبت vip command + account premium

»»

این اسکریبت برای command هاش برخلاف vip command های دیگه شما دیگه نباید رنک جی ام هارو از 1 ببرید بالا که دیگه وی آی پی ان کامند جی امی رو نداشته باشه
به راحتی میتونید استفاده کنید یعنی دیگه رنک 1 نمیشه
برای فعال کردن به account premium برید آیدی که میخوایین vip شه رو وارد کنید هم vip command ham vip account آن اکانت فعل میشه 

کد PHP:
diff --git a/sql/updates/SliceCore/auth.sql b/sql/updates/SliceCore/auth.sqlnew file mode 100644
index 0000000..2831386
--- /dev/null+++ b/sql/updates/SliceCore/auth.sql@@ -0,+1,@@
+-- 
Vip Accounts+CREATE TABLE IF NOT EXISTS `account_premium` (
+  `
idint(11NOT NULL default '0' COMMENT 'Account id',
+  `
setdatebigint(40NOT NULL default '0',
+  `
unsetdatebigint(40NOT NULL default '0',
+  `
premium_typetinyint(4unsigned NOT NULL default '1',
+  `
activetinyint(4NOT NULL default '1',
+  
PRIMARY KEY  (`id`,`setdate`)
+) 
ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Premium Accounts';
No newline at end of file
diff 
--git a/sql/updates/SliceCore/world.sql b/sql/updates/SliceCore/world.sql
index 935fc46
..9de7bf9 100644--- a/sql/updates/SliceCore/world.sql+++ b/sql/updates/SliceCore/world.sql@@ -34,+34,10 @@ INSERT INTO `creature_template` (`entry`, `modelid1`, `name`, `subname`, `IconNa
 DELETE FROM 
`locales_creature` WHERE `entry` = 190000;
 INSERT INTO 
`locales_creature` (`entry``name_loc8``subname_loc8`) VALUES
 (190000, 'Наблюдатели Арены', 'Используйте Аддон!');
+
+-- Vip Commands
+DELETE FROM 
`trinity_string` WHERE `entry` IN (11007,11008,11009,11010,11011,11012);
+INSERT INTO 
`trinity_string`(`entry`,`content_default``content_loc8`) VALUES 
+(11009, 'You can\`t do this at the moment.', ''),
+(11007,'You are not VIP.', ''),
+(11008,'You are not VIP.', '');
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index fc4d4df..89dcaa9 100755
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -357,6 +357,9 @@ bool AuthSocket::_HandleLogonChallenge()
 
     // Verify that this IP is not in the ip_banned table
     LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS));
+    
+    // Vip Account
+    LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_SET_ACCOUNT_PREMIUM));
 
     std::string const& ip_address = socket().getRemoteAddress();
     PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_BANNED);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 2f8569f..5205a6d 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -6988,6 +6988,9 @@ void Player::CheckAreaExploreAndOutdoor()
                 {
                     XP = uint32(sObjectMgr->GetBaseXP(areaEntry->area_level)*sWorld->getRate(RATE_XP_EXPLORE));
                 }
+                
+                if(GetSession()->IsPremium())
+                   XP *= sWorld->getRate(RATE_XP_EXPLORE_PREMIUM);
 
                 GiveXP(XP, NULL);
                 SendExplorationExperience(area, XP);
@@ -7320,6 +7323,10 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool pvpt
     }
 
     honor_f *= sWorld->getRate(RATE_HONOR);
+    
+    if(GetSession()->IsPremium())
+       honor_f *= sWorld->getRate(RATE_HONOR_PREMIUM);
+        
     // Back to int now
     honor = int32(honor_f);
     // honor - for show honor points in log
@@ -15245,6 +15252,9 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
     Unit::AuraEffectList const& ModXPPctAuras = GetAuraEffectsByType(SPELL_AURA_MOD_XP_QUEST_PCT);
     for (Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin(); i != ModXPPctAuras.end(); ++i)
         AddPctN(XP, (*i)->GetAmount());
+        
+    if (GetSession()->IsPremium())
+        XP *= sWorld->getRate(RATE_XP_QUEST_PREMIUM);
 
     int32 moneyRew = 0;
     if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index dac5b1e..e1f7be2 100755
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -178,7 +178,9 @@
                         gain *= 2;
                 }
 
-                gain = uint32(gain * sWorld->getRate(RATE_XP_KILL));
+                float premium_rate = player->GetSession()->IsPremium() ? sWorld->getRate(RATE_XP_KILL_PREMIUM) : 1.0f;
+                
+                return uint32(gain * sWorld->getRate(RATE_XP_KILL) * premium_rate);
             }
 
             sScriptMgr->OnGainCalculation(gain, player, u);
diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h
index 5893bbd..f686931 100755
--- a/src/server/game/Miscellaneous/Language.h
+++ b/src/server/game/Miscellaneous/Language.h
@@ -1076,7 +1076,12 @@ enum TrinityStrings
 
     // Use for custom patches             11000-11999
     LANG_AUTO_BROADCAST                 = 11000,
-    LANG_INVALID_REALMID                = 11001
+    LANG_INVALID_REALMID                = 11001,
+    
+    // Vip Commands
+     LANG_PLAYER_NOT_VIP                 = 11007,
+     LANG_VIP_COMMAND_DISABLED           = 11008,
+     LANG_VIP_ERROR                      = 11009,
 
     // NOT RESERVED IDS                   12000-1999999999
     // 
`db_script_string` table index     2000000000-2000009999 (MIN_DB_SCRIPT_STRING_ID-MAX_DB_SCRIPT_STRING_ID)
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 7ef5991..d360610 100755
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -362,6 +362,10 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in
         {
             // int32 *= float cause one point loss?
             standing = int32(floor((float)standing * sWorld->getRate(RATE_REPUTATION_GAIN) + 0.5f));
+            
+            if(_player->GetSession()->IsPremium())
+               standing = int32(floor((float)standing * sWorld->getRate(RATE_REPUTATION_GAIN_PREMIUM) + 0.5f));
+               
             standing += itr->second.Standing + BaseRep;
         }
 
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 30618e8..5b6fb94 100755
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -75,6 +75,7 @@
 void AddSC_ticket_commandscript();
 void AddSC_titles_commandscript();
 void AddSC_wp_commandscript();
+void AddSC_vip_commandscript();
 
 #ifdef SCRIPTS
 //world
@@ -693,6 +694,7 @@ void AddCommandScripts()
     AddSC_ticket_commandscript();
     AddSC_titles_commandscript();
     AddSC_wp_commandscript();
+    AddSC_vip_commandscript();
 }
 
 void AddWorldScripts()
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 6a2c7e6..6b0cf09 100755
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -88,9 +88,9 @@ bool WorldSessionFilter::Process(WorldPacket* packet)
 }
 
 /// WorldSession constructor
-WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter):
+WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec,  bool ispremium, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter):
     m_muteTime(mute_time),
     m_timeOutTime(0),
     _player(NULL),
     m_Socket(sock),
     _security(sec),
+    _ispremium(ispremium),
     _accountId(id),
     m_expansion(expansion),
     _warden(NULL),
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index bc9e6ac..6b9cfb3 100755
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -225,7 +225,7 @@ class CharacterCreateInfo
 class WorldSession
 {
     public:
-        WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter);
+        WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, bool ispremium, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter);
         ~WorldSession();
 
         bool PlayerLoading() const { return m_playerLoading; }
@@ -252,6 +252,7 @@ class WorldSession
         void SendClientCacheVersion(uint32 version);
 
         AccountTypes GetSecurity() const { return _security; }
+        bool IsPremium() const { return _ispremium; }
         uint32 GetAccountId() const { return _accountId; }
         Player* GetPlayer() const { return _player; }
         std::string GetPlayerName(bool simple = true) const;
@@ -974,6 +975,8 @@ class WorldSession
         AccountTypes _security;
         uint32 _accountId;
         uint8 m_expansion;
+        
+        bool _ispremium;
 
         typedef std::list<AddonInfo> AddonsList;
 
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 92455f8..ebf8947 100755
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -740,6 +740,9 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
     LocaleConstant locale;
     std::string account;
     SHA1Hash sha;
+    
+    bool isPremium = false;
+    
     BigNumber v, s, g, N;
     WorldPacket packet, SendAddonPacked;
 
@@ -890,6 +893,17 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
         TC_LOG_DEBUG("WorldSocket::HandleAuthSession: Sent Auth Response (Account banned).");
         return -1;
     }
+    
+    QueryResult premresult =
+        LoginDatabase.PQuery ("SELECT 1 "
+                              "FROM account_premium "
+                              "WHERE id = '%u' "
+                              "AND active = 1",
+                              id);
+    if (premresult) // if account premium
+    {
+        isPremium = true;
+    }
 
     // Check locked state for server
     AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit();
@@ -954,7 +968,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
     LoginDatabase.Execute(stmt);
 
     // NOTE ATM the socket is single-threaded, have this in mind ...
-    ACE_NEW_RETURN(m_Session, WorldSession(id, this, AccountTypes(security), expansion, mutetime, locale, recruiter, isRecruiter), -1);
+    ACE_NEW_RETURN(m_Session, WorldSession(id, this, AccountTypes(security), isPremium, expansion, mutetime, locale, recruiter, isRecruiter), -1);
 
     m_Crypt.Init(&k);
 
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index ae55c3b..244c65a 100755
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -458,8 +458,11 @@ void World::LoadConfigSettings(bool reload)
     rate_values[RATE_DROP_ITEM_REFERENCED_AMOUNT] = sConfigMgr->GetFloatDefault("Rate.Drop.Item.ReferencedAmount", 1.0f);
     rate_values[RATE_DROP_MONEY]  = sConfigMgr->GetFloatDefault("Rate.Drop.Money", 1.0f);
     rate_values[RATE_XP_KILL]     = sConfigMgr->GetFloatDefault("Rate.XP.Kill", 1.0f);
+    rate_values[RATE_XP_KILL_PREMIUM]    = sConfigMgr->GetFloatDefault("Rate.XP.Kill.Premium", 1.0f);
     rate_values[RATE_XP_QUEST]    = sConfigMgr->GetFloatDefault("Rate.XP.Quest", 1.0f);
+    rate_values[RATE_XP_QUEST_PREMIUM]   = sConfigMgr->GetFloatDefault("Rate.XP.Quest.Premium", 1.0f);
     rate_values[RATE_XP_EXPLORE]  = sConfigMgr->GetFloatDefault("Rate.XP.Explore", 1.0f);
+    rate_values[RATE_XP_EXPLORE_PREMIUM] = sConfigMgr->GetFloatDefault("Rate.XP.Explore.Premium", 1.0f);
     rate_values[RATE_REPAIRCOST]  = sConfigMgr->GetFloatDefault("Rate.RepairCost", 1.0f);
     if (rate_values[RATE_REPAIRCOST] < 0.0f)
     {
@@ -467,6 +470,7 @@ void World::LoadConfigSettings(bool reload)
         rate_values[RATE_REPAIRCOST] = 0.0f;
     }
     rate_values[RATE_REPUTATION_GAIN]  = sConfigMgr->GetFloatDefault("Rate.Reputation.Gain", 1.0f);
+    rate_values[RATE_REPUTATION_GAIN_PREMIUM]  = sConfigMgr->GetFloatDefault("Rate.Reputation.Gain.Premium", 1.0f);
     rate_values[RATE_REPUTATION_LOWLEVEL_KILL]  = sConfigMgr->GetFloatDefault("Rate.Reputation.LowLevel.Kill", 1.0f);
     rate_values[RATE_REPUTATION_LOWLEVEL_QUEST]  = sConfigMgr->GetFloatDefault("Rate.Reputation.LowLevel.Quest", 1.0f);
     rate_values[RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS] = sConfigMgr->GetFloatDefault("Rate.Reputation.RecruitAFriendBonus", 0.1f);
@@ -494,6 +498,7 @@ void World::LoadConfigSettings(bool reload)
     rate_values[RATE_AUCTION_DEPOSIT] = sConfigMgr->GetFloatDefault("Rate.Auction.Deposit", 1.0f);
     rate_values[RATE_AUCTION_CUT] = sConfigMgr->GetFloatDefault("Rate.Auction.Cut", 1.0f);
     rate_values[RATE_HONOR] = sConfigMgr->GetFloatDefault("Rate.Honor", 1.0f);
+    rate_values[RATE_HONOR_PREMIUM] = sConfigMgr->GetFloatDefault("Rate.Honor.Premium", 1.0f);
     rate_values[RATE_MINING_AMOUNT] = sConfigMgr->GetFloatDefault("Rate.Mining.Amount", 1.0f);
     rate_values[RATE_MINING_NEXT]   = sConfigMgr->GetFloatDefault("Rate.Mining.Next", 1.0f);
     rate_values[RATE_INSTANCE_RESET_TIME] = sConfigMgr->GetFloatDefault("Rate.InstanceResetTime", 1.0f);
@@ -1206,6 +1211,15 @@ void World::LoadConfigSettings(bool reload)
     // misc
     m_bool_configs[CONFIG_PDUMP_NO_PATHS] = sConfigMgr->GetBoolDefault("PlayerDump.DisallowPaths", true);
     m_bool_configs[CONFIG_PDUMP_NO_OVERWRITE] = sConfigMgr->GetBoolDefault("PlayerDump.DisallowOverwrite", true);
+    
+    // Vip Commands
+    m_bool_configs[CONFIG_VIP_DEBUFF_COMMAND] = sConfigMgr->GetBoolDefault("Vip.Debuff.Command", true);
+    m_bool_configs[CONFIG_VIP_BANK_COMMAND] = sConfigMgr->GetBoolDefault("Vip.Bank.Command", true);
+    m_bool_configs[CONFIG_VIP_REPAIR_COMMAND] = sConfigMgr->GetBoolDefault("Vip.Repair.Command", true);
+    m_bool_configs[CONFIG_VIP_RESET_TALENTS_COMMAND] = sConfigMgr->GetBoolDefault("Vip.Reset.Talents.Command", true);
+    m_bool_configs[CONFIG_VIP_TAXI_COMMAND] = sConfigMgr->GetBoolDefault("Vip.Taxi.Command", true);
+    m_bool_configs[CONFIG_VIP_HOME_COMMAND] = sConfigMgr->GetBoolDefault("Vip.Home.Command", true);
+    m_bool_configs[CONFIG_VIP_CAPITAL_COMMAND] = sConfigMgr->GetBoolDefault("Vip.Capital.Command", true);
 
     // call ScriptMgr if we're reloading the configuration
     m_bool_configs[CONFIG_WINTERGRASP_ENABLE] = sConfigMgr::GetBoolDefault("Wintergrasp.Enable", false);
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 7227ae6..242a80a 100755
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -169,6 +169,13 @@ enum WorldBoolConfigs
     CONFIG_DUEL_RESET_ENABLE,
     CONFIG_ANTI_REKLAMA_ENABLE,
     CONFIG_CHANNEL_ON_CITY_ONLY_FLAG,
+    CONFIG_VIP_DEBUFF_COMMAND,
+     CONFIG_VIP_BANK_COMMAND,
+     CONFIG_VIP_REPAIR_COMMAND,
+     CONFIG_VIP_RESET_TALENTS_COMMAND,
+     CONFIG_VIP_TAXI_COMMAND,
+     CONFIG_VIP_HOME_COMMAND,
+     CONFIG_VIP_CAPITAL_COMMAND,
     BOOL_CONFIG_VALUE_COUNT
 };
 
@@ -355,10 +362,14 @@ enum Rates
     RATE_DROP_ITEM_REFERENCED_AMOUNT,
     RATE_DROP_MONEY,
     RATE_XP_KILL,
+    RATE_XP_KILL_PREMIUM,
     RATE_XP_QUEST,
+    RATE_XP_QUEST_PREMIUM,
     RATE_XP_EXPLORE,
+    RATE_XP_EXPLORE_PREMIUM,
     RATE_REPAIRCOST,
     RATE_REPUTATION_GAIN,
+    RATE_REPUTATION_GAIN_PREMIUM,
     RATE_REPUTATION_LOWLEVEL_KILL,
     RATE_REPUTATION_LOWLEVEL_QUEST,
     RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS,
@@ -386,6 +397,7 @@ enum Rates
     RATE_AUCTION_DEPOSIT,
     RATE_AUCTION_CUT,
     RATE_HONOR,
+    RATE_HONOR_PREMIUM,
     RATE_MINING_AMOUNT,
     RATE_MINING_NEXT,
     RATE_TALENT,
diff --git a/src/server/scripts/Commands/CMakeLists.txt b/src/server/scripts/Commands/CMakeLists.txt
index 177b3a4..2094a50 100644
--- a/src/server/scripts/Commands/CMakeLists.txt
+++ b/src/server/scripts/Commands/CMakeLists.txt
@@ -41,6 +41,7 @@ set(scripts_STAT_SRCS
   Commands/cs_server.cpp
   Commands/cs_titles.cpp
   Commands/cs_wp.cpp
+  Commands/cs_vip.cpp
 #  Commands/cs_pdump.cpp
 #  Commands/cs_channel.cpp
 #  Commands/cs_pet.cpp
diff --git a/src/server/scripts/Commands/cs_vip.cpp b/src/server/scripts/Commands/cs_vip.cpp
new file mode 100644
index 0000000..ec5e5dd
--- /dev/null
+++ b/src/server/scripts/Commands/cs_vip.cpp
@@ -0,0 +1,269 @@
+/*
+* Copyright (C) 2012 SliceCore <https://github.com/Neket007/SliceCore>
+*/
+
+#include "ScriptMgr.h"
+#include "Common.h"
+#include "Chat.h"
+#include "Player.h"
+#include "World.h"
+#include "Config.h"
+#include "WorldSession.h"
+#include "Language.h"
+#include "Log.h"
+#include "SpellAuras.h"
+
+
+class vip_commandscript : public CommandScript
+{
+public:
+    vip_commandscript() : CommandScript("vip_commandscript") { }
+
+    ChatCommand* GetCommands() const
+    {
+        static ChatCommand vipCommandTable[] =
+        {
+            { "debuff",         SEC_PLAYER,         false, &HandleVipDebuffCommand,             "", NULL },
+            { "bank",           SEC_PLAYER,         false, &HandleVipBankCommand,               "", NULL },
+            { "repair",         SEC_PLAYER,         false, &HandleVipRepairCommand,             "", NULL },
+            { "resettalents",   SEC_PLAYER,         false, &HandleVipResetTalentsCommand,       "", NULL },
+            { "taxi",           SEC_PLAYER,         false, &HandleVipTaxiCommand,               "", NULL },
+            { "home",           SEC_PLAYER,         false, &HandleVipHomeCommand,               "", NULL },
+            { "capital",        SEC_PLAYER,         false, &HandleVipCapitalCommand,            "", NULL },
+            { NULL,             0,                  false, NULL,                                "", NULL }
+        };
+
+
+        static ChatCommand commandTable[] =
+        {
+            { "vip",            SEC_PLAYER,         false, NULL,                                "", vipCommandTable },
+            { NULL,             0,                  false, NULL,                                "", NULL }
+        };
+        return commandTable;
+    }
+
+    static bool HandleVipDebuffCommand(ChatHandler* handler, const char* /*args*/)
+    {   
+        Player *plr = handler->GetSession()->GetPlayer();
+
+        if (!handler->GetSession()->IsPremium())
+        {
+            handler->SendSysMessage(LANG_PLAYER_NOT_VIP);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (!sWorld->getBoolConfig(CONFIG_VIP_DEBUFF_COMMAND))
+        {
+            handler->SendSysMessage(LANG_VIP_COMMAND_DISABLED);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if(plr->IsInCombat() || plr->IsInFlight() || plr->GetMap()->IsBattlegroundOrArena() || plr->HasStealthAura() || plr->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH) || plr->isDead())
+        {
+            handler->SendSysMessage(LANG_VIP_ERROR);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        handler->GetSession()->GetPlayer()->RemoveAurasDueToSpell(15007);
+        handler->GetSession()->GetPlayer()->RemoveAurasDueToSpell(26013);
+
+        return true;
+    }
+    
+    static bool HandleVipBankCommand(ChatHandler* handler, const char* /*args*/)
+    {
+        Player *plr = handler->GetSession()->GetPlayer();
+
+        if (!handler->GetSession()->IsPremium())
+        {
+            handler->SendSysMessage(LANG_PLAYER_NOT_VIP);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+        
+        if (!sWorld->getBoolConfig(CONFIG_VIP_BANK_COMMAND))
+        {
+            handler->SendSysMessage(LANG_VIP_COMMAND_DISABLED);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }

+        if (plr->IsInCombat() || plr->IsInFlight() || plr->GetMap()->IsBattlegroundOrArena() || plr->HasStealthAura() || plr->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH) || plr->isDead())
+        {
+            handler->SendSysMessage(LANG_VIP_ERROR);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        handler->GetSession()->SendShowBank(handler->GetSession()->GetPlayer()->GetGUID());
+
+        return true;
+    }
+
+    static bool HandleVipRepairCommand(ChatHandler* handler, const char* /*args*/)
+    {
+        Player *plr = handler->GetSession()->GetPlayer();
+
+        if (!handler->GetSession()->IsPremium())
+        {
+            handler->SendSysMessage(LANG_PLAYER_NOT_VIP);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (!sWorld->getBoolConfig(CONFIG_VIP_REPAIR_COMMAND))
+        {
+            handler->SendSysMessage(LANG_VIP_COMMAND_DISABLED);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (plr->IsInCombat() || plr->IsInFlight() || plr->GetMap()->IsBattlegroundOrArena() || plr->HasStealthAura() || plr->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH) || plr->isDead())
+        {
+            handler->SendSysMessage(LANG_VIP_ERROR);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        handler->GetSession()->GetPlayer()->DurabilityRepairAll(false, 0, false);
+
+        handler->PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, handler->GetNameLink(handler->GetSession()->GetPlayer()).c_str());
+        return true;
+    }
+
+    static bool HandleVipResetTalentsCommand(ChatHandler* handler, const char* /*args*/)
+   {
+        Player *plr = handler->GetSession()->GetPlayer();
+
+        if (!handler->GetSession()->IsPremium())
+        {
+            handler->SendSysMessage(LANG_PLAYER_NOT_VIP);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (!sWorld->getBoolConfig(CONFIG_VIP_RESET_TALENTS_COMMAND))
+        {
+            handler->SendSysMessage(LANG_VIP_COMMAND_DISABLED);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (plr->IsInCombat() || plr->IsInFlight() || plr->GetMap()->IsBattlegroundOrArena() || plr->HasStealthAura() || plr->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH) || plr->isDead())
+        {
+            handler->SendSysMessage(LANG_VIP_ERROR);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        plr->resetTalents(true);
+        plr->SendTalentsInfoData(false);
+        handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(handler->GetSession()->GetPlayer()).c_str());
+        return true;
+    }
+
+    static bool HandleVipTaxiCommand(ChatHandler* handler, const char* /*args*/)
+    {
+        Player *plr = handler->GetSession()->GetPlayer();
+
+        if (!handler->GetSession()->IsPremium())
+        {
+            handler->SendSysMessage(LANG_PLAYER_NOT_VIP);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (!sWorld->getBoolConfig(CONFIG_VIP_TAXI_COMMAND))
+        {
+            handler->SendSysMessage(LANG_VIP_COMMAND_DISABLED);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (plr->IsInCombat() || plr->IsInFlight() || plr->GetMap()->IsBattlegroundOrArena() || plr->HasStealthAura() || plr->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH) || plr->isDead())
+        {
+            handler->SendSysMessage(LANG_VIP_ERROR);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        plr->SetTaxiCheater(true);
+        handler->PSendSysMessage(LANG_YOU_GIVE_TAXIS, handler->GetNameLink(plr).c_str());
+        if (handler->needReportToTarget(plr))
+            ChatHandler(plr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str());
+            
+        return true;
+    }
+
+    static bool HandleVipHomeCommand(ChatHandler* handler, const char* /*args*/)
+    {
+        Player *plr = handler->GetSession()->GetPlayer();
+
+        if (!handler->GetSession()->IsPremium())
+        {
+            handler->SendSysMessage(LANG_PLAYER_NOT_VIP);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (!sWorld->getBoolConfig(CONFIG_VIP_HOME_COMMAND))
+        {
+            handler->SendSysMessage(LANG_VIP_COMMAND_DISABLED);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (plr->IsInCombat() || plr->IsInFlight() || plr->GetMap()->IsBattlegroundOrArena() || plr->HasStealthAura() || plr->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH) || plr->isDead())
+        {
+            handler->SendSysMessage(LANG_VIP_ERROR);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        plr->RemoveSpellCooldown(8690,true);
+        plr->CastSpell(plr,8690,false);
+
+        return true;
+    }
+
+    static bool HandleVipCapitalCommand(ChatHandler* handler, const char* /*args*/)
+  {
+        Player *plr = handler->GetSession()->GetPlayer();
+
+        if (!handler->GetSession()->IsPremium())
+        {
+            handler->SendSysMessage(LANG_PLAYER_NOT_VIP);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (!sWorld->getBoolConfig(CONFIG_VIP_CAPITAL_COMMAND))
+        {
+            handler->SendSysMessage(LANG_VIP_COMMAND_DISABLED);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (plr->IsInCombat() || plr->IsInFlight() || plr->GetMap()->IsBattlegroundOrArena() || plr->HasStealthAura() || plr->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH) || plr->isDead())
+        {
+            handler->SendSysMessage(LANG_VIP_ERROR);
+            handler->SetSentErrorMessage(true);
+            return false;
+        }
+
+        if (plr->GetTeam() == HORDE)
+            plr->CastSpell(plr,3567,true);
+        else
+            plr->CastSpell(plr,3561,true);
+        
+        return true;
+    }       
+};
+
+void AddSC_vip_commandscript()
+{
+    new vip_commandscript();
+}
\ No newline at end of file
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp
index 31d9f5e..bdb51ca 100755
--- a/src/server/shared/Database/Implementation/LoginDatabase.cpp
+++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp
@@ -87,4 +87,5 @@ void LoginDatabaseConnection::DoPrepareStatements()
     PrepareStatement(LOGIN_SEL_ACCOUNT_WHOIS, "SELECT username, email, last_ip FROM account WHERE id = ?", CONNECTION_SYNCH);
     PrepareStatement(LOGIN_SEL_REALMLIST_SECURITY_LEVEL, "SELECT allowedSecurityLevel from realmlist WHERE id = ?", CONNECTION_SYNCH);
     PrepareStatement(LOGIN_DEL_ACCOUNT, "DELETE FROM account WHERE id = ?", CONNECTION_ASYNC);
+    PrepareStatement(LOGIN_SET_ACCOUNT_PREMIUM, "UPDATE account_premium SET active = 0 WHERE unsetdate<=UNIX_TIMESTAMP() AND unsetdate<>setdate", CONNECTION_ASYNC);
 }
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h
index b4f6713..d1d63ca 100755
--- a/src/server/shared/Database/Implementation/LoginDatabase.h
+++ b/src/server/shared/Database/Implementation/LoginDatabase.h
@@ -107,6 +107,7 @@ enum LoginDatabaseStatements
     LOGIN_SEL_ACCOUNT_WHOIS,
     LOGIN_SEL_REALMLIST_SECURITY_LEVEL,
     LOGIN_DEL_ACCOUNT,
+    LOGIN_SET_ACCOUNT_PREMIUM,
 
     MAX_LOGINDATABASE_STATEMENTS
 };
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
+#########################################################################################################
+# VIP CONFIG
+#
+#    Rate.XP.Kill.Premium
+#    Rate.XP.Quest.Premium
+#    Rate.XP.Explore.Premium
+#    Rate.Honor.Premium
+#    Rate.Reputation.Gain.Premium
+#        Description: Enables rates modifier to VIPs.
+#        Default: 1
+
+Rate.XP.Kill.Premium    = 1
+Rate.XP.Quest.Premium   = 1
+Rate.XP.Explore.Premium = 1
+Rate.Honor.Premium = 1
+Rate.Reputation.Gain.Premium = 1
+
+#    Vip.Debuff.Command = 1
+#    Vip.Bank.Command = 1
+#    Vip.Repair.Command = 1
+#    Vip.Reset.Talents.Command = 1
+#    Vip.Taxi.Command = 1
+#    Vip.Home.Command = 1
+#    Vip.Capital.Command = 1
+#        Description: Here you can enable or disable some VIP commands.
+#        Default: 1
+
+Vip.Debuff.Command = 1
+Vip.Bank.Command = 1
+Vip.Repair.Command = 1
+Vip.Reset.Talents.Command = 1
+Vip.Taxi.Command = 1
+Vip.Home.Command = 1
+Vip.Capital.Command = 1
+
+#
 ###################################################################################################
 
 ###################################################################################################
-- 
1.7.10  

برای نسخه 7 ماه پیشتر استفاده و فیکس شده اگه برای نسخه جدید اررور داد ارور هاشو بزارید
و کامند هایی که داره بیشتر برای سرور نرمال استفاده میشه

منبع : irancore