Wednesday, May 27, 2015

Tat's Trivia Bot V.3.7

Tat's Trivia Bot v. 3.7

Added WPM questions.

WPM*The quick brown fox jumps over the lazy dog
WPM*What a todo to die today at a minute or two to two
WPM*The world beyond the stars is full of stumps.
WPM*The night is long and full of terrors
WPM*Winter is coming
What is the chemical symbol for gold=*Au

Fixed /ask command. It was wonky and I never realized till I tried to use it to test /ask WPM: This is a test of the trivia bot.

The added = formatting indicates that it should use exact mode. Which uses neither fix nor case insensitivity. This is also used for WPM questions Where failing to capitalize the letters results in a fail.

Added /openquestions as a secret command that opens the question file.


Sergio Martinengo said...

Hello, first of all, I appreciate the update, but the capitalize letter it's still not necessary, i'm using the question:

Symbol of Oxygen, and I input o instead of O and it works.

About the time of answer, I read your post and well, if you think you could add this option, like a little checkbox to "count repeated answers time and wpm", or someting like that.

Of course, when you got free time and you consider it's possible and not too complicated to do, it's not my intention to bother you at all, I wish I knew how to code this XD, haha

Anyways, to summarize, what I'm looking for is the the function of lower and upper case and the time of repeated answers.

Thank you!

Tatarize said...

Yeah, that kind of over specificity, would also *need* to be done per question, or could be added in as part of WPM mode. Though it's not like speed typing the symbols for elements is something people would be doing. The problem here is two fold. First, I auto correct with $lower on both sides. And secondly mIRC script is case insensitive anyway unless compared with === rather than ==. So not only will that modification require breaking $fix() for capital letters, it also requires an edit to the compare routine.

Tatarize said...

Actually, checking the code. I really use regex to the the checking. So it really is all the lowers. The main code is:

var %pick = $regex($lower($fix($1-)), $trivia.pattern)

With the relevant factors the $lower($fix($1-)) and the $trivia.pattern which builds a regex pattern to match acceptable answers on the fly, which is also fixed. Removed the redundant $lower commands and added in a setting to force a bypass of fix. In reality the place there with lower(fix()) and the part in trivia pattern if replaced with just $1- will suddenly become overly exact.

In any event, this isn't exactly a feature you'd always want on, because it would be annoying as hell. Unless you would. I'm thinking some kind of indicator in the question file. Or perhaps just a secret on and off switch, for people who might want such a silly thing.

Sergio Martinengo said...

Thank you for your reply, I couldn't understand much because of my lack of knowledge, so I'm not totally sure what you mean.

Haha, and I know it's kind of silly, we are just a community of 30 players, and we play on another platform instead of irc chat, but with all the features covered, irc would be the best option.

So, am I suppose to add something extra to the question in order to make it recognize capital letters?, for example, on the symbols, I want the first letter capitalize, and if they input on lower case, it won't be detected as a right answer.

I wouldn't mind about the indicator thing, actually, with the indicator is even better, that way I won't have to cover all the possibilities on topics where I don't require capital letters (for example, on world capitals, I don't mind if the capital of Spain is type MaDrId), but especifically on the word per minute questions (the ones where you have to type exactly the whole phrase), and for symbols, this would be great.

Besides that, in case it's possible, the thing about detect time on all the ansers for every user, and that would be it.

Not sure how complicated this is or if it takes too much time to do. Once again, thank you for your answer, and I'm sorry for all these questions and petitions.

Tatarize said...

In short, did you want this feature as an always on thing? Or would it suffice to say end your question with something like = to indicate you want the answer exact, for this particular question.

As is I have - as an end flag if memory serves that tells it to not include a ? at the end.

Tatarize said...

I should rather modify the WPM formatting anyhow. And make sure it provides a required exactness by default.

It should be:

WPM*What is the world coming to these days with the the onions and the the apples.

Rathers than require the question and answer in both parts.

Other alternative formats like:

Works that way.

And in that question type, require exactness and case sensitivity. And in others just let it it format with a = to indicate that you want that exactness on that question.

In fact, I'm going to pull the script and include those in 3.7.

Tatarize said...

Okay, pulled and restored. Lemme edit this thing to sweep under the rug the now defunct setup.

Tatarize said...

Okay, the topic here correctly identifies how to use those modes. And other people should be completely unaffected.

Golden Stewie said...

Number of questions: 9646
How do I increase the number of questions limit?
Thank you! Lovely program btw! :)

Tatarize said...

The number of questions isn't a limit, it's a count. That's how many questions are in the given question file. If you check the download site for the bot, there should be a directory for questions and a QBig one or something that has a couple hundred thousand or something. There's no hard-coded limit.

Sergio Martinengo said...

Hello how have you been? I was wondering if it was possible to add amount of rounds won, because we mostly played based on rounds. A hall of fame of who has the max amount of rounds.

Also, I was wondering if it's possible to only count wpm on a certain topic, because on my community, we have different topics, and I want only to count wpm on a certain category/topic.

Is it possible to see stats of a round?, I know all I've asked might be difficult, I'm not sure about it, but I basically want to separate teams and individual scores and focus mostly on the rounds instead of the amount of total questions.

Thank you

Sergio Martinengo said...

Ohh, and also to add the time next to a person answer, so we ccan know how fast the second fastest answert and the third one replied, how fast they did

Sergio Martinengo said...

Sorry for a third message. I'm not sure of this, I'm playing on kiwiirc, I created a channel and we play there. But I think what I send gets faster than everyeone else, and sometimes they see their answers first than others, but they lose. Is there any alternative or way to fix this? is it something related to mirc?

thank you

Sergio Martinengo said...

Also, the plugin bans most of my members, I'm not sure why, maybe somethng related to the flood? is it possible to deactive this? thank you.

Sergio Martinengo said...

I know I'm bothering a lot, it's just that I have some ideas, which I'm not sure if hey are hard to implement or not. I also noticed that at the end of a round, doesn't annunciate the winner, that'd be pretty cool, especiale if you could make it a different text color.