Randomizes a fortune on the command #fortune
will be updated later,
to can customize it, change (1,9) if you want to (1,EnterANumber)
and add more fortunes!
on *:text:!fortune*:#: {
/set %em $rand(1,9)
if (%em == 1) { msg $chan $me looks into $nick 's future and sees Sadness in $nick 's day }
if (%em == 2) { msg $chan $me looks into $nick 's future and sees Happyness in $nick 's day }
if (%em == 3) { msg $chan An Unexpected Surprise waits in your day to come }
if (%em == 4) { msg $chan An Unexpected Visit from a friend will arrive at your door today }
if (%em == 5) { msg $chan You will have a good week }
if (%em == 6) { msg $chan Somone close by needs your comfort }
if (%em == 7) { msg $chan Patience is Nessecary in life }
if (%em == 8) { msg $chan Friends are Nessecary in life, treat them kindly and good fortune will come to you }
if (%em == 9) { msg $chan Comfort in life comes from Family, treat them with kindness and kindess will be recived }
}
another way of doing this code is a socket. This is only an example! I know that Weasel would have no clue how to make a socket but il post this as a comment anyways. So again this is only a example:
on $*:text:/@fortune$/iS:#: { if (!%fortuneflood) { set -u3 %fortuneflood on | if ($sock(fortune)) .sockclose fortune | set %fortune.chan.nick $chan $nick | .sockopen fortune www.fortunecookiemessage.com 80 } }
on *:sockopen:fortune: { sockwrite -nt $sockname GET / HTTP/1.1 | sockwrite -nt $sockname Host: www.fortunecookiemessage.com | sockwrite -nt $sockname $crlf }
on *:sockread:fortune: {
var %fortune | sockread %fortune
if ($regex(%fortune,/(\w.+)<\/p>/)) { msg $gettok(%fortune.chan.nick,1,32) 14[04 $gettok(%fortune.chan.nick,2,32) Here Is Your Random Fortune 14] $regml(1) | unset %fortune.chan.nick | .sockclose fortune }
}
Wow, it's worse than I thought. Only difference is the content and command.
Though.. This is how I would write it. Even though this is a very simple script.
On *:Text:!fortune*:#: {
var %fortune $rand(1,9)
if (%fortune == 1) { .msg $chan $me looks into $nick $+ 's future and sees sadness in their day. }
if (%fortune == 2) { .msg $chan $me looks into $nick $+ 's future and sees happiness in their day. }
if (%fortune == 3) { .msg $chan An Unexpected Surprise waits in your day to come. }
if (%fortune == 4) { .msg $chan An Unexpected Visit from a friend will arrive at your door today. }
if (%fortune == 5) { .msg $chan You will have a good week. }
if (%fortune == 6) { .msg $chan Somone close by needs your comfort. }
if (%fortune == 7) { .msg $chan Patience is Nessecary in life. }
if (%fortune == 8) { .msg $chan Friends are Nessecary in life, treat them kindly and good fortune will come to you. }
if (%fortune == 9) { .msg $chan Comfort in life comes from Family, treat them with kindness and kindess will be recived. }
}
Not that it makes it any better. Just fixes the variable, and sets it as a local var, and I fixed the puncuation and added . before the msg to silence it. And reworded a couple of things.
same codes each time just different titles Max...
on *:text:!channels*:#: {
/set %em $rand(1,9)
if (%em == 1) { msg $chan you might want to try <EnterAChannelHere> }
if (%em == 2) { msg $chan you might want to try <EnterAChannelHere> }
if (%em == 3) { msg $chan you might want to try <EnterAChannelHere> }
if (%em == 4) { msg $chan you might want to try <EnterAChannelHere> }
if (%em == 5) { msg $chan you might want to try <EnterAChannelHere> }
if (%em == 6) { msg $chan you might want to try <EnterAChannelHere> }
if (%em == 7) { msg $chan you might want to try <EnterAChannelHere> }
if (%em == 8) { msg $chan you might want to try <EnterAChannelHere> }
if (%em == 9) { msg $chan you might want to try <EnterAChannelHere> }
}
that was his channel dialogue
this was in his bunch of code...
on *:text:!random*:#:{
/set %em $rand(1,8)
if (%em == 1) { msg $chan i like pie }
if (%em == 3) { msg $chan WHEEEEEEEEHOOOOOOOO! }
if (%em == 4) { msg $chan WHEEEECALP }
if (%em == 5) { msg $chan $me slaps $nick }
if (%em == 6) { msg $chan i like gerbils }
if (%em == 7) { msg $chan i like Cows }
if (%em == 8) { msg $chan people scare me! }
}
there is no new coding here at all