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

	<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-04-12T14:09:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[darkmare]]></name></author>
		<updated>2004-04-12T14:09:35-04:00</updated>

		<published>2004-04-12T14:09:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35466#p35466</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35466#p35466"/>
		<title type="html"><![CDATA[Adding timed procedure]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35466#p35466"><![CDATA[
Here's what I've started with:<br><br>#Random Cat Action<br>set timer_seconds {30 + [rand 60]}<br><br>if {![info exists word_timer_id]} {<br>set word_timer_id [timer $timer_seconds word_timer]<br>}<br><br>proc word_timer {}  {<br>global word_timer_id timer_seconds random_actions<br>set word_timer_id [timer $timer_seconds word_timer]<br>putserv "PRIVMSG #marytest :\001ACTION [lindex $random_actions [rand [llength $random_actions]]]"<br>}<br><br>set random_actions {<br>"chases a dustball under the bar."<br>"falls off of the chair, and starts displacement grooming."<br>"runs around the room chasing invisible mice."<br>"closes his eyes and starts purring."<br>"starts grooming."<br>"stands half in and out of the place."<br>"perks his ears up, and then closes his eyes once again."<br>}<br><br>I generally try to learn from context, so yes, it's copied, and then modified to fit what I want.  As it sits now, it's not working, well, it is, but it's not doing it in seconds, it sems to be doing it in minutes.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4813">darkmare</a> — Mon Apr 12, 2004 2:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darkmare]]></name></author>
		<updated>2004-04-12T13:15:37-04:00</updated>

		<published>2004-04-12T13:15:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35462#p35462</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35462#p35462"/>
		<title type="html"><![CDATA[Adding timed procedure]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35462#p35462"><![CDATA[
OK this is almost exactly what I want to do, but I have one twist on it; I want to make the timer_minutes variable, something like 10 + random number from 0-30, so that it does the random action every 10-40 minutes, for example.<br><br>I can figure out how to add the random amount to the timer, my question is, will that set the timer once everytime it loads it, or will it give a random time interval everytime it calls it?  I have a cat, and I want him to do random things like go use the litter box, preen, jump on someone's lap, etc. at random intervals.  Also, I'd prefer generic examples; this way I learn something, not just a specific application of it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4813">darkmare</a> — Mon Apr 12, 2004 1:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[YooHoo]]></name></author>
		<updated>2004-03-27T10:35:50-04:00</updated>

		<published>2004-03-27T10:35:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34985#p34985</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34985#p34985"/>
		<title type="html"><![CDATA[Adding timed procedure]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34985#p34985"><![CDATA[
That works fantastically stdragon  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing">  my thanks  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br>Just one more lil' thing I could use help with...a flood control procedure, so chatters won't/can't make the bot flood a room with the $definitions.  I tested it out, and the bot will respond to however many times it is triggered until it excess floods.  Surely this could be prevented, right?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2706">YooHoo</a> — Sat Mar 27, 2004 10:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-03-25T13:10:04-04:00</updated>

		<published>2004-03-25T13:10:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34925#p34925</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34925#p34925"/>
		<title type="html"><![CDATA[Adding timed procedure]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34925#p34925"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set timer_minutes 300if {![info exists word_timer_id]} {  set word_timer_id [timer $timer_minutes word_timer]}proc word_timer {} {  global word_timer_id timer_minutes definitions  set word_timer_id [timer $timer_minutes word_timer]  putserv "privmsg #mychan :[lindex $definitions [rand [llength $definitions]]]"}</code></pre></div>Something like that.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Mar 25, 2004 1:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[YooHoo]]></name></author>
		<updated>2004-03-24T12:41:44-04:00</updated>

		<published>2004-03-24T12:41:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34897#p34897</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34897#p34897"/>
		<title type="html"><![CDATA[Adding timed procedure]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34897#p34897"><![CDATA[
Trigger its bind.  Example of how this tcl works:<br><br>&lt;YooHoo&gt; !sexword<br>&lt;Eggy&gt; <strong class="text-strong">teabagging - v.</strong> When a man lowers his testicles down onto someone's mouth. So-called because of the resemblance to lowering a teabag into water.<br><br>The bot grabs a predefined term and spits it out into the channel when triggered.  What I would like to include is a function that would make the bot randomly spew forth a line every hour or so into my room.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2706">YooHoo</a> — Wed Mar 24, 2004 12:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-03-24T11:48:00-04:00</updated>

		<published>2004-03-24T11:48:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34891#p34891</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34891#p34891"/>
		<title type="html"><![CDATA[Adding timed procedure]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34891#p34891"><![CDATA[
Automatically trigger it to do what?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Mar 24, 2004 11:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[YooHoo]]></name></author>
		<updated>2004-03-24T04:00:13-04:00</updated>

		<published>2004-03-24T04:00:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34882#p34882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34882#p34882"/>
		<title type="html"><![CDATA[Adding timed procedure]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34882#p34882"><![CDATA[
I'm attempting to add another function to my sexword tcl.<br>I need a timer to automatically trigger the bot to run my procedure without being otherwise triggered, like every 300 minutes?  <br>Here is what I have so far:<br><br>bind pub - !word pub_word<br>bind msg - word msg_word<br>bind dcc - word dcc_word<br><br>proc pub_word { nick mask hand channel args } {<br>        global definitions<br>        putquick "PRIVMSG $channel :[lindex $definitions [rand [llength $definitions]]]"<br>}<br><br>proc msg_word { nick uhost hand rest } {<br>        global definitions<br>        putquick "NOTICE $nick :[lindex $definitions [rand [llength $definitions]]]"<br>}<br><br>proc dcc_word { hand idx rest } {<br>        global definitions<br>        putidx $idx "[lindex $definitions [rand [llength $definitions]]]"<br>}<br><br><br>set definitions {<br>"word1 - definition of word1"<br>"word2 - definition of word2"<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2706">YooHoo</a> — Wed Mar 24, 2004 4:00 am</p><hr />
]]></content>
	</entry>
	</feed>
