mIRC Home    About    Download    Register    News    Help

Print Thread
#100215 11/10/04 12:36 AM
Joined: Nov 2003
Posts: 257
A
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 ?

#100216 11/10/04 01:12 AM
Joined: Nov 2003
Posts: 2,327
T
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
#100217 11/10/04 03:10 AM
Joined: Nov 2003
Posts: 257
A
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.

#100218 11/10/04 03:25 AM
Joined: Nov 2003
Posts: 2,327
T
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
#100219 11/10/04 04:06 AM
Joined: Nov 2003
Posts: 257
A
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
works great, thanks tidy


Link Copied to Clipboard