Trivia Oracle for mIRC v6.16By: cerberus
Last Modified: Oct 03 1:25am (r6)

errr, just something i wrote when i was bored hahaha, makes trivia so much more fun to play =oP
make sure you have a text file named " resolved.txt " in the same directory as your mirc.exe
example:
(15:41:18) (&trivia) 5. UnScramble this Word: a i a s l f c?
(15:41:18) [Trivia h4x] Resolved: facials
(15:41:18) [Trivia h4x] Auto: 18.49 sec
(15:41:27) (&trivia) Here's a hint, f______
(15:41:36) (&cerberus) facials
(15:41:38) (&trivia) Winner: cerberus Answer: facials Time: 18.777 Streak: # Points: # WPM: # Rank: #
make sure you have a text file named " resolved.txt " in the same directory as your mirc.exe
example:
(15:41:18) (&trivia) 5. UnScramble this Word: a i a s l f c?
(15:41:18) [Trivia h4x] Resolved: facials
(15:41:18) [Trivia h4x] Auto: 18.49 sec
(15:41:27) (&trivia) Here's a hint, f______
(15:41:36) (&cerberus) facials
(15:41:38) (&trivia) Winner: cerberus Answer: facials Time: 18.777 Streak: # Points: # WPM: # Rank: #

;-- Requires -C Struct Emulation- functions
;-- evil code =oP
alias -l trivia.struct return trivia. $+ $chan $+ . $+ $nick
alias -l trivia.file return trivia.resolved.txt
alias -l trivia.resolve {
sadd $trivia.struct r $gettok($read($trivia.file, w, $+(*,$sget($trivia.struct).q,*)),2,42)
if ($sget($trivia.struct).r != $null) echo -tmg $chan [Trivia h4x] Resolved: $sget($trivia.struct).r
else echo -tmg $chan [Trivia h4x] ! Not Resolved !
}
alias -l trivia.store {
if ($sget($trivia.struct).r == $null) {
write -a $trivia.file $+($sget($trivia.struct).q,*,$sget($trivia.struct).a)
echo -tmg $chan [Trivia h4x] ! Stored !
echo -tmg $chan $sget($trivia.struct).q --> $sget($trivia.struct).a
}
}
on *:text:*:#: {
var %tmp $strip($1-)
var %re.q /^[\d]+\. (.*)$/si
var %re.a /Winner: .* Answer: (.*) Time:|The answer was: (.*)$/si
if ($regex(%tmp,%re.q)) {
sdel $trivia.struct *
sadd $trivia.struct q $regml(1)
trivia.resolve
}
else if ($regex(%tmp,%re.a)) {
sadd $trivia.struct a $regml(1)
trivia.store
sdel $trivia.struct *
}
}
|

Comments