egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

event countdown till the date

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
mabrook
Halfop


Joined: 14 Jun 2021
Posts: 52

PostPosted: Mon Sep 06, 2021 2:18 pm    Post subject: event countdown till the date Reply with quote

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.
Back to top
View user's profile Send private message
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 374

PostPosted: Mon Sep 06, 2021 2:39 pm    Post subject: Reply with quote

Try this here Smile
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mabrook
Halfop


Joined: 14 Jun 2021
Posts: 52

PostPosted: Mon Sep 06, 2021 3:29 pm    Post subject: Reply with quote

Razz Razz (need to changed my opinion for better cause)


here are the commands for that script @CompterTech

Code:


<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:


<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:


<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:


<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.
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 670
Location: Tennessee, USA

PostPosted: Mon Sep 06, 2021 5:10 pm    Post subject: Reply with quote

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
.
Back to top
View user's profile Send private message Visit poster's website
mabrook
Halfop


Joined: 14 Jun 2021
Posts: 52

PostPosted: Tue Sep 07, 2021 1:20 am    Post subject: Reply with quote

thanks.

this will do.. and it is working perfect.



how can i set the timer to every 4 hours?
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1138

PostPosted: Tue Sep 07, 2021 7:31 am    Post subject: Reply with quote

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 !
Back to top
View user's profile Send private message
mabrook
Halfop


Joined: 14 Jun 2021
Posts: 52

PostPosted: Tue Sep 07, 2021 11:09 am    Post subject: Reply with quote

thank you
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 670
Location: Tennessee, USA

PostPosted: Tue Sep 07, 2021 9:03 pm    Post subject: Reply with quote

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



Try replace the bind time line with this bind cron line...
Code:
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
.
Back to top
View user's profile Send private message Visit poster's website
mabrook
Halfop


Joined: 14 Jun 2021
Posts: 52

PostPosted: Wed Sep 08, 2021 1:46 am    Post subject: Reply with quote

thanks Spike^^

it working great.. Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber