Skip to content
Buzzen Chat Network

A Trivia Question Or Two

A TG007 community discussion started by iLia.

Discussion 21 posts
Page 1 of 2
Open
Topic #9887 · 21 published posts · 4,471 views

In Tat's trivia you can set the number of Q's you want the round to have..ie !trivia 20 (and it gives you 20 Q's and then it stops). In super trivia version 5 the round is unlimited. Any way I can have the limited round thing added to st5?

 

Also...I'm not sure which trivia has it or whether it's sth that is added to either one....there's a 'speacial question, make your bet' feature in which you bet a certain amount of points and then a special (multiple choice) Q appears. I'd like to add that to Super Trivia but not sure if I can ( if it's ok to I mean) and , if it's ok, how to.

 

Any help would be appreciated. I did look at Petertje's site ( well I had) but it seems to be pretty dormant.

 

P.S. Although it's for a Buzz script, I thought the question is general and didn't post under Buzzen. If I was wrong , plz move it. thx.

Ειναι πολλα τα λεφτα Αρη.

 

 

 

I've messed around with Supertrivia, and it's not the easiest thing to mod.

The trivia I made was loosely based on Tats, however, a bonus question probably wouldn't be that difficult to make.

alias extra { 
if (%q.num = 20) { 
msg # message stuff here
var %bonus.num active
}
else halt
}
on *:TEXT:*:#:{ 
if (%bonus.num == active) && ($1 isnum) { 
set %bet.num. $+ $nick
msg # message stuff here
}
else halt 
}

That's a loose outline of what it would do. It doesn't work, and I don't have enough time to check over Tats or ST to modify it. It would take alot of modifying to do.

No..you misunderstood me. ST HAS bonus questions (not sure about tats but I'm using ST5 right now)..I'm talking about 'Special questions'.

 

IE...Script sez 'Special Question, make your bets preceeded ( I can't spell this word, sorry) by a dot.

 

So you type .half ( you bet half yr points) or .max ( all of them) or .456 (or whatever number of points you wish).

 

Then it asks in whisper in room a question...its a multiple choice question. Each chatter who's betted sees the options/choices in a different sequence so theres no cheating. You type only the letter that corresponds to the answer you think is correct..ie a

Then bot sez who got it right right after they type their choice and adds or deducts points according to whether it was the right option or not.

 

That's a special question.

Ειναι πολλα τα λεφτα Αρη.

 

 

 

 

the questions you are talking about usuallyare in a file called bonus.and are in the the form of

 

M: What is bob's name?*bob*joe*mark*lou

 

i am not sure where to find this type of question.i got luck and found a bonus file that has about 180 of these.but these are what you are looking for.depending on if your bot came with st50 already loaded you might already have some of thesejust check all your question files its usually the smallest one.

I suppose if your gonna do it that way, something like this would work ..

alias start.trivia {
set %trivia $1
msg $1 Starting multiple choice Trivia in 10 seconds. Get Ready!
.timertrivia 1 10 trivia.q
}
alias trivia.q {
var %x = $r(1,$lines(trivia.txt))
set %trivia.q $gettok($read(trivia.txt,%x),1,42)
set %trivia.a $gettok($read(trivia.txt,%x),2,42)
msg %trivia Question: $+($chr(3),12,%trivia.q,$chr(3),.) You have 1 minute and 30 seconds!
set %trivia.aq 1
.timertriv 1 90 trivia.a
}
alias trivia.a {
var %x = 1,%y
unset %trivia.aq
msg %trivia Times up! The answers were: %trivia.a
while (%x <= $numtok(%triv.u,32)) {
  %y = $gettok(%triv.u,%x,32) with $+(%triv.u. [ $+ [ $gettok(%triv.u,%x,32) ] ] correct,$iif(%x = $numtok(%triv.u,32),.,$chr(44)))
  writeini triv-scores.ini scores $gettok(%triv.u,%x,32) $calc($readini(triv-scores.ini,scores,$gettok(%triv.u,%x,32)) + %triv.u. [ $+ [ $gettok(%triv.u,%x,32) ] ])
  inc %x
}
msg %trivia Here are the points for this round: %y
msg %trivia Next question in 5 seconds!
unset %trivia.*
unset %triv.*
.timertriv 1 5 trivia.q
}
on *:TEXT:*:#: {
if ($chan != %trivia) halt
if (%trivia.aq) && ($istok(%trivia.a,$1,32)) && (!$istok(%trivia.ala,$1,32)) {
  $iif(!$istok($nick,%triv.u,32),set %triv.u %triv.u $nick)
  inc %triv.u. [ $+ [ $nick ] ] 1
  set %trivia.ala %trivia.ala $1
  msg $chan $+($chr(3),12,$nick,$chr(3) got one of the answers: $1
  if ($numtok(%trivia.ala,32) = $numtok(%trivia.a,32)) { .timertriv off | trivia.a }
}
elseif ($1 = !score) {
  if ($readini(triv.scores.ini,scores,$nick) { msg $chan The score for $nick is: $v1 }
  else { msg $chan There is no score for $nick }
}
}

 

Then, it would be Question*Answer Answer Answer Answer

A basic showing of how it's done. I may implement the idea into my trivia script. I highly doubt it would work in any current Trivia bot, as I'm almost sure some amount of highly modding would need to be done. I'll see if I can work on implementing something in my current trivia bot later this evening.

I looked in the trivia files. There's no such file BUT ..Petertje says you can choose from 3 question files..but only uses two...norm Q's and bonus Q's ( the usual bonus ones, not multiple choice). There's no bonus. file. However he says in his manual for it the following :

 

Multiple choice question

M[points]: <question>*<correct answer>*<wrong answer>*<wrong answer>

 

This question give every player (only when points are betted!) a question in CTCPREPLY TIME with 2 to 6 choices. The order of the answer will be different for every player.

The player has to respond the letter of the correct answer.

 

Examples:

 

M: How much is 1 + 1?*2*4*6*8

M100: How much is pi ? *3.1415*3.1417*3.1413*3.1514

 

Taking for granted that I have no idea what CTCPREPLY TIME is.....how do i go and add that? I was hoping someone would give it to me so I load it to the script. I can prolly create a txt file with that kind of bonus Q's (though let's face it..I'd prefer it if they already existed somewhere) but I'm not sure I know how I could have the script to 'produce' them.

 

Truth be told..I'm not over fussed over it..but personally I really like them so would like for the room I run Trivia in to offer them.

Ειναι πολλα τα λεφτα Αρη.

 

 

 

@ X-Fusion

 

Ok.....actually the time given is much less..sth like 15 seconds.

 

Unless I can't read it in yours X...there's no betting in yours..whereas the whole point is the betting of a certain amount of points. The Q's come after a set amount of Q's ( I think....bonus Q's do).

 

Ok..this is probably way out of my lead and I really do not want anyone to sit and write it for me. I thought (seeing it's a rather popular trivia feature) the code already existed out there along with a set of Q's. I was mostly asking for ppl to direct me to it ( cause a/ I'm lazy, b/ I'm so busy with work I can't think straight and can only cope with c/p).

 

 

Ειναι πολλα τα λεφτα Αρη.

 

 

 

i have a multiple choice bonus file.it only has about 180 multiple choice questions.you are more then welcom to it.i just dont know how i can get it to you.i see you can upload a file to the forum.if there asr no objections from the techgear staff i have no problem uploading it to the forum.

You can if you want.

Thx rdnck_ca !!! Dun worry about it being only 180 q's..I can add to that I guess when I have the time.

Ειναι πολλα τα λεφτα Αρη.

 

 

 

so you know there are a few reg bonus questions in this file that are for 1000 points if you dont want them or want the points less you have to change the wmount in the question file in front of the question.

Bonus.txt

Attachments 1 file

So..I add this where the other txt files are in trivia and the bot uses them when? That's the bit I don't get....Is it considered just another bonus question? Do I add them to the already existing bonus Q's? Where is the (if one is needed) code with lotsa if and $'s to tell ppl to bet their points? Is it implemented in Petertje's trivia already but I was just missing the file?

Ειναι πολλα τα λεφτα Αρη.

 

 

 

to get them as bonus go to st50 and configure and where you set the question files make this one the bonus questions.if you make it the regular file its just gonna give you a multiple choice normal queston.i will stop by the lounge in VSIX this afternoon so if you still need help you can ask me then and i will do my best to help you.

 

Thx rdnck_ca :D

Ειναι πολλα τα λεφτα Αρη.

 

 

 

If the solution gets posted, I'll be more then happy to consider this topic resolved and close it.

Ok....the file rdnck_ca posted..you load it to your file and direct your bonus Q's to that file. You basically stop using the bonus Q's file st50 already has but either use that one or integrate that one to rdnck_ca's file OR edit it so they become multiple choice questions ( though not too sure about that last bit). What I did was load his file....direct my bonus questions to that and then copy some of the bonus Q's I already had to that. I'm running Supertrivia version 5.0 (st50) and it works great.

 

 

And I'm sorry it's not the clearest solution posted.

 

 

However, I'm still waiting on anyone ( though I'm doing ok as I'm set now) to offer a way to have st50 allow rounds of Q's and not just have the existing unlimited round. So X, it's up to you if you want to give it another day or two or close it now.

Edited Apr 3, 2008 10:45 PM by iLia

Ειναι πολλα τα λεφτα Αρη.

 

 

 

I'll keep it open until the OP feels a suitable solution has been posted.

ok i found this on one of the othe forums for you ilia and i believe its what you need.if im not mistaken you want it to stop after X number of questions BUT not reset the scores.so this is what i found.

 

in the automation tab of the settings set it to reset after <the number you want> questions, then in the code under the reset Trivia section disable the following lines

 

mstat *s4 $stm(reset) 
.timerst_resetscores 1 10 st resetscores 
 .timerst_restart 1 10 st start

 

to be honest i dont know how to disable this line .my guess(and this is just a guess,as i havent tested this)is to add ; before mstat.i have a cpl bots i dont use too much so i wil load trivia in them and try it and let you know what happens.and so you all know that code is firehouse's code.

Thx rdnck. I was also thinking....I was looking at Rumbaar's and someone had offered a code to stop trivia ( in Hybrid, but I dun use Hybrid for trivia) after an X number of unanswered questions. That code would prolly suit my needs ...only problem is...someone posted after him telling him he should check his brackets or sth and that was the end of that thread lol.

 

Not sure if Hybrid is using Super trivia or not..so not sure that code ( if corrected) would work for me. I could always find it again and post it here ( giving credit to its original creator/creator of post) and have someone look and correct it.

 

The 'stop after 20 unanswered' for example would be great for me...better than the round ones actually. Cause that way I could leave it on if someone is playing and when they go ( and I'm away and cant stop trivia) the script can see that no one is playing and stop. Tis a great idea..if only that guys code worked :mellow:

 

 

Ειναι πολλα τα λεφτα Αρη.

 

 

 

That could be undoable unless you required your users to use a prefix before answering their questions (eg; &, !, #, -).

Edited Apr 4, 2008 11:07 PM by X-Fusion