Author Topic: Intro Lua  (Read 1459 times)

0 Members and 1 Guest are viewing this topic.

Offline Annie

  • Double Ace
  • *
  • Posts: 104
  • Karma: +13/-5
Intro Lua
« 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

Code: [Select]
-- 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 :)

PtokaX forum

Intro Lua
« on: 17 March, 2008, 17:13:03 »

Offline Annie

  • Double Ace
  • *
  • Posts: 104
  • Karma: +13/-5
Re: Intro Lua
« Reply #1 on: 17 March, 2008, 21:47:53 »
thank you very much :D

PtokaX forum

Re: Intro Lua
« Reply #1 on: 17 March, 2008, 21:47:53 »