Code: Select all
set t2(on) "!trivia" ;# public trigger to turn game on #
set t2(off) "!strivia" ;# public trigger, game off ("" = same as on trigger)
@oper: !start
@BoT: BogusTrivia loading......
@oper: !stop
@BoT: BogusTrivia stopped.
@oper: !comenzar
@BoT: BogusTrivia loading......
@oper: !detener
@BoT: BogusTrivia stopped.
Code: Select all
set v(tls2) "chan on off upubq hint p-cmdpre m-cmdpre hintchar"
Code: Select all
set v(tls2) "chan upubq hint p-cmdpre m-cmdpre hintchar"
Code: Select all
set v(tls3) "p-mystat p-opstat p-info p-owner p-page p-top-d p-t20-d p-tmor-d"
Code: Select all
set v(tls3) "on off p-mystat p-opstat p-info p-owner p-page p-top-d p-t20-d p-tmor-d"
Code: Select all
if {$t2(p-cmdpre) ne "."} {
foreach x {on off} { set y $t2($x)
if {[string match .* $y]} { set t2($x) "$t2(p-cmdpre)[string range $y 1 end]" }
}
}
Code: Select all
if {$t2(off) ne $t2(on)} { bind pubm $t2(sflag) "$t2(chan) $t2(off)" TOnOff }
bind pubm $t2(oflag) "$t2(chan) $t2(on)" TOnOff
Code: Select all
foreach ttmp(x) $t2(on) { bind pubm - "$t2(chan) $ttmp(x)" TOnOff }
if {$t2(off) ne $t2(on)} {
foreach ttmp(x) $t2(off) {
if {[lsearch -nocase $t2(on) $ttmp(x)]=="-1"} {
bind pubm - "$t2(chan) $ttmp(x)" TOnOff
}
}
}
Code: Select all
if {$from=="0" && ![string match -nocase $t2(on) $tx]} { return 0 }
Code: Select all
if {$from=="0"} {
if {[lsearch -nocase $t2(on) $tx]=="-1"} { return 0 }
if {$t2(oflag) ne "-" && $hn eq "*"} { return 0 }
if {$t2(oflag) ne "-" && ![matchattr $hn $t2(oflag) $ch]} { return 0 }
}
Code: Select all
if {$from=="0" && ![string match -nocase $t2(off) $tx]} { return 0 }
Code: Select all
if {$from=="0"} {
if {[lsearch -nocase $t2(off) $tx]=="-1"} { return 0 }
if {$t2(sflag) ne "-" && $hn eq "*"} { return 0 }
if {$t2(sflag) ne "-" && ![matchattr $hn $t2(sflag) $ch]} { return 0 }
}
Code: Select all
set t2(on) ".t2" ;# public trigger to turn game on #
set t2(off) "" ;# public trigger, game off ("" = same as on trigger) #
set t2(oflag) "o|o" ;# flags to turn the game on ("" = everyone) #
set t2(sflag) "" ;# flags to turn game off ("" = same as on flags) #
;# separate off flags requires using separate on & off triggers #
Code: Select all
set t2(on) "!start !comenzar" ;# public trigger(s) to turn game on #
set t2(off) "!stop !detener" ;# public trigger(s), game off ("" = same as on trigger(s)) #
set t2(oflag) "o|o" ;# flags to turn the game on ("" = everyone) #
set t2(sflag) "" ;# flags to turn game off ("" = same as on flags) #
;# Separate off flags No Longer Requires using separate on & off triggers !! #
Ok, I assumed it would be difficult the cuestion of databases of users and scores.SpiKe^^ wrote:No, not at all.
BogusTrivia will probably never be a multi-channel script.
Code: Select all
# strip color codes from players answers # requires eggdrop 1.6.17+ #
# allow BogusTrivia to accept answers typed in color ? #
# this will have the bot remove color codes to look for an answer match #
set t2(stripcolor) "1" ;# (1=yes | 0=no) #