03-23-2017, 15:22 +0100
Forum: OverviewworkJob Offers & Requests
Looking for someone to code a couple of scripts.
AuthorPost
Seka  04-16-2011, 23:48   | Eggdrop/TCL Requests
Novice Scripter
Member since 04/2011
1 Post
Location: USA
Hello,

Let me start off by saying I am not good at scripting. What little I have done in TCL has been at a novice level, or lower, if that is possible.

What I am looking for is a couple of TCL scripts for two IRC eggdrop bots.

The first script is the most important one, to me. I have no idea how extensive an effort it requires, so I will just lay out what I'm looking for. Basically, I want a script that will make the bot send a text input to a specified channel every hour, on the hour. Each input will be different, depending on what hour it is. the hours will span from noon to midnight and repeat every day. The input will read something along the lines of "The time is now noon," or "The clock has struck first bell (1:00)." Having the numeric time in the post is not a necessity.

The second script will be driven by the first, but will be executed by a separate bot in the same channel. Each day, when the first bot posts "It is now midnight," the second bot will change the channel topic to reflect the change in day.

The tricky part with the second script is that there will be eleven days, each with its own specific name (not Monday through Friday). So, the days will need to be tracked with a numeric variable, as well as a variable for the different names. The name of the day will only be part of the topic. The rest of the channel topic will not change.

I realize this is a bit of a mess and I am more than willing to elaborate on what I'm looking for, if needed. Just let me know what is needed.

If necessary, I can compensate the scripter for their time, on a reasonable scale.

Thanks.
Johannes13  01-31-2012, 23:31   Homepage
Member since 11/2008
4 Posts
Ok, [ code ] seems to be broken, so...

namespace eval timeannounce {

    variable messages {
        {The time is now noon}
        {The clock has struck first bell (1:00).}
    }
    setudef flag timeannounce
    bind time - "00 *" [namespace current]::timed
    proc timed {min hour args} {
        variable messages
        if {[lindex $messages $hour] ne ""} {
            foreach c [channels] {
                if {[channel get $c timeannounce]} {
                    putmsg $c [lindex $messages $hour]
                }
            }
        }
    }
}
CyBex  02-01-2012, 07:15   Jabber  ICQ  AOL IM  Yahoo IM  MSN  Homepage
nie da
(Administrator)

Avatar

Member since 01/2004
260 Posts
Location: Berlin
on hour 08 and 09 you get this error:
Result: bad index "0X": must be integer or end?-integer? (looks like invalid octal number)

better use:
putmsg $c [lindex $messages [scan $hour %d]]

mfG CyBex @ QuakeNet, UnderNet, EFNet, Freenode, euIRC, GameSurge & ShadowWorld - Files
Advanced options for this topic:

Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen