<?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/11244" />

	<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>2006-01-29T21:08:37-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-29T21:08:37-04:00</updated>

		<published>2006-01-29T21:08:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59920#p59920</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59920#p59920"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59920#p59920"><![CDATA[
Or you can do this:<div class="codebox"><p>Code: </p><pre><code>bind pub - junge state:wcproc state:wc {nick uhost hand chan arg} { global wordcount if {![info exists wordcount(junge)]} { set wordcount(junge) 0 } puthelp "privmsg $chan :junge Nr. [incr wordcount(junge)]"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jan 29, 2006 9:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Cardinal]]></name></author>
		<updated>2006-01-29T06:42:45-04:00</updated>

		<published>2006-01-29T06:42:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59897#p59897</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59897#p59897"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59897#p59897"><![CDATA[
Done!<br><div class="codebox"><p>Code: </p><pre><code>if {[file exists scripts/wordcount.txt]} {   foreach {word count} [split [read [set infile [open scripts/wordcount.txt]]][close $infile] \n] {    if {$word != ""} {     set wordcount($word) $count    }   }  }  bind time ?0* save:wc  bind pubm - * state:wc  proc save:wc args {   global wordcount   set f [open scripts/wordcount.txt w]   foreach {w c} [array get wordcount] {    puts $f "$w $c"   }   close $f  }  proc state:wc {nick uhost hand chan arg} {  if {[string match -nocase *junge* $arg]} {  global wordcount   set word [string tolower [lindex [split $arg] 0]]   if {![info exists wordcount($word)]} { set wordcount($word) 0 }   puthelp "privmsg $chan :$word Nr. [incr wordcount($word)]"  } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7283">Cardinal</a> — Sun Jan 29, 2006 6:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Cardinal]]></name></author>
		<updated>2006-01-29T06:15:32-04:00</updated>

		<published>2006-01-29T06:15:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59895#p59895</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59895#p59895"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59895#p59895"><![CDATA[
I replaced the * on bind pubm with "Junge" because the script should just count the word "junge", not every word <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>But thats not working...<br><br>Thank you anyway for the patience![/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7283">Cardinal</a> — Sun Jan 29, 2006 6:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-28T18:56:04-04:00</updated>

		<published>2006-01-28T18:56:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59858#p59858</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59858#p59858"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59858#p59858"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># read words with count from fileif {[file exists scripts/wordcount.txt]} { foreach {word count} [split [read [set infile [open scripts/wordcount.txt]]][close $infile] \n] {  if {$word != ""} {   set wordcount($word) $count  } }}# save words to file every 10 minutebind time ?0* save:wcbind pubm - * state:wcproc save:wc args { global wordcount set f [open scripts/wordcount.txt w] foreach {w c} [array get wordcount] {  puts $f "$w $c" } close $f}proc state:wc {nick uhost hand chan arg} { global wordcount set word [string tolower [lindex [split $arg] 0]] if {![info exists wordcount($word)]} { set wordcount($word) 0 } puthelp "privmsg $chan :$word Nr. [incr wordcount($word)]"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jan 28, 2006 6:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Cardinal]]></name></author>
		<updated>2006-01-28T04:40:34-04:00</updated>

		<published>2006-01-28T04:40:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59816#p59816</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59816#p59816"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59816#p59816"><![CDATA[
The Script should count how often the word hello was used in the channel, and always give out the count if its used.<br>So the script must save the number in a file to keep it on a reboot.<br><br>i.e:<br>Chan: Junge<br>Bot: Junge Nr. 5982<br><br>Chan: Junge<br>Bot: Junge Nr. 5983<br><br>...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7283">Cardinal</a> — Sat Jan 28, 2006 4:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-27T18:23:17-04:00</updated>

		<published>2006-01-27T18:23:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59799#p59799</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59799#p59799"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59799#p59799"><![CDATA[
<blockquote class="uncited"><div>Can you edit that the script will count the word endless, and will never beginn from 0? If im right then it must be savend in an extern file to keep the number.</div></blockquote>I didn't get what you mean.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Jan 27, 2006 6:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Cardinal]]></name></author>
		<updated>2006-01-27T14:18:29-04:00</updated>

		<published>2006-01-27T14:18:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59793#p59793</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59793#p59793"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59793#p59793"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {![file exists counter.txt]} {   close [open counter.txt a+] }bind pub - junge junge:reply proc junge:reply {nick uhost hand chan arg} {  global jungereply  if {![info exists jungereply([set chan [string tolower $chan]])]} {   set jungereply($chan) [list [unixtime] 1]  }  set file [open counter.txt r] set counter [lindex [gets $file] 0] close $file incr counter set $file [open counter.txt w] puts $file $counter close $file putserv "privmsg $chan :Junge $counter" }</code></pre></div>That is what i build, but its not working..<br><br>Tcl error [hallo:reply]: expected integer but got ""<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7283">Cardinal</a> — Fri Jan 27, 2006 2:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Cardinal]]></name></author>
		<updated>2006-01-27T12:56:50-04:00</updated>

		<published>2006-01-27T12:56:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59790#p59790</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59790#p59790"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59790#p59790"><![CDATA[
Im sure im going on your nerves... but<br><div class="codebox"><p>Code: </p><pre><code>bind pub - hallo! hallo:reply proc hallo:reply {nick uhost hand chan arg} {  global halloreply  if {![info exists halloreply([set chan [string tolower $chan]])]} {   set halloreply($chan) [list [unixtime] 1]  }  foreach {t o} $halloreply($chan) {break} if {[unixtime]-$t &gt; 60 || $o &gt; 3} { set o 1 }  putserv "privmsg $chan :HalloNr$o"  set halloreply($chan) [list [unixtime] [incr o]] }</code></pre></div>Can you edit that the script will count the word endless, and will never beginn from 0? If im right then it must be savend in an extern file to keep the number.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7283">Cardinal</a> — Fri Jan 27, 2006 12:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Cardinal]]></name></author>
		<updated>2006-01-26T18:50:35-04:00</updated>

		<published>2006-01-26T18:50:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59763#p59763</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59763#p59763"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59763#p59763"><![CDATA[
thx again! Its working<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7283">Cardinal</a> — Thu Jan 26, 2006 6:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-26T17:08:08-04:00</updated>

		<published>2006-01-26T17:08:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59761#p59761</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59761#p59761"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59761#p59761"><![CDATA[
My bad, replace<div class="codebox"><p>Code: </p><pre><code>foreach {t o} $halloreply {break}</code></pre></div>with<div class="codebox"><p>Code: </p><pre><code>foreach {t o} $halloreply($chan) {break}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Jan 26, 2006 5:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Cardinal]]></name></author>
		<updated>2006-01-26T14:00:09-04:00</updated>

		<published>2006-01-26T14:00:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59755#p59755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59755#p59755"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59755#p59755"><![CDATA[
Both scripts are not working:<br><br>Tcl error [hallo:reply]: can't read "halloreply": variable is array<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7283">Cardinal</a> — Thu Jan 26, 2006 2:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Cardinal]]></name></author>
		<updated>2006-01-26T02:43:08-04:00</updated>

		<published>2006-01-26T02:43:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59736#p59736</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59736#p59736"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59736#p59736"><![CDATA[
Thank You!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7283">Cardinal</a> — Thu Jan 26, 2006 2:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-25T19:29:57-04:00</updated>

		<published>2006-01-25T19:29:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59727#p59727</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59727#p59727"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59727#p59727"><![CDATA[
You should've figured that out by yourself after the example I gave you.<div class="codebox"><p>Code: </p><pre><code>bind pub - hallo! hallo:replyproc hallo:reply {nick uhost hand chan arg} { global halloreply if {![info exists halloreply([set chan [string tolower $chan]])]} {  set halloreply($chan) [list [unixtime] 0] } set replies {"Hallo" "Hi" "Hidiho"} foreach {t o} $halloreply {break} if {[unixtime]-$t &gt; 60 || $o &gt; 3} { set o 0 } putserv "privmsg $chan :[lindex $replies $o]" set halloreply($chan) [list [unixtime] [incr o]]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Jan 25, 2006 7:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Cardinal]]></name></author>
		<updated>2006-01-25T02:01:39-04:00</updated>

		<published>2006-01-25T02:01:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59697#p59697</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59697#p59697"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59697#p59697"><![CDATA[
Sorry but that is not what i mean, he should not just add a number behind the same response.<br>The Bot should give 3 very different responses, but in a specified order!.<br><br>Chan: Hallo<br>Bot: Hallo           (reply1)<br>Chan: Hallo<br>Bot: Hi               (reply2)<br>Chan Hallo<br>Bot: Hidiho         (reply3)  <br><br>Sorry if im not easy to understand <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>I hope you now know what i mean.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7283">Cardinal</a> — Wed Jan 25, 2006 2:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-24T20:54:33-04:00</updated>

		<published>2006-01-24T20:54:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59685#p59685</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59685#p59685"/>
		<title type="html"><![CDATA[Ordered Response]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59685#p59685"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - hallo! hallo:replyproc hallo:reply {nick uhost hand chan arg} { global halloreply if {![info exists halloreply([set chan [string tolower $chan]])]} {  set halloreply($chan) [list [unixtime] 1] } foreach {t o} $halloreply {break} if {[unixtime]-$t &gt; 60 || $o &gt; 3} { set o 1 } putserv "privmsg $chan :HalloNr$o" set halloreply($chan) [list [unixtime] [incr o]]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Jan 24, 2006 8:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
