Tat's Trivia Bot v3.38

http://tatarize.com/trivia.htm
To check for latest version.

To use this trivia bot, simply put the files in your mIRC directory.
At the status window type:

/load -rs trivscript.mrc

That'll start it up.

Goto Commands, Trivia, options, and set the options as you require.


General:
Channel: Not truely needed to be set in options. Commands, set channel will set the current channel as the trivia channel.
Scores: Use what file to define specific scores for the channel set.
Question: Specify the question.txt
Additions: This file is a sort of drop file for suggestion on new question by patrons.
Report: Close to the additions but different file (could specify the same) for problems with questions.
Delimiter: The character that seperates questions from answers in the questions file.
Directory: Directory that the files (Question, Additions, Report) reside in.

Options:
Echo Answer: Would you like to cheat? Morally you should leave this off if your going to play.
Join Message: Allows you to enable an on join message to tell people that the trivia script is enabled.
Autostart: Automaticly start the bot when you join the trivia channel.
Auto-Hint: After (Before Auto-Hint) seconds it will automaticly give the room a hint if engaged.
Crosshatch Hint: Rather than Hint: John F. K   enabling this feature allows for Hint: John F. K#######
Msg !responces: Forces all messages relayed to a user to be displayed to the entire room.
Champ Mode: Resets scores and records when somebody exceeds the champ goal. Places that person on a pedistule.
Answer Timeout: Allows the answer to be provided when the question times out.
Traditional Win: Sometime you might want to ditch all the techno garble. This is one step in that direction.
Say Scramble: For scramble questions this allows for an introduction to take the place of where the category would usually go.
Msg !hint: Like Msg !responces it displays hint responces to the entire room. !vowels, !last, !hint, !words
Answer Space: Right after an question is asked the spacing for the answer is displayed.
No Mid-Match: Prevents an answer that is contained completely in a large set of text to be taken. 1 2 3 would be accepted for the answers 1 or 3 but 2 would not be excepted.
Scatter Hint: Rather than displaying the first characters left to right, it randomly displays them.
Show Matched: By default, after an answer is accepted the first, most valid, responce is displayed. This overrides that and displays the answer which was matched inside the different answers.

Hint Character: Allows a hint character to be specified as whatever you choose.
NOTE: Using # can cause errors as it is sometimes taken to mean the channel name by mIRC.
No-activity off: After a set number of questions the bot turns itself off.
Hint-Pause: After a person requests a hint it refuses to take a correct answer for a giving amount of time.


Defaults:
Primary Color: Color of important text.
Secondary Color: Unimportant text.
B & U: These make the color that the color is next to either (B)old or (U)nderlined.
Background1: Background color for the text.
Background1: Background color for the secondary text.
Before Start: Lag in seconds between start and first question.
Beween Questions: If the question was answered or the question timed out different amount of lag can be applied.
Given to Answer: Amount of time before the question times out.
Before '!hint' allowed: To combat people who want a !hint before they finish reading the question
Default Round: If nobody specifies how long they wish the round to be by using a command such as !trivia 10 this is how many questions are done in the round.
Champ Goal: The goal amount before reset so long as Champ Mode is engaged.

Teams:
When somebody does the command !trivia team, team mode begins. With a default number of questions in the round. 
Team 1: This specifies the name of Team 1.
Team 2: Name of team 2.
(Team 3): Name of Team 3. If used.
(Team 4): Name of Team 4. If used.
Tied message: If at the end of the round if any number of teams are tied for first place.
Team 1 victory message: Message displayed if team 1 wins.
Team 2 victory message: Message displayed if team 2 wins.
Team 3 victory message: Message displayed if team 3 wins.
Team 4 victory message: Message displayed if team 4 wins.
For example to make the team 1 victory message: 

"Team 1 soundly whoops the butts of Team 2".
"*t1 soundly whoops the butts of *t2". 

The *t1 and *t2 are replaced with Team 1's and Team 2's names.
Limit Join Period: You can choose to limit the amount of questions which a person must have joined a team by. Or simply leave it not depressed and have no limit.

Award:
Award messages play when a person in any given game gets a streak of however many questions or their score hits a disired amount. All the entries have the same format. The line is displayed in the box and * is replaced with the nick of the person and ^ is replaced with either the row they hit for the award or the score they hit.
"pats * on the back for getting ^ questions in a row." becomes "pats Nick on the back for getting 3 questions in a row."

The special command is powerful. You can use the internal commands inform and tsay to message through notice or trivia channel say.

It issues: (Special command)
Row E.G. 10; -;/kick $nick
Would kick a person for getting a row of ten.
Score E.G. 1000; -;/topic $chan $e1($nick) $e2(broke) $e1(1000) $2(points!)
Would set the topic to the message when somebody breaks 1000 points.

Use $nick to mean the person who won.
Use $chan to mean the current channel.

Avoid using command like "/me grins" as it refers to current chan which could change while you're looking elsewhere and screw up. Rather, use "/describe $chan grins." for this.
To notice somebody you can use the trivia bot's internal command "inform" or to message the channel "tsay"
If you want something in color surround what you want in color with $e1(Text) or $e2(Text) depending on with color you want. These refer to internal script commands and will act as such. trivia.award $nick <score> should be done to give points. Please note it will choose the correct message awarded or deducted.

Commands.
Allows you to disable most any feature you don't want to use. Including most !commands, spell fixing, awards, and themes. One should not that the spell fixing is very helpful and without it only EXACT matches would be accepted.

Themes dialog.
Allows certain !themes to be added, the themes themselves are rather simple, when set they allow for a different number or questions, question file, and an option to use team mode with this theme.
To be accessed, for example if you allow a scramble theme to use the scramble.txt question list provided with this release.
!trivia scramble, by a patron or yourself would start it up with the scramble.txt question file.
Add button, adds a theme, you shall be prompted for name, round, questionfile, and whether you'd like this to be a team game.


Patron commands:
Command ----------- Function
!help ------------- Provides help on the commands to the patron.
!strivia ---------- Stops trivia
!trivia ------------ Starts trivia.
!trivia x --------- x must be a number. 
!trivia Unlimited - For an unlimited question round.
!trivia Team ------ For team mode.
!trivia Team # ---- For a specified sized team game.
!hint ------------- Gives a hint
!vowels ----------- Gives the vowels of the answer.
!last ------------- Gives the last letter of the answer.
!words ------------ Gives the number of words in the answer.
!join x ----------- Joins a team, must be in team mode, x can be a 1 or 2 or (3 or 4) in 4 team mode.
!add -------------- Allows patrons to add questions
!report ----------- Lets you report problems with the questions
!triviaping ------- Checks the lag from the bot
!version ---------- Displays the version of this bot
!hof <unit> <time>- Displays the hall of fame, for <score|streak|time|wpm> of time <day|week|month|year>
!hoffast ---------- Displays speed hall of fame
!hofstreak -------- Displays streak hall of fame
!hofwpm ----------- Displays words per minute all of fame
!hofscoreday ------ Displays top scores for the day.
!hoftimeday ------- Displays top times for the day.
!hofstreakday ----- Displays top streak for the day.
!hofwpmday -------- Displays top words per minute for the day.
!hofscoreweek ----- Displays top scores for the week.
!hoftimeweek ------ Displays top times for the week.
!hofstreakweek ---- Displays top streak for the week.
!hofwpmweek ------- Displays top words per minute for the week.
!hofscoremonth ---- Displays top scores for the month.
!hoftimemonth ----- Displays top times for the month.
!hofstreakmonth --- Displays top streak for the month.
!hofwpmmonth ------ Displays top words per minute for the month.
!hofscoreyear ----- Displays top scores for the year.
!hoftimeyear ------ Displays top times for the year.
!hofstreakyear ---- Displays top streak for the year.
!hofwpmyear ------- Displays top words per minute for the year.
!promotion -------- Displays next military promotion and points needed for it
!server ----------- Displays the bot's server
!record(s)--------- Displays the record time and streak
!champ ------------ Displays the champ
!pause ------------ Pauses the current round.
!resume ----------- Resumes the current round.
!repeat ----------- Repeats the question
!next ------------- After half the time has expired allows a person to timeout the question early.
!themes ----------- Displays available themes
!stat(s) ---------- Returns the patron's current rank, score, best time, best streak.
!stat(s) <name> --- Allows !stats for other players.
!stat(s) # -------- Allows the bot to call the stat of a specified rank.

