Eggdrop Tcl Archive

Home | Contact | Forum | Submit a Script

View All Information: Script Id416

Script Name: trivia.tcl Version: 1.02 Author: DarkMist` Script Date: 04/08/2001 Category: Game Scripts Downloads: 227 File Name: trivia1.02.zip Short Description: Trivia game script. Highly configurable.

Extended Description File

<title>trivia.tcl readme</title>

File:           trivia.tcl
Version:        1.02
Author:         Graeme Donaldson
E-mail:         gpd@madpower.net
WWW:            http://madpower.net/~gpd/trivia/
IRC:            DarkMist` @ irc.blabber.net
                (sometimes <http://www.undernet.org/> Undernet)
===================================================================

Contents
========

1.     General info
2.     History
3.     Installation & usage
4.     Conditions of use
5.     Thanks

Appendix A: Detailed descriptions of all settings.

-------------------------------------------------------------------

1. GENERAL INFO
---------------

I made this script because I couldn't find a trivia game 
for eggdrop which worked the way I wanted. I first wrote 
a trivia game script for mIRC which more or less looked 
like the one used on #trivia on irc.blabber.net. I then 
decided to run my own trivia game using eggdrop instead. 
This script still looks more or less like the one used 
on #trivia, it's just that the commands and features 
differ in certain respects.

This script was developed on eggdrop 1.6.4+. While it 
should work on any of the 1.6 series, I have not tested 
it on anything below 1.6.4. Also note that this is the 
first TCL script I've written and I am by no means 
any kind of expert, so I expect that there may be more 
efficient ways of doing some things in places. If you 
have any tips you'd like to share, you can contact me 
at the e-mail address at the top of this file. =)

2. HISTORY
----------

28 July 2001   v1.01  First release.
4 August 2001  v1.02  Added: auto disable after X unanswered
                             questions. (set tgmaxmissed).
                      Removed: check on load if channel set for
                               the game is a valid channel.
		               Was causing some problems.
                      Added: you can specify if you want the bot
                             to use bold in messages or not.
			        (set tgusebold).
                      Added: you can now disable winning streaks
                             if you want to. (set tgstreakmin 0).

3. INSTALLATION & USAGE
-----------------------

To use the script:
 - extract all the files in the archive to a directory on your shell.
 - edit the trivia.tcl file to customise the settings to your liking.
   (skip this step at your own risk ;).
 - add the script to your bot's config. see the eggdrop documentation
   if you don't know how to do this.
 - rehash your bot and you're ready to go. =)

NOTE:
 - make sure that alltools.tcl 1.6 or higher is loaded in your bot's
   config. Also, make sure that it loads before trivia.tcl
 - make sure that the file you set for the question/answers database
   exists, or your bot will DIE and you'll have to restart it.
 - the question database included is a sample for example purposes.
   Add more questions by following the format of the example file,
   i.e. one question/answer pair per line, answer first, then
   question, seperated by a '|'. It does not need to be in any order,
   I just find it easier to prevent adding a duplicate question if
   my database is sorted alphabetically by answer.

If you've done this and rehashed the bot (and it didn't DIE =),
you can start the game by typing the start command on the
channel you specified.

The default channel commands (and flags required for their use) are:

Command       Flags      Description

!start        -|-        Starts the game (if it's not running).
!stop         o|o        Stops the game (if it's running).
!hint         o|o        Gives another hint to the current question.
!skip         o|o        Skips the question and selects a new one.

The default /msg commands (and flags required for their use) are:

Command       Flags      Description

?             n/a        Gives help.
score         n/a        Looks up someones score.
target        n/a        Tells you who is ranked one above you.
error         n/a        Report errors in questions/answers.
reset         n|n        Reset score table.

4. CONDITIONS OF USE
--------------------

You have my permission to do anything you like with this script,
as long as you give me credit for anything you used from it. =)

5. THANKS
---------

Thanks to...

 - The helpful folks on Undernet's #eggdrop for answering my newbie
   questions. =)
 - The guy who originally wrote the mIRC trivia script as used on
   blabber.net and various other places.
 - Prince_of_Chaos @ irc.blabber.net: assisting with beta testing.
 - stuuu @ irc.xnet.org, #xnet-trivia & #gimp:
                                      bug reports and suggestions.

APPENDIX A
----------

This is a list of all the variable settings used by the script
and what they are for.

set tgqdb
Set this to the name of the file to use for questions and answers.
The account the bot runs on must be able to read from this file.

  Example: set tgqdb "/home/lamer/eggdrop/scripts/trivia.questions"

set tgscf
Set this to the name of the file to use for the score table.
The acct the bot runs on must have read & write access to this file.
If the file does not exist, it will be created when needed.

  Example: set tgscf "/home/lamer/eggdrop/scripts/trivia.scores"

set tgerrfil
Set this to the name of the file to use for error reports.
The acct the bot runs on must have read & write access to this file.
If the file does not exist, it will be created when needed.

  Example: set tgerrfil "/home/lamer/eggdrop/scripts/trivia.errors"

set tgchan
Set the name of the channel you want the trivia game to run on.

  Example: set tgchan "#lame"

set tgpointsperanswer
Set the number of points to give a person for a correct answer.

  Example: set tgpointsperanswer 3

set tgmaxhint
Set the max number of hints to give before the question "expires".
Note that the first hint given when the question is asked is not
included in this total.

  Example: set tgmaxhint 3

set tgstreakmin
Set the min number of correct answers in a row by one person which
puts them on a winning streak. Set to 0 to disable winning streaks.

  Example: set tgstreakmin 3

set tgmaxmissed
Set the number of unanswered questions after which the game will
automatically disable. Note that skipping a question does not mean
it is unanswered. Set to 0 to make the bot go on until the stop
command is used.

  Example: set tgmaxmissed 25

set tghintchar
Set the character to be used as a placeholder in hints.

  Example: set tghintchar "@"

set tgtimehint
Set the time, in seconds, between one hint and the next.

  Example: set tgtimehint 30

set tgtimenext
Set the time, in seconds, between a correct answer, unanswered or
skipped question and asking the next question.

  Example: set tgtimenext 10

set tgcongrats
Set a list of phrases to pick from when someone answers a question
correctly. This must be a TCL list as shown in the example.

  Example:
    set tgcongrats [list "Congratulations" "Well done" "Nice going"]

set tgnobodygotit
Set a list of phrases to pick from when a question goes unanswered.
This must be a TCL list as shown in the example.

  Example:
    set tgnobodygotit [list "Nobody got it!" "Hello? Anybody home?"]

set tgtrythenextone
Set a list of phrases to pick from when a question goes unanswered
and another question is about to be asked. This must be a TCL list
as shown in the example.

  Example:
    set tgtrythenextone [list "Try the next one..." "Next!!!"]

set tgusebold
Set whether to use bold in messages (1) or not (0).

  Example: set tgusebold 0

set tgcmdhelp
Set the /msg keyword for giving help. The bot will send help text
to someone if they type /msg botnick &lt;this&gt;.

  Example: set tgcmdhelp "triviahelp"
           -- will make the bot respond to /msg botnick triviahelp

set tgcmdstart
Set the channel command used to start the game.

  Example: set tgcmdstart "!start"

set tgflagsstart
Set the flags required to use the start command according to the
new flag system where the first flag is global and the second is
channel specific (to the channel you set in set tgchan).

  Example: set tgflagsstart -|-

set tgcmdstop
Set the channel command used to stop the game.

  Example: set tgcmdstop "!stop"

set tgflagsstop
Set the flags required to use the stop command according to the
new flag system where the first flag is global and the second is
channel specific (to the channel you set in set tgchan).

  Example: set tgflagsstop o|o

set tgcmdhint
Set the channel command used to give a hint.

  Example: set tgcmdhint "!hint"

set tgflagshint
Set the flags required to use the hint command according to the
new flag system where the first flag is global and the second is
channel specific (to the channel you set in set tgchan).

  Example: set tgflagshint o|o

set tgcmdskip
Set the channel command used to skip the current question, if any.

  Example: set tgcmdhint "!skip"

set tgflagsskip
Set the flags required to use the skip command according to the
new flag system where the first flag is global and the second is
channel specific (to the channel you set in set tgchan).

  Example: set tgflagsskip o|o

set tgcmdreset
Set the msg command used to reset the score table.

  Example: set tgcmdreset "reset"

set tgflagsreset
Set the flags required to use the reset command according to the
new flag system where the first flag is global and the second is
channel specific (to the channel you set in set tgchan).

  Example: set tgflagsreset n|n

set tgcmdlookup
Set the msg command used to lookup a person's score.

  Example: set tgcmdlookup "score"

set tgcmdtarget
Set the msg command used to lookup the score of the person
ranked one above you.

  Example: set tgcmdtarget "target"

set tgcmderror
Set the msg command used to report errors in questions and/or
answers.

  Example: set tgcmderror "error"

set tgerrremindtime
Set the time, in minutes, between channel reminders of how to
report an error.

  Example: set tgerrremindtime 15

======================================================================

Latest News

27 Dec 2018 Eggdrop v1.8.4 Stable Release 22 Dec 2018 Eggdrop v1.8.4 Release Candidate 3 15 Dec 2018 Eggdrop v1.8.4 Release Candidate 2 12 Dec 2018 Eggdrop v1.8.4 Release Candidate 1 04 Feb 2018 Eggdrop v1.8.3 Stable Release 13 Jan 2018 Eggdrop v1.8.3 Release Candidate 2

Resources

Eggdrop Community Forum Download Eggdrop Eggdrop Set-up Using your Eggdrop Enhancing Eggdrop Eggdrop Tcl Commands Eggdrop 1.8.3 Documents Eggdrop Config File Unix Shell Commands
Donate Help TclArchive.org with server costs. By donating, you help keep these scripts available to everyone. PayPal

© 2015 - 2025,  Greenwood Web Design