<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/16570" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2009-01-23T07:43:34-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/16570</id>

		<entry>
		<author><name><![CDATA[Fraud]]></name></author>
		<updated>2009-01-23T07:43:34-04:00</updated>

		<published>2009-01-23T07:43:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87084#p87084</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87084#p87084"/>
		<title type="html"><![CDATA[omgword script does not work correct]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87084#p87084"><![CDATA[
Hello everybody. I have a quit old omgword script which is bit buggy.<br>If somebody solves a word the first time, the script counts doubled.<br><br>thats what it does only the first time. Output is in german<br><blockquote class="uncited"><div>Bot-Output - OMG-Word: Füller wurde von Rashors richtig erraten. Rashors hat 1 Punkte <br>Bot-Output - OMG-Word: Füller wurde von Rashors richtig erraten. Rashors hat 2 Punkte</div></blockquote>here is the error <br><strong class="text-strong">Tcl error [omgfertig]: invalid timerID</strong><br><br>and thats the script<div class="codebox"><p>Code: </p><pre><code>################ Binds ################bind PUB -|- .omg omgwordset 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)] &amp;&amp; [expr [unixtime] - $::noflood($channel)] &lt; 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 $wort2while { $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 countif {[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)" omgfertigset ::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 counterif {![info exists counter($nick)]} {set counter($nick) 1putquick "PRIVMSG $chan : \002OMG-Word\002: \037$::norm(wort)\037 wurde von \002$nick\002 richtig erraten. $nick hat $counter($nick) Punkte"killutimer $::timerkillutimer $::timermoneyunbind 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 $::timerkillutimer $::timermoneyunbind pubm - "$chan $::norm(wort)" omgfertig}}</code></pre></div>[/code]<br><br>So. hopefully you can help me. thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9931">Fraud</a> — Fri Jan 23, 2009 7:43 am</p><hr />
]]></content>
	</entry>
	</feed>