Op Commands:
!op find <text> - Finds text.
!op add <question*answer> - Adds a question and directly to the main question file.
!op ban <user> - Bans a user.
!op unban <user> - Unbans a user.
!op ask <#> - Asks given question.
!op banned -- Lists banned individuals
!op enable ---- Enables the bot.
!op disable --- Disables the bot.

Categories:
general questions...
#general
sports questions...
#sports
animal questions...
#animal
The categories work like so, determining the category by the closest #category at the bottom.

Features:
Answer hashing routine to fix some typos. It's trivia not a Spelling B. Auto-enabled.
Options dialog to quicky adjust the settings on the bot.
Team mode; when somebody types "!trivia team"
Choice between 2-team and 4-team game.
Customizable team mode end messages to allow you to set up themes to your trivia bot.
Question logging to stop any question from repeating itself in a round.
Advanced high score ranking system that allows anybody to know their rank (!stats) out of hundreads of scores.
Flawless sorting of the high score entries.
Scores based on Streak, Time, Words per minute and of course Score.
Customizable award triggers, messages, and commands for most events on the bot.
Allows unlimited question rounds.
Allows an infinate number of secondary answers.
Unlike other trivia bots this one allows the trivia bot itself (you) to play.
Scramble: Jumble-like play. Could make the entire bot do scrambles by making the entire question file like "Scramble*Hi All"
Total: Give every responce to given category. Question format: "Total: integers between 2-7*3*4*5*6"
Multi: Pick the answer out of a multiple choice entry. Question format: "Multi: 2 + 2 =*1*2*3*4*5*6"
Bonus: Allow certain questions to be worth an given number of points. Question format: "20: Pi (to 4 after decimal)*3.1415"
Themes: Let you're people choose what type of game they play.
HTMLBuild: Allows automatic score update to the web.
Day, Week, Month, Year high scores for score, time, streak, wpm


Fixes in 3.38
Fixed ends with 's' fix bug
Fixed a ping reply spam exploit, thanks Langly.
Trivia build dialog updated.
Updated trivia theme dialog.
Fixed no color room automaticly strip for describes
Hide Stats: score, time, streak, WPM. Prevents giving info on given stat.
Answer in other channels breaks streak, fix.
Added option for exactmatch, "No Partial Match"
Fully Implemented limit guess.
Added option to turn off color shortening.
Added option to turn off the decheater feature. MSN users take note.
Added option to turn the categories off.
Added option to turn the Bonus questions off. Caused stray questions worth thousands of points.
Added say Hint number.
Added no question number feature.
Web site was actually listed wrong, sent to web.dreamsoft.com
Added choice for first hint type. Random includes some special random only hint starts.
Added option to turn the bot off if the room is empty.
Added !promotion command, military rank and rank in game.
Instanced new method for translation files.
Welcome message editing
Trivia <number> when trivia <number> disabled.
Turned category color primary, !hof name colors primary. Messed with translation.
Added time limit for between pings.
Added month, week, day, and year stats. !hof <score|streak|time|wpm> <day|week|month|year>
Revamped Channel networks/Channel nick use. Now allows better multi-channel settings. Uses wildcards.
!hof for nonexisting table, returns warning message.
1st, 2nd, ect. now processed by translation matrix.
HTML build revamped, now should be able to do anything on trigger.
Deleted vmerge feature. It sucked, and the time complexity for the wildcard matches was way too high.
Added command "/tfind" to allow people to find the names vmerge would find and do virtually.

Fixes in 3.3
Trivia html file build to a specific directory. Type /htmldir to change it, For now.
Spam ping fix, now prevents !triviaping spamming
Fixed setvar bug, which started messing up lastwin
Autodecolor based on +c in channel.
Fixed letters in hints don't use european letter concepts.
!state return current state in round and number of seconds left.
Globalized e1 and e2, so other script may use them.
Fixed an error in the decheater which overwrote other $chr(160) replacements giving only one replace max.
Fixed an odd bug which stopped the multifiles thing from actually working.
Repaired an error in !next

Fixes in 3.29
Created Option to turn off Vmerge.
Auto started "NoVmerge" in on position.
Corrected a bug which caused a failed character creation.
Corrected a few more bugs in reference to vmerge.

If there is a feature that you would like to see added *please* e-mail me.
Any questions, comments, bugs or compliments; e-mail me at:
-    DragonRib@yahoo.com

Good Luck.
