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

	<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>2004-02-23T07:30:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[slennox]]></name></author>
		<updated>2004-02-23T07:30:12-04:00</updated>

		<published>2004-02-23T07:30:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33888#p33888</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33888#p33888"/>
		<title type="html"><![CDATA[aidle.tcl component]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33888#p33888"><![CDATA[
Quickest mod: find the two line that match<div class="codebox"><p>Code: </p><pre><code>timer [expr [rand $ai_time] + 1] ai_sendmsg</code></pre></div>and replace them with<div class="codebox"><p>Code: </p><pre><code>timer [expr {[rand $ai_time] + $ai_timemin}] ai_sendmsg</code></pre></div>Then add your "set ai_timemin" line, which will be the minimum interval. The maximum interval will be ai_time + ai_timemin. If you wanted between 20 and 60 minutes, for example, you would set ai_timemin to 20, and ai_time to 40. There is actually an error of 1 minute, but ignoring that saves some code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13034">slennox</a> — Mon Feb 23, 2004 7:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[FiRe]]></name></author>
		<updated>2004-02-18T20:54:22-04:00</updated>

		<published>2004-02-18T20:54:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33719#p33719</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33719#p33719"/>
		<title type="html"><![CDATA[aidle.tcl component]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33719#p33719"><![CDATA[
Currently it only does a message at a random time from 1 to $ai_time right?<br><br>How do I modify it so that it does message between two time periods? say $ai_timemin and $ai_timemax?<br><div class="codebox"><p>Code: </p><pre><code># netbots.tcl v4.09 (1 April 2002)# Copyright 1998-2002 by slennox# slennox's eggdrop page - http://www.egghelp.org/## aidle.tcl component script ##proc ai_sendmsg {} {  global ai_chans ai_msgbots ai_msgs ai_time ai_uidle botnick  if {$ai_chans == ""} {    set chan [lindex [channels] [rand [llength [channels]]]]  } else {    set chan [lindex $ai_chans [rand [llength $ai_chans]]]  }  if {$ai_msgbots} {    if {[validchan $chan] &amp;&amp; [botonchan $chan]} {      set botlist ""      foreach bot [chanlist $chan b] {        if {$bot == $botnick || [onchansplit $bot $chan]} {continue}        lappend botlist $bot      }      if {$botlist != ""} {        puthelp "PRIVMSG [lindex $botlist [rand [llength $botlist]]] :[lindex $ai_msgs [rand [llength $ai_msgs]]]"      }    }  } else {    puthelp "PRIVMSG $chan :[lindex $ai_msgs [rand [llength $ai_msgs]]]"  }  if {$ai_uidle} {    utimer [expr 140 + [rand 40]] ai_sendmsg  } else {    timer [expr [rand $ai_time] + 1] ai_sendmsg  }  return 0}set ai_chans [split $ai_chans]if {$ai_uidle} {  if {![string match *ai_sendmsg* [utimers]]} {    utimer [expr 140 + [rand 40]] ai_sendmsg  }} else {  if {![string match *ai_sendmsg* [timers]]} {    timer [expr [rand $ai_time] + 1] ai_sendmsg  }}return "nb_info 4.09.0"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4433">FiRe</a> — Wed Feb 18, 2004 8:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
