on *:TEXT:!start*:#pang: {
set %game on
gameon1
}
on *:TEXT:$( %word ):#pang: {
set %game on
if (%words == ready) {
set %secondss $calc($ticks - %ticks)
set %seconds $calc(%secondss / 1000)
tokenize 46 %seconds
set %words waiting
inc %speed [ $+ [ $nick ] ]
msg $chan It took $1 seconds and $2 miliseconds for you to get that - Well done $nick - You have a total of %speed [ $+ [ $nick ] ] points
unset %word
gameon1
if ($1 < 3) {
inc %cheating [ $+ [ $nick ] ]
if (%cheating [ $+ [ $nick ] ] > 5) {
ban -ku600 $chan $nick Sorry please dont cheat 10min ban
unset %cheating [ $+ [ $nick ] ]
}
}
}
}
alias gameon1 {
if (%game == on) {
if (%words == ready) { msg $chan wait there is allready a game }
else {
set %word $read(words.txt)
set %words ready
set %ticks $ticks
msg $chan The word is -- $regsubex($regsubex(%word,/a/g,a@),/e,e@) -- First person to type it wins! - Without the @'s
}
}
}
on *:TEXT:!stop*:#: {
unset %game
unset %word
unset %words
}
on *:PART:#pang: {
unset %cheating [ $+ [ $nick ] ]
}