How would I be able to make this script?
Currently I use this script that takes chat input and places it in a .txt file. Then I see who guessed the closest.

Code:
on *:TEXT:*:#: {
  if ($strip($1) == !guess) {
      write guesses.txt $2 $+  :  $+ $nick
  }
}


But I can't figure out how to get it so when a person uses it twice, it overwrites his last input.

I tried but this somehow only checks the last line of the text file.
Code:
write -dl $+ $readn(guesses.txt, w, *$nick*) guesses.txt


Then I also need an admin only command like !result x which then checks in all the entries who guessed the closest to the x given with the !result command.

Last edited by Fattyshow; 02/03/16 07:19 PM.

Digital Rocker on Twitch TV - Bassist