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

	<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-08-31T02:34:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-31T02:34:18-04:00</updated>

		<published>2002-08-31T02:34:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10239#p10239</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10239#p10239"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10239#p10239"><![CDATA[
Might want to use the round() function instead.<p>Statistics: Posted by Guest — Sat Aug 31, 2002 2:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-29T15:17:36-04:00</updated>

		<published>2002-08-29T15:17:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10204#p10204</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10204#p10204"/>
		<title type="html"><![CDATA[if you want to round up correctly..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10204#p10204"><![CDATA[
Use this proc:<br><div class="codebox"><p>Code: </p><pre><code>proc integer {integer} {  if {[expr $integer - int($integer)] &lt; 0.5} {    return [expr int($integer)]  } else {    return [expr int($integer) + 1]  }}</code></pre></div>Put it in your code like so:<div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $channel :After $gold_hours hour(s) in the bank, $gold_start gold will be [integer $gold_make] gold."</code></pre></div>The rounding should be correct now.<p>Statistics: Posted by Guest — Thu Aug 29, 2002 3:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-29T14:20:58-04:00</updated>

		<published>2002-08-29T14:20:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10202#p10202</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10202#p10202"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10202#p10202"><![CDATA[
ok.<br><br>The script is doing exactly what it should do now.<br><br>Thanks to Papillon and Iridium for their help.<br><br>Theo<p>Statistics: Posted by Guest — Thu Aug 29, 2002 2:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-29T13:31:37-04:00</updated>

		<published>2002-08-29T13:31:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10199#p10199</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10199#p10199"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10199#p10199"><![CDATA[
ok.<br><br>this removes the comma.<br><br>now one more thing.<br><br>if i do the command theo calc 100 24 it says that it will be 125 gold.<br><br>this isn't right.<br><br>it should be 124.<br><br>anybody knows how to fix that?<p>Statistics: Posted by Guest — Thu Aug 29, 2002 1:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-29T13:18:36-04:00</updated>

		<published>2002-08-29T13:18:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10198#p10198</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10198#p10198"/>
		<title type="html"><![CDATA[Sorry about the while to reply..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10198#p10198"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $channel :After $gold_hours hour(s) in the bank, $gold_start gold will be [expr int($gold_make)] gold."</code></pre></div>hth..<br><br>warning.. this will unfortunately not round up correctly..<br><br>e.g. <br>1.4 -&gt; 1<br>1.5 -&gt; 1<br>1.6 -&gt; 1<br>2.5 -&gt; 1<br><br>You get the idea.<p>Statistics: Posted by Guest — Thu Aug 29, 2002 1:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-28T12:47:31-04:00</updated>

		<published>2002-08-28T12:47:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10137#p10137</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10137#p10137"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10137#p10137"><![CDATA[
that would be at            putserv "PRIVMSG $channel :After $gold_hours hour(s) in the bank, $gold_start gold will be $gold_make gold." <br><br>the $gold_make would be the place where it says that<p>Statistics: Posted by Guest — Wed Aug 28, 2002 12:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-28T12:37:08-04:00</updated>

		<published>2002-08-28T12:37:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10136#p10136</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10136#p10136"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10136#p10136"><![CDATA[
where does it say 16446.3182184?<p>Statistics: Posted by Guest — Wed Aug 28, 2002 12:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-28T12:36:15-04:00</updated>

		<published>2002-08-28T12:36:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10135#p10135</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10135#p10135"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10135#p10135"><![CDATA[
i am just beginning with tcl, so i don't know where to put it exactly.<br><br>i tried a couple of places, but only thing that happens is the script stops working at all.<br><br>anybody that can put me in the right direction?<br><br>Theo<p>Statistics: Posted by Guest — Wed Aug 28, 2002 12:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-28T08:09:20-04:00</updated>

		<published>2002-08-28T08:09:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10108#p10108</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10108#p10108"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10108#p10108"><![CDATA[
this is really dirty, but try [lindex [split "it" .] 0] where "it" is whatever is returning 1234.1234<p>Statistics: Posted by Guest — Wed Aug 28, 2002 8:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-08-25T16:12:15-04:00</updated>

		<published>2002-08-25T16:12:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10024#p10024</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10024#p10024"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10024#p10024"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># command syntax is ok, process request          } else {             set gold_start [lindex $arg 1]            set gold_hours [lindex $arg 2]     set check 1    set gold_make "$gold_start"    while {$check != [expr $gold_hours + 1]} {       set gold_new [expr $gold_make * 0.01]      set gold_make [expr $gold_make + $gold_new]      set check [incr check]    }            putserv "PRIVMSG $channel :After $gold_hours hour(s) in the bank, $gold_start gold will be $gold_make gold."             }           }</code></pre></div>that works.. but it is now with comma's, 10000 dollars for 50 hours will return "16446.3182184"<br>how to make it without comma's I'll leave to u... don't have the knowledge of how <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">  .... or the time to figure it out<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sun Aug 25, 2002 4:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-25T14:17:46-04:00</updated>

		<published>2002-08-25T14:17:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10020#p10020</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10020#p10020"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10020#p10020"><![CDATA[
thanks papilon. <br><br>You responded before i could edit my message again.<br><br>The game doesn't work with comma's.<br><br>The script you made puts :<br><br>After 50 hour(s) in the bank, 10000 gold will be 15000.0 gold<br><br>while it should be 16420.<br><br>The hours that past also give interest<br><br>could you please help me again?<br><br>Theo<p>Statistics: Posted by Guest — Sun Aug 25, 2002 2:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-08-25T14:01:04-04:00</updated>

		<published>2002-08-25T14:01:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10017#p10017</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10017#p10017"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10017#p10017"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># command syntax is ok, process request          } else {             set gold_start [lindex $arg 1]             set gold_hours [lindex $arg 2]             set gold_new [expr [expr $gold_start * 0.01] * $gold_hours]             set gold_make [expr $gold_start + $gold_new]               putserv "PRIVMSG $channel :After $gold_hours hour(s) in the bank, $gold_start gold will be $gold_make gold."             }           } </code></pre></div>that should do it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sun Aug 25, 2002 2:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-25T13:25:04-04:00</updated>

		<published>2002-08-25T13:25:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10014#p10014</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10014#p10014"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10014#p10014"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># listen to all theo commands in channels bind pub - theo pub:theo # limit the chans to listen in by filling them in here ( more chans goes this way {#chan1 #chan2} set enabledchans {#attack} # procedure to check if chan where command is used is listed chan proc isenabledchan { channel } {    global enabledchans    # compare each chan in $enabledchans with current chan and return 1 (true) if chan is listed    foreach enablechan $enabledchans {       if { $channel == $enablechan } {          return 1       }    }    return 0 } # main procedure to handle the theo commands proc pub:theo { nick uhost handle channel arg } {    # check if command should work in this chan    set chan [string tolower $channel]       if { ![isenabledchan $chan] } {       return 1    }    # check if valid command (calc)    if { [llength $arg] == 0 } {       putserv "PRIVMSG $channel :Unable to perform request, give command."    } else {       # get command and compare it to "calc"       set command [lindex $arg 0]       set command [string tolower $command]       if { [string compare $command calc] == 0 } {          # check if valid number of arguments          if { [llength $arg] &lt; 2 } {             putserv "PRIVMSG $channel :Please check the help function if you don't know how to use this command."          # command syntax is ok, process request          } else {             set gold_start [lindex $arg 1]            set gold_hours [lindex $arg 2]            set gold_temp [expr $gold_start / 1.01]            set gold_new [expr $gold_temp * $gold_hours]            set gold_make [expr $gold_start + $gold_new]              putserv "PRIVMSG $channel :After $gold_hours hour(s) in the bank, $gold_start gold will be $gold_make gold."            }          }   }}</code></pre></div><p>Statistics: Posted by Guest — Sun Aug 25, 2002 1:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-08-25T14:07:18-04:00</updated>

		<published>2002-08-25T13:23:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10013#p10013</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10013#p10013"/>
		<title type="html"><![CDATA[What is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10013#p10013"><![CDATA[
Hi,<br><br>i made myself a script to use for players from a online game.<br><br>The script should tell people how much gold they will have after a couple of hours by interest.<br><br>The interest is 0.01 an hour.<br><br>the script only doesn't calculate it right.<br><br>i tried to calculate 100 gold. the hours to bild interest was 5. so it should say that after 5 hours my gold would be 105 gold.<br><br>that is doing it right, but the hours that are past give interest also.<br><br>If i do a 10000 with 50 hours it says 10500 gold, while it should be 10510 gold.<br><br>I put the script in a new message.<br><br>Theo.<p>Statistics: Posted by Guest — Sun Aug 25, 2002 1:23 pm</p><hr />
]]></content>
	</entry>
	</feed>
