All pastes #264803 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-12-02 19:27 UTC
rendered paste body
on *:text:*:#rstrivia:{
  if ($nick == <botnick>) {
    if ($read(cheater.txt, w, * $+ $strip($1-) $+ *)) {
      set %answer $remove($remove($right($read(cheater.txt, w, * $+ $strip($1-) $+ *),$calc($len($read(cheater.txt, w, * $+ $strip($1-) $+ *)) - $len($strip($1-)))),*),chr(63)))
      set %answer $remove(%answer,?)
      if ($len(%answer) <= 6) {
        .timer 1 1  /msg $chan $lower(%answer)
        halt
      }
      if ($len(%answer) <= 10) {
        .timer 1 $rand(1,1.2) /msg $chan $lower(%answer)
        halt
      }
      if ($len(%answer) <= 14) {
        .timer 1 $rand(1,1.5) /msg $chan $lower(%answer)
        halt
      }
      if ($len(%answer) <= 17) {
        .timer 1 $rand(2,2.4) /msg $chan $lower(%answer)
        halt
      }
      if ($len(%answer) >= 23) {
        .timer 1 $rand(2.3,2.4) /msg $chan $lower(%answer)
        halt
      }
    }
  }
}

on *:text:03*:#rstrivia:{
  if ($nick == <botnick>) {
    if (03Hint* !iswm $1-) {
      set %question $strip($1-)
    }
  }
}
on *:text:*:#rstrivia:{
  if ($nick == <botnick>) {
    if (* The answer was * You got it in * iswm $1-) {
      if ($read(cheater.txt, w, * $+ %question $+ *)) {
        if ($rand(1,3) == 2) {
          halt
        }
      }
      if ($read(cheater.txt, w, * $+ %question $+ *) == $null) {
        set %ans $strip($remove($ [ $+ [ $calc($findtok($1-,answer,1,32) + 2))) ] $+ ] - [ $+ [ $calc($findtok($1-,You,1,32) - 1) ] ],.))
        write cheater.txt %question $+ * $+ %ans
        if ($rand(1,3) == 2) {
          halt
        }
      }
    }
  }
}