I'm looking for a boot that puts welcome message like this
Welcome MX-10
Your ISP is:
Your Share is:
Min Share is:
Sorry For bad English.
Bot = "Welcome"
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(curUser)
readfrom("Welcome.txt")
local message = ""
while 1 do
local line = read()
if (line == nil) then break else
message = message..line.."\r\n"
end
end
curUser:SendPM(Bot,message)
end
whether it works or not is a different questions, but thats what i had in the archives from previous go at hub :)
if anyone has a better script please post a reply :)
here try this one:
-- Quick Welcome Bot By: NightLitch 2004
-------------------------------------------------------------------
kb = 1024
mb = kb*kb
gb = kb*kb*kb
-------------------------------------------------------------------
ISP = {"[BBB]","[Sunet]"}
BotName = "ZeusRage"
-------------------------------------------------------------------
MinShare = frmHub:GetMinShare()
function NewUserConnected(curUser)
if checkISP(curUser) then
GetISP = val
else
GetISP = "N/A"
end
s,e, vShare = strfind(curUser.sMyInfoString,"$+(%d+)$+|+")
curUser:SendData(BotName,"Welcome "..curUser.sName)
curUser:SendData(BotName,"Your ISP is: <"..GetISP..">")
curUser:SendData(BotName,"Your Share is: <"..format("%0.2f", tonumber(vShare)/gb).."> Gb")
curUser:SendData(BotName,"Min Share is: <"..MinShare.."> Gb")
end
function checkISP(curUser)
for key,val in ISP do
if strfind(strlower(curUser.sName), strlower(val),1,1) then
return 1,val
end
end
end
and someone else Plop or anyone... how do I calulate the
HubSoft Share so it is right ???
Both of them do not seem to work for me??
any ideas or any other .lua??
Well The One I created works Great...
------------------------------------------------------------------------
-- Quick Welcome Bot By: NightLitch 2004
-- Set The same value in MinShare as the
-- one you have in HubSoft...
-------------------------------------------------------------------
kb = 1024
mb = kb*kb
gb = kb*kb*kb
-------------------------------------------------------------------
ISP = {"[BBB]","[Sunet]","[Bostream]", "[Swe]"}
BotName = "ZeusRage"
MinShare = 20
-------------------------------------------------------------------
function NewUserConnected(curUser)
if checkISP(curUser) then
GetISP = val
else
GetISP = "N/A"
end
s,e, vShare = strfind(curUser.sMyInfoString,"$+(%d+)$+|+")
curUser:SendData(BotName,"Welcome "..curUser.sName)
curUser:SendData(BotName,"Your ISP is: <"..GetISP..">")
curUser:SendData(BotName,"Your Share is: <"..format("%0.2f", tonumber(vShare)/gb).."> Gb")
curUser:SendData(BotName,"Min Share is: <"..MinShare.."> Gb")
end
function checkISP(curUser)
for key,val in ISP do
if strfind(strlower(curUser.sName), strlower(val),1,1) then
return 1,val
end
end
end
------------------------------------------------------------------------
Here's a link for it if you don't managed to copy it right:
Download (http://swenorth.myftp.org/network/nightlitch/files/simlplewelcome.rar)
Thanks a lot
a little update with Woody's Script:
-- Quick Welcome Bot By: NightLitch 2004
-- Set The same value in MinShare as the
-- one you have in HubSoft...
-------------------------------------------------------------------
kb = 1024
mb = kb*kb
gb = kb*kb*kb
-------------------------------------------------------------------
ISP = {"[BBB]","[Sunet]","[Bostream]", "[Swe]"} -- Type in more ISP's
BotName = "ZeusRage" -- set Botname
MinShare = 20 -- set the min. Share to the one in HubSoft
SetWelcome = "on" -- set on or off
WelcomeFile = "Welcome.txt" -- set the file
-------------------------------------------------------------------
function Main()
frmHub:RegBot(BotName)
end
-------------------------------------------------------------------
function NewUserConnected(curUser)
if checkISP(curUser) then
GetISP = val
else
GetISP = "N/A"
end
s,e, vShare = strfind(curUser.sMyInfoString,"$+(%d+)$+|+")
curUser:SendData(BotName,"Welcome "..curUser.sName)
curUser:SendData(BotName,"Your ISP is: <"..GetISP..">")
curUser:SendData(BotName,"Your Share is: <"..format("%0.2f", tonumber(vShare)/gb).."> Gb")
curUser:SendData(BotName,"Min Share is: <"..MinShare.."> Gb")
if SetWelcome == "on" then
ReadFile(WelcomeFile)
curUser:SendPM(BotName,message)
end
end
-------------------------------------------------------------------
function checkISP(curUser)
for key,val in ISP do
if strfind(strlower(curUser.sName), strlower(val),1,1) then
return 1,val
end
end
end
-------------------------------------------------------------------
function ReadFile(file)
readfrom(file)
local message = ""
while 1 do
local line = read()
if (line == nil) then
break
else
message = message..line.."\r\n"
end
end
return message
end
-------------------------------------------------------------------
-- By NightLitch
Download (http://swenorth.myftp.org/network/nightlitch/files/simlplewelcome.rar)
let me check i am getting this rite, i create a file called Welcome.txt that has my welcome message rite.....
i create that in the scripts folder???
if so i have done all that and still no welcome message apon arrival
try this one:
-- Quick Welcome Bot By: NightLitch 2004
-- Set The same value in MinShare as the
-- one you have in HubSoft...
-------------------------------------------------------------------
kb = 1024
mb = kb*kb
gb = kb*kb*kb
-------------------------------------------------------------------
ISP = {"[BBB]","[Sunet]","[Bostream]", "[Swe]"} -- Type in more ISP's
BotName = "ZeusRage" -- set Botname
MinShare = 20 -- set the min. Share to the one in HubSoft
SetWelcome = "on" -- set on or off
WelcomeFile = "Welcome.txt" -- set the file
-------------------------------------------------------------------
function Main()
frmHub:RegBot(BotName)
end
-------------------------------------------------------------------
function NewUserConnected(curUser)
if checkISP(curUser) then
GetISP = val
else
GetISP = "N/A"
end
s,e, vShare = strfind(curUser.sMyInfoString,"$+(%d+)$+|+")
curUser:SendData(BotName,"Welcome "..curUser.sName)
curUser:SendData(BotName,"Your ISP is: <"..GetISP..">")
curUser:SendData(BotName,"Your Share is: <"..format("%0.2f", tonumber(vShare)/gb).."> Gb")
curUser:SendData(BotName,"Min Share is: <"..MinShare.."> Gb")
if SetWelcome == "on" then
ReadFile(curUser,WelcomeFile)
end
end
-------------------------------------------------------------------
function checkISP(curUser)
for key,val in ISP do
if strfind(strlower(curUser.sName), strlower(val),1,1) then
return 1,val
end
end
end
-------------------------------------------------------------------
function ReadFile(curUser,file)
readfrom(file)
while 1 do
line = read()
if line == nil then break end
curUser:SendPM(curUser,line)
end
readfrom()
end
-------------------------------------------------------------------
-- By NightLitch
Nope still not working!
where exactly to i say the txt file?????
and is it Welcome.txt or welcome.txt?????
QuoteOriginally posted by NightLitch
kb = 1024
mb = kb*kb
gb = kb*kb*kb
format("%0.2f", tonumber(vShare)/gb)
and someone else Plop or anyone... how do I calulate the
HubSoft Share so it is right ???
thats 100% correct.
you could make it a tiny bit faster by:
gb = 1073741824
won't make a big difference do, but you can drop 2 globals (mb isn't used @ all so that can be removed anyway).
plop