Thursday, March 10, 2011

Tat's Trivia Bot, 3.61

Update: Latest Tat's Trivia Bot 3.69

Download: Tat's Trivia Bot, 3.61

See Tat's Trivia Bot, 3.65

This is a feature update. It adds team assignment permanence..

In what is likely the second weirdest thing in the history of Tat's Trivia Bot, I actually added a feature after like half a decade. It seems that the trivia team mode was unduly hampered by not maintaining team assignments in the player files. It would just leave them in the hash table during run time and lose them when the bot stopped. So every team game, everybody would need to do !join or they couldn't play. It also had no power to force assign people to a specific team or to limit their ability to join teams. Combined these would make having the bot run only in team mode, rather effortless. It is the first feature-addition-request/inquiry-if-it-had-such-ability I couldn't just give a bit of award code, point out a secret hidden feature, or justify as too far off the beaten path to ever bother with in half a decade.

!op team (Player) (Team Number)
!op team Tat 2

And a few relevant disables.

I also added !help to the disabled section. So it can be modified in commands tab.

In case anybody cares the weirdest thing was this one time somebody sent me a bug fix with usable code. Usually if somebody finds a bug and fixed it, they added it somewhere odd and it was an eye-sore of a kludge and completely useless. One time though, somebody sent me code that actually worked the way the bot worked and was placed in the correct routine and everything. I actually just pasted it in. It was truly bizarre.


There is a bug which causes the ping to not work.

alias -l check.respond {
unset %respond
var %respondlevel = $getset(disable,$1 $+ .respondlevel)
if (%respondlevel == 2) set -u2 %respond .notice $nick
else if (%respondlevel == 3) set -u2 %respond msg $chan
else if (%respondlevel == 4) set -u2 %respond .msg $nick
else if (%respondlevel == 5) set -u2 %respond describe $chan

This routine should not actually use $chan by $iden

alias -l check.respond {
unset %respond
var %respondlevel = $getset(disable,$1 $+ .respondlevel)
if (%respondlevel == 2) set -u2 %respond .notice $nick
else if (%respondlevel == 3) set -u2 %respond msg $iden
else if (%respondlevel == 4) set -u2 %respond .msg $nick
else if (%respondlevel == 5) set -u2 %respond describe $iden

It'll be fixed next version. Thank you KindOne for the note.


carlosteixeira said...

so many painful bugs, no OP commands work.

Tatarize said...


Op commands seem to work fine. When I tested them. And I daresay the number of actual bugs is downright minor at this point. I'm not tooting my own horn I'm just pointing out that that's all I've done fixing for the last half a decade at a pretty slow trickle.

VipeR said...

One thing Tatarize.How would you have the said trivia bot display the winner in the topic and change the name accoding to the current trivia champion?

Tatarize said...

Using actual champion the best thing is to add champ to awards. Which I'll have in case I add another version (should have already existed). Basically it requires only two changes:

alias -l trivia.newchamp {
.rename $scoresfil $asctime(yymmddhhmmss) $+ .bak
setset Champ $calc($setini(Champ, 0) + 1) $nick
tsay $msg.trivia.victory($nick)
award Champ $nick

That "Award Champ $nick" is new in the bot.

It also requires that the token in the award section has a reference for Champ:

alias award.on.tok { return Null.Score.Row.Time.WPM.Join.Question.Uprank.Promotion.Answered.RoundStart.RoundStop.Command.NoAnswer.Hint.HTMLUpdate.Champ }

Champ there is new as well. Then you can trigger events when somebody becomes champion. So you can have something change the topic of the channel with a special command. I'm not sure what the "name" refers to but it's likely possible too.

Sagar said...

how do i change the font color... the yellow color seems to be too bright... please help

Tatarize said...

Commands, Trivia, Trivia Options, Default tab, and the colors are those numbers at the top. Change the #8 (yellow) to something you don't hate.

It randomly chooses colors on initialization.

Brett said...

The teams functionality has certainly improved but one thing that confuses me is what the point of team mode is with regards to points. It seems like points are still awarded individually regardless of teams. I would have expected a bonus to be given to the winning team at the end, or extra points to all team members after each question answered or something like that, but many people in my channel don't see the point of playing in team mode because there's no different in points. Am I simply not implementing something correctly?

Tatarize said...

Brett. That is the functionality it has. Well, it had. I just went about and fixed it. Now there's a version 3.65 that includes awards TeamAnswered and TeamVictory which pass * as the team number. There's also a command / <#> which will, during a team game award the team points.

So, TeamAnswered, Always, Special, / * 1

Will as an award give everybody on that team a point when they answer correctly.

You can now configure it to give points to teams on victory or right answers.

VipeR's request that needed the added champ command is also in the new version. So changing the topic for the champ or whatever awards are done there can be utilized.

Fathia said...
This comment has been removed by the author.
Fathia said...

I use 3.61 and I can't change the round of questions to Unlimited while i actually have ticked the Unlimited button.
But when the trivia is starting, it still says, "Round of 10 questions"

and uh, i cant use general trivia, im only able to use the themes trivia.

please help

Tatarize said...

Seems really odd. Did you maybe turn off "Trivia Unlimited" and set the default to "Trivia Unlimited"? That might default to the default or fail every load? Never tried those settings together.

Fathia said...

figured it all out, no worries. Thanks Tat xD