Changeset 35 for TriviaEngine/TriviaEngine-sqlite.tcl
- Timestamp:
- 11/16/06 09:27:09 (6 years ago)
- File:
-
- 1 edited
-
TriviaEngine/TriviaEngine-sqlite.tcl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
TriviaEngine/TriviaEngine-sqlite.tcl
r34 r35 34 34 set trivia_guesser_count 0 35 35 set trivia_last_qid 0 36 36 set trivia_q_timestamp 0 37 37 if [info exists trivia_must_rehash] { 38 38 if {$trivia_must_rehash == 1} { … … 364 364 global trivia_q_id trivia_q_cat trivia_q_question trivia_q_answer trivia_q_hint trivia_q_attempts trivia_channel trivia_status 365 365 global trivia_timer trivia_delay trivia_db_handle trivia_unanswered trivia_run_qty trivia_run_last trivia_run_nick trivia_c 366 global trivia_score_time trivia_time_left_warning trivia_asking_question trivia_current_leader 366 global trivia_score_time trivia_time_left_warning trivia_asking_question trivia_current_leader trivia_q_timestamp 367 367 368 368 if {$trivia_status != 1} { … … 377 377 set trivia_asking_question 0 378 378 379 set speed [expr [clock seconds] - $trivia_q_timestamp] 380 381 set speedword "" 382 if {$speed <= 1} { 383 set speedword [trivia_random_element [list "POW! 0 to correct in under a second!" "Faster than a speeding fast thing!" "Even I didn't get it that quick, and I've just got to do a database lookup!"]] 384 } elseif {$speed < 7} { 385 set speedword [trivia_random_element [list "WHOOSH! 0 to correct in $speed seconds!" "%% shows their unassailable knowledge of whatever that question was about by getting it in $speed seconds" "Set course for correctsville, Commander %%. Ahead warp [expr 10 - $speed]!" "Caffeine abuse pays off for %% with a speedy time of $speed seconds" "Faster than a speeding triviabullet!"]] 386 } 387 379 388 set uid [trivia_get_uid $nick] 380 389 if {$uid == 0} { … … 390 399 trivia_incr_score $uid 391 400 401 regsub -all -nocase "%%" $speedword "$trivia_c(purple)$nick$trivia_c(off)" speedword 402 392 403 putquick "PRIVMSG $trivia_channel :Congratulations $trivia_c(purple)$nick$trivia_c(off)! The answer was$trivia_c(purple) $answer$trivia_c(off)." 404 if {$speedword != ""} { 405 putquick "PRIVMSG $trivia_channel :$speedword" 406 } 393 407 394 408 trivia_bmotion_send "winner" "$nick $answer" … … 468 482 } 469 483 4 { 470 put help"PRIVMSG $trivia_channel :$trivia_c(realblue)QUAD DAMAGE!"484 putquick "PRIVMSG $trivia_channel :$trivia_c(realblue)QUAD DAMAGE!" 471 485 return "is on a roll ..." 472 486 } … … 917 931 #<<< 918 932 global trivia_q_id trivia_q_cat trivia_q_question trivia_q_answer trivia_q_hint trivia_q_attempts trivia_channel trivia_status trivia_last_qid 919 global trivia_asking_question trivia_delay botnick 933 global trivia_asking_question trivia_delay botnick trivia_q_timestamp 920 934 921 935 if {$trivia_status != 1} { … … 951 965 952 966 trivia_bmotion_send "start" "$trivia_channel $trivia_delay $botnick" 967 set trivia_q_timestamp [clock seconds] 953 968 954 969 trivia_round … … 988 1003 } 989 1004 990 putserv "PRIVMSG $trivia_channel :$trivia_c(red)--== Trivia ==--$trivia_c(off) \[category: \002$trivia_q_cat\002\]"991 #\[question id: \002$trivia_q_id\002\]"992 1005 set split_question [trivia_question_split $trivia_q_question] 1006 1007 putquick "PRIVMSG $trivia_channel :$trivia_c(red)--== Trivia ==--$trivia_c(off) \[category: \002$trivia_q_cat\002\]" 993 1008 foreach q $split_question { 994 1009 if {$q != ""} { 995 put serv"PRIVMSG $trivia_channel :$trivia_c(blue) [trivia_question_inject $q]"1010 putquick "PRIVMSG $trivia_channel :$trivia_c(blue) [trivia_question_inject $q]" 996 1011 } 997 1012 } 998 1013 #set new_question [trivia_question_inject $trivia_q_question] 999 #put serv"PRIVMSG $trivia_channel :$trivia_c(blue) $new_question"1000 put serv"PRIVMSG $trivia_channel :Hint$hint: [trivia_explode $trivia_q_hint]"1014 #putquick "PRIVMSG $trivia_channel :$trivia_c(blue) $new_question" 1015 putquick "PRIVMSG $trivia_channel :Hint$hint: [trivia_explode $trivia_q_hint]" 1001 1016 1002 1017 incr trivia_q_attempts
Note: See TracChangeset
for help on using the changeset viewer.
