This is a small game to test how many words you can type in one minute
made it for fun and i havent seen one yet.
Commands
!words = this will Prompt you about the start of the game
!Score = this will display your best score so far
Basicly when you are told to start typing.
you type as many words as you can within 60 seconds.
It will only count words that are 4 letters or more in length, to stop people doing:
j j j j jj j j j j j jj j j j j jj j j j j j j j j jj j j j j j jj j j j j jj
although i know they could still dfsdf dsfdsf dsfdsfsd dsfsdfsdf dsfdsf
but what the hell.
Thanks to SanitariuM for that regex
and Thanks to PsYcHo[X] for the other way you gave me.
Tt all seems to be clean so far ,
but if there is any problems just let me know.
Any advice would be MUCH appreciated.
;@@@@@@@@@@@@@@@@@@@@@@
;@___Paul1337noob____@@
on *:TEXT:!score*:#: { if (%spam) { halt }
else {
set -u10 %spam 1
msg $chan $nick your best score so far is... $readini(wordscore.ini,$nick,score) words per minute!!!
}
}
on *:TEXT:!words*:#: {
if (!%gameon) {
set %wordnick $nick
if (!$readini(wordscore.ini,%wordnick,score)) { makeini }
set %gamechan $chan
set %gameon 1
notice $nick Type as many words as you can in 60 seconds.
notice $nick These words must be atleaset 4 letters long to count.
notice $nick You MUST press enter before your 60 seconds are up.
.timer0 1 3 notice $nick You have 10 seconds to prepare.
.timer1 1 8 notice $nick 5 seconds to go.
.timer2 1 13 startgame
}
else { notice $nick there is already a test in progress! }
}
alias makeini { writeini -n wordscore.ini %wordnick score 0 }
alias startgame {
if ( %gameon == 1 ) {
set %on 1
notice %wordnick Type away biatch.
.timer 1 55 notice %wordnick 5 seconds remaining press enter before your time runs out!
.timer 1 60 timerend
}
else { halt }
}
; Thanks alot guys/gals from us.undernet.org #mircscripting
; /me needs to learn regex XD
on *:TEXT:*:#: {
if (%on) && ( $nick == %wordnick ) { inc %words $regex($1-,/\b\w\w\w\w+\b/g) }
else { halt }
}
on *:KICK:#bots: {
if (%on) && ( $nick == %wordnick ) { notice %wordnick lol pwnt for flooding?
timerhalt
endgame
}
else { halt }
}
alias timerend {
if ( %words > $readini(wordscore.ini,%wordnick,score) ) {
.timerlol0 1 1 notice %wordnick Well done! %wordnick you managed to type %words words in 60 seconds!
.timerlol1 1 2 notice %wordnick Thats more then your previous score of $readini(wordscore.ini,%wordnick,score)
.timerlol2 1 3 notice %wordnick Why dont you have another go and try beat it.
writeini -n wordscore.ini %wordnick score %words
.timer 1 5 endgame
}
elseif ( %words <= $readini(wordscore.ini,%wordnick,score) ) {
.timerlol0 1 1 notice %wordnick You managed to type %words words in 60 seconds!
.timerlol1 1 2 notice %wordnick Thats less then your previous score of $readini(wordscore.ini,%wordnick,score)
.timerlol2 1 3 notice %wordnick Why dont you have another go and try beat it.
.timer 1 5 endgame
}
}
alias endgame {
unset %wordnick
unset %words
unset %on
.timerlol3 1 5 unset %gameon | msg %gamechan You can now test your typing speed, type !words. | unset %gamechan
}
ok wait i found it :D
here is my thing i made for a game i made...
not the whole one... but ya... just maes sure no one types words like hhhh hhhh hhhh hhhh
on :TEXT::?: {
close -m $nick
if %version2.state == $null { halt }
if $nick iswm $read(players.txt, w, $nick) {
write times\ $+ $nick $+ .txt $1
if $len($1) == $left(%letters.dic,1) {
if $1 !iswm $read(players\ $+ $nick $+ .txt, w, $1) {
if $1 iswm $read(%letters.dic, w, $1) {
write players\ $+ $nick $+ .txt $1
halt
}
}
if $1 iswm $read(players\ $+ $nick $+ .txt, w, $1) {
msg $nick 10CLONING WORDS WONT HELP YOU
}
}
}
}