Manual And Command Reference
For Nerfbendr’s Triviabot v6.0 Beta
Demo and Registered Version
(Written on March 31st, 2001)
(Revised for v6.0 on July 9th, 2002)

Contents

Prelude: What’s under the hood of v6.0 Beta!
Section I: Triviabot Setup
Section II: Commands
Section III: Notes About Trivia Banks
Section IV: Command Quick Reference
Section V: Triviabot FAQ
Section VI: Notes about the FTP’ing of Webscores
Section VII: Ordering the Full TriviaBot or more Trivia Banks!

This Manual and Eggdrop script is ©Copyright 2002 by Shawn Roles (Nerfbendr)

E-Mail: Nerfbendr@hotmail.com any questions, ideas, concerns, comments, etc...(You can also find me in #Chat_Central on Undernet!)

Visit my Websites for the latest news, info and downloads of various Eggdrop Channelgames I’m working on at http://nerfbendr.cjb.net

(If you didn’t get this off my official site above, go get it now!)
Prelude: What’s Under the Hood of v6.0 Beta!

This might be easier to answer if it was ‘What ISN’T under the hood of v6.0 Beta?’,  and to help prove this all the current features (Both New and previously existing features) are listed below:
New Features: (Introduced officially as of v6.0)
-	Team Trivia is Now Available and completely configurable as to how it operates
-	Maximum Number of Teams can be anywhere between 2-10 (Most Team TriviaBots
       have a Maximum of 4…hardly enough for the true hardcore trivia fans!) ;)
-	Maximum Players Per Team can be anywhere between 1 and unlimited!
-	Points To Win a Team Game can be anywhere from 1 to unlimited!
-	Team Trivia Games can last anywhere between 1 minute to unlimited!
-	Team Trivia Players will be auto-removed if they leave the channel and don’t use the !remove command!
-	Team Trivia Scores Are Randomly Displayed between Trivia Rounds!
-	Time Remaining in a Team Game is Randomly Displayed During the Game if the ‘Unlimited’ option hasn’t been selected, plus if there is 5 minutes or less remaining the bot will always display the remaining time between rounds!
-	EVEN MORE streamlining and re-coding to make the bot far more responsive and less ‘evil’ regarding cpu hogging on a shell.
-	If nobody answers the question correctly in either Team Mode or Normal Trivia, the bot gives itself  a point for outsmarting everyone! (Think of it as a little ‘Beat-The-Bot’ Mode) ;)
...AND BEST OF ALL... 
- YOU CAN HAVE TEAM TRIVIA ACTIVE AND SINGLE PLAYERS CAN STILL PLAY AND ENJOY THEIR USUAL TRIVIA FIX AS USUAL...PLUS ALL TEAM PLAYERS NOT ONLY WIN POINTS FOR THEIR TEAM BUT STILL CONTINUE INCREASING THEIR PERSONAL SCORES = TEAM TRIVIA AND INDIVIDUAL TRIVIA EXISTING TOGETHER IN TOTAL HARMONY = ALL YOUR PLAYERS GET THE BEST OF BOTH WORLDS! ;)
New Features added between v5.6-v5.9:
-	The TriviaBot now features a built-in ScrambleBot mode and has it’s own individual settings in the Triviabot’s config file! (The Triviabot can either run as a pure Triviabot, pure ScrambleBot, or a mix of the two with percentage settings to decide which mode will be played for each round!)
-	The ScrambleBot has it’s own personal settings regarding colors, banks to use, etc, etc…
-	The Triviabot now accepts multiple answers to a question if your trivia banks contain more than one answer to a question! (Configurably enabled/disabled)
-	An experimental mode has been added for the bot to accept ‘close’ answers! (Configurably enabled/disabled) [THIS IS STILL IN TESTING…YOU’VE BEEN WARNED!]
-	Bonus points are given to players that have ‘winning streaks’ (Completely Configurable)
-	Bonus point Trivia can be enabled in the config file to grant bonus points for Trivia (And Scrambles) that have lengthier answers if desired!
-	Hint Modes now include Letter Hints, Vowel Hints (Full version only!), Scrambled Hints (Not in Scramble mode of course…*Grin*) and Reversed Hints…all configurable for which hint types you want enabled/disabled!
-	ALL settings for the Triviabot are now contained in the Config file of the Triviabot (Advertisements and other previous items that were contained in the top section of the Triviabot tcl are included in this change!)
-	The Triviabot now randomly displays the top X players for either the day, week, month, year, yesterday, last week, last month, last year and top streakers between rounds…all completely configurable as to which displays you would like to have in your channel!

Previous Features: (Introduced as of v5.5)
-	It runs using a config file for people’s main triviabot settings! (So any/all bugfixes and updates should only require a replacement of the tcl file…no re-editing your settings each time!) 8)
-	Settings can now be changed, uploaded to your triviabot, and then can take effect via a command used by the triviabot owner even while the triviabot is running!
-	User host protections are now on all the main and necessary commands…so people can’t take your nick and mess with your triviabot commands!
-	REALLY bad bug that was caused by one of my timer variables that would crash the bot if it was being used in a channel with ‘Trivia’ in its name…didn’t even see that glitch coming…ironic one though…8)
-	The tracking of Already Asked Questions is now an optional setting due to it being too intense on some shells and they would kill the bot!
-	Point Value Decreases in a round are now configurable!
-	Point Value Decrease when a hint is used is now configurable!
-	MAJOR re-vampments of scoring procedures…unfortunately, these changes will affect previous scores…most should be ok, but some people will lose their scores…best bet would be to delete all scores in all directories and start the new triviabot with a clean slate! (Sorry!)
-	Top Ten Scores of ANY week can now be viewed using the !weektop10 command!
-	Automatic and manual uploading of web and text scores to your website!
-	Made the automatically created score webpages a LOT nicer to look at!

Hope you like the new Triviabot!
Sincerely,
Nerfbendr!

Section I: Triviabot Setup
1) UNZIP the archive! (If you haven't, you’re probably not reading this!) ;)
2) Copy all the directories into your bot's main directory (Eggdrop?), and
    place the .tcl script into the Scripts directory of your bot!
3) Doublecheck and ensure that the 'DemoBank.qst' and ‘ScrambleWords1.qst’ Trivia
    and Scramble Banks are inside the 'TriviaBanks' directory!

Next, there should be a file in the main directory of your eggdrop called ‘Triviabot_Config.txt’…this is the file where the triviabot’s settings are contained!
It should be pretty self-explanitory as to what-does-what in it in the file so I won’t go into HUGE detail here about every little thing…

The triviabot will create some needed files at times…below is a quick description of them:
“Config_Output.txt” – Debug file when the TriviaBot reads your config file!
			 (Remember to attach this file to an e-mail if there’s a problem!)
“AlreadyAsked/QuestionInUse.txt” – An info file on the Question Currently In Use!
			 (If your bot is hanging, use this file to see what question was in use!)
"AutoVoicedUsers.txt" - Contains All Users That The Bot Will Autovoice!
"TriviabotErroredQuestions.txt" – Reported Trivia Errors go in this file!
"TriviabotUserComments.txt" - All User Comments go here!
"TriviabotUserQuestions.log" - Tells you who left which Trivia questions!
"TriviabotUserQuestions.txt" - Contains all added user Trivia Questions!
"TriviaDeletions.log" - Tells you who deleted which questions!
"TriviaDeletions.qst" - The bot uses this one for ignoring deleted questions!
"TriviaEditedQuestions.txt" - The Triviabot uses this file for using edited Trivia questions!
"TriviaEditedQuestions.log" - Tells you who edited what trivia question!
"TriviaVoicedUsers.txt" - The bot records who gets autovoiced with this file!
"TriviaBankTotals.txt" - This file contains all totals of your trivia banks, plus your total 
     amount of trivia overall! The bot uses this file to make a lot of 
     things it has to do *MUCH* faster since it doesn't have to
     continually count out your trivia all the time!
########################################################################
The directories should be pretty much self-explanitory from their names:
"AlreadyAsked" - Contains all the info on questions already asked so far!
"GenericScoresHTML" - Web Page versions of constantly updated scorefiles!
"GenericScoresTEXT" - As above, but in normal text form!
"HTMLxxxxScores" - Directories for Daily/Weekly/Monthly/Yearly Scores as Web Pages! 
"TriviaBanks" - Place all your Trivia Question Banks in here!
"TriviaxxxxScores" - Directories for Daily/Weekly/Monthly/Yearly Scores in text form!
“TeamTriviaScoresHTML” – Web Page versions of Team Trivia Scores!
“TeamTriviaScoresTEXT” – As above, but in text form!
########################################################################
Aside from placing the directories, script, and editing the config file it should be otherwise all ready to run!
**REMEMBER to run the ‘recount’ command when you change any trivia quantities!**
########################################################################
Section II: Commands
Public Commands                   		     Summary			Page#
!TeamTrivia					Starts/Stops Team Triva			10
!Join						Join a Team In Team Trivia		10
!Remove					Leave a Team In Team Trivia		10
!Stats						Display Stats For All Active Teams	10
!trivia						Starts Normal Trivia			6
!trivquit					Stops Trivia				6
!next						Requests Next Question			6
!won						Shows User’s Stats			6
!rank						Displays Rank of User			6
!repeat						Shows Current Question			6
!hint						Gives a  hint				6
!help						Shows Help Menu			6
!server						Shows Server Bot Is On			6
!error						Reports a Trivia Error			6
!top10fastest or !toptenfastest			Shows Top 10 Fastest Players		6
!top10streakers or !toptenstreakers		Shows Top 10 Longest Streaks		6
!lastanswer or !last				Shows Previous Answer			7
!daytop10 or !daytopten				Shows Daily Top 10			7
!weektop10 or !weektopten			Shows Weekly Top 10			7
!top10, !topten, !monthtop10 or 			Shows Monthly Top 10			7
!monthtopten	
!yeartop10 or !yeartopten			Shows Yearly Top 10			7

Messaged Commands
Adjust						Adjusts a player’s score			8
Add						Add Trivia To The Bot			8
Changetopic					Make The Bot Change The Topic		8
Check						Check A Trivia Question(*)		10
Comment					Send A Comment To The Bot		8
Delete						Delete A Trivia Question(*)		10
Edit						Edit A Trivia Question(*)		10
Reconfig					Reloads your triviabot config         	8
Recount						Recounts All Available Trivia		8
Swapbank					Change The Trivia Bank In Use		9
Transfer					Transfers scores between players   	9
Trivreset					Clear ‘AlreadyAsked’ Trivia Files	9
Update						Manually sends scores to webpage 	9

(*) = Remote Editor Commands! Make these commands available to users that
        help moderate your trivia!

Section II: Commands 

!Trivia		Starts Trivia!

!Trivquit	Stops Trivia!

!Next		Requests the Next Question! Use of this command means you forfeit
		any guesses and use of the !Hint command for the duration of the
		current round!

!won		This command displays a player’s trivia stats in-channel!
		The stats include the player’s daily, weekly, monthly and yearly scores
		PLUS their highest winning streak, and their fastest answer time and
		How many times they’ve matched it!
		If a nick is given after the command (!won Nerfbendr, for example!),
		It will display the stats of that specific player!
		** NOTE ** The !won command is CASE-SENSITIVE!!!
		(nerfbendr does not equal Nerfbendr!)

!repeat	Repeats the current question in play!

!hint		Gives a hint to the answer of the current question!
		The amount of letters given, number of times per round and point
		Drop value per usage of this command are all set in the config file!

!help		Privately shows the Help Menu to the User!

!server		Displays the Server the Bot is on!

!error		Reports an Errored Question to the Triviabot!
If no number is given, the bot displays the syntax for this command! 
(Syntax is ‘!error QUESTION NUMBER’, like ‘!error 5000’)

!top10fastest	Displays the Top 10 Fastest Trivia Players!

!top10streakers Displays the Top 10 Longest Winning Streaks!

!lastanswer 	Displays the answer to the previous Trivia Question!

Section II: Commands 

!daytop10	Displays the current day’s Top 10 to the user!
		This command will also let you check on ANY Top 10 scores
		Of ANY day it’s been running. The syntax for it is displayed
		When someone uses this command. The syntax is:
		‘!daytop10 MONTH DAY YEAR’
		(‘!daytop10 aug 22 1999’ will show the Daily Top 10 Scores
		  for August 22nd, 1999!)

!weektop10	Displays the current week’s Top 10 to the user!
		This command can also display the previous week’s Top 10!
		(The syntax is ‘!weektop10 lastweek’)
*** NEW TO VERSION 5.5 BETA: This command can now
		view the scores from ANY week by using a week number from 1-52!
		(!weektop10 52 will display the top 10 for the last week of the year!)

!monthtop10	Displays the current month’s Top 10 to the user!
		This command will also let you check on ANY Top 10 scores
		Of ANY month it’s been running. The syntax for it is displayed
		When someone uses this command. The syntax is:
		‘!monthtop10 MONTH YEAR’
		(‘!monthtop10 aug  1999’ will show the Monthly Top 10 Scores
		  for August, 1999!)

!yeartop10	Displays the current year’s Top 10 to the user!
		This command will also let you check on ANY Top 10 scores
		Of ANY year it’s been running. The syntax for it is displayed
		When someone uses this command. The syntax is:
		‘!yeartop10 YEAR’
		(‘!yeartop10 1999’ will show the Yearly Top 10 Scores
		  for 1999!)

Section II: Commands 

** NOTE: The following commands are MESSAGED to the triviabot! **

Adjust		This command is used to increase or decrease someone’s score!
		As of 6.0, you can specify the change to only be in the day, week, month
or year! If no specific score section is specified the bot defaults to adjusting
all of them…please note that no score can be adjusted below 0!

		Usage: ‘/msg BOT adjust NICK POINTS DAY/WEEK/MONTH/YEAR’
		Example: ‘/msg Jigglypuf adjust Nerfbendr 50’
		Example: ‘/msg Jigglypuf adjust Nerfbendr –50’
		Example: ‘/msg Jigglypuf adjust Nerfbendr 50 DAY’
		Example: ‘/msg Jigglypuf adjust Nerfbendr -50 MONTH’

Add		This command lets users send Trivia Questions to the Triviabot!
		It stores questions in ‘TriviaBanks/TriviaAdditions.txt’, so it doesn’t
		mess up your actual Trivia Questions!
	
Usage: ‘/msg BOT add Question*Answer’
		Example: ‘/msg Jigglypuf add What color is the sky*blue’

Comment	This command lets users send their thoughts and comments to the
		Triviabot! It stores them in ‘TriviaBotUserComments.txt’ for you
		To look at later!

 	Usage: ‘/msg BOT comment YOUR COMMENT’
		Example: ‘/msg Jigglypuf comment I love your channel!’

Changetopic	This command lets you (and users you allow usage of it to) change
		the channel’s topic via the Triviabot if the bot is Opped!
		It randomly selects a left and right border for the topic as well
		to make it more colorful and noticeable when people see it in a
		Channel list. If no topic is given, the bot uses a random Trivia Ad
		And places it, along with the number of Trivia Questions you have,
		In the topic!

 	Usage: ‘/msg BOT changetopic YOUR TOPIC’
		Example: ‘/msg Jigglypuf changetopic Welcome to the Channel!’

Reconfig 	This command reloads the triviabot config file so any new changes to
		It will take affect without requiring a shutdown of the game!

		Useage: ‘/msg BOT reconfig’

Recount	Updates the bot’s totals of all your trivia! Without this command,
		The bot won’t recognize or use any new banks or triva questions
		You have added to it! **VERY IMPORTANT COMMAND**

 	Usage: ‘/msg BOT recount’
		Example: ‘/msg Jigglypuf recount’

Section II: Commands 

** NOTE: The following commands are MESSAGED to the triviabot! **

Swapbank	Makes the bot swap triviabanks! Useable even while the bot is running! Mainly for ‘Theme Nights’ on specific banks, plus if
	You type ‘random’ in place of a trivia bank name, the bot swaps
	Into ‘Random Mode’ where it uses ALL your trivia banks!

 	Usage: ‘/msg BOT swapbank YOUR BANK’
		Example: ‘/msg Jigglypuf swapbank General.qst’

Transfer	Transfers scores from one user to another! If the user the scores are
		Being transferred to already has scores, the transferred points are
		Added to their total!

		Usage: ‘/msg BOT transfer FROMPLAYER TOPLAYER’
		Example: ‘/msg Jigglypuf transfer Nerfbendr ScrappyDo’

Trivreset	This command lets you reset the ‘AlreadyAsked’ file of a
		Trivia Bank, so all the Trivia in that Bank will now be used
		Again!

 	Usage: ‘/msg BOT reset YOUR BANK’
		Example: ‘/msg Jigglypuf reset General.qst’

Update	This command is used to manually update your webpage with the
		Latest text an web scorefiles! By placing ‘all’ after update, this
		Command will update your website with ALL existing text and web 
		Scorefiles!

		Usage: ‘/msg BOT update’
		Example: ‘/msg Jigglypuf update’
		Example: ‘/msg Jigglypuf update all’

Section II: Commands 

** NOTE: The following commands are MESSAGED to the triviabot! **

Remote Trivia Editor Commands

Check		Lets you view a specific Trivia Question!
		If no question number is given, a list of currently reported
Errored questions is shown to the user!
If ‘reset’ is used in place of a question number, it will reset
The Errored Trivia File!

 		Usage: ‘/msg BOT check QUESTION NUMBER’
		Example: ‘/msg Jigglypuf check 5000’

		Usage: ‘/msg BOT check reset’
		Example: ‘/msg Jigglypuf check reset’

Edit		Lets the user remotely edit a trivia question!
		Don’t worry! The edits are maintined in a separate file,
		And the triviabot checks to see if an edited version of a
		Question exists in that file…if so, then the edited version is used
		In place of the original question. So your actual trivia banks
		Stay totally safe!

 		Usage: ‘/msg BOT edit QUESTION NUMBER Q*A’
		Example: ‘/msg Jigglypuf edit 5000 What color is the sky*blue’

Delete		Lets the user remotely delete a trivia question!
		Deletions are kept in a separate file. The triviabot checks to see
If a question is ‘deleted’. If so, it picks another. Your actual trivia banks stay totally safe!

 		Usage: ‘/msg BOT delete QUESTION NUMBER’
		Example: ‘/msg Jigglypuf delete 5000’

Team Trivia Commands 

!TeamTrivia	Starts/Stops Team Trivia!
 		Usage: ‘!TeamTrivia’

!Join		Lets you Join a Team If Team Trivia Is Playing!
Usage: ‘!Join COLOR’
		Example: ‘!Join Blue’

!Remove	Removes yourself from a Team in Team Trivia!
		(Please note that you can ONLY remove yourself from a Team!)
		
 		Usage: ‘!Remove NICK’
		Example: ‘!Remove Nerfbendr’

!Stats		Displays the current scores, team sizes, and players on all active teams!
		Usage: ‘!stats’

Section III: Notes About Trivia Banks

NOTE: Any Trivia That Is Designed For This Triviabot Has Already Had The Changes Below Done...Make These Changes To Your Own Trivia Banks or New Questions You Add!

-	Search and Replace all " to ' ...it interferes with the non-piracy  code and causes
problems...8(

-	Make sure there are NO QUESTION MARKS as they will stop the bot if it finds one in 
either the trivia question or in it's answer! (Search/replace them out is the easiest way!)

-	Questions seem to cut off around 140 characters with the anti-piracy code running!
Personally, I try to keep my questions around a max of  120 or so characters long...you
may not have this prob...'tis jus' a quirk that seems t'happen on my side if a 
reallyreallyreally long  question appears and I have the Anti-Trivia-Theft code on...8)

Section IV: Command QuickReference
Public Commands                   		     Summary				
!trivia						Starts Trivia
!trivquit					Stops Trivia
!next						Requests Next Question
!won (nick)					Shows User’s Stats
!rank (nick)					Shows Rank of a User
!repeat						Shows Current Question
!hint						Gives a 3-5 letter hint
!help						Shows Help Menu
!server						Shows Server Bot Is On
!error	(question number)			Reports a Trivia Error
!top10fastest or !toptenfastest			Shows Top 10 Fastest Players
!top10streakers or !toptenstreakers		Shows Top 10 Longest Streaks
!lastanswer or !last				Shows Previous Answer
!daytop10 or !daytopten				Shows Daily Top 10
!weektop10 or !weektopten			Shows Weekly Top 10
!top10, !topten, !monthtop10 or 			Shows Monthly Top 10
!monthtopten
!yeartop10 or !yeartopten			Shows Yearly Top 10

Messaged Commands
/msg BOT Add Question*Answer			Add Trivia To The Bot
/msg BOT Adjust NICK POINTS	 (DWMY)	Adjust’s NICK’s score by POINTS points
/msg BOT Comment YourComment		Send A Comment To The Bot
/msg BOT Check QuestionNumber		Check A Trivia Question(*)
/msg BOT Changetopic YourTopic		Make The Bot Change The Topic
/msg BOT Delete QuestionNumber		Delete A Trivia Question(*)
/msg BOT Edit QuestionNumber Q*A		Edit A Trivia Question(*)
/msg BOT Reconfig				Re-loads your triviabot’s config file
/msg BOT Recount				Recounts All Available Trivia Banks!
/msg BOT adjust NICK POINTS			Adjusts NICK’s Scores by POINTS
/msg BOT Swapbank BankName			Change The Trivia Bank In Use
/msg BOT Transfer NICK1 NICK2		Transfers scores from NICK1 to NICK2
/msg BOT Trivreset BankName			Clear ‘Already Asked’ Trivia Files
/msg BOT update				Manually sends latest scores to website
/msg BOT update all				Manually sends ALL scores to website

(*) = Remote Editor Commands! Make these commands available to users that
        help moderate your trivia!

Team Trivia Commands

!TeamTrivia					Starts & Stops Team Trivia
!Join COLOR					Joins Team COLOR For Team Trivia
!Remove YOURNICK				Removes yourself from Team Trivia
!Stats						

Underlined Items = Change this part to what you’re doing! Don’t use it literally!

Section V: Triviabot FAQ
FIRST AND FOREMOST, IF YOU ARE USING ANY VERSION OF THE BOT BELOW THE LATEST RELEASED VERSION LOCATED ON MY WEBSITE YOUR QUESTION WILL BE IGNORED! THE LATEST VERSION CAN BE FOUND AT MY WEBSITE AT HTTP://NERFBENDR.CJB.NET AS WELL AS A ‘FAQS’ PAGE…IF YOU ARE USING THE LATEST VERSION CHECK THERE FOR YOUR ANSWER…IF NO LIGHT HAS BEEN SHED ON YOUR PROBLEM OR YOUR PROBLEM PERSISTS EVEN AFTER THE ABOVE HAS BEEN DONE THEN FOLLOW THE INSTRUCTIONS ON THE ‘FAQS’ PAGE AND E-MAIL ME IN THE MANNER SUGGESTED THERE…IF YOU DON’T TAKE THE TIME TO PROPERLY SOLVE YOUR OWN PROBLEM OR APPROPRIATELY E-MAIL ME ABOUT YOUR PROBLEM DON’T EXPECT ME TO TAKE THE TIME TO SOLVE IT EITHER!

Section VI: Notes about the FTP’ing of Webscores!

-	In order to use the Auto or Manual FTP ability, please ensure that you have all the info 
properly set up in the triviabot’s config file! (login, password, port, directory, etc, etc…)

-	Also ensure that the ftp command exists where your shell is otherwise it will not work!
(It can be found in the /usr/bin directory!)

-	***DO NOT*** try to use this with a WinEgg…this is made with unix shells in mind!
-	Make sure you unzip the ‘ForWebsite.Zip’ archive and send everything in it up to your website…also included is the ‘Scores.html’ webpage which links to all the various scorefiles and directories…simply add a link somewhere on your own website to this page and it should all work properly as long as directory viewing is allowed on your website and you’ve uploaded everything in it’s proper place!

Section VII: Ordering the Full TriviaBot or more Trivia Banks!

For information regarding TriviaBot Ordering, Trivia Bank Ordering, or ordering of other Eggdrop Channelgame scripts the latest and updated information can be found at my website at http://nerfbendr.cjb.net under the ‘Ordering’ section…in case there is any discrepancy regarding pricings for any items, the prices on the website are deemed correct!