Trivia 2.1 by Larry Cloud - cloud@whidbey.net

This TCL script is for Eggdrop versions 1.1.5 and higher.  It is a basic
trivia game for your users to play in channel against each other.  This
version is an upgrade from the version originally written by Tobias Begalke
(tsbegalk@cip.informatik.uni-erlangen.de).  While I loved his version, I
felt there were some shortcomings in it that I could improve upon.  These
improvements include:

* - Instead of having one question bank, there is now the ability to have
    up to five, choosable by your channel users at the start of the game.
    I have included some sample question banks in this archive.

* - The bot now NOTE's you in the channel instead of MSGing you and opening
    another annoying window.

* - A few bugs in the original code are squishsed or sprayed with Raid.

* - Standardized, throughout the code, many items such as the trivia command
    that your users type (the default was PF, and in many places it was
    hardcoded as PF - now you change ONE variable at the top and all
    references now use that variable).

* - Removed a lot of ambiguous remarks in the code, which shortened it
    considerably.

* - Added sound support - the bot will now play WAV files to the channel while
    the game progresses, if you have sounds enabled in the script.  This was
    a really hard thing to figure out how to do :)

SETUP:

This is one of the easier scripts to set up.  Make an entry in your config
file for your bot to add it (most people put their scripts at the end of
their config file).  The entry will be:

source scripts/trivia2.tcl


Dump the entire contents of the archive into your scripts directory.  No
need to create a separate directory.

Edit the script to your liking (Bot owner name, whether or not you want
sounds enabled, how many question banks you're going to use, etc.)

If you want to use the sounds, be sure to unzip them in your /scripts
directory as well (see bottom of this text for URL to get the sounds).

Rehash/restart your bot and its ready to go.  See, told ya it was easy.


COMMANDS:

OK, to start a game, you need to decide how many correct answered questions
are required to win the game.  This can be a number between 1 and 25.
Start the game by typing:
!trivia x
Where is is a number between 1 and 10.  For example:
!trivia 10
starts a 10 question game.

OK, once the game has started, you need to have your users join a team.
Use your attention code (the default is zz) followed by the words join team x
where x is either 1 or 2.  Example:
zz join team 1

Once the game is initialized, it will present the channel with these instructions
so you don't have to explain it.  It will also list the different question
banks available.  You can customize these by editing the TCL file and replacing
the stuff I've provided with your own question banks.  Again, if you want to use
a different topic/question bank, your users can choose this now.  Note that once
a game has begun, you canNOT change topics.

Once the game has begun, your users can answer the questions by using the
attention sequence (remember the default is zz unless you change it in the TCL
script) followed by the answer.  For example - lets say the question is:

A red crayon is what color?

Your users would then type:

zz red

Whoever the bot sees as getting the correct answer first, wins the point for that
question.  So smart users will connect to the same server the bot is sitting on :)

This continues until the number of correct answers the game is started with is
reached.  Then the game wraps up, congratulates the winning team, and terminates.



REACHING THE AUTHOR


You can leave me email at:
cloud@whidbey.net  or  larrycloud@hotmail.com

You can always get the latest versions of this script and the sounds from here:
The script:  http://www2.whidbey.net/cloud/trivia2.zip
The sounds:  http://www2.whidbey.net/cloud/trivwavs.zip

If you come up with some really good question banks, send them my way and I'll
include them in the next archive release, and credit you.


CREDITS

Again, I have to thank Tobias Begalke for writing the original game.  I learned
a lot about TCL by studying how he did things.

The guy who wrote the RFC for CTCP - I never would have figured out how to do the
sounds without that text!



QUESTION BANK CREDITS

Original          :  Tobias Begalke
Trivia Idiots     :  Me :)
Comics & Cartoons :  ^Pegasus^
Grab Bag          :  Jenbug


SOUND FILES CREDIT

The voice of Jenbug can be heard if you enable sounds in the game.
