Latest topics
» TrinityCore 2 Gold Max Work-Around
[Eluna] Grumbo`z VIP System Icon_minitime1Tue Mar 21, 2017 9:14 pm by Grumbo

» [CPP][Conv] Dedicated World Chat Channel
[Eluna] Grumbo`z VIP System Icon_minitime1Tue Mar 21, 2017 8:56 pm by Grumbo

» Cool [CPP] Grumbo'z VIP System
[Eluna] Grumbo`z VIP System Icon_minitime1Tue Mar 21, 2017 8:03 pm by Grumbo

» [CPP] EmuDevs Premium System
[Eluna] Grumbo`z VIP System Icon_minitime1Tue Mar 21, 2017 7:18 pm by Grumbo

» [TC]255 server stats edit! By Frost - Thanx
[Eluna] Grumbo`z VIP System Icon_minitime1Tue Mar 21, 2017 6:27 pm by Grumbo

» [Eluna] Grumbo`z VIP System
[Eluna] Grumbo`z VIP System Icon_minitime1Tue Mar 21, 2017 6:20 pm by Grumbo

» [CPP] Grumbo'z Capture the Flag System
[Eluna] Grumbo`z VIP System Icon_minitime1Tue Mar 21, 2017 5:14 pm by Grumbo

» Black Wolfs Den
[Eluna] Grumbo`z VIP System Icon_minitime1Mon Mar 20, 2017 10:07 pm by Grumbo

» [CPP] Patchless Item Extended Costs
[Eluna] Grumbo`z VIP System Icon_minitime1Thu Mar 16, 2017 9:11 pm by Grumbo

August 2019

Calendar Calendar


free forum

Forumotion on Facebook Forumotion on Twitter Forumotion on YouTube Forumotion on Google+

[Eluna] Grumbo`z VIP System

Go down

[Eluna] Grumbo`z VIP System Empty [Eluna] Grumbo`z VIP System

Post by Grumbo on Tue Mar 21, 2017 6:20 pm

Grumbo'z VIP System

VIP System:
ok we only have a couple basic Vip/Premium systems so far that I have found on our site 
so I figured I would release a complete version of my VIP System.

--Built Tested and Approved for TC2 3.3.5a Eluna ONLY--
--Tested and Approved for TC2 4.3.4 Eluna ONLY--

For TrinityCore2 3.3.5a

add 1 column to your auth.account db:

ALTER TABLE `account`

then just create a VIP folder in your Lua_scripts folder and name the Core so it will allways load first i.e. "VIP_1_CORE.lua"
Add the scripts you choose, to the VIP folder also.

  • Allows for VIP 1 to xx. max VIP level set in the core (VIPMAX) currently set to 5.
  • A VIP Coin to give access to extra commands and perks.
  • A VIP Stone that will level-up a player's VIP level.

    • Stone is a one shot use. it will vanish after use.

  • A '#resetTP' command for players to reset there own talent points.

    • The command will add extra points based on VIP level also.

  • A '#hp' command to buff a players health points based on there VIP level.

Core Script: 

-- this MUST be the first script of the VIP System to load --

print("Grumbo'z VIP Engine starting:\n")

local VIPMAX = 5; -- you can set it to what ever your little heart desires.
local VIPCOIN = 63020; -- item id for the VIP Coin.
local VIPSTONE = 63021; -- item id for the VIP Stone.
local VIPTPBONUS = 14; -- how many extra talent points for each vip level.

ACCT = {}
print("VIP Table Allocated.")
 Vip_max = VIPMAX,
 Vip_coin = VIPCOIN,
 Vip_stone = VIPSTONE,
print("CORE settings loaded.")

function Player_Vip_Table(event, player)
 local Q = WorldDBQuery("SELECT username, vip FROM auth.account WHERE `id` = '"..player:GetAccountId().."';");
 ACCT[player:GetAccountId()] = {
 Name = Q:GetString(0),
 Vip = Q:GetUInt32(1),
 Health = player:GetMaxHealth()

RegisterPlayerEvent(3, Player_Vip_Table)
print("Player VIP Table prepared.")

function SetVip(player, vip)
 if((vip or 0)==0)then

 ACCT[player:GetAccountId()].Vip = vip
 WorldDBQuery("UPDATE auth.account SET `vip`='""' WHERE `username`='"..player:GetAccountName().."';");
 player:SendBroadcastMessage("|cff00cc00Your VIP is set to "..ACCT[player:GetAccountId()].Vip..".|r")


print("\nGrumbo'z VIP Engine running.")

This needs to be added to your world.item_template table.
The Vip Coin will allow players to get extra perks and access to extra commands when a player has one in there inventory.:" may be required for some scripts to work properly."


INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `maxcount`, `stackable`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `bonding`, `description`) VALUES
(63020, 15, 0, -1, 'VIP Coin', 32282, 1, 64, 0, 1, 0, -1, -1, 1, 1, 1, 1, 13567, 0, 0, 0, -1, 0, -1, 1, 'A MUST HAVE item for all your VIP needs.');

You can add the VIP Coin to a vendor or as a donation item.

The VIP stone will upgrade a players VIP level by 1 when used then vanishes.
the VIP Stone SQL file: 


INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `maxcount`, `stackable`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `bonding`, `description`) VALUES
(63021, 15, 0, -1, 'VIP Stone', 32282, 1, 64, 0, 1, -1, -1, 1, 1, 1, 1, 13567, 0, 0, 0, -1, 0, -1, 1, '!!Wooooohooooooo!!\r\n!!ClickMe!!!ClickMe!!\r\n!!VIP+1!!SuperFun!!');

the Vip Stone can be added to your site store for donors or add it as a drop from your major boss's: 


-- this will update a player's VIP +1 then delete the stone.
-- the timer is set to 1ms to avoid double tapping exploit.
local timer = 1
local itemid = ACCT["SERVER"].Vip_stone

local function RemoveVIPstone(event, _, _, player)
 SetVip(player, ACCT[player:GetAccountId()].Vip+1)
 player:RemoveItem(ACCT["SERVER"].Vip_stone, 1)

function VIPstone(event, player, spellID, effindex, item)

 player:RegisterEvent(RemoveVIPstone, timer, 1, player)
 player:SendBroadcastMessage("you are Max VIP "..ACCT[player:GetAccountId()].Vip..".")
RegisterItemEvent(itemid, 2, VIPstone)

Just use local chat /say and type #resettp to reset talent points: 


[color=#808080]function VIPresetTP(event, player, message, type, language)

 if(message:lower() == "#resettp") then
 local Tp = (78+(ACCT[player:GetAccountId()].Vip*ACCT["SERVER"].Tp_mod))
 player:SetFreeTalentPoints(Tp, 0)
 player:SetFreeTalentPoints(Tp, 1)
 player:SendBroadcastMessage("|cff00cc00All your talents are reset!|r")
RegisterPlayerEvent(18, VIPresetTP)

Just use local chat /say and type #hp to buff your health: 

-- using local chat /say type #hp
-- adds 5%(0.05) of health max PER players vip level :: 0.10 = 10% :: 0.75 = 75% :: 1.25 = 125%

function VIPbuff(event, player, message, Type, lang)

 if(message:lower() == "#hp") then
 player:SetMaxHealth(ACCT[player:GetAccountId()].Health + ((ACCT[player:GetAccountId()].Health * 0.05) * ACCT[player:GetAccountId()].Vip))

RegisterPlayerEvent(18, VIPbuff)

This is a PvP reward script. it will reward the killer 5% of the victims gold multiplied by the killers VIP level. :

function Pvp_Gold_Reward(_, killer, killed)

killer:ModifyMoney(killed:GetCoinage()*(0.05 * ACCT[killer:GetAccountId()].Vip)) -- reward is 0.05 = 5% of victims gold multiplied by killers VIP level


RegisterPlayerEvent(6, Pvp_Gold_Reward)

print("Grumbo'z VIP Gold loot loaded.")

This is a dynamic system so you can use the global ACCT table in other scripts if you wish to use stored values for something or add new scripts using the table entries or expand with new table entries and scripts.

Pick and choose which scripts you wish to use, its dynamic, or write your own scripts. The value is stored in RAM so you can access the stored value in either Lua or C++.ooooh maybe a new community project?...

if you have your own scripts you have wrote to work with this and want to add them here in a post , just remember to be thorough with a very verbose 'how-to' whether it is Lua or C++ .. oh yea and it should work too.

Enjoy everyone and have fun makin kewl new addonz for your server.

Thanks to the following:
Lightning Blade for the Sticky I owe you a sticky Very Happy
@Rochet2 and @FoeReaper for the tons of info that got me to this point.

3.3.5a, Eluna script, TrinityCore, Trinity Core, VIP System, VIP, wotlk, Grumbo

Posts : 94
Points : 231
Join date : 2014-08-21
Location : Pocatello Idaho

View user profile

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum