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

	<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>2002-09-04T08:16:02-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-04T08:16:02-04:00</updated>

		<published>2002-09-04T08:16:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10437#p10437</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10437#p10437"/>
		<title type="html"><![CDATA[A &quot;drawing by lots&quot; bot?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10437#p10437"><![CDATA[
oh thx!<br><br>can you tell me more about that ctcp bind?<br><br>because I don't know much about tcl programming.<br><br>oh and btw. the nicklist is sorted in alphabetically order, so the bot nick isn't the first in the list, but thanks anyway! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Wed Sep 04, 2002 8:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-04T05:22:40-04:00</updated>

		<published>2002-09-04T05:22:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10420#p10420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10420#p10420"/>
		<title type="html"><![CDATA[A &quot;drawing by lots&quot; bot?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10420#p10420"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set rnick [lindex [chanlist #channel] [expr [rand [llength [chanlist #channel]]] - 1]]</code></pre></div></div></blockquote>He probably doesn't want to pick the bot's nick. Also you don't need the -1 since rand n returns 0 to n-1.<br><div class="codebox"><p>Code: </p><pre><code>set nicks [lrange [chanlist #chan] 1 end]set len [llength $nicks]set randnick [lindex $nicks [rand $len]]</code></pre></div>This assumes that the bot's nick is the first in the list. I don't think that's a documented feature but it generally works out.<br><br>Now to do your second part, giving him 30 seconds to say something, you have to use a pubm bind and a utimer. Check tcl-commands.doc for more information. If you want t ocatch actions too (like /me says hi), then use a ctcp bind.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Sep 04, 2002 5:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-04T04:59:04-04:00</updated>

		<published>2002-09-04T04:59:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10415#p10415</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10415#p10415"/>
		<title type="html"><![CDATA[A &quot;drawing by lots&quot; bot?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10415#p10415"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set rnick [lindex [chanlist #channel] [expr [rand [llength [chanlist #channel]]] - 1]]</code></pre></div>That will get you a random nickname.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Sep 04, 2002 4:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-03T14:35:10-04:00</updated>

		<published>2002-09-03T14:35:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10398#p10398</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10398#p10398"/>
		<title type="html"><![CDATA[A &quot;drawing by lots&quot; bot?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10398#p10398"><![CDATA[
thanks!<br><br>i'll have a look there! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Tue Sep 03, 2002 2:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-09-03T13:55:23-04:00</updated>

		<published>2002-09-03T13:55:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10393#p10393</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10393#p10393"/>
		<title type="html"><![CDATA[A &quot;drawing by lots&quot; bot?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10393#p10393"><![CDATA[
<a href="http://www.egghelp.org/enhance.htm#tclscripts" class="postlink">http://www.egghelp.org/enhance.htm#tclscripts</a><br><br>that's a good place to start <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>also read the tcl-commands.doc in your eggdrop's "doc-dir" it has alot of commands u might find useful<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Tue Sep 03, 2002 1:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-03T13:40:23-04:00</updated>

		<published>2002-09-03T13:40:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10392#p10392</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10392#p10392"/>
		<title type="html"><![CDATA[A &quot;drawing by lots&quot; bot?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10392#p10392"><![CDATA[
ah ok, thx!<br><br>can you give me a link to a documentation, where to read all those things?<br><br>thx! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Tue Sep 03, 2002 1:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-09-03T12:53:07-04:00</updated>

		<published>2002-09-03T12:53:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10389#p10389</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10389#p10389"/>
		<title type="html"><![CDATA[A &quot;drawing by lots&quot; bot?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10389#p10389"><![CDATA[
well.... all u have to do is to use "foreach u [chanlist #channel]" to find all the nicks in the channel, then use "rand" to pick one of them. after that u just have to activate a utimer which will be canceled if the nick responds in time... 30 secs <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Tue Sep 03, 2002 12:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-03T12:31:24-04:00</updated>

		<published>2002-09-03T12:31:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10387#p10387</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10387#p10387"/>
		<title type="html"><![CDATA[A &quot;drawing by lots&quot; bot?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10387#p10387"><![CDATA[
Hi There!<br><br>I want to code such a bot.<br><br>I need a thing before I can start:<br><br>How can i randomly pick one out of the Nicklist and give him 30 seconds of time to say anything?<br><br>How to do that?<br><br>Thanks for your help! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Tue Sep 03, 2002 12:31 pm</p><hr />
]]></content>
	</entry>
	</feed>
