-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathVIP_Stone.lua
More file actions
24 lines (19 loc) · 773 Bytes
/
VIP_Stone.lua
File metadata and controls
24 lines (19 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
local timer = 1 -- speed to eliminate the chance of double clicking exploit.
local itemid = ACCT["SERVER"].Vip_stone
local function RemoveVIPstone(event, _, _, player)
local Paccid = player:GetAccountId()
SetVip(player, ACCT[Paccid].Vip+1)
UpdateVotes(player, ACCT["SERVER"].Vote_count+1) -- just to balance the math for the checker.
player:RemoveItem(ACCT["SERVER"].Vip_stone, 1)
end
function VIPstone(event, player, spellID, effindex, item)
local Paccid = player:GetAccountId()
if(ACCT[Paccid].Vip<=(ACCT["SERVER"].Vip_max-1))then
player:RegisterEvent(RemoveVIPstone, timer, 1, player)
else
player:SendBroadcastMessage("you are Max VIP "..ACCT[Paccid].Vip..".")
return
end
end
RegisterItemEvent(itemid, 2, VIPstone)
print("Grumbo'z VIP Stone loaded.")