mIRC Home    About    Download    Register    News    Help

Print Thread
command returns nothing #100215 11/10/04 12:36 AM
Joined: Nov 2003
Posts: 257
A
alkahol1k Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
//sockwrite -tn bot $read($findfile(logs,*.log,$rand(1,$findfile(logs,*.log,0))))

no msg or anything what is wrong with this ?

Re: command returns nothing #100216 11/10/04 01:12 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Nothing's wrong with it, it's just not doing what you want it to do, what do you want it to do?


New username: hixxy
Re: command returns nothing #100217 11/10/04 03:10 AM
Joined: Nov 2003
Posts: 257
A
alkahol1k Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
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.

Re: command returns nothing #100218 11/10/04 03:25 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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.


New username: hixxy
Re: command returns nothing #100219 11/10/04 04:06 AM
Joined: Nov 2003
Posts: 257
A
alkahol1k Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
works great, thanks tidy