PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: rstandley on 13 April, 2004, 11:46:54

Title: add share for script bot
Post by: rstandley on 13 April, 2004, 11:46:54
how do you add a share for a script bot?
Title:
Post by: nErBoS on 13 April, 2004, 15:08:50
Hi,

You want your Bot to share it really or fkae it ?? If you want your bot to share it, it?s not possible, if you want to fake it, why ???

Best regards, nErBoS
Title: Fake share to a bot
Post by: Creator on 05 June, 2004, 05:45:47
QuoteOriginally posted by rstandley
how do you add a share for a script bot?

This need to be in you're script replace botname etc whit youre own info

---------------BotInfo---------------
BotName = "(**BioProtectBot**)"
BotDiscr = "(**BioProtect**)"
BotTag = ""
BotConn = "100Mbit"
BotShare = "666Kb"
BotEmail = "biohazardclan@home.nl"

---------------WatToDoOnScriptStart--------------- look for the next 3 lines in youre script if it already in the scipt leave it out
function Main()                                
   frmHub:RegBot(BotName)
end

---------------ToDo---------------
---------------ToUser---------------
function NewUserConnected(curUser)
   curUser:SendData( BotStr )
end
---------------ToOp---------------
function OpConnected(curUser)
   curUser:SendData( BotStr )
end

---------------WatToSend---------------
BotStr = "$MyINFO $ALL "..BotName.." "..BotDiscr.." "..BotTag.."$ $"..BotConn..strchar( 1 ).."$"..BotEmail.. "$" ..BotShare.."$"

--Greetz Creator
Title:
Post by: HaArD on 05 June, 2004, 05:55:50
BotShare = "666Kb"

Should be:

BotShare = "681984"

In other words it should be a string of numbers representing the number of BYTES SHARED.

DC Clients convert that to show "xxx MiB" or "xxx GiB"
Title:
Post by: Creator on 05 June, 2004, 06:07:04
QuoteOriginally posted by HaArD
BotShare = "666Kb"

Should be:

BotShare = "681984"

In other words it should be a string of numbers representing the number of BYTES SHARED.

DC Clients convert that to show "xxx MiB" or "xxx GiB"

I have the script running on my own hub and it works fine and all is displayed ok. look for yourself.
If i want 666kb to show and its shows 666kb its ok for me lol.
Title:
Post by: Corayzon on 05 June, 2004, 07:36:21
a simple way to do this is as follows...

in userconnect() and opconnect() send this data to the connecting users...

user:SendData("$MyINFO $ALL nickname  description $ $Connection$email$sharesize$|")

eg...

user:SendData("$MyINFO $ALL cSlave  This hub is power by cSlave 1.0 $ $Cable$Corayzon@yahoo.com.au$666$|")

noza

*** edited strchar() to