Hard on OP's - Page 2
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Hard on OP's

Started by kepp, 27 October, 2003, 16:37:50

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

plop

QuoteOriginally posted by kepp
another thing i tried...

tRL = format("%0.2f", strlen(900.54))

ended up '6.00'

confused..
ok next hint.
if strlen(share) <= 6 then
if this hits the spot your gone return the share in GB, if not you got some more deviding 2 do.
comeon i know you can do it.

if you continue like this your gone have a full opBot in a couple of weeks.  lol

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

kepp

#26
tRL = format("%0.2f", strlen(1024.00)/1024)
^^ That will return 0.00..!!??

if i don't divide it it will return 4.00

so i assume i'll use:
format("%0.2f", strlen(1024.00)/1024)

so that will show the share in GB's from 0 up to
1024 Gb's !?

Ok i think i got it,

So the same thing now but this time with tb's?

format("%0.2f", strlen(30720.00)/1024)

OK.. now how would i do to make it change to TB
when it reaches 1 tb??
Guarding    

kepp

#27
-------------------
-- Info on connect
-- Made By Kepp
-- 03/10/30
-- Added: Botdecsription, such as speed, e-mail, connection
-- Idea from Mr420's botdesc script 01/11/03
-- Added: HubInfoAdvert, in main every hour
-- Added: It will now show the curent user his/her DNS ;)
-------------------
hubadress = "your-hub.adress.here" --// :D

kb = 1024
mb = 1024/1024
Sgb = 1024/1024/1024
tb = 1024/1024/1024/1024

sEC = 1000
MiN = 60*sEC  ---// Don't touch any of this :P
Hour = 60*MiN  
---------------
sU = "[SU]xxx"
sU1 = "[SU]xxx1"      --//Your Super Operators name/s
sU2 = "[SU]xxx2"
sU3 = "[SU]xxx3"
---------------
sBot = "[Police]"    --//Botname
eBot = "[E-mail]"    --//The bots E-mail
BotS = "Faster Than Light"  --//The bots speed :D
Botdesc = "El Jefe"         --//Botdescription! El Jefe = The boss
botTag = "<--)V:0.999>"
---------------
SirYesSir = "Now Get Back To Work!"
opleave = "Where do you think you are going"
Gb = "Get Back Now!"

gSM = frmHub:GetMinShare()/(1024)
woo = format("%0.2f", frmHub:GetCurrentShareAmount()/1024/1024/1024/1024)

function Main()
SetTimer(Hour)
StartTimer()
frmHub:RegBot(sBot)
mIS = "$MyINFO $ALL "..sBot.." "..Botdesc.."$ $"..botTag.."$ $"..BotS..strchar( 1 ).."$"..eBot.."$"
SendToAll( mIS )
end

function NewUserConnected(curUser)
U = curUser
local h = tohostname(curUser.sIP)
U:SendData("_____________________________________________")
U:SendData("Welcome To: "..frmHub:GetHubName().."")
U:SendData("Your Name: "..curUser.sName)
U:SendData("Your IP: "..curUser.sIP.." \t Your DNS: "..tohostname(curUser.sIP))
U:SendData("Your Version: "..curUser.iVersion)
U:SendData("Your Profile: "..(GetProfileName(curUser.iProfile) or "Unregistered"))
U:SendData("Total online users: "..frmHub:GetUsersCount().."")
U:SendData("Minimum Share for you: "..gSM.." GB")
U:SendData("Curent Share Amount: "..woo.." TB")
U:SendData("_____________________________________________")
end

function OpConnected(curUser)
U = curUser
local h = tohostname(curUser.sIP)
U:SendData("_____________________________________________")
U:SendData("Your Profile: "..(GetProfileName(curUser.iProfile) or "Unregistered"))
U:SendData("Your IP: "..curUser.sIP.." \t Your DNS: "..tohostname(curUser.sIP))
U:SendData("_____________________________________________")
SendToAll(sBot, "Hey "..curUser.sName..", "..SirYesSir)
end

function OpDisconnected(curUser)
SendToAll(sBot, opleave.." "..curUser.sName.." ? "..Gb)
end

function OnTimer()
SendToAll("Hub Name:")
SendToAll("\t\t\t\t\t["..frmHub:GetHubName().."]")
SendToAll("_____________________________________________")
SendToAll("Super Operators:")
SendToAll("["..sU.."]")
SendToAll("["..sU1.."]")
SendToAll("["..sU2.."]")
SendToAll("["..sU3.."]")
SendToAll("\t __________________________________________________________________")
SendToAll("\t\t Write /fav in main chat, And BOOM, our hub is in your Favorites")
SendToAll("\t __________________________________________________________________")
SendToAll("(`?._.?-=@ Remember : Enjoy your stay and let the DC sprit rule @=-?._.??)")
SendToAll("\t\t\t // Crew @ "..hubadress.."")
end
=)
Guarding    

kepp

