Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- certificate that will give you VIP2 without voting
- -- by Black Wolf of Blackwolfsden.dyndns-free.com
- -- this item will modify votes count and vip level in db then delete itself
- -- from the inventory (when item is clicked on)
- -- with many thanks to rochet2 of ac-web.org for getting it all working
- function Item_Trigger(item, event, player)
- local CheckVipl = WorldDBQuery("SELECT `vip` FROM logon.accounts WHERE `login` = '"..player:GetAccountName().."';");
- local Vip = CheckVipl:GetColumn(0):GetLong()
- if (Vip < 10) then -- max vip level cant upgrade anymore. current max level is 10
- WorldDBQuery("UPDATE logon.accounts SET `votes` = `votes` + '125' WHERE `login` = '"..player:GetAccountName().."' LIMIT 1; ");
- WorldDBQuery("UPDATE logon.accounts SET `vip` = `vip` + '1' WHERE `login` = '"..player:GetAccountName().."' LIMIT 1; ");
- player:SendBroadcastMessage("Congratz. you are now VIP"..Vip + '1'..".")
- player:RemoveItem(62000, 1)
- else
- if (Vip == 10) then -- max VIP level is 10 . this will return the char the cost of the certificate and delete the cert if char vip is 10
- player:SendBroadcastMessage("you are VIP"..Vip..".you cannot level up anymore.")
- player:SendBroadcastMessage("A Refund Is In Progress....DONT BUY ANOTHER ONE....Dumbazz")
- WorldDBQuery("UPDATE logon.accounts SET `mg` = `mg` + '50000' WHERE `login` = '"..player:GetAccountName().."' LIMIT 1; ");
- player:RemoveItem(62000, 1)
- else
- end
- end
- end
- RegisterItemGossipEvent(62000, 1, "Item_Trigger")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement