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

	<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-04-04T21:16:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-04-04T21:16:18-04:00</updated>

		<published>2006-04-04T21:16:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61657#p61657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61657#p61657"/>
		<title type="html"><![CDATA[&gt;&gt; Hard MIRC -&gt; TCL Script Conversion &lt;&lt;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61657#p61657"><![CDATA[
<blockquote class="uncited"><div>Oh, sorry... I don't much about TCL scripts... Do you think you could help with it anyway?</div></blockquote>You should learn Tcl and convert the "code" yourself. The following will be of assistance:<br><br><a href="http://suninet.org/tclguide/" class="postlink">Guide to TCL scripting for Eggdrop 1.6</a><br><a href="http://www.tcl.tk/man/tcl8.4/TclCmd/" class="postlink">man/tcl8.4/TclCmd/</a><br><a href="http://johoho.eggheads.org/eggdrop/other/guide2tcl.html#Triggers_for_code" class="postlink">A beginners guide to TCL with focus on Eggdrop</a><br><a href="http://tcl.b0rk.de/mirror/eggdrop1.6.15/html/tcl-commands.html" class="postlink">Eggdrop Tcl Commands</a><br><a href="http://www.peterre.com/characters.html" class="postlink">How to write eggdrop scripts that won't choke on special characters</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Tue Apr 04, 2006 9:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Hamish]]></name></author>
		<updated>2006-04-01T12:29:01-04:00</updated>

		<published>2006-04-01T12:29:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61567#p61567</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61567#p61567"/>
		<title type="html"><![CDATA[&gt;&gt; Hard MIRC -&gt; TCL Script Conversion &lt;&lt;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61567#p61567"><![CDATA[
Oh, sorry... I don't much about TCL scripts... Do you think you could help with it anyway?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7551">Hamish</a> — Sat Apr 01, 2006 12:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-04-01T10:04:10-04:00</updated>

		<published>2006-04-01T10:04:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61565#p61565</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61565#p61565"/>
		<title type="html"><![CDATA[&gt;&gt; Hard MIRC -&gt; TCL Script Conversion &lt;&lt;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61565#p61565"><![CDATA[
this script simply gets a <a href="http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=hamish150" class="postlink">webpage </a> and prints the stats from there to the channel?! Sounds like it would be easier to write from scratch.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Apr 01, 2006 10:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Hamish]]></name></author>
		<updated>2006-04-01T06:08:01-04:00</updated>

		<published>2006-04-01T06:08:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61555#p61555</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61555#p61555"/>
		<title type="html"><![CDATA[&gt;&gt; Hard MIRC -&gt; TCL Script Conversion &lt;&lt;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61555#p61555"><![CDATA[
Hi, I have another script request... I think this one is quite hard...<br>If anyone can manage it I am very thankful. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><div class="codebox"><p>Code: </p><pre><code>alias stats {   if ($1) {     /var %i 1     while ($sock(stats. $+ %i)) {       /inc %i     }     /set %stats. $+ %i $+ .user $1-     /set %stats. $+ %i $+ .self 1     /sockopen stats. $+ %i hiscore.runescape.com 80   } } #stats on on *:TEXT:!stats *:*:{   if ($2) {     /var %i 1     while ($sock(stats. $+ %i)) {       /inc %i     }     /set %stats. $+ %i $+ .user $2-     if ($chan) {       /set %stats. $+ %i $+ .target $chan     }     else {       /set %stats. $+ %i $+ .target $nick     }     /sockopen stats. $+ %i hiscore.runescape.com 80   } } #stats end on *:SOCKOPEN:stats.*:{   /sockwrite -t $sockname GET /lang/en/aff/runescape/hiscorepersonal.ws?user1= $+ $eval(% $+ $sockname $+ .user, 2) HTTP/1.1 $+ $crlf   /sockwrite -t $sockname Host: hiscore.runescape.com $+ $crlf   /sockwrite -t $sockname $crlf } on *:SOCKREAD:stats.*:{   if ($sockerr) {     if ($eval(% $+ $sockname $+ .self, 2)) {       /echo -s Socket error while looking up $eval(% $+ $sockname $+ .user, 2) $+ : $sockerr     }     else {       /msg $eval(% $+ $sockname $+ .target, 2) Socket error while looking up $eval(% $+ $sockname $+ .user, 2) $+ : $sockerr     }     /cleanup $sockname   }   else {     /sockread &amp;read     /bwrite $sockname -1 -1 &amp;read     if ($bfind(&amp;read, 1, &lt;/html&gt;).text) {       /results $sockname     }   } } on *:SOCKCLOSE:stats.*:{   /cleanup $sockname } alias -l results {   if ($1) {     /bread $1 1 $file($1).size &amp;statspage     /var %statsstring $chr(91) 04 $+ $upper($eval(% $+ $1 $+ .user, 2)) $+  $chr(93) $+ :     if ($bfind(&amp;statspage, 1, does not feature in the hiscores.).text) {       %statsstring = %statsstring does not feature in the hiscores.     }     else {       /var %currentstat       /var %i 0       while (1) {         %i = $bfind(&amp;statspage, $calc(%i + 1), &lt;td align="left"&gt;&lt;a href="overall.ws?table=).text         if (!%i) {           /break         }         %currentstat = $striphtml($bvar(&amp;statspage, %i, 150).text)         if ($gettok(%currentstat, 3, 32)) {           %statsstring = %statsstring $gettok(%currentstat, 1, 32) 02 $+ $gettok(%currentstat, 3, 32) $+  $chr(124)         }       }       %statsstring = $left(%statsstring, -2)     }     if ($eval(% $+ $1 $+ .self, 2)) {       /echo -s %statsstring     }     else {       /msg $eval(% $+ $1 $+ .target, 2) %statsstring     }     /cleanup $1   } } alias -l striphtml {   /var %charcount 1   /var %tag 0   /var %strippedstring   while (%charcount &lt;= $len($1-)) {     if ($mid($1-, %charcount, 1) == &lt;) {       %tag = 1     }     elseif ($mid($1-, %charcount, 1) == &gt;) {       %tag = 0     }     elseif (!%tag) {       if ($mid($1-, %charcount, 1) == $chr(32)) {         %strippedstring = %strippedstring $chr(32)       }       else {         %strippedstring = %strippedstring $+ $mid($1-, %charcount, 1)       }     }     /inc %charcount 1   }   /return %strippedstring } alias -l cleanup {   if ($1) {     /.remove $1     /unset % $+ $1 $+ .*     /sockclose $1   } }</code></pre></div>So this is what should happen:<br><br>&lt;<span style="color:red"><strong class="text-strong">@Hamish</strong></span>&gt; !stats hamish150<br><span style="color:darkred">-<strong class="text-strong">ClanBot</strong>-</span> <span style="color:red"><strong class="text-strong">Hamish150</strong></span>: <span style="color:darkred">Overall  </span><span style="color:orange">913</span><span style="color:darkred"> | Attack  </span><span style="color:orange">62</span><span style="color:darkred"> | Defence  </span><span style="color:orange">60</span><span style="color:darkred"> | Strength  </span><span style="color:orange">58</span><span style="color:darkred"> | Hitpoints  </span><span style="color:orange">60</span><span style="color:darkred"> | Ranged  </span><span style="color:orange">50</span><span style="color:darkred"> | Prayer  </span><span style="color:orange">41</span><span style="color:darkred"> | Magic  </span><span style="color:orange">50</span><span style="color:darkred"> | Cooking  </span><span style="color:orange">61</span><span style="color:darkred"> | Woodcutting  </span><span style="color:orange">50</span><span style="color:darkred"> | Fletching  </span><span style="color:orange">34</span><span style="color:darkred"> | Fishing  </span><span style="color:orange">61</span><span style="color:darkred"> | Firemaking  </span><span style="color:orange">40</span><span style="color:darkred"> | Crafting  </span><span style="color:orange">47</span><span style="color:darkred"> | Mining  </span><span style="color:orange">55</span><span style="color:darkred"> | Agility  </span><span style="color:orange">40</span><span style="color:darkred"> | Thieving  </span><span style="color:orange">37</span><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7551">Hamish</a> — Sat Apr 01, 2006 6:08 am</p><hr />
]]></content>
	</entry>
	</feed>