Suggestions? :)
Plop, im still looking into the change of Gb's to tb's
can't figure it out... But just give me a few days... he he
-------------------// From this line please ;)
-- Info on connect v.0.2
-- Made By Kepp
-- 03/10/30
-- Added: Botdecsription, such as speed, e-mail, connection
-- Idea from Mr420's botdesc script 01/11/03
-- Added: HubInfoAdvert, in main every hour
-- Added: It will now show the curent user his/her DNS ;)
-- Added: Date And time on connect
-- Fixed: The list information about the user looks alot better now.
-- Added: Command ?author, the author of the script ;)
-- Added: Command ?myip, Will show the user his/her ip + DNS in PM
-- Added: Command !drop, Disconnect yourself
-- Fixed: All command now works in PM to the bot
--
-- Thanks Plop/Tezlo for helping me out
-------------------------------//For your own good
hubadress = "your-hub.adress.here" --// :D
country = "Sweden" --// Change this to your country
Network = "Network-adress.here"
-------------------------------// (Forgot)
kb = 1024
mb = 1024/1024
Sgb = 1024/1024/1024
tb = 1024/1024/1024/1024
-------------------------------// Timer options
sEC = 1000
MiN = 60*sEC  ---// Don't touch any of this :P
Hour = 60*MiN  
------------------------------- // Op's/Su's name/s
sU = "[SU]xxx"
sU1 = "[SU]xxx1"      --//Your Super Operators/Op's name/s
sU2 = "[SU]xxx2"
sU3 = "[SU]xxx3"
-------------------------------// Bot Options
sBot = "[Police]"    --//Botname
eBot = "[E-mail]"    --//The bots E-mail
BotS = "Faster Than Light"  --//The bots speed :D
Botdesc = "El Jefe"         --//Botdescription! El Jefe = The boss
botTag = "<--)V:0.999>"
-------------------------------// Ah-ah-ah
gSM = frmHub:GetMinShare()/(1024)
woo = format("%0.2f", frmHub:GetCurrentShareAmount()/1024/1024/1024/1024)
-------------------------------
function Main()
SetTimer(Hour)
StartTimer()
frmHub:RegBot(sBot)
mIS = "$MyINFO $ALL "..sBot.." "..Botdesc.."$ $"..botTag.."$ $"..BotS..strchar( 1 ).."$"..eBot.."$"
SendToAll( mIS )
end
-------------------------------// New user connected
function NewUserConnected(curUser)
U = curUser
local h = tohostname(curUser.sIP)
U:SendData("\t\t\t\t\t\t\t<============================================================>\t\t\t\t\t\t Welcome To\t\t:::\t"..frmHub:GetHubName().."\t\t\t\t\t\t\t Host is located in\t\t:::\t"..country.." \t\t\t\t\t\t\t\t Current Date And Time\t:::\t("..date()..") \t\t\t\t\t\t Your Name\t\t:::\t"..U.sName.."\t\t\t\t\t\t\t\t Your IP\t\t\t:::\t"..U.sIP.." \t\t\t\t\t\t\t Your DNS\t\t:::\t"..tohostname(U.sIP).." \t\t\t\t\t\t Your Version\t\t:::\t"..U.iVersion.."\t\t\t\t\t\t\t\t Your Profile\t\t:::\t"..(GetProfileName(U.iProfile) or "Unregistered) \t\t\t\t\t\t\t Total Online Users\t:::\t"..frmHub:GetUsersCount().." \t\t\t\t\t\t\t\t Minimum Share For You\t:::\t"..gSM.." \t\t\t\t\t\t\t\t Curent Share Amount\t:::\t"..woo.." TB\t\t\t\t\t\t\t<============================================================>"))
end
--------------------------------// Op connected
function OpConnected(curUser)
local h = tohostname(curUser.sIP)
U = curUser
U:SendData("\t\t\t\t\t\t<=======================================================>\t\t\t\t\t\tYour Profile\t::: \t"..(GetProfileName(U.iProfile).."\t\t\t\t\t\t\t\t\tYour IP\t\t:::\t"..U.sIP.."\t\t\t\t\t <=======================================================>"))
SendToAll(sBot, "Hey "..U.sName..", Now Get Back To Work!")
end
--------------------------------// An Op Disconnects
function OpDisconnected(curUser)
SendToAll(sBot, "Where do you think you are going "..curUser.sName.."? Get Back Now!")
end
--------------------------------// Timer function
function OnTimer()
SendToAll("<============"..frmHub:GetHubName().."============>Hub Owner: "..hubowner.." ==> Hub Address: "..hubadress.." ==> Op's: "..sU.." | "..sU1.." | "..sU2.." | "..sU3.." ==> Hub Network: "..Network.." ==>|")
end
--------------------------------// To this one =)

function DataArrival(user, data)
if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="?author") then
user:SendPM(sBot, "Kepp is the author of this script")
end
end
return 1
end

function DataArrival(user, data)
if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="?myip") then
user:SendPM(sBot, "Your IP: "..user.sIP.." From "..tohostname(user.sIP))
end
end
return 1
end

function DataArrival(user, data)
if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="!drop") then
user:Disconnect()
end
end
return 1
end
Guarding    

tezlo

its all great but..
you can only have ONE DataArrival
you should calc total share amount everytime a user connects.. not on script start

DarkElf

