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

	<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>2010-10-14T04:22:49-04:00</updated>

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

		<entry>
		<author><name><![CDATA[crazycooky77]]></name></author>
		<updated>2010-10-14T04:22:49-04:00</updated>

		<published>2010-10-14T04:22:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94718#p94718</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94718#p94718"/>
		<title type="html"><![CDATA[Detailed mIRC Script to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94718#p94718"><![CDATA[
Thanks for the great suggestions and links, I'll definitely check all those out today <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11390">crazycooky77</a> — Thu Oct 14, 2010 4:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-10-13T21:21:41-04:00</updated>

		<published>2010-10-13T21:21:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94716#p94716</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94716#p94716"/>
		<title type="html"><![CDATA[Detailed mIRC Script to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94716#p94716"><![CDATA[
Just wanted to comment on this code: <br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- "brb" brbproc brb { nick host hand chan text } {putserv "msg $nick/$chan :See you in a sec $nick"} </code></pre></div>I suppose you could use a pub bind... but I'd use pubm, which uses the same args, like so: <div class="codebox"><p>Code: </p><pre><code>bind pubm * "% brb" brb</code></pre></div> <br>The "%" represents one word: the channel, in this case.<br><br>As for this line: <div class="codebox"><p>Code: </p><pre><code>putserv "msg $nick/$chan :See you in a sec $nick"</code></pre></div>Its almost right, except you need "privmsg" rather than "msg" and you can't combine $nick and $chan together in that manner. You can do this, however: <div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $chan,$nick :See you in a sec $nick"</code></pre></div>Or, you can write two individual lines, one that sends to $nick, and the other $chan. You can queue those with "puthelp" instead of "putserv" too, to make it a bit easier on your bot.<br><br>You could make a single proc to process several of those types of triggers, using string equal/match/regexp, with if/elseifs. You'd have to change the pubm bind like so in that case: <div class="codebox"><p>Code: </p><pre><code>bind pubm * * brbproc brb {nick host hand chan text} {# and then process each line to see if it matches what you want: if {[string equal -nocase "brb" $text]} {   putserv "PRIVMSG $chan,$nick :See you in a sec $nick" } elseif { ... } } </code></pre></div>Hope that helped, you seem to be off to a pretty good start so far. <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=11101">Luminous</a> — Wed Oct 13, 2010 9:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2010-10-13T12:22:52-04:00</updated>

		<published>2010-10-13T12:22:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94712#p94712</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94712#p94712"/>
		<title type="html"><![CDATA[Re: Detailed mIRC Script to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94712#p94712"><![CDATA[
<blockquote class="uncited"><div>... (i.e. without an eggdrop, I only want to buy it when I actually have the script).</div></blockquote>Eggdrop is free.<br><a href="http://www.eggheads.org/downloads/" class="postlink">http://www.eggheads.org/downloads/</a><br><br>So is Windrop.<br><a href="http://windrop.sourceforge.net/downloads.html" class="postlink">http://windrop.sourceforge.net/downloads.html</a><br><blockquote class="uncited"><div> Any suggestions would be great.</div></blockquote>Go for it!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>Get a shell, and install eggdrop.  <br><a href="http://www.egghelp.org/" class="postlink">http://www.egghelp.org/</a>    and see the left side. <br>This site has lots... LOTS... of info.<br><br>Alternate idea:<br>(assuming you have a Windows machine handy) - Install Windrop on your local machine.   With the exception of some scripts that use some linux specific commands, it is a great way to experiment with writing your own TCL scripts.   I keep a Windrop, just for that purpose.<br><blockquote class="uncited"><div>...<br>I've tried to learn this, but I'll tell you straight away, I'm a "noob". I would like any help you can give me ...  giving me examples of how to write the certain codes I want or just general tips and tricks.</div></blockquote>When you install bot, one of the created sub dirs is    doc/       .   In it, find a file named    tcl-commands.doc   .<br>It is essential for script writing, as it contains syntax and explanation of eggdrop specific TCL commands.<br>Else,  view it here:<br><a href="http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html" class="postlink">http://www.eggheads.org/support/egghtml ... mands.html</a><br><br>Next:<br><a href="http://suninet.the-demon.de/" class="postlink">http://suninet.the-demon.de/</a><br>A VERY nice tutorial.  Starts with the basics, for newcomers.<br>Be sure to bookmark that site.<br><br>Next:<br><a href="http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm" class="postlink">http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm</a><br>That's the rest - the non-Eggdrop specific TCL commands - , explained.  <br><br>With those three things, and a Windrop to experiment on locally,  you can write TCL scripts, and test.      <br><br>I hope this helps.<br><br><br>p.s.  If you can write mIRC scripts,  then as soon as you look at tcl-commands.doc ,   it will click.      ( Tip: Be sure to find and understand the bind command )<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Oct 13, 2010 12:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[crazycooky77]]></name></author>
		<updated>2010-10-13T12:03:51-04:00</updated>

		<published>2010-10-13T12:03:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94711#p94711</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94711#p94711"/>
		<title type="html"><![CDATA[Detailed mIRC Script to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94711#p94711"><![CDATA[
Hey!<br><br>I doubt I'll find someone with enough patience and time for this, but it never hurts to ask.<br><br>I worked on an mIRC bot for about 3 years and it took me quite a while to learn it all, especially the counting script. Now I would like to "convert" my mIRC script so that I could use it in an eggdrop but I'm having quite a bit of trouble with it.<br><br><br>My bot generally just writes something whenever someone in the channel types a key word (e.g. you write "brb", the bot will say "see you in a sec!").<br><br><br>For that, I wrote this in TCL:<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- "brb" brb proc brb { nick host hand chan text } { putserv "msg $nick/$chan :See you in a sec $nick" } </code></pre></div><br>I have absolutely no idea if that's correct and I couldn't find anything on Google where I could test it for free (i.e. without an eggdrop, I only want to buy it when I actually have the script). Any suggestions would be great.<br><br><br>Now it gets a bit harder... when someone joins or leaves a channel, the bot says something again (e.g. on join -&gt; Hello $nick!). It gets a bit more complicated, when the bot has some restrictions. For example, my mIRC script says "Hello $nick" if the ($nick != BotNick) and ($chan != #CertainChannel).<br><br><br>That's most of what my bot does or rather what the eggdrop should do. I do have 2 very complicated scripts, however. That would be the "counting script".<br><br>Whenever someone types "!cookie", the bot will say "X gave cookie to Y" and will add the variable 1 to Y. The variable will always increase, depending on how many cookies Y received and when you type "?cookie Y", the bot would tell you how many cookies Y has -&gt; "Y has X $variable" (e.g. "Y has 10 cookies"). Again with many if's and else (Y has 1 cookie, Y has 0 cookieS, Y has 10 cookieS, etc). All variables are bound to the nicknames that were given cookies to and are saved by the bot.<br><br>The bot also "steals" cookies, where the variable will be decreased from X by 1 and added to Y by 1. E.g. "!cookiesteal X" -&gt; "Y stole a cookie from X" -&gt; Y has now +1 $variable (cookie) and X has minus 1.<br><br><br>One last thing I have is a timer with quit and rejoin. The bot leaves the channel with a certain text when you write the trigger word, comes back after X seconds and writes another sentence.<br><br><br>Other than that, the only thing that changes is that sometimes the text the bot writes is written via query, sometimes directly in the channel and sometimes via notice.<br><br><br>I've tried to learn this, but I'll tell you straight away, I'm a "noob". I would like any help you can give me - no matter if it's rewriting my script for me (though I know that is a bit much to ask) or giving me examples of how to write the certain codes I want or just general tips and tricks.<br><br>Looking forward to your replies!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11390">crazycooky77</a> — Wed Oct 13, 2010 12:03 pm</p><hr />
]]></content>
	</entry>
	</feed>
