forked from BlackWolfsDen/Eluna_VIP_System
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathVIP_Guild_MG_Rewarder.lua
More file actions
36 lines (29 loc) · 1003 Bytes
/
VIP_Guild_MG_Rewarder.lua
File metadata and controls
36 lines (29 loc) · 1003 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
25
26
27
28
29
30
31
32
33
34
35
36
-- created in memory of BloodyWoW
-- rewards players who belong to a guild mg every half hour that they are logged in.
local timer = 1800000 -- 30mins
local function Guild_MG_reward(event, delay, calls, player)
local Paccid = player:GetAccountId()
if(player:IsInGuild()==true)then
player:SendBroadcastMessage("Jazzmine whispers:|cff00cc00Your Guild Thankz you for playing.|r")
AddMG(player, 5*ACCT[Paccid].Vip)
else
player:SendBroadcastMessage("Grumbo shouts:|cffff0000Join a Guild to earn extra rewards.|r")
end
end
function Online_Timer(event, player)
player:RegisterEvent( Guild_MG_reward, timer, 0)
end
RegisterPlayerEvent(3, Online_Timer)
function ReLoadMGrewarder(event, player, msg)
if(msg=="Load Vip Table")then
for _,v in ipairs(GetPlayersInWorld()) do
if(v and v:IsInWorld()) then
Online_Timer(1, v)
end
end
print("Guild MG Timers Reloaded.")
return false;
end
end
RegisterPlayerEvent(18, ReLoadMGrewarder)
print("Grumbo'z VIP Guild MG Rewarder loaded.")