After finishing a word, JUST the first time it counts doubled.
Outputs a omgword - User solves it
and the bot output looks like that
OMG-Word: <OMGWORD> wurde von USER1 richtig erraten. USER hat 1 Punkte
OMG-Word: <OMGWORD> wurde von USER1 richtig erraten. USER1 hat 2 Punkte
Means OMG-Word: <OMGWORD> has been solved by USER1 . USER 1 got 1/2 Points
The TCL error is Tcl error [omgfertig]: invalid timerID
and this is the Script
#############
### Binds ###
#############
bind PUB -|- .omg omgword
set count "0"
set omgwoerter "scripts/priv/db/omg.txt"
#################
### FloodProt ###
#################
proc noflood { type channel } {
if {[string equal -nocase "check" $type]} {
if {[info exists ::noflood($channel)] && [expr [unixtime] - $::noflood($channel)] < 30} {
return 1
}
return 0
} elseif {[string equal -nocase "set" $type]} {
set ::noflood($channel) [unixtime]
}
}
#############
### Procs ###
#############
####################
### UmdrehenProc ###
####################
proc umdrehen { wort } {
set wort2 "[string toupper [lindex [split $wort ""] 0]][join [lrange [split $wort ""] 1 end] ""]"
set n $wort2
while { $wort2 == $n } {
set n ""
foreach b [split $wort2 ""] { if { [rand 2] != "1" } { set n "$n$b" } { set n "$b$n" } }
}
return $n
}
############
### Main ###
############
proc omgword { nick host hand chan args } {
global count
if {[noflood check $chan]} {
putquick "NOTICE $nick : Mit flooden kannst du nix bezwingen!"
return
}
set ::norm(wort) [lindex [set fileList [split [read [set fs [open "$::omgwoerter" r]]] \n]] [rand [llength $fileList]]][close $fs]
set count [expr $count + 1]
putquick "PRIVMSG $chan :\002OMG-Word\002: nr: \002$count\002 Okay dann fangt mal an zu raten, wir suchen: \037[umdrehen $::norm(wort)]\037, ihr habt 30s Zeit."
bind pubm - "$chan $::norm(wort)" omgfertig
set ::timer [utimer 30 [list putquick "PRIVMSG $chan :\002OMG-Word\002: nr: \002$count\002 Leider hat keiner das Wort erraten, wir haben \037$::norm(wort)\037 gesucht."]]
set ::timermoney [utimer 29 [list unbind pubm - "$chan $::norm(wort)" omgfertig]]
noflood set $chan
}
##################
### OMG-Fertig ###
##################
proc omgfertig {nick host hand chan arg} {
global counter
if {![info exists counter($nick)]} {
set counter($nick) 1
putquick "PRIVMSG $chan : \002OMG-Word\002: \037$::norm(wort)\037 wurde von \002$nick\002 richtig erraten. $nick hat $counter($nick) Punkte"
killutimer $::timer
killutimer $::timermoney
unbind pubm - "$chan $::norm(wort)" omgfertig
}
if {[info exists counter($nick)]} {
set counter($nick) [expr $counter($nick) +1]
global counter($nick)
putquick "PRIVMSG $chan : \002OMG-Word\002: \037$::norm(wort)\037 wurde von \002$nick\002 richtig erraten. $nick hat $counter($nick) Punkte"
killutimer $::timer
killutimer $::timermoney
unbind pubm - "$chan $::norm(wort)" omgfertig
}
}
Thanks for helping me

Ahhh btw. maybe somebody has a better omgword script. Thx in advance