User Tag List

Page 1 of 9 1 2 3 4 5 ... LastLast
Results 1 to 7 of 59

Thread: [Eluna] Grumbo`z VIP System

  1. #1
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,497
    XP
    20,134,837
    Level
    500
    Thanks
    1,092
    Thanked 333 Times in 213 Posts

    [Eluna] Grumbo`z VIP System

    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:
    Code:
    
    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:
    Code:
    -- 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."
    Code:
     
    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:
    Code:
    
    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:
    Code:
    
    -- 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:
    Code:
    
    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:
    Code:
    
    -- 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. :
    Code:
    
    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


    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 :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
    Last edited by slp13at420; 12-01-2016 at 05:45 AM. Reason: added new script
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff Da Bomb!
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

  2. The Following 7 Users Say Thank You to slp13at420 For This Useful Post:


  3. #2
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,497
    XP
    20,134,837
    Level
    500
    Thanks
    1,092
    Thanked 333 Times in 213 Posts

    "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.:
    Code:
    
    -- 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.

    Last edited by slp13at420; 03-17-2015 at 09:46 PM.
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff Da Bomb!
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

  4. #3
    Epic Member <span class='glow_FF4500'>La_Blazer</span>'s Avatar
    Join Date
    Jan 2014
    Location
    Chair
    Posts
    28
    XP
    6,670
    Level
    24
    Thanks
    2
    Thanked 1 Time in 1 Post
    Great! But please correct that typo "You're VIP is set to..."

  5. The Following User Says Thank You to La_Blazer For This Useful Post:


  6. #4
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,497
    XP
    20,134,837
    Level
    500
    Thanks
    1,092
    Thanked 333 Times in 213 Posts
    Quote Originally Posted by La_Blazer View Post
    Great! But please correct that typo "You're VIP is set to..."
    I Don't understand what the typo is.
    Code:
    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.
    Code:
    player:SendBroadcastMessage("|cff00cc00Congratulations "..player:GetName()..". You are now VIP "..ACCT[player:GetAccountId()].Vip..".|r")
    -- update --
    changed .Vip from a GetString() to GetUInt32()
    Last edited by slp13at420; 07-06-2014 at 03:31 PM.
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff Da Bomb!
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

  7. #5
    Moderator / Eluna Dev <span style='color: #FF0000'><span class='glow_8B0000'>Rochet2</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Finland
    Posts
    1,860
    XP
    13,531
    Level
    35
    Thanks
    95
    Thanked 592 Times in 419 Posts
    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
    ;)

  8. The Following User Says Thank You to Rochet2 For This Useful Post:


  9. #6
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,497
    XP
    20,134,837
    Level
    500
    Thanks
    1,092
    Thanked 333 Times in 213 Posts
    lol ok I understand now tnx :D lol

    - - - Updated - - -

    fixed ;)
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff Da Bomb!
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

  10. #7
    Enthusiast
    Join Date
    May 2014
    Posts
    78
    XP
    2,439
    Level
    13
    Thanks
    5
    Thanked 1 Time in 1 Post
    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
    Last edited by mariow; 07-13-2014 at 12:01 PM.
    Achievements:
    1 year registered Level X

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •