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

	<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>2003-11-17T19:29:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-17T19:29:25-04:00</updated>

		<published>2003-11-17T19:29:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30210#p30210</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30210#p30210"/>
		<title type="html"><![CDATA[Help....my dice dosnt work exactly. Anybody help me plz! ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30210#p30210"><![CDATA[
<span style="color:teal">Nobody with an idea here?? Hmm..., i think i give up!</span><p>Statistics: Posted by Guest — Mon Nov 17, 2003 7:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-17T19:04:33-04:00</updated>

		<published>2003-11-17T19:04:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30208#p30208</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30208#p30208"/>
		<title type="html"><![CDATA[Help....my dice dosnt work exactly. Anybody help me plz! ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30208#p30208"><![CDATA[
<span style="color:teal">No! This is incorrect.<br>If i only type <strong class="text-strong">!w</strong>, my bot says the errormessage! (<em class="text-italics">e.G. sorry, only positive letters (&gt;0)</em>)   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> <br><br><br><strong class="text-strong">Anybody here with an idea where the error is in my script!</strong> Plz help! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"> <br></span><p>Statistics: Posted by Guest — Mon Nov 17, 2003 7:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2003-10-29T06:50:02-04:00</updated>

		<published>2003-10-29T06:50:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29141#p29141</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29141#p29141"/>
		<title type="html"><![CDATA[Help....my dice dosnt work exactly. Anybody help me plz! ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29141#p29141"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - !w ?pub_wuerfel proc ?pub_wuerfel {nick userhost hand chan {input "6"}} {   if {[regexp {^[0-9]+$} $input] &amp;&amp; $input&gt;0} {       set num [expr [rand $input] + 1]     if {$input == "6"} {       putchan $chan "--&gt; $nick hat eine $num gewürfelt!";     } else {       putchan $chan "--&gt; $nick hat eine $num gewürfelt! (von $input Seiten)"     }   } else {     putchan $chan "--&gt; $nick ! Nur positive Zahlen eingeben! (z.B.: !w 78)"   } } </code></pre></div>try this. hope this {input "6"} syntax is correct, but you will see...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Wed Oct 29, 2003 6:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-10-28T12:55:23-04:00</updated>

		<published>2003-10-28T12:55:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29097#p29097</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29097#p29097"/>
		<title type="html"><![CDATA[Help....my dice dosnt work exactly. Anybody help me plz! ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29097#p29097"><![CDATA[
<span style="color:teal">It dont work!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> <br>If i type only <strong class="text-strong">!w</strong> he prints out the Errormsg! (Nur positiv...bla)</span><p>Statistics: Posted by Guest — Tue Oct 28, 2003 12:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2003-10-28T11:42:38-04:00</updated>

		<published>2003-10-28T11:42:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29093#p29093</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29093#p29093"/>
		<title type="html"><![CDATA[Help....my dice dosnt work exactly. Anybody help me plz! ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29093#p29093"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - !w ?pub_wuerfel proc ?pub_wuerfel {nick userhost hand chan input} {   if {[regexp {^[0-9]+$} $input] &amp;&amp; $input&gt;0} {    if {$input != ""} {      set num [expr [rand $input] + 1]    } else {      set num [expr [rand 6] + 1]    }    if {$input == ""} {      putchan $chan "--&gt; $nick hat eine $num gewürfelt!";    } else {      putchan $chan "--&gt; $nick hat eine $num gewürfelt! (von $input Seiten)"    }  } else {    putchan $chan "--&gt; $nick ! Nur positive Zahlen eingeben! (z.B.: !w 78)"  } }</code></pre></div>that's how i'd code it. untested. i guess user's way is better, however, i don't understand it *g*<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Tue Oct 28, 2003 11:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-10-28T06:47:40-04:00</updated>

		<published>2003-10-28T06:47:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29085#p29085</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29085#p29085"/>
		<title type="html"><![CDATA[Help....my dice dosnt work exactly. Anybody help me plz! ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29085#p29085"><![CDATA[
<span style="color:teal">Sorry, but can u specify that?<br>Im a <strong class="text-strong">n00b</strong> in this and i have to learn....  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"> <br>I also have read any tuts, but my english is very bad and mostly i cant understand anything... =(<br>*angry*<br>Thx for ur understandment...<br></span><p>Statistics: Posted by Guest — Tue Oct 28, 2003 6:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-10-27T19:31:13-04:00</updated>

		<published>2003-10-27T19:31:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29074#p29074</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29074#p29074"/>
		<title type="html"><![CDATA[Help....my dice dosnt work exactly. Anybody help me plz! ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29074#p29074"><![CDATA[
If you want a random value based on the number supplied by the user you better use that number when randomizing <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Keep in mind that 'rand' returns a random number between 0 and the (positive) integer you feed it -1, so you better add 1 to the result, not to the number randomized if you want values from 1 to 6 returned.<br><br>To check if the input is valid you can do <div class="codebox"><p>Code: </p><pre><code>if {[string is int $input] &amp;&amp; $input&gt;0} {..}</code></pre></div> or <div class="codebox"><p>Code: </p><pre><code>if {[regexp {^[0-9]+$} $input] &amp;&amp; $input&gt;0} {..}</code></pre></div> if you're coding for some old version that doesn't have that string command.<br><br>Here's a way to do the randomizing and adding in one operation:<div class="codebox"><p>Code: </p><pre><code> [expr {int(rand()*$input)+1}]</code></pre></div>Good luck <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=2878">user</a> — Mon Oct 27, 2003 7:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-10-27T15:37:36-04:00</updated>

		<published>2003-10-27T15:37:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29067#p29067</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29067#p29067"/>
		<title type="html"><![CDATA[Help....my dice dosnt work exactly. Anybody help me plz! ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29067#p29067"><![CDATA[
<span style="color:teal">Hey everybody!<br>I have a little prob!<br>I´ve written a little neat Dice-addon, but it dont work on my idea! (my english sux, i know  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> )<br>Here the code:</span><div class="codebox"><p>Code: </p><pre><code>bind pub - !w ?pub_wuerfelproc ?pub_wuerfel {nick userhost hand chan target} {  set num [rand 7]  if {$num &gt; 0 &amp;&amp; $target == ""} {   putchan $chan "--&gt; $nick hat eine $num gewürfelt!" ;return 0}   if {$num &gt; 0 &amp;&amp; $target != ""} {   putchan $chan "--&gt; $nick hat eine $num gewürfelt! (von $target Seiten)" ;return 0}   else {  putchan $chan "--&gt; $nick ! Nur positive  Zahlen eingeben! (z.B.: !w 78)" ;return 0}}</code></pre></div>When a user type only <strong class="text-strong">!w</strong>, the answer is [/color]<span style="color:red">"NICK hat eine "RANDOM Number" gewürfelt."</span> Where a default dice only have 6 sides! [it means it cant display numbers higher then 6 or a 0]<br><br>But is he typing <strong class="text-strong">!w 666</strong>, it must display the same above, but with the attachment <span style="color:blue">"(Von 666 Seiten)"</span><span style="color:teal"> in end of this line. (will means, the dice now has 666 sides)<br><br>last but not least:<br>Is he typing <strong class="text-strong">!w 0</strong> or <strong class="text-strong">!w abc</strong> an error must displayed!<br><br>Well i hope any Germans are present here to understand my problem.<br><br>Greetz:<br><br>-{DFW}-DER_Wolle!<br><br></span>Notice: Falls jemand deutsch spricht und mir helfen kann, #dfw im Quarknet! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> Einfach Querie oder frag nach mir!<p>Statistics: Posted by Guest — Mon Oct 27, 2003 3:37 pm</p><hr />
]]></content>
	</entry>
	</feed>
