PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: Xtremist on 16 July, 2008, 13:36:10

Title: AutoVIP script :eg.reg users above 200gb share will become Vip
Post by: Xtremist on 16 July, 2008, 13:36:10
AutoVIP script :eg.reg users above 200gb share will become Vip

Please can any 1 make a script like this.
The registered user sharing above 200gb should be made Vip automatically.
:)
Title: Re: AutoVIP script :eg.reg users above 200gb share will become Vip
Post by: CrazyGuy on 16 July, 2008, 14:41:37



RegConnected = function(User)
if Core.GetUserValue(User,16) >= (200*(1024^3)) then
local tCurProf = ProfMan.GetProfile(User.iProfile)
if tCurProf.sProfileName ~= "VIP" then
local tCurReg = RegMan.GetReg(User.sNick)
local tProfiles = ProfMan.GetProfiles()
for k in pairs(tProfiles) do
if tProfiles[k].sProfileName == "VIP" then
RegMan.ChangeReg(tCurReg.sNick, tCurReg.sPassword, tProfiles[k].iProfileNumber)
Core.SendPmToUser(User,SetMan.GetString(21),"Your profile has been automatically updated to VIP.|")
end
end
end
end
end

Title: Re: AutoVIP script :eg.reg users above 200gb share will become Vip
Post by: Xtremist on 16 July, 2008, 18:58:00
hey the only thing i have to do is that save it in .lua file and load it.
Isn't it?

Thank you
Title: Re: AutoVIP script :eg.reg users above 200gb share will become Vip
Post by: merlin_xl54 on 16 July, 2008, 19:41:26
Quote from: Xtremist on 16 July, 2008, 18:58:00
hey the only thing i have to do is that save it in .lua file and load it.
Isn't it?

Yes, copy it and paste it to notepad. Save as .lua and put it in your scripts folder. When you open PtokaX you will see it in the scripts. Check it and you will be all set.

M