PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Conversion Requests => Topic started by: Annie on 17 March, 2008, 17:13:03

Title: Intro Lua
Post by: Annie on 17 March, 2008, 17:13:03
Please can i somebody convert this script for me  hub im using is Ptokax 0.4.0.0  thanks  :D

-- InlogScript created by [NL]Foxy
-- added Receiver and Receiver2 to seperate totalk counter from log
-- Updated Total reset per day 

BotName = "?Intro?"
Receiver = "OP1"
Receiver2 = "OP2"
Receiver3 = "OP3"

function Main() 
frmHub:RegBot(BotName) 
end

CheckProfiles = { --//Set the profiles you want to check to 1 
[-1] = 1, -- Users (Unregged) 
[0] = 0, -- Masters 
[1] = 0, -- Operators 
[2] = 0, -- VIP 
[3] = 1, -- Reg 
[4] = 0, -- Moderator 
[5] = 0, -- NetFounder 


total = 0

lastday = os.date("%a")

function NewUserConnected(user, data) 
if CheckProfiles[user.iProfile] == 1 then
total = total + 1
local shares = string.format( "%.2f",user.iShareSize/(1024*1024*1024))
local disp = total.." IP: "..user.sIP.."\t\tNick: "..user.sName..
"\t\tShare: "..shares.." GiB\t\tTag: "..user.sTag..
"\t\tProfile: "..user.iProfile.."."
SendPmToNick(Receiver,BotName,disp)
SendPmToNick(Receiver2,BotName,disp)
                                           SendPmToNick(Receiver3,BotName,disp)
disp = ""
local now = os.date("%a")
if now ~= lastday then
disp = "total on "..lastday.." was "..total.." users."
SendPmToNick(Receiver2,BotName,disp)
SendPmToNick(Receiver,BotName,disp)
total = 0
lastday = now
end
end
end


I changed the names in it  because you dont want to see those lol so i put OP1 OP2 and OP3
thank you :)
Title: Re: Intro Lua
Post by: Annie on 17 March, 2008, 21:47:53
thank you very much :D