Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Sql For Item Below
- INSERT INTO `item_template` VALUES (100003, 0, 0, 0, 'Donor Status Token', 50216, 6, 0, 0, 1, 0, 0, 0, -1, -1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 0, 0, 18282, 0, 0, 0, 8000, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, '|cff00FF00Use: Activates donor status on your account.|r', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 'Vip_Activate', 0, 0, 0, 0, 0, -4);
- */
- #include "ScriptMgr.h"
- #define itemid = 100003
- class Vip_Activate : public ItemScript
- {
- public: Vip_Activate() : ItemScript("Vip_Activate") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
- {
- if(player->GetSession()->GetSecurity() >= 2) // Checks if you are gm lvl 1 or above if you are it will return false.
- {
- player->GetSession()->SendNotification("You are already a donor and can not use this item on your account.");
- return false;
- }
- else
- {
- LoginDatabase.PExecute("UPDATE account_access SET gmlevel = 2 WHERE id = %u",player->GetSession()->GetAccountId());
- player->DestroyItemCount(itemid, 1, true, false); // Token ID, Count.
- player->GetSession()->SendNotification("You are now a donor! Relog To Take Effect.");
- return true;
- }
- }
- };
- void AddSC_Vip_Activate()
- {
- new Vip_Activate();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement