PDA

View Full Version : [Eluna] Grumbo`z VIP System



slp13at420
05-11-2014, 07:07 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`
ADD COLUMN `vip` TINYINT(2) UNSIGNED NOT NULL DEFAULT '1' AFTER `recruiter`;


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.


"VIP_1_CORE.lua"
Core Script:


-- this MUST be the first script of the VIP System to load --
print("\n----------------------------")
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.")
ACCT["SERVER"] = {
Vip_max = VIPMAX,
Vip_coin = VIPCOIN,
Vip_stone = VIPSTONE,
Tp_mod = VIPTPBONUS
};
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()
};
end

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

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

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

end

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



"VIP_coin.sql"
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.

"VIP_stone.sql"
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!!');





"VIP_stone.lua"
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)
end

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

if(ACCT[player:GetAccountId()].Vip<=(ACCT["SERVER"].Vip_max-1))then
player:RegisterEvent(RemoveVIPstone, timer, 1, player)

else
player:SendBroadcastMessage("you are Max VIP "..ACCT[player:GetAccountId()].Vip..".")
return
end
end

RegisterItemEvent(itemid, 2, VIPstone)

"VIP_ResetTP.lua"
Just use local chat /say and type #resettp to reset talent points:



function VIPresetTP(event, player, message, type, language)

if(message:lower() == "#resettp") then
player:ResetTalents()
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")
else
end
end
RegisterPlayerEvent(18, VIPresetTP)



"VIP_buff.lua"
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))
end
end

RegisterPlayerEvent(18, VIPbuff)



"VIP_pvp_gold_reward.lua"
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

end

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 :RpS_flapper:


>> The Complete System (https://github.com/BlackWolfsDen/Eluna-Grumboz_VIP_System-Complete) <<

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

Thanks to the following:
Lightning Blade for the Sticky :bump2: I owe you a sticky :D
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

slp13at420
05-26-2014, 02:56 PM
"VIP_repair_command.lua"
Here is another kewl command I added.
The "#repair" command will repair ALL players gear IF they possess A VIP Coin in there inventory.:


-- use local chat /say #repair
function VIP_repair(event, player, message, type, language)

if(message == "#repair") then
if(player:HasItem(ACCT["SERVER"].Vip_coin)==true) then
player:DurabilityRepairAll(100,100)
player:SendBroadcastMessage("|cff00cc00All your items have been repaired!|r")
else
player:SendBroadcastMessage("You must have a VIP Coin to use this command.")
return false;
end
end
end

RegisterPlayerEvent(18, VIP_repair)

print("Grumbo'z VIP Repair command loaded.")




This will require you to update the VIP_1_Core.lua Engine to the latest version in the first post and install the VIP Coin sql file.

La_Blazer
07-06-2014, 02:05 PM
Great! But please correct that typo "You're VIP is set to..."

slp13at420
07-06-2014, 02:59 PM
Great! But please correct that typo "You're VIP is set to..."

I Don't understand what the typo is.


player:SendBroadcastMessage("|cff00cc00You\'re VIP is set to "..ACCT[player:GetAccountId()].Vip..".|r")


but you can also change it to say what-ever you want.


player:SendBroadcastMessage("|cff00cc00Congratulations "..player:GetName()..". You are now VIP "..ACCT[player:GetAccountId()].Vip..".|r")


-- update --
changed .Vip from a GetString() to GetUInt32()

Rochet2
07-06-2014, 04:35 PM
The typo is the classic "You're vs Your".
You're = you are
"You are VIP is set to..." doesnt sound good now does it?

http://www.wikihow.com/Use-You're-and-Your
;)

slp13at420
07-06-2014, 09:30 PM
lol ok I understand now tnx :D lol

- - - Updated - - -

fixed ;)

mariow
07-13-2014, 11:45 AM
Can anyone please fix this script. There is an error in VIP_stone.lua. Worldserver says "Couldn't find a item with <ID: 63021>!" and that is from the VIP_stone.lua script... I have imported both item 63020 and 63021 to item_template in world DB. Help me to fix this please

Also none of the commands except "#resettp" is working. so this script really needs to be fixed. And yes i did add a "VIP" folder in lua_scripts folder and added all scripts there with the names that you recommended. So please fix it

Foereaper
07-13-2014, 03:04 PM
The script works fine, make sure the item is actually in your database, or change the stones entry in the script to whatever is correct :)

Tok124
07-13-2014, 03:56 PM
The script works fine, make sure the item is actually in your database, or change the stones entry in the script to whatever is correct :)Hello Foereaper, I'm a friend to Mariow and i can confirm that the item is in the database. Both items is there. And we also restarted the server and both the item appear ingame and we did not change the entry of the items. So we use the Default Entry. I did "reload eluna" in worldserver.exe and also restarted but the script wont work... I also added the "vip" column to account table in auth but it just wont work...

Tok124
07-13-2014, 04:02 PM
"VIP_coin.lua"
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."


REPLACE INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `WDBVerified`) VALUES
(63020, 15, 0, -1, 'VIP Coin', 32282, 1, 64, 0, 1, 0, 0, 0, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 0, 0, 0, 13567, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, 'Click me to view your stats.\r\nA MUST HAVE item.\r\nFor all your VIP needs.\r\n', 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 'Vipcoin_Trigger', 0, 0, 0, 0, 0, 12340);



And also. It says vip_coin.lua but this is not a lua script. It's a SQL Script... However we did import this item. The only thing i changed was WDBVerified to VerifiedBuild

slp13at420
07-13-2014, 05:13 PM
And also. It says vip_coin.lua but this is not a lua script. It's a SQL Script... However we did import this item. The only thing i changed was WDBVerified to VerifiedBuild

thanx good catch. :top:
-fixed-
this is an sql file and needs to be added to your sql world.item_template DB.
yea if you were placing it in the lua_scripts folder rather than grinding it into your SQL db then it would cause the problems your having.
sorry my fault .

Tok124
07-13-2014, 05:51 PM
thanx good catch. :top:
-fixed-
this is an sql file and needs to be added to your sql world.item_template DB.
yea if you were placing it in the lua_scripts folder rather than grinding it into your SQL db then it would cause the problems your having.
sorry my fault .

Np, However first i just tried to insert the items into DB and then i got that error and then i was thinking that maybe there is a function in the lua script that includes that SQL so then i added that SQL File in lua_scripts folder. And it reported same error. So the error was there before i added that to the folder. Anyway i will try again.

Btw, You can also edit the query to support latest DB Version, Just change WDBVerified to VerifiedBuild. Most people know how to edit this but before someone ask about it i would atleast recommend that you change it :P

slp13at420
07-13-2014, 06:01 PM
tnx and updated.
I may shorten it down to just the basic needed data so it wont need to be edited after every TC update lol

slp13at420
07-13-2014, 06:26 PM
ok -updated-
stripped it down the just the needed data so it should be better for both newer/older cores.
this was one of those back-burnur things I been meaning to get to rofl shortening up all the sql files to short needed data. K.I.S.S.

mariow
07-13-2014, 06:32 PM
ok -updated-
stripped it down the just the needed data so it should be better for both newer/older coresThanks for all help slp, However i did remove the sql now from scripts folder and the error is gone. Now i have a error with the buff command. I think you forgot and "end" and i tried to add that and then i got another error about a nil message value or something like that. Here is an image to show you the error
http://i60.tinypic.com/ojji3o.png

And also the items still doesn't work. Atleast the VIP Cooin does not work. When i click it i just see some red aura around my char. Butt i guess a menu should pop up. But that doesnt work. There is no window that pops up when i click that item

slp13at420
07-13-2014, 06:54 PM
k fixed :D

slp13at420
07-13-2014, 07:02 PM
consider it an item that gives extra bonus's. this is a stripped down version of a larger VIP System in the donator section.
if a player has this coin then they can use extra commands like the '#repair' command.
In the full version it will display VIP Stats when a player clicks it hence the spell visual.

kusanagy
12-12-2014, 07:16 AM
hey mate, how can add Rate of Drop for VIP?

slp13at420
12-12-2014, 03:13 PM
hey mate, how can add Rate of Drop for VIP?
currently there is not a way to influence the drop rate for a specific player thru Eluna. atm.
that can only be done thru a core edit.

slp13at420
12-28-2015, 04:20 AM
Added ".VIP mall" command.

Now a player that has a VIP Coin in there inventory can now teleport to a location you have setup as a VIP mall.
Just type ".VIP mall" ingame and poof :D

This requires the VIP Coin from the first post.




-- command ".VIP mall"
local command = "VIP mall";

local VIPCoin = ACCT["SERVER"].Vip_coin;
local VIPCoinName = GetItemLink(VIPCoin);

-- GPS coord's . current coord's is Shattrath.
local map_id = 530;
local x = -1863.6059;
local y = 5430.4414;
local z = -7.7509;
local o = 5.1025;

function VIP_Mall(event, player, message)

if(message == command) then

if(player:HasItem(VIPCoin)==true) then
player:Teleport(map_id, x, y, z, o)
else
player:SendBroadcastMessage("|cffFF0000[SYSTEM] |cff00cc00"..Pname.." you need to have a "..VIPCoinName.." to use the mall command.|r")
player:SendBroadcastMessage("|cffFF0000[SYSTEM] |cff00cc00"..Pname.." you can purchase a "..VIPCoinName.." from the Custom VIP vendor, misc items for xx "..mg_name..".|r")
return false;
end
end
end

RegisterPlayerEvent(42, VIP_Mall)

function VIP_reset_comm(event, player, message, type, language)

if(message:lower() == "vcommands") then

player:SendBroadcastMessage("/say ."..command.." |cff00cc00To teleport to the VIP mall when you own a "..VIPCoinName..".|r")
end
return;
end

RegisterPlayerEvent(18, VIP_reset_comm)

print("Grumbo'z VIP Mall command loaded.")

revowow
08-21-2016, 11:09 PM
Most of these dont work, VIP Vendor dont work, VIP Mall is not working not sure whats happening. getting error :

lua_scripts/VIP_Vendor.lua:169: attempt to call method 'SendVendorWindow' (a nil value)

slp13at420
08-22-2016, 12:27 AM
Most of these dont work, VIP Vendor dont work, VIP Mall is not working not sure whats happening. getting error :

lua_scripts/VIP_Vendor.lua:169: attempt to call method 'SendVendorWindow' (a nil value)

lol looks like this now needs updating lol
I will tinker on this over the next few days :)

change `SendVendorWindow` to `SendListInventory`.

revowow
08-22-2016, 04:28 AM
:) When doesnt things need tinkering with VIP Functions :)

Though your script is really nice, I had to rebuild everything, yours works off having a VIP Coin in inventory, the problem with this is you need to ether setup a way a VIP Gets that coin or give it to him.

I set it on VIP Level table on account, so really don't even need the VIP Coin.

I also didn't like how 1: The Bloody token instead of adding MG, just gave you enough points to get next level VIP.

I had to rethink your system, as MG didnt sound really even good to have.

1: Your Website should keep track of your votes not the game.
On website, if you want "I want it to work off vip level donation instead of votes", but if you want the votes to work, you should be able to buy a Upgraded level in your web store and it would set "VIP" Column +1 for each purchase.

This way you do not have to keep track of the # of MG and such. also it would remove the need for the Coins fully.

ProxyAcid
08-22-2016, 11:07 PM
I've tried this system, i do like it, but i dident get the #VIP commands up, also had issues with the MG thing, it gave me some errors so i removed the whole system, altought i would like a single VIP system where i set VIP level and VIP requested LEVEL to aquire a special weapon/gear, so for example:

VIP Level 1: Sword Of Death (VIP1) Can only be used by VIP level 1
VIP Level 2: Death For Hun (VIP2) Can only be used by VIP level 2
VIP Level 3: Fun Speed Smurf (VIP3) Can only be used by VIP level 3
VIP Token 1-3 "Right click to receive your VIP rank!

Would be useful if people would like to buy VIP tokens to be able to use special gear :)

slp13at420
08-22-2016, 11:25 PM
:) When doesnt things need tinkering with VIP Functions :)

Though your script is really nice, I had to rebuild everything, yours works off having a VIP Coin in inventory, the problem with this is you need to ether setup a way a VIP Gets that coin or give it to him.

I set it on VIP Level table on account, so really don't even need the VIP Coin.

I also didn't like how 1: The Bloody token instead of adding MG, just gave you enough points to get next level VIP.

I had to rethink your system, as MG didnt sound really even good to have.

1: Your Website should keep track of your votes not the game.
On website, if you want "I want it to work off vip level donation instead of votes", but if you want the votes to work, you should be able to buy a Upgraded level in your web store and it would set "VIP" Column +1 for each purchase.

This way you do not have to keep track of the # of MG and such. also it would remove the need for the Coins fully.

it is supposed to work off website votes but the end user needs to set that up in there website ... but come to think of it I didn't accommodate a way for it to check for changes in vote count in sql from website.
basically you will add a second line in your php where a vote will +1 to the sql just add a second sql update line for `auth.account.votes`.

The VIP Coin is in the Vendor but the vendor needs updating for latest rev of Eluna.

I could add an MG reward amount and use the players VIP level as a multiplier for each increase.

My C++ VIP Engine does have the ability to allow a minimum required VIP level to use or equip an item.

ProxyAcid
08-23-2016, 12:03 PM
it is supposed to work off website votes but the end user needs to set that up in there website ... but come to think of it I didn't accommodate a way for it to check for changes in vote count in sql from website.
basically you will add a second line in your php where a vote will +1 to the sql just add a second sql update line for `auth.account.votes`.

The VIP Coin is in the Vendor but the vendor needs updating for latest rev of Eluna.

I could add an MG reward amount and use the players VIP level as a multiplier for each increase.

My C++ VIP Engine does have the ability to allow a minimum required VIP level to use or equip an item.

Sweet, altought i dont know how to set that up

slp13at420
08-24-2016, 01:30 AM
yea that is more for the more advanced users. once you get some skill n basic understanding. it requires more than just adding a couple files to a folder. lotta editing of other files.

slp13at420
10-21-2016, 11:17 PM
10k+ views :whoo:

Thank you everyone for taking the time to stop and check out my Work.

m8fun
10-22-2016, 09:49 AM
when i press this in db

ALTER TABLE `item_template`
ADD COLUMN `vip` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1' ;



get this error in server world consol when loading items ..
-
-
-
-
-
2016-10-22 13:20:13 Loading Items...
2016-10-22 13:20:14 ERROR:Error in item_template table, probably sql file format was updated (there should be 141 fields in sql).

slp13at420
10-22-2016, 12:57 PM
when i press this in db

ALTER TABLE `item_template`
ADD COLUMN `vip` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1' ;



get this error in server world consol when loading items ..
-
-
-
-
-
2016-10-22 13:20:13 Loading Items...
2016-10-22 13:20:14 ERROR:Error in item_template table, probably sql file format was updated (there should be 141 fields in sql).

that is weird . all that is doing is adding a new field to world.item_template table...
you can add the field manually if you know how.
And I will look into it tonite after work.

second glance realize its a loading error.
something is counting the fields and throwing an error during startup.
I never had that happen before ....
auto db update system?

what rev/core/patch are you applying this to?

m8fun
10-22-2016, 02:01 PM
that is weird . all that is doing is adding a new field to world.item_template table...
you can add the field manually if you know how.
And I will look into it tonite after work.

second glance realize its a loading error.
something is counting the fields and throwing an error during startup.
I never had that happen before ....
auto db update system?

what rev/core/patch are you applying this to?

Corona Core Owned by : Salija

m8fun
10-22-2016, 02:06 PM
I Need A Vip System With This Feature :

Max VIP LEVEL 7 .

If You Vip a Member to vip 1 , 1 level added to all character of those account . [ for example if max level 70 . you add vip 1 for he's all of hes heroes level up to 71 . ] [ vip 1 : 71 , vip 2 : 72 , vip 3 : 73 And .... ]

Rate Loot

MG .

Need Vip For Equip This ITem .

Extra Talent Point

:| Just This :|||||||||

slp13at420
10-23-2016, 04:01 AM
CoronaCore is a customized version of Mangos. Customized by Salja and his team.
This System was designed and tested on TrinityCore 3.3.5a only. I cantr verify if it would work on Mangos altho I have been told that other scripts of mine have worked on Mangos.
This System doesn't expect a specific amount of fields for a db table . it only grabs what it needs from the db tables.
this sounds like a core issue. something in the core is checking for an exact amount of fields for a table rather than the minimum required....

Hopefuly Salja will get notified of these mentions and see this then help out :)

and btw, Thank you for choosing my work :D

m8fun
10-23-2016, 09:20 AM
CAn You Make a VIP System With My Needs ?


Max VIP LEVEL 7 .

If You Vip a Member to vip 1 , 1 level added to all character of those account . [ for example if max level 70 . you add vip 1 for he's all of hes heroes level up to 71 . ] [ vip 1 : 71 , vip 2 : 72 , vip 3 : 73 And .... ]

Rate Loot

MG .

Need Vip For Equip This ITem .

Extra Talent Point


Can you ?> :((

slp13at420
10-23-2016, 07:18 PM
Only thing you listed that this system doesn't do is the VIP reward Level per rank.
but I am adding and testing that.

as for modified drop rate, I have not found a way to increase the drop rate thru Eluna. Altho there is a couple scripts that will add mg "drop" to an npc.

this does contain `Magic Gold` than can be shared across account toons.

Max adjustable VIP rank limit is 255.

This does have `Extra TP per VIP rank`.

This does allow the Admin to set items to require different minimum VIP ranks to equip/use. i.e. item requires a player to have VIP4 or higher to use/equip.

slp13at420
10-23-2016, 09:37 PM
update 10-23-2016:
Added new feature:
Now the Admin can allow VIP ranks to increase a players level for each Rank.

m8fun
10-25-2016, 03:07 PM
ERROR:Error in item_template table, probably sql file format was updated (there should be 141 fields in sql).

Cant Help Me With My Consol Error when Run SQL_Item_Requird_vip_rank ?

m8fun
10-25-2016, 04:15 PM
At New Update When I Create New Hero . Consol worldserver.exe crashed.


Problem From : VIP_Item_Require_VIP_Rank.lua

slp13at420
10-26-2016, 01:15 AM
i'm assuming by the linked screen shot in the prior post that the field 'vip' exists in world.item_template since the screen shot is of a loading error, not an error from adding the field via the sql editor you use.

the error you linked prior is a Core error. for some reason CoronaCore will only expect x number of fields to a db or it crashes ....

Now in theory this should work for Eluna on Cmangos which is what CoronaCore is spawned from but its been modified by Salja and his team.
I have never worked with Cmangos nor have I ever worked with CoronaCore.
ArcEmu and TrinityCore are the only 2 server cores I have worked with so far.

m8fun
10-26-2016, 08:50 AM
i'm assuming by the linked screen shot in the prior post that the field 'vip' exists in world.item_template since the screen shot is of a loading error, not an error from adding the field via the sql editor you use.

the error you linked prior is a Core error. for some reason CoronaCore will only expect x number of fields to a db or it crashes ....



Now in theory this should work for Eluna on Cmangos which is what CoronaCore is spawned from but its been modified by Salja and his team.
I have never worked with Cmangos nor have I ever worked with CoronaCore.
ArcEmu and TrinityCore are the only 2 server cores I have worked with so far.


Arcemu : ArcEmu 2.4.3 Not Full Supported [ LUA Part ] and your scripts dont work 1% on arcEmu 2.4.3
TrinityCore : We Have TrinityCore 2.4.3 ?? Eluna ?? if have send link download to me .
Cmangos : I just can use your sripts on Cmangos but no 100% .

Anyone Can Help Me ?>!

slp13at420
10-29-2016, 01:40 AM
Arcemu : ArcEmu 2.4.3 Not Full Supported [ LUA Part ] and your scripts dont work 1% on arcEmu 2.4.3
TrinityCore : We Have TrinityCore 2.4.3 ?? Eluna ?? if have send link download to me .
Cmangos : I just can use your sripts on Cmangos but no 100% .



here is the repo for Eluna pre-added to trinitycore wotlk and cata along with cmangos 1 and higher:

https://github.com/ElunaLuaEngine

m8fun
11-02-2016, 08:29 PM
hey . BRave Man : ))

new updates ? :DD i waiting for your new updatings ..... or new scripts ,, [ ELUNA ]

Marko
01-15-2017, 06:02 PM
ERROR lua_scripts/VIP/VIP_stone.lua:8: attempt to index global 'player' (a nil value)
ERROR lua_scripts/VIP/VIP_MG_Banker.lua:52: attempt to call method 'SendVendorWindow' (a nil value)
ERROR lua_scripts/VIP/VIP_world_chat.lua:51: attempt to index field '?' (a nil value)
ERROR lua_scripts/VIP/VIP_Item_Require_VIP_Rank.lua:15: attempt to index field '?' (a nil value)
:surprised: :notokay:

slp13at420
01-15-2017, 07:42 PM
gotta roll back my test server by removing my CPP VIP system so i can test properly.

make sure you have all your sql updates for the system added and the Core script added.

also what rev are you using ?

does it do what it is supposed to do then throw the error?..
what were you trying to do when it threw the error/'s ?

Marko
01-15-2017, 09:59 PM
used latest trinitycore with eluna from 29.10.2016
the magic gold vendor seems broken, when clicking any option in his menu:
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63030), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63031), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63032), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63033), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63034), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (62006), ignore
ERROR lua_scripts/VIP/VIP_MG_Banker.lua:52: attempt to call method 'SendVendorWindow' (a nil value)
VIP vendor when anything clicked does not work ERROR lua_scripts/VIP/VIP_Vendor.lua:178: attempt to index field '?' (a nil value)
ERROR lua_scripts/VIP/VIP_1_CORE.lua:156: attempt to index field '?' (a nil value)
ERROR lua_scripts/VIP/VIP_pvp_item_reward.lua:11: attempt to index field '?' (a nil value)
ERROR lua_scripts/VIP/VIP_pvp_gold_reward.lua:3: attempt to index field '?' (a nil value)
When other player is killed no item is ever rewarded - VIP_pvp_item_reward.lua fails
Everything is buggy, but some things don't work at all. If anything editable changed in any lua script, all VIP scripts fail to function and .reload eluna does not fix it, entire server must be restarted. Otherwise players can not even chat or use any scripts.
And when server does get restarted, everyone looses all their VIP ranks back to rank 1
:foreveralone:

slp13at420
01-16-2017, 05:10 AM
the magic gold vendor seems broken, when clicking any option in his menu:
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63030), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63031), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63032), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63033), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (63034), ignore
Table `(game_event_)npc_vendor` for Vendor (Entry: 60120) have in item list non-existed item (62006), ignore


those errors are self explained. those item id's dont exist in your db. i just used those as placeholders for examples. you just replace them with the id's of the items you want the vendor the sell, and you can use them as examples to add more items.

slp13at420
01-16-2017, 07:52 AM
can you export your DB? auth,char,world then upload somewhere?
i cant get my test server to update without completely crashing?

Marko
01-16-2017, 09:32 AM
well that would be troublesome since i am hosting my classless server :D i cant exacly give it away, worked a lot on it and made many custom contents and stuff. You can use latest trinitycore db it is the same except all the custom stuff ofc.


But yes the vendor is just one of things, main problem is the restart issue if i restart server everyone looses VIP rank.
Would also be nice to know how to direct script to point in auth db to vp table i see the line where it has to be changed but dont know what to put there so it points to that table for vote points.
PVP item reward is also broken and gives nothing instead of some item that victim had equipped.
I'm also going to try convert your Guild Warz into latest trinity core, atm having trouble with game objects template being different but will somehow figure it out what to put instead of "faction" etc.

It would be nice to have both of your works fully functional and working with latest revisions and am glad i'm contributing a little at least for the testing part :)

Marko
01-16-2017, 03:26 PM
Have fixed the issue where server restart also restarts all players vip lvls, by deleting this in VIP Core lua script

local tmplvl = (math.ceil(ACCT[Paccid].Votes / ACCT["SERVER"].Vote_count));

if(ACCT[Paccid].Votes <= ACCT["SERVER"].Vote_count)then
tmplvl = 1;
end

if(ACCT[Paccid].Votes >= (ACCT["SERVER"].Vote_count*ACCT["SERVER"].Vip_max))then
tmplvl = ACCT["SERVER"].Vip_max;
end

SetVip(player,tmplvl);
But other issues not resolved yet. Like the VIP titles stone and MG banker, PVP item reward etc.
Sent Grumbo some of my files over skype :)

slp13at420
01-16-2017, 07:34 PM
Have fixed the issue where server restart also restarts all players vip lvls, by deleting this in VIP Core lua script

local tmplvl = (math.ceil(ACCT[Paccid].Votes / ACCT["SERVER"].Vote_count));

if(ACCT[Paccid].Votes <= ACCT["SERVER"].Vote_count)then
tmplvl = 1;
end

if(ACCT[Paccid].Votes >= (ACCT["SERVER"].Vote_count*ACCT["SERVER"].Vip_max))then
tmplvl = ACCT["SERVER"].Vip_max;
end

SetVip(player,tmplvl);
But other issues not resolved yet. Like the VIP titles stone and MG banker, PVP item reward etc.
Sent Grumbo some of my files over skype :)

Ok that block you deleted is the cheater checker. it readjusts a players VIP rank to its proper value based on stored votes in case some one finds a way to hack there VIP rank higher it will re adjust back when they log in again.

https://github.com/BlackWolfsDen/Eluna-Grumboz_VIP_System-Complete/blob/master/VIP_1_Core.ext#L56

slp13at420
01-16-2017, 08:23 PM
does your website use a vote system ? if so where does it store it?

Marko
01-16-2017, 09:39 PM
Votes = Q:GetUInt32(2), -- you can table this independantly if you want to query the data from a different db location
idk what to change here so it points to auth db - account table - column called "vp"

That vp checker is not so good because if even pointed properly to vp table instead of votes, when player buys something with vp it will get reduced and then his vip might fall as well. better to keep that part of script removed then

oh, and also had to deactivate the leveling part of script because it gives all players max lvl and my players do not start with max lvl, and then it adds lvls per VIP rank, but yes the part which makes them max lvl is fatal. wish there was a way it does not give max lvl but gives lvl per vip rank after they reach max lvl. But guess that is too complicated to code

slp13at420
01-16-2017, 10:23 PM
yea your gonna have to edit your website to support storing `total` amount of votes. i.e. find the block of code in your website that updates the sql votes tally for the website and add a second query to update another entry that it wont use for buying items via vote points.

- - - Updated - - -

my site uses `vp` as a column name to store and update the vote count @ each vote. i found where this is done in the vote system and added a second query that will update a column named `votes` that will only be used by the VIP System.

Marko
01-16-2017, 10:32 PM
seems the VIP buff only uses first 3 lines of buffs + stone buffs
and i have made 9 lines of buffs (made 9VIP ranks), how can i make them work?


[1] = {works},
[2] = {works},
[3] = {works},
[4] = {Not Working},
[5] = {Not Working},
[6] = {Not Working},
[7] = {Not Working},
[8] = {Not Working},
[9] = {Not Working},

- - - Updated - - -


yea your gonna have to edit your website to support storing `total` amount of votes. i.e. find the block of code in your website that updates the sql votes tally for the website and add a second query to update another entry that it wont use for buying items via vote points.

- - - Updated - - -

my site uses `vp` as a column name to store and update the vote count @ each vote. i found where this is done in the vote system and added a second query that will update a column named `votes` that will only be used by the VIP System.

I'm just using azer cms nothing fancy. Since am doing everything by myself and am not a web dev. Will take me some time to check all files there and find where it is configured and then figure out how to change it if possible.. and probably will fail. also have other 100 things that i do on server so this can't really be high on to do list, so will take time..

BTW when the bonus hp of VIP ranks goes over certain percentage, it bugs out and reduces the players hp back to 7k hp , while i set the script to give 30% hp per rank and have 9ranks, and even without hp buff players have over 200k hp so with buffs + this VIP rank percentage they should have over 1mil and if all the buffs i made worked, it would be like 2 or 3 mill hp
player:SetMaxHealth(ACCT[Paccid].Health + ((ACCT[Paccid].Health * 0.3) * ACCT[Paccid].Vip))

slp13at420
01-16-2017, 10:46 PM
seems the VIP buff only uses first 3 lines of buffs + stone buffs
and i have made 9 lines of buffs (made 9VIP ranks), how can i make them work?

the player will recieve buffs based on vip rank. the total count of buffs will be divided by the max vip rank and then the player recieve (x*player_vip_rank) amount of buffs.




local BUFFIDS = {
[1] = {24752, 48074},
[2] = {43223, 36880, 467, 48469, 48162},
[3] = {48170, 16877, 10220, 13033, 11735, 10952}
} -- add/remove spell IDs for buffs (used in the buff command).


line #1 is for all players. <-- buffs you want all players to be able to gain.(not to include bonus buffs)
line #2 is for players in guild.(bonus buffs for being a guild member)
line #3 is for players who have reached the mid-point in VIP ranks or higher.(bonus buffs for seeking higher VIP ranks)
- - - Updated - - -



I'm just using azer cms nothing fancy. Since am doing everything by myself and am not a web dev. Will take me some time to check all files there and find where it is configured and then figure out how to change it if possible.. and probably will fail. also have other 100 things that i do on server so this can't really be high on to do list, so will take time..

yea i agree with you totally .
it took me a while of searching thru the php files and reading line after line searching for that `UPDATE INTO` blah blah blah and woohoooo \o/
they do keep everything fairly labeled well so searching thru stuff with names that may relate to the vote system.

slp13at420
01-16-2017, 10:54 PM
local BUFFIDS = {
[1] = {24752, 48074},
[2] = {43223, 36880, 467, 48469, 48162},
[3] = {48170, 16877, 10220, 13033, 11735, 10952}
} -- add/remove spell IDs for buffs (used in the buff command).



let me re-state that lol
ok `KEY` '1' or first line will be where you add all the buffs you want any player to access.

KEY '2' is where you put bonus buffs for players in a Guild.

KEY '3' is where you will add bonus buffs for players who reach half-way point or higher in the VIP ranks.

Marko
01-16-2017, 11:25 PM
local BUFFIDS = {
[1] = {24752, 48074},
[2] = {43223, 36880, 467, 48469, 48162},
[3] = {48170, 16877, 10220, 13033, 11735, 10952}
} -- add/remove spell IDs for buffs (used in the buff command).



let me re-state that lol
ok `KEY` '1' or first line will be where you add all the buffs you want any player to access.

KEY '2' is where you put bonus buffs for players in a Guild.

KEY '3' is where you will add bonus buffs for players who reach half-way point or higher in the VIP ranks.

Hehe Ok, have made em now to work with that system.. (but i wish they could have worked with each rank more and more buffs :thoughtful: ) now to figure out how to fix hp modification bug.. will try increasing even more the % then decreasing etc. Don't know why it bugs out :jackiechanwtf: ====> figured it out, as suspected the multiplication does not work well with some numbers. When changed max vip rank to 10 then works fine, but with 9 gets bugged.

Marko
01-16-2017, 11:37 PM
oh and when i set the wintergrasp mark of honor to be used as Magic Gold
local MAGICGOLD = 43589;
The entire server crashes
[1146] Table 'auth_434.account' doesn't exist
Your database structure is not up to date. Please make sure you've executed all queries in the sql/updates folders.
:yuno: what the... i am using normal 3.3.5a
and in eluna logs:
ERROR lua_scripts/VIP/VIP_stone.lua:8: attempt to index global 'player' (a nil value)
ERROR lua_scripts/VIP/VIP_Vendor.lua:189: attempt to call method 'SendVendorWindow' (a nil value)
:herpderp: :fffffuuuuuuuuuuuu:

slp13at420
01-17-2017, 12:02 AM
Hehe Ok, have made em now to work with that system.. (but i wish they could have worked with each rank more and more buffs :thoughtful: )

yea this is an older version. just kept updated to revs.
My CPP version does disperse the buffs per rank , and has a ton of buffs to give lol. my CPP version is way more advanced than this system....




now to figure out how to fix hp modification bug.. will try increasing even more the % then decreasing etc. Don't know why it bugs out :jackiechanwtf: