This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

event countdown till the date

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
mabrook
Halfop
Posts: 60
Joined: Mon Jun 14, 2021 9:41 am

event countdown till the date

Post by mabrook »

i would like to request an event countdown till the event day.. (January - December)


example: https://www.xmasclock.com/ <-- see this link..


let's say, christmas countdown.

- add and set the month/date/year/
- auto show the countdown in the channel once you set the time every 8hours or set a minutes as you like

example auto show:

<BOT> ** Christmas Day ** is in 15 weeks and 4 days left. [ DEC 25 2021 ]

and the following day is:

<BOT> ** Christmas Day ** is in 15 weeks and 3 days left. [ DEC 25 2021 ]





i hope anyone interested in doing the script.


thank you.
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

Try this here :)
ComputerTech
User avatar
mabrook
Halfop
Posts: 60
Joined: Mon Jun 14, 2021 9:41 am

Post by mabrook »

:P :P (need to changed my opinion for better cause)


here are the commands for that script @CompterTech

Code: Select all


<BOT> Date.tcl: Store and set channel topics to show birthdays, or store event reminders and show countdowns on command.
<BOT> To input your birthday: .date bday <month> <day> <year> [additional channels]
<BOT>    [Additional channels] are extra channels to set birthday topics in (max 5)
<BOT>    Default channel #botname is automatically included in the list.
<BOT>    Note: Excluded or invalid channels are automatically dropped from the list.
<BOT>    Example: .date bday Oct 02 1981 #channel2 #channel3
<BOT> To input an event: .date event <eventname> <month> <day> <year> <time> <description>
<BOT>    Example: .date event myevent Feb 10 2001 19:30 Some Business Meeting
<BOT> To view dates:
<BOT>         .date bday                      - show countdown til your birthday in channel.
<BOT>         .date bday <username>  - show countdown til username's birthday in channel.
<BOT>         Note: this is the username as stored in the bot!
<BOT>         .date listbdays                - show all birthdays.
<BOT>         .date nextbday                - show the next upcoming birthday(s).
<BOT>         .date event eventname    - show countdown til eventname in channel.
<BOT>         .date listevents               - show all of your events.
<BOT>         .date listall                      - show all events, including other peoples.
<BOT> To remove a date:
<BOT>         .date remove bday      - remove your birthday.
<BOT>         .date remove eventname - Remove event by name.
<BOT> Commands can be typed in channel or msg to BOT
<BOT> [end date help]


now, i set the event in the #channel

Code: Select all


<User> .date event Christmas Dec 25 2021 12:00 Merry Christmas
<BOT> Eventname christmas is set for DEC 25 2021 at 12:00 with desc: Merry Christmas


and then i need to type from the channel to show the event

Code: Select all


<User> .date event Christmas
<BOT> christmas is in 15 weeks 4 days 23 hours 3 minutes 9 seconds (9500589 sec.), on DEC 25 2021 12:00. Desc: Merry Christmas


Now, i want that this event will be set as autos how in the channel, like you set 8hours or 10hours and it shows in the channel.


my suggestion to show is like this (if any better suggestions, that's very nice)

Code: Select all


<BOT> *** Christmas Day *** is in 15 weeks 4 days 23 hours 3 minutes 9 seconds, on [ DEC 25 2021 ] | MERRY CHRISTMAS



The missing feature of this script is the auto show event in the channel.


Hope someone have a time and help out. thank you.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

Maybe have a look at this forum thread for a very simple countdown timer...
http://forum.egghelp.org/viewtopic.php?t=11018
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
User avatar
mabrook
Halfop
Posts: 60
Joined: Mon Jun 14, 2021 9:41 am

Post by mabrook »

thanks.

this will do.. and it is working perfect.



how can i set the timer to every 4 hours?
w
willyw
Revered One
Posts: 1204
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

mabrook wrote: ...
how can i set the timer to every 4 hours?

Possibly some info to work with:

Visit:
https://docs.eggheads.org/mainDocs/tcl-commands.html
and text search to find:
bind cron
Read that. Back when the posts that you are reading - from 2007 - I don't believe that bind cron even existed. It's very handy.

Next, visit:
https://crontab.guru/
as that makes it easy to get the "cron" part of the command set the way you want it. You can experiment on that webpage, plugging in values, etc. You'll see.

I hope this helps.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
User avatar
mabrook
Halfop
Posts: 60
Joined: Mon Jun 14, 2021 9:41 am

Post by mabrook »

thank you
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

mabrook wrote:...
how can i set the timer to every 4 hours?

Try replace the bind time line with this bind cron line...

Code: Select all

bind cron - {00 */4 * * *} count:down
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
User avatar
mabrook
Halfop
Posts: 60
Joined: Mon Jun 14, 2021 9:41 am

Post by mabrook »

thanks Spike^^

it working great.. :lol:
Post Reply