PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Cboy301 on 19 February, 2004, 11:04:35

Title: Userinfo Script On Connect
Post by: Cboy301 on 19 February, 2004, 11:04:35
Looking for a script that would show info to user on connect like this:








Title:
Post by: nErBoS on 19 February, 2004, 13:13:28
Hi,

Hope it helps..

--Requested by Cboy301
--Made by nErBoS

Bot = "Show-Info"
youradress = "lalala.mine.nu"

function Main()
frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
s,e,share = strfind(user.sMyInfoString, "$MyINFO $ALL [^$]+$ $[^$]*$[^$]*$([^$]+)")
share = share / (1024*1024*1024)
share = strsub(share, 1, 5)
user:SendData(Bot, "Your nick: "..user.sName)
user:SendData(Bot, "Your IP: "..user.sIP)
user:SendData(Bot, "Name of The Bot: "..Bot)
user:SendData(Bot, "The name of the Hub: "..frmHub:GetHubName())
user:SendData(Bot, "The adress of the Hub: "..youradress)
user:SendData(Bot, "The Hub description: "..frmHub:GetHubDescr())
user:SendData(Bot, "The "..GetTime())
user:SendData(Bot, "The "..GetDate())
user:SendData(Bot, "You are sharing: "..share.." GB")
end

function GetTime()
s = date("%S")
h = date("%H")
m = date("%M")
time = "Hour: "..h..":"..m..":"..s
return time
end

function GetDate()
d = date("%d")
mm = date("%m")
y = date("%y")
Date = "Date: "..d.."/"..mm.."/"..y
return Date
end

Best regards, nErBoS
Title: Changing
Post by: Cboy301 on 20 February, 2004, 07:47:26
Now what do i do if i wanna change what it says and does from time to time? If needed i can tell u other things i may want it to do.
Title:
Post by: nErBoS on 20 February, 2004, 12:35:15
Hi,

The script only shows the info when the user get connected.

Best regards, nErBoS
Title: Userinfo Script
Post by: Cboy301 on 03 March, 2004, 05:44:33
Sorry for the late response script works great thank you......... :)