This is just a snippet to predict your future. Enjoy. :)
on *:TEXT:-Fortune*:#: {
var %fortune $rand(1,10)
if (%fortune == 1) { msg $chan $2- will live a wonderful life, full of happiness, and love. }
if (%fortune == 2) { msg $chan $2- will become a hermit and live sad and lonely for the rest of their life. }
if (%fortune == 3) { msg $chan $2- will start a company, and live a prosperous life. }
if (%fortune == 4) { msg $chan $2- will die at a young age. }
if (%fortune == 5) { msg $chan $2- will become a famous actor/actress/musician and spend the rest of their life in the spotlight. }
if (%fortune == 6) { msg $chan $2- will disappear without a trace, and never be heard from again. }
if (%fortune == 7) { msg $chan $2- will die, but become reanimated as a Zombie, and forever roam the earth in search of purpose... And brains, of course. }
if (%fortune == 8) { msg $chan $2- will live a normal life, with a normal home, a normal job, and a normal future. }
if (%fortune == 9) { msg $chan $2- will be eaten alive by bears. }
if (%fortune == 10) { msg $chan $2- does not exist, and therefore will not have a future. }
}
azy: You are correct. That is a more sensible way of doing it. However, for simple and 'beginner-like', this can be made acceptable :)
SoxFarAway777: May I suggest a different approach? See below:
alias -l fort {
var %r = return
goto $rand(1,10)
:1
%r will live a wonderful life, full of happiness, and love.
:2
%r will become a hermit and live sad and lonely for the rest of their life.
:3
%r will start a company, and live a prosperous life.
:4
%r will die at a young age.
:5
%r will become a famous actor/actress/musician and spend the rest of their life in the spotlight.
:6
%r will disappear without a trace, and never be heard from again.
:7
%r will die, but become reanimated as a Zombie, and forever roam the earth in search of purpose... And brains, of course.
:8
%r will live a normal life, with a normal home, a normal job, and a normal future.
:9
%r will be eaten alive by bears.
:10
%r does not exist, and therefore will not have a future.
}
on *:TEXT:-Fortune*:#:msg $chan $2 $fort
Code's a bit quicker and cleaner and it will also save you around 0.2k in file size. However, as 'azy' suggested, use a text file. Create a text file called 'fortune.txt' and save all of the fortunes to it. Then, all you will need is this simple, one-line text-event:
ON *:TEXT:-Fortune*:#:msg $chan $2 $read(fortune.txt)
You don't need the slashes (/msg $chan), and you're missing a bunch of brackets (1st and 4th "fortune".
Also, try to add some flood protection to that trigger; you wouldn't want people spamming it. :D
Put this into good use: http://www.hawkee.com/snippet/3874/