Error:
BotS = "LAN(ThC)"  --//The bots speed :D
Botdesc = "<++ V:0.301,M:P,H:0/0/1,S:5>"         --//Botdescription! El Jefe = The boss
botTag = "<++ V:0.301,M:P,H:0/0/1,S:5>"

with these settings the bot have:
Connection: <++ V:0.301,M:P,H:0/0/1,S:5
Description: <++ V:0.301,M:P,H:0/0/1,S:5>
Tag:

(sorry for my bad english)

Bye
Please sorry my bad english, i'm learning it :-D

\\100Gb ][ MeGaShArE @ I?? - ?u?i?N Owner [/I]
100gb.ifs-fusion.net:666 Only EliTe ShArE min 100gb
-={ I?? - ?u?i?N }=- N??Owner

plop

kepp try writing in this style, makes if a lot easyer 2 read.
--------------------------------// To this one =)
function DataArrival(user, data)
   if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if (cmd=="?author") then
         user:SendPM(sBot, "Kepp is the author of this script")
      end
   end
   return 1
end

function DataArrival(user, data)
   if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if (cmd=="?myip") then
         user:SendPM(sBot, "Your IP: "..user.sIP.." From "..tohostname(user.sIP))
      end
   end
   return 1
end

function DataArrival(user, data)
   if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if (cmd=="!drop") then
         user:Disconnect()
      end
   end
   return 1
end
with elseif you can make those 3 into 1 so they all work and not only the 1st.
if you look closely you can allready see how 2 do this.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

plop

how's it going kepp??

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

kepp

Internet has been down for a couple of days, but back up now :)

Yea, i noticed when i checked it out right after the shutdown of my internet, i can olny use one of the commands, reading the manual about Else if now :)
or shall i say elseif? :D
Guarding    

Guibs

Hi there,,

kepp,,
As tezlo said,... better use 1 function data arrival :)
So,, use 'elseif' in your commands choice,, yep,... smthg like that should work fine:
-------
--------------------------------// To this one =)
function DataArrival(user, data)
   if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if (cmd=="?author") then
         user:SendPM(sBot, "Kepp is the author of this script")
      elseif (cmd=="?myip") then
         user:SendPM(sBot, "Your IP: "..user.sIP.." From "..tohostname(user.sIP))
      elseif (cmd=="!drop") then
         user:Disconnect()
      end
   end
   return 1
end
-------
Btw,, your:
----
      elseif (cmd=="!drop") then
         user:Disconnect()
----
should be quite funny to use,.... lol

Good luck,,

l8tr,, ;)
-- Please,... don\'t ask help in Pm,...Forums are made for that, to help everyone & my Inbox pm will be safe,... Thks,,  :))  --
CB forum     /     CB Home page

pHaTTy

QuoteOriginally posted by Guibs
Hi there,,

kepp,,
As tezlo said,... better use 1 function data arrival :)
So,, use 'elseif' in your commands choice,, yep,... smthg like that should work fine:
-------
--------------------------------// To this one =)
function DataArrival(user, data)
   if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if (cmd=="?author") then
         user:SendPM(sBot, "Kepp is the author of this script")
      elseif (cmd=="?myip") then
         user:SendPM(sBot, "Your IP: "..user.sIP.." From "..tohostname(user.sIP))
      elseif (cmd=="!drop") then
         user:Disconnect()
      end
   end
   return 1
end
-------
Btw,, your:
----
      elseif (cmd=="!drop") then
         user:Disconnect()
----
should be quite funny to use,.... lol

Good luck,,

l8tr,, ;)


      elseif (cmd=="!drop") then
         user:Disconnect()

hmm now why wud you want to drop yourself :P
Resistance is futile!

kepp

:D
Ah well, it should be the victim :P
Guarding    

kepp

#37
-------------------// From this line please ;)
-- Info on connect v.0.3
-- Made By Kepp
-- 03/10/30
-- Added: Botdecsription, such as speed, e-mail, connection
-- Idea from Mr420's botdesc script 01/11/03
-- Added: HubInfoAdvert, in main every hour
-- Added: It will now show the curent user his/her DNS ;)
-- Added: Date And time on connect
-- Fixed: The list information about the user looks alot better now.
-- Added: Command !author, the author of the script ;)
-- Added: Command !myip, Will show the user his/her ip + DNS in PM
-- Added: Command !drop, Disconnect yourself
-- Fixed: All command now works in PM to the bot
-- Added: Command !getip , Will show you the user's IP and DNS server
--
-- Thanks Plop/Tezlo for helping me out
-------------------------------//For your own good
hubadress = "your-hub.adress.here" --// :D
country = "Sweden" --// Change this to your country
Network = "Network-adress.here"
-------------------------------// (Forgot)
kb = 1024
mb = 1024/1024
Sgb = 1024/1024/1024
tb = 1024/1024/1024/1024
-------------------------------// Timer options
sEC = 1000
MiN = 60*sEC  ---// Don't touch any of this :P
Hour = 60*MiN  
------------------------------- // Op's/Su's name/s
sU = "[SU]xxx"
sU1 = "[SU]xxx1"      --//Your Super Operators/Op's name/s
sU2 = "[SU]xxx2"
sU3 = "[SU]xxx3"
-------------------------------// Bot Options
sBot = "[Police]"    --//Botname
eBot = "[E-mail]"    --//The bots E-mail
BotS = "Faster Than Light"  --//The bots speed :D
Botdesc = "El Jefe"         --//Botdescription! El Jefe = The boss
botTag = "<--)V:0.999>"
-------------------------------// Ah-ah-ah
gSM = frmHub:GetMinShare()/(1024)
woo = format("%0.2f", frmHub:GetCurrentShareAmount()/1024/1024/1024/1024)
-------------------------------
function Main()
SetTimer(Hour)
StartTimer()
frmHub:RegBot(sBot)
mIS = "$MyINFO $ALL "..sBot.." "..Botdesc.."$ $"..botTag.."$ $"..BotS..strchar( 1 ).."$"..eBot.."$"
SendToAll( mIS )
end
-------------------------------// New user connected
function NewUserConnected(curUser)
U = curUser
local h = tohostname(curUser.sIP)
U:SendData("\t\t\t\t\t\t\t<============================================================>\t\t\t\t\t\t Welcome To\t\t:::\t"..frmHub:GetHubName().."\t\t\t\t\t\t\t Host is located in\t\t:::\t"..country.." \t\t\t\t\t\t\t\t Current Date And Time\t:::\t("..date()..") \t\t\t\t\t\t Your Name\t\t:::\t"..U.sName.."\t\t\t\t\t\t\t\t Your IP\t\t\t:::\t"..U.sIP.." \t\t\t\t\t\t\t Your DNS\t\t:::\t"..tohostname(U.sIP).." \t\t\t\t\t\t Your Version\t\t:::\t"..U.iVersion.."\t\t\t\t\t\t\t\t Your Profile\t\t:::\t"..(GetProfileName(U.iProfile) or "Unregistered) \t\t\t\t\t\t\t Total Online Users\t:::\t"..frmHub:GetUsersCount().." \t\t\t\t\t\t\t\t Minimum Share For You\t:::\t"..gSM.." \t\t\t\t\t\t\t\t Curent Share Amount\t:::\t"..woo.." TB\t\t\t\t\t\t\t<============================================================>"))
end
--------------------------------// Op connected
function OpConnected(curUser)
local h = tohostname(curUser.sIP)
U = curUser
U:SendData("\t\t\t\t\t\t<=======================================================>\t\t\t\t\t\tYour Profile\t::: \t"..(GetProfileName(U.iProfile).."\t\t\t\t\t\t\t\t\tYour IP\t\t:::\t"..U.sIP.."\t\t\t\t\t <=======================================================>"))
SendToAll(sBot, "Hey "..U.sName..", Now Get Back To Work!")
end
--------------------------------// An Op Disconnects
function OpDisconnected(curUser)
SendToAll(sBot, "Where do you think you are going "..curUser.sName.."? Get Back Now!")
end
--------------------------------// Timer function
function OnTimer()
SendToAll("<============"..frmHub:GetHubName().."============>Hub Owner: "..hubowner.." ==> Hub Address: "..hubadress.." ==> Op's: "..sU.." | "..sU1.." | "..sU2.." | "..sU3.." ==> Hub Network: "..Network.." ==>|")
end
--------------------------------// To this one =)

function DataArrival(user, data)
if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")

if (cmd=="!author") then
user:SendData(sBot, "Kepp is the author of this script") return 1

elseif (cmd=="!drop") then
user:Disconnect()

elseif (cmd=="!myip") then
user:SendPM(sBot, "Your IP: "..user.sIP.." From "..tohostname(user.sIP)) return 1

elseif (cmd=="!getip") then
s,e,cmd,Name = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
victim = GetItemByName(Name)
if victim == nil then
user:SendData("**** User is not in the list.") return 1 end
if not user.bOperator then
user:SendData("**** You are not allowed to use this function") return 1
else
user:SendPM(sBot, victim.sName.."'s IP is: "..victim.sIP.." \t\t:::\tDNS: "..tohostname(victim.sIP)) return 1
end
end
end
end


I kept the drop command, may be useful for some...
Added another command, !getip
but still working on a when you're logging in as a normal user and type that command without user...
:)
more to come
Guarding    

kepp

#38
-------------------// From this line please ;)
-- Info on connect v.0.4
-- Made By Kepp
-- 03/10/30
-- Added: Botdecsription, such as speed, e-mail, connection
-- Idea from Mr420's botdesc script 01/11/03
-- Added: HubInfoAdvert, in main every hour
-- Added: It will now show the curent user his/her DNS ;)
-- Added: Date And time on connect
-- Fixed: The list information about the user looks alot better now.
-- Added: Command !author, the author of the script ;)
-- Added: Command !myip, Will show the user his/her ip + DNS in PM
-- Added: Command !drop, Disconnect yourself
-- Fixed: All command now works in PM to the bot
-- Added: Command !getip , Will show you the user's IP and DNS server
-- Fixed: A bug, Report from Darkelf
-- Added: Gave the bot a share of 43.38 GB ;)
--
-- Thanks Plop/Tezlo for helping me out
-------------------------------//For your own good
hubadress = "your-hub.adress.here" --// :D
country = "Sweden"
Network = "Network-adress.here"
-------------------------------// (Forgot)
kb = 1024
mb = 1024/1024
Sgb = 1024/1024/1024
tb = 1024/1024/1024/1024
-------------------------------// Timer options
sEC = 1000
MiN = 60*sEC  ---// Don't touch any of this :P
Hour = 60*MiN
------------------------------- // Op's/Su's name/s
HuBowner = "XXX" --// Hubowners name here
sU = "[SU]xxx"
sU1 = "[SU]xxx1"      --//Your Super Operators/Op's name/s
sU2 = "[SU]xxx2"
sU3 = "[SU]xxx3"
-------------------------------// Bot Options
sBot = "[Police]"    --//Botname
eBot = "[E-mail]"    --//The bots E-mail
BotS = "Faster Than Light"  --//The bots speed :D
Botdesc = "El Jefe"         --//Botdescription! El Jefe = The boss
botTag = "<--)V:0.4>"
botS = 46582578356
-------------------------------// Ah-ah-ah

         function Main()
         SetTimer(Hour)
         StartTimer()
         frmHub:RegBot(sBot)
         frmHub:EnableFullData(1)
mIS= "$MyINFO $ALL "..sBot.." "..Botdesc.." "..botTag.."$ $"..BotS..strchar( 1 ).."$"..eBot.."$"..botS.."$"
          SendToAll( mIS )
end
-------------------------------// New user connected
function NewUserConnected(curUser)
local host = tohostname(curUser.sIP)
U = curUser
U:SendData("<============================================================>")
U:SendData("Welcome To\t\t:\t"..frmHub:GetHubName())
U:SendData("Current data and time\t\t:\t"..date())
U:SendData("Your Name\t\t\t:\t"..curUser.sName)
U:SendData("Your IP\t\t\t:\t"..curUser.sIP)
U:SendData("Your DNS\t\t\t:\t"..tohostname(curUser.sIP))
U:SendData("Total Online Users\t\t:\t"..frmHub:GetUsersCount())
U:SendData("Minimum Share For You\t:\t"..frmHub:GetMinShare()/(1024).." GB")
U:SendData("Current Share Ammount\t:\t"..format("%0.2f", frmHub:GetCurrentShareAmount()/1024/1024/1024/1024).." TB")
U:SendData("<============================================================>")
end
--------------------------------// Op connected
                  function OpConnected(curUser)
          local h = tohostname(curUser.sIP)
U = curUser
U:SendData("<=======================================================>")
U:SendData("Your Profile\t:\t"..(GetProfileName(U.iProfile) or unregistered))
U:SendData("Your IP\t:\t"..U.sIP)
U:SendData("<=======================================================>")
SendToAll(sBot, "Hey "..U.sName..", Now Get Back To Work!")
end
--------------------------------// An Op Disconnects
          function OpDisconnected(curUser)
             SendToAll(sBot, "Where do you think you are going "..curUser.sName.."? Get Back Now!")
end
--------------------------------// Timer function
function OnTimer()
SendToAll("<============"..frmHub:GetHubName().."============>")
SendToAll("\tHub Owner: "..HuBowner)
SendToAll("\tHub Adress: "..hubadress)
SendToAll("\tOp's: |  "..sU.." |  "..sU1.." |  "..sU2.." |  "..sU3)
SendToAll("\tHub Network: "..Network)
end
--------------------------------// To this one =)

      function DataArrival(user, data)
           if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
             data=strsub(data,1,strlen(data)-1)
           s,e,cmd = strfind(data,"%b<>%s+(%S+)")

         if (cmd=="!author") then
            user:SendData(sBot, "Kepp is the author of this script") return 1

         elseif (cmd=="!drop") then
           user:Disconnect() return 1

         elseif (cmd=="!myip") then
           user:SendPM(sBot, "Your IP: "..user.sIP.."  From "..tohostname(user.sIP)) return 1

         elseif (cmd=="!getip") then
           s,e,cmd,Name = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
        victim = GetItemByName(Name)
           if user.bOperator then
              user:SendPM(sBot, victim.sName.."'s IP       is: "..victim.sIP.." \t\t:::\tDNS: "..tohostname(victim.sIP))return 1
                    end
              end
         end
end
Guarding    

plop

did some minor cleaning up.
now everything is in tabbed style (send me an email and i'll send you a nice lua editor).
-------------------// From this line please ;)
-- Info on connect v.0.4
-- Made By Kepp
-- 03/10/30
-- Added: Botdecsription, such as speed, e-mail, connection
-- Idea from Mr420's botdesc script 01/11/03
-- Added: HubInfoAdvert, in main every hour
-- Added: It will now show the curent user his/her DNS ;)
-- Added: Date And time on connect
-- Fixed: The list information about the user looks alot better now.
-- Added: Command !author, the author of the script ;)
-- Added: Command !myip, Will show the user his/her ip + DNS in PM
-- Added: Command !drop, Disconnect yourself
-- Fixed: All command now works in PM to the bot
-- Added: Command !getip , Will show you the user's IP and DNS server
-- Fixed: A bug, Report from Darkelf
-- Added: Gave the bot a share of 43.38 GB ;)
--
-- Thanks Plop/Tezlo for helping me out
-------------------------------//For your own good
hubadress = "your-hub.adress.here" --// :D
country = "Sweden"
Network = "Network-adress.here"
-------------------------------// (Forgot)
kb = 1024
mb = 1024/1024
Sgb = 1024/1024/1024
tb = 1024/1024/1024/1024
-------------------------------// Timer options
sEC = 1000
MiN = 60*sEC  ---// Don't touch any of this :P
Hour = 60*MiN
------------------------------- // Op's/Su's name/s
HuBowner = "XXX" --// Hubowners name here
sU = "[SU]xxx"
sU1 = "[SU]xxx1"      --//Your Super Operators/Op's name/s
sU2 = "[SU]xxx2"
sU3 = "[SU]xxx3"
-------------------------------// Bot Options
sBot = "[Police]"    --//Botname
eBot = "[E-mail]"    --//The bots E-mail
BotS = "Faster Than Light"  --//The bots speed :D
Botdesc = "El Jefe"         --//Botdescription! El Jefe = The boss
botTag = "<--)V:0.4>"
botS = 46582578356
mIS= "$MyINFO $ALL "..sBot.." "..Botdesc.." "..botTag.."$ $"..BotS..strchar( 1 ).."$"..eBot.."$"..botS.."$"
-------------------------------// Ah-ah-ah

function Main()
   SetTimer(Hour)
   StartTimer()
   frmHub:RegBot(sBot)
   frmHub:EnableFullData(1)
   SendToAll( mIS )
end
-------------------------------// New user connected
function NewUserConnected(user)
   local host = tohostname(user.sIP)
   user:SendData("<============================================================>")
   user:SendData("Welcome To\t\t:\t"..frmHub:GetHubName())
   user:SendData("Current data and time\t\t:\t"..date())
   user:SendData("Your Name\t\t\t:\t"..user.sName)
   user:SendData("Your IP\t\t\t:\t"..user.sIP)
   user:SendData("Your DNS\t\t\t:\t"..tohostname(user.sIP))
   user:SendData("Total Online Users\t\t:\t"..frmHub:GetUsersCount())
   user:SendData("Minimum Share For You\t:\t"..frmHub:GetMinShare()/(1024).." GB")
   user:SendData("Current Share Ammount\t:\t"..format("%0.2f", frmHub:GetCurrentShareAmount()/1024/1024/1024/1024).." TB")
   user:SendData("<============================================================>")
end
--------------------------------// Op connected
function OpConnected(user)
   local h = tohostname(user.sIP)
   user:SendData("<=======================================================>")
   user:SendData("Your Profile\t:\t"..(GetProfileName(user.iProfile) or unregistered))
   user:SendData("Your IP\t:\t"..user.sIP)
   user:SendData("<=======================================================>")
   SendToAll(sBot, "Hey "..user.sName..", Now Get Back To Work!")
end
--------------------------------// An Op Disconnects
function OpDisconnected(user)
   SendToAll(sBot, "Where do you think you are going "..user.sName.."? Get Back Now!")
end
--------------------------------// Timer function
function OnTimer()
   SendToAll("<============"..frmHub:GetHubName().."============>")
   SendToAll("\tHub Owner: "..HuBowner)
   SendToAll("\tHub Adress: "..hubadress)
   SendToAll("\tOp's: |  "..sU.." |  "..sU1.." |  "..sU2.." |  "..sU3)
   SendToAll("\tHub Network: "..Network)
end
--------------------------------// To this one =)

function DataArrival(user, data)
   if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if (cmd=="!author") then
         user:SendData(sBot, "Kepp is the author of this script") return 1
      elseif (cmd=="!drop") then
         user:Disconnect() return 1
      elseif (cmd=="!myip") then
         user:SendPM(sBot, "Your IP: "..user.sIP.."  From "..tohostname(user.sIP)) return 1
      elseif (cmd=="!getip") then
         s,e,cmd,Name = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
         victim = GetItemByName(Name)
         if user.bOperator then
            user:SendPM(sBot, victim.sName.."'s IP       is: "..victim.sIP.." \t\t:::\tDNS: "..tohostname(victim.sIP))return 1
         end
      end
   end
end
before you start trying tables i sugest you take a look here.
that can help you making it look a bit nicer.
and then you can use the next 2 do the share size i sugested by using this piece of code.
        local tempshare = format("%0.2f", (frmHub:GetCurrentShareAmount()/1024/1024/1024))
         if strlen(tempshare) <= 6 then 
            tempshare = tempshare.." GB"
         else
            tempshare = format("%0.2f", (tempshare/1024)).." TB"
         end
when your done with that whill start with using a table for the op's and extracting them from the registered users file from ptokax.
this because it's easyer if you use that fancy way.

good luck
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

kepp

-------------------// From this line please ;)
-- Info on connect v.0.4
-- Made By Kepp
-- 03/10/30
-- Added: Botdecsription, such as speed, e-mail, connection
-- Idea from Mr420's botdesc script 01/11/03
-- Added: HubInfoAdvert, in main every hour
-- Added: It will now show the curent user his/her DNS ;)
-- Added: Date And time on connect
-- Fixed: The list information about the user looks alot better now.
-- Added: Command !author, the author of the script ;)
-- Added: Command !myip, Will show the user his/her ip + DNS in PM
-- Added: Command !drop, Disconnect yourself
-- Fixed: All command now works in PM to the bot
-- Added: Command !getip , Will show you the user's IP and DNS server
-- Fixed: A bug, Report from Darkelf
-- Added: Gave the bot a share of 43.38 GB ;)
--
-- Thanks Plop/Tezlo for helping me out
-------------------------------//For your own good
hubadress = "your-hub.adress.here" --// :D
country = "Sweden"
Network = "Network-adress.here"
-------------------------------// (Forgot)
kb = 1024
mb = 1024/1024
Sgb = 1024/1024/1024
tb = 1024/1024/1024/1024
-------------------------------// Timer options
sEC = 1000
MiN = 60*sEC  ---// Don't touch any of this :P
Hour = 60*MiN
------------------------------- // Op's/Su's name/s
HuBowner = "XXX" --// Hubowners name here
sU = "[SU]xxx"
sU1 = "[SU]xxx1"      --//Your Super Operators/Op's name/s
sU2 = "[SU]xxx2"
sU3 = "[SU]xxx3"
-------------------------------// Bot Options
sBot = "[Police]"    --//Botname
eBot = "[E-mail]"    --//The bots E-mail
BotS = "Faster Than Light"  --//The bots speed :D
Botdesc = "El Jefe"         --//Botdescription! El Jefe = The boss
botTag = "<--)V:0.4>"
botS = 46582578356
mIS= "$MyINFO $ALL "..sBot.." "..Botdesc.." "..botTag.."$ $"..BotS..strchar( 1 ).."$"..eBot.."$"..botS.."$"
-------------------------------// Ah-ah-ah

function Main()
   SetTimer(Hour)
   StartTimer()
   frmHub:RegBot(sBot)
   frmHub:EnableFullData(1)
   SendToAll( mIS )
end
-------------------------------// New user connected
function NewUserConnected(user)

    local share = format("%0.2f",(frmHub:GetCurrentShareAmount()/1024/1024/1024))
        if strlen(share) <= 6 then 
    share = share.." GB"
  else
        share = format("%0.2f", (share/1024)).." TB"
 end


   local host = tohostname(user.sIP)
   user:SendData("<============================================================>")
   user:SendData("Welcome To\t\t:\t"..frmHub:GetHubName())
   user:SendData("Current data and time\t\t:\t"..date())
   user:SendData("Your Name\t\t\t:\t"..user.sName)
   user:SendData("Your IP\t\t\t:\t"..user.sIP)
   user:SendData("Your DNS\t\t\t:\t"..tohostname(user.sIP))
   user:SendData("Total Online Users\t\t:\t"..frmHub:GetUsersCount())
   user:SendData("Minimum Share For You\t:\t"..frmHub:GetMinShare()/(1024).." GB")
   user:SendData("Current Share Amount: "..share)
   user:SendData("<============================================================>")
end
--------------------------------// Op connected
function OpConnected(user)
   local h = tohostname(user.sIP)
   user:SendData("<=======================================================>")
   user:SendData("Your Profile\t:\t"..(GetProfileName(user.iProfile) or unregistered))
   user:SendData("Your IP\t:\t"..user.sIP)
   user:SendData("<=======================================================>")
   SendToAll(sBot, "Hey "..user.sName..", Now Get Back To Work!")
end
--------------------------------// An Op Disconnects
function OpDisconnected(user)
   SendToAll(sBot, "Where do you think you are going "..user.sName.."? Get Back Now!")
end
--------------------------------// Timer function
function OnTimer()
   SendToAll("<============"..frmHub:GetHubName().."============>")
   SendToAll("\tHub Owner: "..HuBowner)
   SendToAll("\tHub Adress: "..hubadress)
   SendToAll("\tOp's: |  "..sU.." |  "..sU1.." |  "..sU2.." |  "..sU3)
   SendToAll("\tHub Network: "..Network)
end
--------------------------------// To this one =)

function DataArrival(user, data)
   if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if (cmd=="!author") then
         user:SendData(sBot, "Kepp is the author of this script") return 1
      elseif (cmd=="!drop") then
         user:Disconnect() return 1
      elseif (cmd=="!myip") then
         user:SendPM(sBot, "Your IP: "..user.sIP.."  From "..tohostname(user.sIP)) return 1
      elseif (cmd=="!getip") then
         s,e,cmd,Name = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
         victim = GetItemByName(Name)
         if user.bOperator then
            user:SendPM(sBot, victim.sName.."'s IP       is: "..victim.sIP.." \t\t:::\tDNS: "..tohostname(victim.sIP))return 1
         end
      end
   end
end

If i understood this right
local tempshare = format("%0.2f", (frmHub:GetCurrentShareAmount()/1024/1024/1024))
         if strlen(tempshare) <= 6 then 
            tempshare = tempshare.." GB"
         else
            tempshare = format("%0.2f", (tempshare/1024)).." TB"
         end

It will get the current share amount in GB
if strlen finds 6 characters in tempshare then
Tempshare will show the amount in GB
else (If it finds more than 6 it will display it in TB)

He he, not really here i wanted you to go comment my misstakes... Im sending you an E-Mail now..

Tack Care
Guarding    

kepp

#41
-----------------------------------------------------------#
-----------------------------------------------------------#
--# [P0lic?] Made By Kepp v.0.5
--# Added: Botdecsription, such as speed, e-mail, connection
--# Added: Date And time on connect 
--# Added: Command +shoot, shoot a user
--# Fixed: All command now works in PM to the bot
--# Fixed: Rewrote everything 2003/18/11
--# Thanks Plop/Tezlo for helping me out
--#
-----------------------------------------------------------#
-----------------------------------------------------------#
sec = 1000
min = 60*sec
hour = 60*min
-----------------------------------------------------------------------------------------------------
Bot = "[P0lic?]"
Bote = "comment@hotmail.com"
Bots = "Faster Than Light"
Botdesc = "El Jefe"
Bottag = "<--)V:0.4>"
My_Info = "$MyINFO $ALL "..Bot.." "..Botdesc.." "..Bottag.."$ $"..Bots..strchar( 1 ).."$"..Bote.."$"
------------------------------------------------------------------------------------------------------
HubAdress = "theabyss2.no-ip.org"
Country = "Sweden"
NetWork = "The Abyss Network"
------------------------------------------------------------------------------------------------------
Ops = {}

  function Main()
  frmHub:RegBot(Bot)
  frmHub:EnableFullData(1)
  SetTimer(hour)
  StartTimer()
  SendToAll(My_Info)
 end
-----------------------------------------------------------------------------------------------------
    function NewUserConnected(curUser)

       local share = format("%0.2f",(frmHub:GetCurrentShareAmount()/1024/1024/1024))
    if strlen(share) <= 6 then 
       share = share.." GB"
  else
    share = format("%0.2f", (share/1024)).." TB"
 end


  curUser:SendData("<=========================-["..frmHub:GetHubName().."]-=========================>")
  curUser:SendData("Your Name\t\t:::\t"..curUser.sName)
  curUser:SendData("Your IP\t\t:::\t"..curUser.sIP)
  curUser:SendData("Your DNS\t\t:::\t"..tohostname(curUser.sIP) or "N/A")
  curUser:SendData("Min Share\t\t:::\t"..frmHub:GetMinShare()/(1024).." GB")
  curUser:SendData("Online Users\t:::\t"..frmHub:GetUsersCount())
  curUser:SendData("Current Share\t:::\t"..share)
  curUser:SendData("Op's Online\t\t:::\t"..getn(Ops))
  curUser:SendData("Current Date\t:::\t"..date("%Y/%B/%A").." Time is: "..date("%H:%M"))
 end

-------------------------------------------------------------------------------------------------------

    function OpConnected(user)
       tinsert(Ops, user.sName)
  user:SendData("<=========================-["..user.sName.."]-=========================>")
  user:SendData("Your Profile   :::    "..GetProfileName(user.iProfile))
  user:SendData("Your IP         :::    "..user.sIP)
  user:SendData("Type +help in main to get your commands.")
    SendToAll(Bot, "Hey "..user.sName.." Now get back to work")
 end

-------------------------------------------------------------------------------------------------------

    function OpDisconnected(user)
       SendToAll(Bot, "Where do you think you are going "..user.sName.."? Get Back Now!")
  end

   function DataArrival(user, data)
      if strsub(data, 1 , 1) == "<" or strsub(data, 1, 4) == "$To:" then
   data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")

   if (cmd=="+shoot") and user.iProfile == 0 or user.iProfile == 1 then
      s,e,cmd,arg = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
   victim = GetItemByName(arg)
      if victim ~= nil then
   if victim.bOperator then
   user:SendData("***You can't shoot That user, He/She is hiding!") return 1
 else

  SendToAll(Bot, ""..user.sName.." Shot "..victim.sName.." In the head!")
  victim:SendPM(Bot, ""..user.sName.." Just shot you in the head! (Which means, You are dead..)")
  victim:Disconnect() return 1 end
 else
  user:SendData("***You must enter a name") return 1 end

  end
 end
end

function OnTimer()
SendToAll("<================================================================>")
SendToAll("\tHub-Address\t\t:::\t"..HubAdress)
SendToAll("\tCountry\t\t\t:::\t"..Country)
SendToAll("\tOur Network\t\t:::\t"..NetWork)
SendToAll("\tCurrent Date\t\t:::\t"..date("%Y/%B/%A").." Time is: "..date("%X"))
SendToAll("<================================================================>")
end

Update
Guarding    

kepp

I think i should mention that i get a Syntax Error

Syntax Error: attempt to concat a nil value

Now, i can't find where it comes from...:S

Otherwise, everything is OK
Guarding    

SMF spam blocked by CleanTalk