Zmodem commented on a Page, Fortune  -  Aug 24, 2008

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)
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.