@WillK1llin that would be easy.....
on *:text:@rsfact*:#:{ msg $chan $read(rsfact.txt) }
Any ways i suggest adding a floodcontrol to this. Since a lot of people will use it to spam.
on *:text:!rsfact*:#: {
var %rsfact = $read(rsfact.txt)
if ( %rsfact == $null ) { return }
if (!$(,$+(%,flood1,$nick))) {
set -u3 $+(%,flood1,$nick)
notice $nick Error: Unable to find a fact, try again later
return
}
else {
if (!$(,$+(%,flood,$nick))) { return }
notice $nick %rsfact
.timer 1 2 notice $nick Want another rsfact? Type !rsfact again!
set -u3 $+(%,flood,$nick)
return
}
on *:text:@rsfact*:#: {
var %rsfact = $read(rsfact.txt)
if ( %rsfact == $null ) { return }
if (!$(,$+(%,flood1,$nick))) {
set -u3 $+(%,flood1,$nick)
notice $nick Error: Unable to find a fact, try again later
return
}
else {
if (!$(,$+(%,flood2,$nick))) { return }
msg $chan %rsfact
.timer 1 2 notice $nick Want another rsfact? Type !rsfact again!
set -u3 $+(%,flood2,$nick)
return
}
on *:text:!addfact*:#: {
if ($address($nick,2) != $address($me,2)) { notice $nick You are not a moderator, so you cant use this command.
else {
notice $nick Adding fact to the list, Please wait....
/write $2- rsfact.txt
.timer 1 2 notice $nick Succesfully added the requested fact to the list.
return
}
My scripts has the following features:
!rsfact = Get a random fact and a notice that you can get more when you type it again.
!addfact = Add a new fact u made up or that u found. (Users in your own network only: Means anyone connected to your Router.)
Some extra Error messages.
And to make it proffesional:
Remove all numbers infront of the facts. And dont place spaces between. Then theres 99.9% chance that the $read will work fine.