Hi,

you're welcome, and don't be shy to ask any questions about the script.
I remember a time where I would have asked the same thing.
I'll explain the steps you need to take to get the bot working.

Should you run into problems trying to get the script working, then i'll just send u an email with the script, and with a simple command to load it grin

1) Assuming you are using a Windows OS, go to 'Start' --> 'Run', and type in the following: wordpad.exe
Click on 'Ok', and then the Wordpad program will open.

Now copy paste the code at the bottom of THIS post to wordpad. This is necessary, as if you would paste it in mirc directly,
it would not respecte the new lines.


2) Leave Wordpad as it is for now, and go to mirc, and in Mirc, do alt+r so that it takes you to the Scripts Editor.
Now click on 'File' in the Scripts Editor, and click on New.
This will create a new scripts file.


3) Copy the code that you pasted in wordpad, from wordpad to this mirc scripts editor.
When you've pasted it, click on the button {} in the upper right of the Scripts Editor, which will sort the code more nicely.


4) Click on 'File' in the scripts editor, and click on 'Save as'. It will ask you to save the script in your mirc folder.
You can choose a name for the script like offlinetrivia.ini
Click on 'Save', and then just close the scripts editor by clicking on 'Ok'.


5) create a .txt file in your mirc folder, named questions.txt, and put in the questions to your liking.
Beware as stated before, you have to add in atleast 5 questions before trying to run the trivia as it will freeze otherwise.


6) when you have your questions.txt file ready, just save it and close it, and now you are ready to play trivia.


7) in your status window, simply type /trivia.load and this will start the trivia. To stop the trivia, type /trivia.unload


By the way I've made some changes to the code that i posted earlier to make it look better, so use the following code instead of the other one.

Code:
 
on *:INPUT:*:{
  if (/* !iswm $1) {
    if ($active == status window) { haltdef | echo -a $+(<,$me,>) $1- }
    if (%trivia.status == on) {
      if (%trivia.answer == $strip($1-)) trivia.win $ifmatch 
      elseif ($1 == !hint) trivia.echo Second Hint: $trivia.hint(%trivia.answer).2
      elseif ($1 == !!hint) trivia.echo Third Hint: $trivia.hint(%trivia.answer).3
    } 
  }
}

alias -l trivia.echo { echo -s $replace(<Trivia> $1-,,10,,07,,04) } 

alias -l trivia.win {
  var %time = $calc(($ticks - %trivia.ticks) / 1000)
  var %wpm = $ceil($calc(($len(%trivia.answer) / %time) * 12))
  inc %trivia.streak 
  trivia.echo [ $+ $me found the right answer << %trivia.answer >> in %time seconds, and average WPM of %wpm $+ ]
  trivia.echo [ $+ $me has won %trivia.streak times in a row]
  trivia.nextQ
}

alias -l trivia.nextQ {
  %trivia.status = off
  .timertrivia.failQ off 
  .timertrivia.askQ 1 %trivia.interval trivia.askQ
  trivia.echo [Next question coming in %trivia.interval seconds, get ready]
  trivia.echo $chr(160)
}

alias -l trivia.failQ {
  %trivia.streak = 0 
  trivia.echo [You didn't find the right answer: %trivia.answer $+ ]
  trivia.nextQ
}

alias -l trivia.askQ {

  :begin
  var %data = $read(%trivia.questions)
  var %number = $readn

  if ($istok(%trivia.repeat,%number,46)) goto begin 
  %trivia.repeat = $addtok(%trivia.repeat,%number,46)
  if ($numtok(%trivia.repeat,46) > %trivia.rep) %trivia.repeat = $deltok(%trivia.repeat,1,46) 

  tokenize 126 %data

  %trivia.status = on
  %trivia.answer = $2
  %trivia.ticks = $ticks

  .timertrivia.failQ 1 %trivia.avaltime trivia.failQ 

  trivia.echo Question $chr(35) $+ %number - $1 ?
  trivia.echo First hint: $trivia.hint($2).1
  trivia.echo $chr(160)
}

alias -l trivia.hint {
  if ($prop == 1) {
    var %t = $chr(42)
    return $lower($replace($1-,a,%t,b,%t,c,%t,d,%t,e,%t,f,%t,g,%t,h,%t,i,%t,j,%t,k,%t,l,%t,m,%t,n,%t,o,%t,p,%t,q,%t,r,%t,s,%t,t,%t,u,%t,v,%t,w,%t,x,%t,y,%t,z,%t,0,%t,1,%t,2,%t,3,%t,4,%t,5,%t,6,%t,7,%t,8,%t,9,%t))
  }
  elseif ($prop == 2) {
    var %t = $chr(42)
    return $lower($replace($1-,b,%t,c,%t,d,%t,f,%t,g,%t,h,%t,k,%t,l,%t,m,%t,n,%t,p,%t,q,%t,r,%t,s,%t,t,%t,v,%t,w,%t,x,%t,y,%t,z,%t,1,%t,2,%t,3,%t,4,%t,5,%t,6,%t,7,%t,8,%t,9,%t))
  }
  elseif ($prop == 3) {
    tokenize 32 $1-

    var %x = 1
    var %word, %newword, %comma, %hint

    while (%x <= $0) { 

      %word = $ [ $+ [ %x ] ]
      if ($right(%word,1) == $chr(44)) { %comma = $ifmatch | %word = $left(%word,-1) }

      while ($len(%word)) {

        if ($rand(1,2) == 1) %newword = $right(%word,1) $+ %newword 
        else %newword = %newword $+ $right(%word,1) 
        %word = $left(%word,-1) 
      }
      %hint = %hint %newword $+ %comma
      %newword = $null
      %comma = $null
      inc %x
    }
    return $lower(%hint)
  }
}

alias trivia.load {
  set %trivia.questions $+(",$scriptdir,questions.txt,")
  set %trivia.rep 4
  set %trivia.status off
  set %trivia.avaltime 60
  set %trivia.interval 10
  .timertrivia.askQ 1 10 trivia.askQ
  trivia.echo [Trivia starting in 10 seconds, get ready]
}

alias trivia.unload {
  unset %trivia.*
  .timertrivia.* off
  trivia.echo [Trivia has been fully stopped. Type /trivia.load to start it back up]
} 


You will notice this alias called
alias -l trivia.echo { echo -s $replace(<Trivia> $1-,,10,,07,,04) }

You can change the colors here to your likings, and it will totally change the way the trivia looks, as this is the central point.
Setting a different color here will make it use this color everywhere in the trivia script. so you could change 10 to another color number, to your likings.

If you want some more features to be added for this trivia, just let me know, i can script it fairly fast, depending on what you are asking.

Greetz, and enjoy!


Gone.