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 

Christmas & New Year Countdown
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
wiiguy
Voice


Joined: 30 Nov 2007
Posts: 9

PostPosted: Thu Dec 06, 2007 6:13 pm    Post subject: Reply with quote

starpossen wrote:
Will try and mess around with that, by the way, I was wondering, would it be possible to a public command to show time left until set date?
like !xmas
and bot would respond with the timeleft.



yes there is

Code:
bind pub m "!xmas" count:down1

proc count:down1 {nick host handle channel text} {
 set christmas "[duration [expr {[clock scan 12/25/07] - [clock seconds]}]]"
 set newyear "[duration [expr {[clock scan 01/01/08] - [clock seconds]}]]"
 puthelp "NOTICE $nick :$christmas before Christmas \[25th December, 2007\] and $newyear before New Year \[1st January, 2008\]"
}



and i found out what the timezone the server is in it is in GMT and i am in GMT+1 so cany anyone help me ?
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Dec 06, 2007 7:23 pm    Post subject: Reply with quote

GMT: Greenwich Mean Time - World Time / Time in every Time Zone
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
wiiguy
Voice


Joined: 30 Nov 2007
Posts: 9

PostPosted: Fri Dec 07, 2007 4:10 am    Post subject: Reply with quote

i really meant with the script becaus i am still learning tcl.

so basically what i need is that he show the count down for GMT+1
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 07, 2007 6:38 am    Post subject: Reply with quote

If your bot's timezone is GMT and yours is GMT+1 then you're 1 hour closer to Christmas and New year. So just subtract 3600 seconds from [clock seconds]:
Code:
set christmas "[duration [expr {[clock scan 12/25/07] - [clock seconds] - 3600}]]"
set newyear "[duration [expr {[clock scan 01/01/08] - [clock seconds] - 3600}]]"

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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