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

	<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-03-20T19:40:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-20T19:40:00-04:00</updated>

		<published>2002-03-20T19:40:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5586#p5586</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5586#p5586"/>
		<title type="html"><![CDATA[Help with msg prompts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5586#p5586"><![CDATA[
Yeah, I know that much... but in the previous post, as you see, I did that, I've double checked that my global flags include a C and they do... but I still can't get that procedure to work...<p>Statistics: Posted by Guest — Wed Mar 20, 2002 7:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-03-20T19:17:00-04:00</updated>

		<published>2002-03-20T19:17:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5584#p5584</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5584#p5584"/>
		<title type="html"><![CDATA[Help with msg prompts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5584#p5584"><![CDATA[
User defined flags are just like built-in ones:<br><br>chattr handle +ABCDEFG<br><br>bind pub A !hello blah<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Mar 20, 2002 7:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-20T15:19:00-04:00</updated>

		<published>2002-03-20T15:19:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5565#p5565</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5565#p5565"/>
		<title type="html"><![CDATA[Help with msg prompts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5565#p5565"><![CDATA[
Thanks, I guess I'll just do it that way.<br>Any help with the user-defined flags though?<p>Statistics: Posted by Guest — Wed Mar 20, 2002 3:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-03-20T14:31:00-04:00</updated>

		<published>2002-03-20T14:31:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5562#p5562</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5562#p5562"/>
		<title type="html"><![CDATA[Help with msg prompts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5562#p5562"><![CDATA[
Use a global array to keep track of the state of each person, and another array to keep track of what they said so far.<br><br>Add in code to check nick changes, parts, quits, kicks, to keep the arrays updated.<br><br>You could also make it non-linear, so that they can answer in whatever order they want, as long as they start with !create and end with !done or something.<br><div class="codebox"><p>Code: </p><pre><code>bind pub !create - on_createbind pub !name - on_nameproc on_create {nick uhost hand chan text} {  global state  set state($nick) 1  putserv "privmsg $chan :Okay, now type !name &lt;blah&gt; to set your name"}proc on_name {nick uhost hand chan text} {  global state answers  if {![info exists state($nick)]} {    putserv "privmsg $chan :You have to use !create first"    return 0  }  if {$state($nick) &gt; 1} {    putserv "privmsg $chan :You already entered your name, fool"    return 0  }  putserv "privmsg $chan :Good job, now type !baa &lt;noise&gt; to set your favorite animal noise."  lappend answers($nick) $text  set state($nick) 2}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Mar 20, 2002 2:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-20T13:37:00-04:00</updated>

		<published>2002-03-20T13:37:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5558#p5558</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5558#p5558"/>
		<title type="html"><![CDATA[Help with msg prompts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5558#p5558"><![CDATA[
Because they aren't new commands... it's whatever the user sends to the bot next gets put into a temp variable and then gets written to a file.  There are about five or six prompts before it gets written to the file.  I guess I could bind it to a different custom flag so when a user with a flag of, let's say, A types anything it'll get put into the variable to be written.  But so far, I havn't had any luck with custom flags either...<div class="codebox"><p>Code: </p><pre><code>bind pub C !startduel startduelproc startduel {nick uhost hand chan text} {  global duel_p1 duel_p2  set duel_p1 $nick  set duel_p2 [string range $text 0 [string wordend $text 0]]  putmsg $chan "blah $duel_p1 $duel_p2"}</code></pre></div>Doesn't even get into that function (procedure... whatever /me == C++ guy) <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":grin:" title="Very Happy"><p>Statistics: Posted by Guest — Wed Mar 20, 2002 1:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2002-03-20T13:01:00-04:00</updated>

		<published>2002-03-20T13:01:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5556#p5556</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5556#p5556"/>
		<title type="html"><![CDATA[Help with msg prompts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5556#p5556"><![CDATA[
why don't you enable binds after each commande?<br>bind pub - "!create" tcl:create<br><br>proc tcl:create {nick uhost handle chan arg } {<br>  your procedure.....<br>  bind msg - "new command" tcl:next<br>}<br><br>proc tcl:next {nick uhost handle arg} {<br>  unbind msg - "new command"<br>  your proc ....<br>  bind ...<br>}<br><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Mar 20, 2002 1:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-19T16:28:00-04:00</updated>

		<published>2002-03-19T16:28:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5535#p5535</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5535#p5535"/>
		<title type="html"><![CDATA[Help with msg prompts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5535#p5535"><![CDATA[
Hi, I was wondering if anyone would like to give me suggestions on how I would do a prompt system.  For instance, someone would message the bot saying !create or whatever. It would then prompt for thier name, they would enter it.  Then it would continue with other prompts.<br>I looked at a previous post about waiting for user input... but from what I could tell the <strong class="text-strong">control</strong> function is only for DCC chats.<p>Statistics: Posted by Guest — Tue Mar 19, 2002 4:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
