This Will Allow A Bot To Have A Description. Just add the my_info_string = blah to the function Main() of the script. If it doesn't have one, use the one provided.
--//Bot Description For Any Bot
--//Mr420
botname = "blah"
bot_email = "blah"
bot_speed = "blah"
bot_descr = "blah"
bot_share_size = 420.01 * 1024 *1024
my_info_string = "$MyINFO $ALL "..botname.." "..bot_descr.."$ $"..bot_speed..strchar( 1 ).."$"..bot_email
function Main()
frmHub:RegBot(botname)
my_info_string = "$MyINFO $ALL "..botname.." "..bot_descr.."$ $"..bot_speed..strchar( 1 ).."$"..bot_email..
"$"..bot_share_size.."$"
end
function NewUserConnected(curUser)
curUser:SendData( my_info_string )
end
function OpConnected(curUser)
curUser:SendData( my_info_string )
end
Enjoy!!
/(Mr420)
:D :P :D
Does it work also for userlist refresh? ;)
Ptaczek, nope;)
It is not, then in the script must be a line which removes it on script start:)
add SendToAll to main function
function Main()
frmHub:RegBot(botname)
my_info_string = "$MyINFO $ALL "..botname.." "..bot_descr.."$ $"..bot_speed..strchar( 1 ).."$"..bot_email..
"$"..bot_share_size.."$"
SendToAll( my_info_string )
end
l8rr,,
-phatty
thanks for the SendToAll phatty. Didn't think of that...hehe
;)
/(Mr420)
yw :o)
QuoteOriginally posted by ptaczek
Does it work also for userlist refresh? ;)
Yes it does =)
it will keep the old info as long as the client doesn't get any new info about the bot/user
This is good... now my bot will not look so, "pale" :-)
can i show a tag for the bot ?
i edited the above ..
botname = "XXX"
bot_email = ""
bot_speed = ""
bot_descr = ""
bot_share_size = XXXXX.XX * 1024 *1024
my_info_string = "$MyINFO $ALL "..botname.." "..bot_descr.."$ $"..bot_speed.."$"..bot_email
function Main()
frmHub:RegBot(botname)
my_info_string = "$MyINFO $ALL "..botname.." "..bot_descr.."$ $"..bot_speed.."$"..bot_email..
"$"..bot_share_size.."$"
SendToAll( my_info_string )
end
function NewUserConnected(curUser)
curUser:SendData( my_info_string )
end
function OpConnected(curUser)
curUser:SendData( my_info_string )
end
i got some error as strchr something..jus removed the strchr part and working as i wanted
regarding tag some1 help pls.
Bot description is built into the API now.
See this (http://ptxwiki.psycho-chihuahua.net/doku.php/scriptinghelp/ptokaxapi#regbot_botname_isop_description_email).
i get error
Syntax [string "--//Bot Description For Any Bot
..."]:9: attempt to call global `strchar' (a nil value)
QuoteOriginally posted by (-=TrIp-iN-SuN=-)
i get error
Syntax [string "--//Bot Description For Any Bot
..."]:9: attempt to call global `strchar' (a nil value)
*shits himself in the face*
BTW you just have to replace strchar to string.char if you eagerly wanna use that solution. ;)
i jus removed the strchr part and lol the script is working ...see tats wat i edited in my posted script...lolol
QuoteOriginally posted by bastya_elvtars
Bot description is built into the API now.
See this (http://ptxwiki.psycho-chihuahua.net/doku.php/scriptinghelp/ptokaxapi#regbot_botname_isop_description_email).
umm ..i tried to understand tat , but cant get mych out of it :(
maybe some1 posts me the code :)
This is what i use and works fine.
--bot info
botname = "Guardian"
botemail = "guardianlua5@walla.com"
bottag = "<++ K:W.4711,M:A,H:1/0/6,S:1>"
botspeed = "-GIII-"
botdescr = "Guardian 5 V1.5 by Guardian Team"
botsharesize = 17 * 1024 * gb + 1024 * 1024 * 285
frmHub:RegBot(botname, Reg)
botinfostring = "$MyINFO $ALL "..botname.." "..botdescr.." "..bottag.."$ $"..botspeed.."$"..botemail.."$"..botsharesize.."$"
function Main()
SendToAll("( >>>> Guardian 5 v.1.5 - Made by Guardianteam? Started at "..os.date(" the %A %d-%m-%Y at %X ").." <<<< )")
end
function NewUserConnected(curUser)
curUser:SendData(botinfostring)
end
function OpConnected(curUser)
curUser:SendDatabotinfostring)
end
Grtzzz
DJ Bert
If a bot has a connection, recent client implementations (and Hub-Link) will handle it as a regular user. So, away messages will be sent to it, etc.
The way PtokaX does it gives no connection to the bot, so every client knows it's a bot, not a user.