mIRC Homepage
Posted By: alkahol1k command returns nothing - 11/10/04 12:36 AM
//sockwrite -tn bot $read($findfile(logs,*.log,$rand(1,$findfile(logs,*.log,0))))

no msg or anything what is wrong with this ?
Posted By: tidy_trax Re: command returns nothing - 11/10/04 01:12 AM
Nothing's wrong with it, it's just not doing what you want it to do, what do you want it to do?
Posted By: alkahol1k Re: command returns nothing - 11/10/04 03:10 AM
if ($gettok(%z,2,32) == PRIVMSG) && (#* iswm $gettok(%z,3,32)) && (%bottalk == on) { .sockwrite -tn bot $read($findfile(logs,*.log,$rand(1,$findfile(logs,*.log,0))))

when someone types in a channel i want the bot to respond with text from a random line, in a random log file in my Logs folder.
Posted By: tidy_trax Re: command returns nothing - 11/10/04 03:25 AM
Try this:

Code:
if ($gettok(%z,2,32) == PRIVMSG) && (#* iswm $gettok(%z,3,32)) && (%bottalk == on) { sockwrite -n bot [color:red]PRIVMSG $gettok(%z,3,32) $+(:,[/color]$read($findfile(logs,*.log,$rand(1,$findfile(logs,*.log,0)))[color:red],n[/color])[color:red]) }[/color]


The red parts are what I added.
Posted By: alkahol1k Re: command returns nothing - 11/10/04 04:06 AM
works great, thanks tidy
© mIRC Discussion Forums