; ; Cosmoquiz v1.10 beta ; ; by Cosmos (cosmos_42@yahoo.com.au) ; ; Last modified 30/12/00 ; ; Requires mIRC v5.82 or later - will not function with earlier versions ; ; Question file must consist of alternating lines of questions and answers ; with no spaces or blank lines at the end. Failure to format question ; file correctly may cause script to behave unexpectedly ; ; After loading script, type /cq to invoke dialog box ; ; See end of script for reference information ; ; Script begins here: on *:start: { ; ; Commands to execute when mIRC starts ; if ($version < 5.82) { echo 4 -a *** Sorry, this script requires mIRC v5.82 or later! cq_unload } .ial on unset %cq* %cq_file_directory = $mircdir %cq_scoreboard = ON %cq_editable = FALSE %cq_previewed = FALSE .disable #cq_answermode echo 4 -a *** Cosmoquiz loaded } alias cq_unload { ; ; Alias to completely unload script and all associated variables ; ; cq_unload takes no arguments ; if ($dialog(cq_dialog).title != $null) { dialog -x cq_dialog cq_dialog } if ($dialog(cq_dialog_answers).title != $null) { dialog -x cq_dialog_answers cq_dialog_answers } echo 4 -a *** Cosmoquiz unloaded .ial off unset %cq* unload -rs [ [ %cq_file_directory ] $+ ] cosmoquiz.txt } alias cq_scores_reset { ; ; Alias to reset all scores, as at the end of a round ; ; cq_scores_reset takes no arguments ; unset %cq_player* unset %cq_hostid* unset %cq_nickid* unset %cq_total_players echo 4 -a *** Scores reset } alias cq_loadfile { ; Alias to load in a new question file ; ; Usage /cq_loadfile - bring up dialog box to pick file to load ; /cq_loadfile filename - immediately load filename ; unset %cq_file* unset %cq_asked* %cq_previewed = FALSE if ($exists($1) == $true) { %cq_file_name = $1 } else { %cq_file_name = $dir="Please select file to open" [ [ %cq_file_directory ] $+ ] *.txt } %cq_file_lines = $lines(%cq_file_name) %cq_file_questions = $calc(%cq_file_lines / 2) %cq_asked_total = 0 if (2 // %cq_file_lines) { echo 4 -a -------------------------------------- echo 4 -a Loaded file [ %cq_file_name ] echo 4 -a File contains [ %cq_file_questions ] questions echo 4 -a -------------------------------------- } else { echo 4 -a *** Sorry, [ %cq_file_name ] has an uneven number of lines! unset %cq_file* } } alias cq_preview { ; ; Alias to preview next question and answer ; ; cq_preview takes no arguments ; if (%cq_asked_total >= %cq_file_questions) { echo 4 -a *** Sorry, you are out of questions! } else { %cq_pointer = $rand(1,%cq_file_questions) while (%cq_asked_ [ $+ [ %cq_pointer ] ] == TRUE) { %cq_pointer = $rand(1,%cq_file_questions) } %cq_question = $read -l [ $+ [ $calc((%cq_pointer * 2)-1) ] ] %cq_file_name %cq_answer = $read -l [ $+ [ $calc(%cq_pointer * 2) ] ] %cq_file_name %cq_previewed = TRUE if ($dialog(cq_dialog).title == $null) { echo 4 -a Next Q : [ %cq_question ] echo 4 -a Answer : [ %cq_answer ] } } } alias cq_ask { ; Alias to ask questions ; ; Usage /cq_ask - picks a random question from file ; /cq_ask Question - manually asks question ; if ($1 == $null) { if (%cq_previewed != TRUE) { if (%cq_asked_total >= %cq_file_questions) { echo 4 -a *** Sorry, you are out of questions! } else { %cq_pointer = $rand(1,%cq_file_questions) while (%cq_asked_ [ $+ [ %cq_pointer ] ] == TRUE) { %cq_pointer = $rand(1,%cq_file_questions) } %cq_question = $read -l [ $+ [ $calc((%cq_pointer * 2)-1) ] ] %cq_file_name %cq_answer = $read -l [ $+ [ $calc(%cq_pointer * 2) ] ] %cq_file_name } } describe $active Q: [ %cq_question ] echo 4 -a Answer: [ %cq_answer ] %cq_asked_ [ $+ [ %cq_pointer ] ] = TRUE inc %cq_asked_total %cq_previewed = FALSE } else { %cq_question = $1- %cq_answer = $null describe $active Q: $1- } } alias cq_repeat { ; ; Alias to repeat the current question ; ; cq_repeat takes no arguments ; describe $active Q: (Repeat) %cq_question } alias cq_ans { ; Alias to answer a question ; ; Usage /cq_ans - display correct answer (award to nobody) ; /cq_ans Nick - award to nick, answer from file ; /cq_ans - award to nick, answer from command line if ($1 == $null) { describe $active The correct answer was: [ %cq_answer ] if (%cq_scoreboard == ON) { cq_scores } } elseif ($address($1, 3) == $null) { echo 4 -a *** Sorry, [ $1 ] is not in [ $active ] } else { if ($2- == $null) { var %answer_to_give = %cq_answer } else { var %answer_to_give = $2- } describe $active < [ $ial($address($1, 3)).nick ] > !!!!!!!! Answer: [ %answer_to_give ] var %lookup_player = %cq_hostid_ [ $+ [ $address($1, 3) ] ] if (%lookup_player == $null) { inc %cq_total_players %cq_player_ [ $+ [ %cq_total_players ] $+ _host ] = $address($1, 3) %cq_player_ [ $+ [ %cq_total_players ] $+ _nick ] = $ial($address($1, 3), 1).nick %cq_player_ [ $+ [ %cq_total_players ] $+ _score ] = 1 %cq_hostid_ [ $+ [ $address($1, 3) ] ] = %cq_total_players %cq_nickid_ [ $+ [ $ial($address($1, 3), 1).nick ] ] = %cq_total_players } else { inc %cq_player_ [ $+ [ %lookup_player ] $+ _score ] %cq_player_ [ $+ [ %lookup_player ] $+ _nick ] = $ial($address($1, 3), 1).nick } if (%cq_scoreboard == ON) { cq_scores } } } alias cq_toggle_scoreboard { ; ; Alias to toggle scoreboard ON/OFF ; ; cq_toggle_scoreboard takes no arguments ; if (%cq_scoreboard == ON) { %cq_scoreboard = OFF echo 4 -a *** Scoreboard is now OFF } else { %cq_scoreboard = ON echo 4 -a *** Scoreboard is now ON } } alias cq_scores { ; ; Alias to display simple (short-form) scoreboard ; ; cq_scores takes no arguments and is called automatically from cq_ans if (%cq_total_players > 0 ) { cq_sort var %loopcounter = 1 var %scorestring = Scores: while (%loopcounter <= %cq_total_players) { %scorestring = [ %scorestring ] %cq_player_ [ $+ [ %loopcounter ] $+ _nick ] $+ ( $+ %cq_player_ [ $+ [ %loopcounter ] $+ _score ] $+ ), inc %loopcounter } describe $active [ $left(%scorestring, -1) ] $+ . } else { echo 4 -a *** The scoreboard is empty! } } alias cq_scores_final { ; ; Alias to display final scoreboard (usually at the end of a round) ; ; cq_scores_final takes no arguments ; if (%cq_total_players > 0) { describe $active FINAL SCORES describe $active ------------ cq_sort var %loopcounter = 0 var %placemarker = 0 while (%loopcounter < %cq_total_players) { inc %loopcounter inc %placemarker if ($right(%placemarker, 1) == 1) { var %placeid = st } elseif ($right(%placemarker, 1) == 2) { var %placeid = nd } elseif ($right(%placemarker, 1) == 3) { var %placeid = rd } else { var %placeid = th } if (%cq_player_ [ $+ [ %loopcounter ] $+ _score ] < 10) { var %leadingzero = 0 } else { var %leadingzero = $null } var %scorestring = [ %placemarker ] $+ %placeid - %leadingzero $+ [ %cq_player_ [ $+ [ %loopcounter ] $+ _score ] ] pts - [ %cq_player_ [ $+ [ %loopcounter ] $+ _nick ] ] while (%cq_player_ [ $+ [ %loopcounter ] $+ _score ] == %cq_player_ [ $+ [ $calc(%loopcounter + 1) ] $+ _score ] ) { inc %loopcounter %scorestring = [ %scorestring ] $+ , %cq_player_ [ $+ [ %loopcounter ] $+ _nick ] } .timer 1 %placemarker describe $active [ %scorestring ] } } else { echo 4 -a *** The scoreboard is empty! } } alias cq_player_add { ; ; Alias to add one point to a player's score ; ; Usage /cq_player_add nick ; var %tempnickid = %cq_nickid_ [ $+ [ $1 ] ] if (%tempnickid == $null) { if ($address($1, 3) == $null) { echo 4 -a *** Sorry, [ $1 ] is not in [ $active ] } else { inc %cq_total_players %cq_player_ [ $+ [ %cq_total_players ] $+ _host ] = $address($1, 3) %cq_player_ [ $+ [ %cq_total_players ] $+ _nick ] = $ial($address($1, 3), 1).nick %cq_player_ [ $+ [ %cq_total_players ] $+ _score ] = 1 %cq_hostid_ [ $+ [ $address($1, 3) ] ] = %cq_total_players %cq_nickid_ [ $+ [ $ial($address($1, 3), 1).nick ] ] = %cq_total_players echo 4 -a *** 1 point added to $1 } } else { inc %cq_player_ [ $+ [ %tempnickid ] $+ _score ] cq_sort echo 4 -a 1 point added to $1 } } alias cq_player_sub { ; ; Alias to substract one point from a player's score ; ; Will delete player from scoreboard if score decreased to 0 ; ; Usage /cq_player_sub nick var %tempnickid = %cq_nickid_ [ $+ [ $1 ] ] if (%tempnickid == $null) { echo 4 -a *** Sorry, [ $1 ] is not on the scoreboard } else { dec %cq_player_ [ $+ [ %tempnickid ] $+ _score ] cq_sort echo 4 -a 1 point subtracted from $1 if (%cq_player_ [ $+ [ %tempnickid ] $+ _score ] <= 0) { cq_player_delete $1 } } } alias cq_player_delete { ; ; Alias to delete a player from the scoreboard ; ; Usage /cq_player_delete nick ; var %tempnickid = %cq_nickid_ [ $+ [ $1 ] ] if (%tempnickid == $null) { echo 4 -a *** Sorry, [ $1 ] is not on the scoreboard } else { var %tempnick = %cq_player_ [ $+ [ %tempnickid ] $+ _nick ] var %temphost = %cq_player_ [ $+ [ %tempnickid ] $+ _host ] %cq_player_ [ $+ [ %tempnickid ] $+ _score ] = -1000 cq_sort unset %cq_player_ [ $+ [ %cq_total_players ] $+ _ ] $+ * unset %cq_hostid_ [ $+ [ %temphost ] ] unset %cq_nickid_ [ $+ [ %tempnick ] ] dec %cq_total_players echo 4 -a *** [ %tempnick ] removed from scoreboard } } alias cq_sort { ; ; Bubblesort routine to sort scoreboard ; var %swapflag = TRUE var %loopcounter2 = 0 while (%swapflag == TRUE) { var %swapflag == FALSE var %loopcounter = 1 inc %loopcounter2 while (%loopcounter <= $calc(%cq_total_players - %loopcounter2)) { if ( %cq_player_ [ $+ [ %loopcounter ] $+ _score ] < %cq_player_ [ $+ [ $calc(%loopcounter + 1) ] $+ _score ] ) { var %tempnick1 = %cq_player_ [ $+ [ %loopcounter ] $+ _nick ] var %temphost1 = %cq_player_ [ $+ [ %loopcounter ] $+ _host ] var %tempscore1 = %cq_player_ [ $+ [ %loopcounter ] $+ _score ] var %tempid1 = %cq_hostid_ [ $+ [ %temphost1 ] ] var %tempnickid1 = %cq_nickid_ [ $+ [ %tempnick1 ] ] var %tempnick2 = %cq_player_ [ $+ [ $calc(%loopcounter + 1) ] $+ _nick ] var %temphost2 = %cq_player_ [ $+ [ $calc(%loopcounter + 1) ] $+ _host ] var %tempscore2 = %cq_player_ [ $+ [ $calc(%loopcounter + 1) ] $+ _score ] var %tempid2 = %cq_hostid_ [ $+ [ %temphost2 ] ] var %tempnickid2 = %cq_nickid_ [ $+ [ %tempnick2 ] ] %cq_player_ [ $+ [ %loopcounter ] $+ _nick ] = %tempnick2 %cq_player_ [ $+ [ %loopcounter ] $+ _host ] = %temphost2 %cq_player_ [ $+ [ %loopcounter ] $+ _score ] = %tempscore2 %cq_hostid_ [ $+ [ %temphost1 ] ] = %tempid2 %cq_nickid_ [ $+ [ %tempnick1 ] ] = %tempnickid2 %cq_player_ [ $+ [ $calc(%loopcounter + 1) ] $+ _nick ] = %tempnick1 %cq_player_ [ $+ [ $calc(%loopcounter + 1) ] $+ _host ] = %temphost1 %cq_player_ [ $+ [ $calc(%loopcounter + 1) ] $+ _score ] = %tempscore1 %cq_hostid_ [ $+ [ %temphost2 ] ] = %tempid1 %cq_nickid_ [ $+ [ %tempnick2 ] ] = %tempnickid1 %swapflag = TRUE } inc %loopcounter } } } on *:NICK:{ ; ; Triggered when a player changes their nick ; var %temphostid = %cq_hostid_ [ $+ [ $address($newnick, 3) ] ] if (%temphostid != $null ) { %cq_player_ [ $+ [ %temphostid ] $+ _nick ] = $newnick unset %cq_nickid_ [ $+ [ $nick ] ] %cq_nickid_ [ $+ [ $newnick ] ] = %temphostid } } alias cq { ; ; Alias to open/close dialog box interface ; if ($dialog(cq_dialog).table == $null ) { dialog -m cq_dialog_answers cq_dialog_answers dialog -s cq_dialog_answers 10000 10000 0 0 dialog -m cq_dialog cq_dialog } else { dialog -x cq_dialog cq_dialog if ($dialog(cq_dialog_answers).title != $null) { dialog -x cq_dialog_answers cq_dialog_answers .disable #cq_answermode } } } alias cq_update_qfilestat { ; ; Alias to update data on current question file ; did -r cq_dialog 33,35,36,38 did -a cq_dialog 33 %cq_asked_total did -a cq_dialog 35 %cq_file_questions did -a cq_dialog 36 $calc(%cq_file_questions - %cq_asked_total) did -a cq_dialog 38 %cq_file_name } alias cq_update_preview { ; ; Alias to update question preview on main dialog box ; did -r cq_dialog 42,44 did -a cq_dialog 42 %cq_question did -a cq_dialog 44 %cq_answer } alias cq_update_answerstat { ; ; Alias to update data on answer dialog box ; did -r cq_dialog_answers 321 did -r cq_dialog_answers 232 did -r cq_dialog_answers 234 did -r cq_dialog_answers 237 did -a cq_dialog_answers 232 %cq_question did -a cq_dialog_answers 234 %cq_answer did -a cq_dialog_answers 237 $upper($group(#cq_answermode)) } ; Main Dialog box - invoke with /cq ; Buttons 1-30 ; Text 31-60 ; Edit 61-80 ; Box 81-100 ; Checkbox 101-120 dialog cq_dialog { title "Cosmoquiz v1.10 - by Cosmos" size 20 105 600 120 button "",1000, 0 0 0 0, ok button "",500, 0 0 0 0, cancel box "",81, -5 68 610 10 text "Q:",41,75 79 15 15 edit %cq_question,42,95 79 505 21, autohs text "A:",43,75 100 15 15 edit %cq_answer,44,95 100 505 21, autohs check "Edit",101, 10 103 60 15 text "Question:",32,1 45 60 20 text %cq_asked_total,33, 60 45 30 20,right text "/",34, 90 45 5 20 text %cq_file_questions,35, 95 45 30 20,left text $calc(%cq_file_questions - %cq_asked_total),36, 160 45 30 20,right text "questions left",37,195 45 80 20 text %cq_file_name,38, 1 60 270 15 button "A S K ",1,0 0 85 45 button "Load...",2,90 0 60 22 button "Answer",3,90 25 60 20 button "Unload script",5,159 25 115 20 button "Preview",6,1 80 60 20 edit "",61, 160 0 114 22, autohs box "",85, 280 -10 1 88 button "Small",11,290 25 45 25 button "Final",12,340 25 45 25 button "Reset",13,390 25 45 25 text "Score Management",59, 305 1 140 20 check "Scoreboard",111,320 55 120 20 box "",91, 445 -10 1 88 button "Add",21,455 25 40 20 button "Sub",22,505 25 40 20 button "Del",23,555 25 40 20 text "Player Management",60, 465 1 140 20 edit "",71, 455 50 140 25 } ; Main Dialog box events on *:dialog:cq_dialog:init:0:{ ; Triggered when dialog box is opened if (%cq_scoreboard == ON) { did -c cq_dialog 111 } did -u cq_dialog 101 %cq_editable = FALSE did -b cq_dialog 42,44 cq_update_qfilestat did -t cq_dialog 2 did -f cq_dialog 2 } on *:dialog:cq_dialog:sclick:500:{ ; Triggered when main dialog box is shut via (X) button if ($dialog(cq_dialog_answers).title != $null) { dialog -x cq_dialog_answers cq_dialog_answers .disable #cq_answermode } } on *:dialog:cq_dialog:sclick:1:{ ; Triggered by clicking the "Ask" button %cq_active_channel = $active if (%cq_asked_total >= %cq_file_questions) { echo 4 -a *** Sorry, you are out of questions! } else { if ($dialog(cq_dialog_answers).title == $null) { dialog -m cq_dialog_answers cq_dialog_answers dialog -s cq_dialog_answers 20 210 600 220 } if (%cq_editable = TRUE) { %cq_question = $did(cq_dialog, 42).text %cq_answer = $did(cq_dialog, 44).text } cq_ask cq_update_qfilestat did -b cq_dialog 1 .enable #cq_answermode if ( $dialog(cq_dialog_answers).x == 10000 ) { dialog -s cq_dialog_answers 20 210 600 220 cq_update_answerstat did -f cq_dialog_answers 261 } else { cq_update_answerstat did -r cq_dialog_answer 321 } } } on *:dialog:cq_dialog:sclick:2:{ ; Triggered when "Load" button is pressed cq_loadfile $did(cq_dialog,61).text did -r cq_dialog 61 cq_update_qfilestat did -t cq_dialog 1 did -f cq_dialog 1 } on *:dialog:cq_dialog:sclick:3:{ ; Triggered when "Answer" button is pressed if ($dialog(cq_dialog_answers).title == $null) { dialog -m cq_dialog_answers cq_dialog_answers dialog -s cq_dialog_answers 20 210 600 220 cq_update_answerstat } else { if ( $dialog(cq_dialog_answers).x == 10000 ) { dialog -s cq_dialog_answers 20 210 600 220 did -f cq_dialog_answers 261 } else { dialog -s cq_dialog_answers 10000 10000 0 0 } } } on *:dialog:cq_dialog:edit:61:{ ; Triggered when text is entered in "Load" edit box did -t cq_dialog 2 } on *:dialog:cq_dialog:sclick:5:{ ; Triggered when "Unload Script" button is pressed beep var %sure = $?!="Are you sure you want to unload Cosmoquiz?" if (%sure == $true) { cq_unload } } on *:dialog:cq_dialog:sclick:6:{ ; Triggered when "preview" button is pressed cq_preview cq_update_preview } on *:dialog:cq_dialog:sclick:11:{ ; Triggered when "Small scoreboard" button is pressed cq_scores } on *:dialog:cq_dialog:sclick:12:{ ; Triggered when "Final scoreboard" button is pressed cq_scores_final } on *:dialog:cq_dialog:sclick:13:{ ; Triggered when "Reset scoreboard" button is double clicked cq_scores_reset } on *:dialog:cq_dialog:sclick:21:{ ; ; Triggered when "Add" button is pressed ; cq_player_add $did(cq_dialog, 71).text } on *:dialog:cq_dialog:sclick:22:{ ; ; Triggered when "Sub" button is pressed ; cq_player_sub $did(cq_dialog, 71).text } on *:dialog:cq_dialog:sclick:23:{ ; ; Triggered when "Del" button is pressed ; cq_player_delete $did(cq_dialog, 71).text } on *:dialog:cq_dialog:sclick:111:{ ; ; Triggered when "scoreboard" checkbox is clicked ; cq_toggle_scoreboard } on *:dialog:cq_dialog:sclick:101:{ ; ; Triggered when "edit" checkbox is clicked if (%cq_editable == TRUE) { %cq_editable = FALSE did -b cq_dialog 42,44 } else { %cq_editable = TRUE did -e cq_dialog 42,44 } } ; Answer mode dialog box ; Buttons 201-230 ; Text 231-260 ; Edit 261-280 ; Box 281-300 ; Checkbox 301-320 ; List 321-340 dialog cq_dialog_answers { title "Answer Mode - Double click to award answer" size 20 190 600 220 button "",1500, 0 0 0 0, cancel button "",2000, 0 0 0 0, ok button "",2500, 0 0 0 0, default list 321, 0 30 530 180, vsbar text "Q:" ,231, 5 1 15 15 text %cq_question,232, 20 1 510 15 text "A:",233, 5 15 15 15 text %cq_answer,234, 20 15 510 15 text "HINT:",235, 2 199 40 20 text "Logging",236, 539 28 60 20 text $upper($group(#cq_answermode)),237, 550 45 40 20 button "Logging",201, 533 64 64 25 button "Clear",202, 533 94 64 25 button "Repeat Q:",203, 533 124 64 25 button "Give A:",204, 533 155 64 25 button "Give hint",205, 533 187 64 25 edit "",261,40 197 490 21, autohs } ; Answer mode dialog box events #cq_answermode off on *:text:*:%cq_active_channel:{ did -a cq_dialog_answers 321 $nick > $1- } #cq_answermode end on *:dialog:cq_dialog_answers:sclick:1500:{ ; Triggered when answer dialog box is shut via (X) button did -t cq_dialog 1 did -f cq_dialog 1 } on *:dialog:cq_dialog_answers:dclick:321:{ ; Triggered by double clicking player's response var %winner = $gettok($did(cq_dialog_answers, 321).seltext, 1, 32) cq_ans %winner .disable #cq_answermode dialog -s cq_dialog_answers 10000 10000 0 0 cq_update_answerstat cq_preview cq_update_preview did -e cq_dialog 1 did -t cq_dialog 1 did -f cq_dialog 1 } on *:dialog:cq_dialog_answers:sclick:201:{ ; Triggered by clicking the "Logging button" if ($group(#cq_answermode) == on) { .disable #cq_answermode did -r cq_dialog_answers 237 did -a cq_dialog_answers 237 $upper($group(#cq_answermode)) } else { .enable #cq_answermode did -r cq_dialog_answers 237 did -a cq_dialog_answers 237 $upper($group(#cq_answermode)) } } on *:dialog:cq_dialog_answers:sclick:202:{ ; Triggered by clicking the "Clear" button did -r cq_dialog_answers 321 } on *:dialog:cq_dialog_answers:sclick:203:{ ; Triggered by clicking the "Repeat Q:" button cq_repeat } on *:dialog:cq_dialog_answers:sclick:204:{ ; Triggered by clicking the "Give A:" button cq_ans dialog -s cq_dialog_answers 10000 10000 0 0 cq_preview cq_update_preview did -e cq_dialog 1 did -t cq_dialog 1 did -f cq_dialog 1 } on *:dialog:cq_dialog_answers:edit:261:{ ; Triggered by entering text into hint box did -t cq_dialog_answers 205 } on *:dialog:cq_dialog_answers:sclick:205:{ ; Triggered by clicking the hint button describe $active HINT: $did(cq_dialog_answers,261).text did -r cq_dialog_answers 261 did -f cq_dialog_answers 261 } ; Reference information ; Variables ; --------- ; %cq_active_channel - channel in which questions are being asked ; %cq_file_directory - directory containing your question files ; %cq_file_name - path and file name of current question file ; %cq_file_lines - number of lines in current question file ; %cq_file_questions - number of questions in current question file ; %cq_scoreboard - Display scoreboard after each question (ON/OFF) ; %cq_asked_total - total number of questions asked from question file ; %cq_total_players - total players with a score ; %cq_asked_# - has question # been asked? (TRUE/FALSE) ; %cq_pointer - current question number ; %cq_question - current question ; %cq_answer - current answer ; %cq_previewed - has the next question been previewed? (TRUE/FALSE) ; %cq_editable - can previewed question/answer be edited? (TRUE/FALSE) ; %cq_player_#_host - hostmask for player with ID = # ; %cq_player_#_nick - nickname for player with ID = # ; %cq_player_#_score - current score for player ID = # ; %cq_hostid_????? - ID number for player with hostmask ????? ; %cq_nickid_????? - ID number for player with nick ????? ; ; Aliases ; ------- ; cq_unload - clear all variables, unload from memory ; cq_loadfile - load in a question file (dialog or command line) ; cq_preview - previews the next question to be asked ; cq_ask - ask a question (from file or from command line) ; cq_repeat - repeat the current question ; cq_ans - answer question (from file or from command line) ; cq_toggle_scoreboard - toggle %cq_scoreboard ON/OFF ; cq_scores - display simple scoreboard (called from cq_ans) ; cq_scores_final - display final scores at end of round ; cq_scores_reset - reset scores (as at end of a round) ; cq_player_add - add 1 point to a player's score ; cq_player_sub - subtract 1 point from a player's score ; cq_player_delete - remove a player from the scoreboard ; cq_sort - simple bubble sort routine to order scoreboard ; cq - open/close dialog box interface ; cq_update_qfilestat - update question parameters on main dialog box ; cq_update_preview - update question preview on main dialog box ; cq_update_answerstat - update parameters on answer dialog box