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

	<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>2012-10-06T16:19:21-04:00</updated>

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

		<entry>
		<author><name><![CDATA[alextide32]]></name></author>
		<updated>2012-10-06T16:19:21-04:00</updated>

		<published>2012-10-06T16:19:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100107#p100107</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100107#p100107"/>
		<title type="html"><![CDATA[Simple countdown script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100107#p100107"><![CDATA[
Works perfectly! Thanks so much for your help!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12092">alextide32</a> — Sat Oct 06, 2012 4:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2012-10-06T15:44:59-04:00</updated>

		<published>2012-10-06T15:44:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100106#p100106</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100106#p100106"/>
		<title type="html"><![CDATA[Simple countdown script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100106#p100106"><![CDATA[
1.<br>change:<div class="codebox"><p>Code: </p><pre><code>bind pub -|- !countdown cd_main </code></pre></div>to:<div class="codebox"><p>Code: </p><pre><code>bind pub -|o !countdown cd_main </code></pre></div><br>2.<br>change:<div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $cd_chan :*** countdown: [expr $sec_index / $ann_interval] minute/s to go!"</code></pre></div>to:<div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $cd_chan :*** countdown: [expr [expr $sec_index / $ann_interval] * [expr $ann_interval / 60]] minute/s to go!"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sat Oct 06, 2012 3:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[alextide32]]></name></author>
		<updated>2012-10-06T15:10:53-04:00</updated>

		<published>2012-10-06T15:10:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100105#p100105</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100105#p100105"/>
		<title type="html"><![CDATA[Simple countdown script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100105#p100105"><![CDATA[
Perfect! This is exactly what I was looking for!<br>There is one small issue that might be easily fixed, when the countdown is at 5 minutes out it says "1 minute/s to go!" and when it's 10 minutes out it says "2 minute/s to go!". I don't know how easy this is to fix but if you can't get it to work you can just take it out and it will be fine. <br>Also is there a way to make it so only people with +o flags on the bot can use it?<br>Thanks for taking the time to script this!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12092">alextide32</a> — Sat Oct 06, 2012 3:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2012-10-06T13:20:04-04:00</updated>

		<published>2012-10-06T13:20:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100104#p100104</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100104#p100104"/>
		<title type="html"><![CDATA[Simple countdown script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100104#p100104"><![CDATA[
test it:<div class="codebox"><p>Code: </p><pre><code># Author: tomekk# e-mail:  tomekk/@/oswiecim/./eu/./org# home page: http://tomekk.oswiecim.eu.org/## Version 0.1## This file is Copyrighted under the GNU Public License.# http://www.gnu.org/copyleft/gpl.html# if you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)# .chanset #channel_name +countd# and later .save##############################################bind pub -|- !countdown cd_mainset cd_set 0set sec_index 0set cd_chan ""set ann_interval 300setudef flag countdproc one_second_timer { } {        global cd_set sec_index cd_chan ann_interval        if {$sec_index &gt;= 0} {                if {$sec_index == 11} {                        putserv "MODE $cd_chan +m" -next                }                if {($sec_index &lt;= 10) &amp;&amp; ($sec_index &gt; 0)} {                        putserv "PRIVMSG $cd_chan :$sec_index"                }                if {$sec_index == 1} {                        putserv "PRIVMSG $cd_chan :GO!"                        set cd_set 0                }                if {$sec_index == 0} {                        putserv "MODE $cd_chan -m"                }                if {([expr $sec_index % $ann_interval] == 0) &amp;&amp; ($cd_set == 1)} {                        putserv "PRIVMSG $cd_chan :*** countdown: [expr $sec_index / $ann_interval] minute/s to go!"                }                if {[string match *one_second_timer* [utimers]] != 1} {                        utimer 1 one_second_timer                }                set sec_index [expr $sec_index - 1]        }}proc cd_main { nick uhost hand chan arg } {        global cd_set sec_index cd_chan        if {![channel get $chan countd]} {                return        }        set minutes [string trim [lindex [split $arg] 0]]        set cd_chan $chan        if {$minutes != ""} {                if {[regexp {^([0-9]+)$} $minutes]} {                        if {$cd_set == 0} {                                putquick "PRIVMSG $nick :done! ($minutes minute/s for You)"                                set cd_set 1                                set sec_index [expr $minutes * 60]                                utimer 1 one_second_timer                        } {                                putquick "PRIVMSG $nick :sorry - one countdown at the same time is max"                        }                } {                        putquick "PRIVMSG $chan :$nick, use: !countdown &lt;minute/s (number ;))&gt;"                }        } {                putquick "PRIVMSG $chan :$nick, use: !countdown &lt;minutes&gt;"        }}putlog "countdown.tcl ver 0.1 by tomekk loaded"</code></pre></div>No multichannel support.<br>One more thing, this script works in eggdrop memory - so, every restart etc. will reset the script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sat Oct 06, 2012 1:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[alextide32]]></name></author>
		<updated>2012-10-03T19:07:36-04:00</updated>

		<published>2012-10-03T19:07:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100101#p100101</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100101#p100101"/>
		<title type="html"><![CDATA[Simple countdown script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100101#p100101"><![CDATA[
I have searched the TCL archives and can't seem to find a countdown script that does what I want. It doesn't involve birthdays or any certain "date". <br>I run a channel that frequently does "listen-alongs" to albums. <br>I just need a bot that I can set a time, like an hour or so in advance, and it will make an announcement in the channel every 5 minutes until it gets to the last 10 seconds. Then set the channel +m and do a complete countdown for the last 10 seconds then -m.<br>I'm not sure how complicated this would be but it would be awesome.<br><br>An example would be like this:<br>**MyBot sets mode +m #chan<br>MyBot: 10<br>MyBot: 9<br>MyBot: 8<br>MyBot: 7<br>MyBot: 6<br>MyBot: 5<br>MyBot: 4<br>MyBot: 3<br>MyBot: 2<br>MyBot: 1<br>MyBot: GO!<br>**MyBot sets mode -m<br><br>If you can script this for me you are awesome!<br>Thanks!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12092">alextide32</a> — Wed Oct 03, 2012 7:07 pm</p><hr />
]]></content>
	</entry>
	</feed>
