Author Topic: is there some kind of countdown timer for newyear ???  (Read 14081 times)

0 Members and 1 Guest are viewing this topic.

Offline Masterload

  • Member
  • ***
  • Posts: 36
  • Karma: +0/-0
is there some kind of countdown timer for newyear ???
« on: 16 November, 2003, 00:05:10 »
just like to have one :))
magmarnet

visit me at home....

 

PtokaX forum

is there some kind of countdown timer for newyear ???
« on: 16 November, 2003, 00:05:10 »

Offline klownietklowniet

  • Forum Ace
  • *****
  • Posts: 77
  • Karma: +0/-0
(No subject)
« Reply #1 on: 16 November, 2003, 00:11:18 »
How would that work? What would the script do?
[ > DC - UniteD < ]

Offline Typhoon

  • Lord
  • ***
  • Posts: 397
  • Karma: +22/-3
  • PGE Developer
    • PGE Homepage
(No subject)
« Reply #2 on: 16 November, 2003, 00:16:58 »
i think it should only do the counting til the exact date 01-01-04 at time 00:00  ... then type happy new year or somthing...
could be cool  

***Typhoon?



Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #3 on: 16 November, 2003, 01:48:35 »
I think that's imposible
Guarding    

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #4 on: 16 November, 2003, 06:40:11 »
Quote
Originally posted by kepp
I think that's imposible
no it is posible, just not fully sure yet how 2 make it.
let me think a little about it, got the basic idea in my head.
or maby some1 else whats have a go @ it.
sure is a cool idea.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Offline Masterload

  • Member
  • ***
  • Posts: 36
  • Karma: +0/-0
(No subject)
« Reply #5 on: 16 November, 2003, 15:31:29 »
i was thinking somthing like this
countdown from now to 24:00 1-1-2004

(no scripter :P just an idea)

say : a second timer counting back bla bla hours  days left until.....
Happy new .......
can it be done ?
magmarnet

visit me at home....

 

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #6 on: 16 November, 2003, 16:46:48 »
if it is possible, you will get the script very soon... :)
Plop, can't you store that date n time in a table...
and then let the script get your date and time frpm your computer?
Guarding    

Offline Masterload

  • Member
  • ***
  • Posts: 36
  • Karma: +0/-0
:)
« Reply #7 on: 16 November, 2003, 16:53:47 »
thxx to you all for your time !
magmarnet

visit me at home....

 

Offline Typhoon

  • Lord
  • ***
  • Posts: 397
  • Karma: +22/-3
  • PGE Developer
    • PGE Homepage
(No subject)
« Reply #8 on: 07 December, 2003, 17:11:28 »
hi Plop  

just woundering if you have figured something out ..



Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #9 on: 08 December, 2003, 01:56:13 »
Quote
Originally posted by Typhoon?
hi Plop  

just woundering if you have figured something out ..
damn i kinda forgot this 1.
good that you help me remember.
still have 24 day's before i'm really 2 late.  lol
while writing this post i fixed the 1st tiny bit.
my hub now shows the amount of day's left before new year on entry.
more 2morrow.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #10 on: 08 December, 2003, 06:46:48 »
I can't wait to see how you will solve ths.. :)
Guarding    

Offline Masterload

  • Member
  • ***
  • Posts: 36
  • Karma: +0/-0
lolz.still waiting.....
« Reply #11 on: 08 December, 2003, 13:02:05 »
had some minor probs here back now....

23 day's left m8,
but the countdown works ?
magmarnet

visit me at home....

 

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #12 on: 08 December, 2003, 13:20:25 »
[12:59] Time left till new year: 23 Day's, 11 Hours, 0 Minutes, 15 Seconds

still some work 2 do on starting/adjusting the timer for the last day.
it now only shows on entry.

btw some ascii would be nice 2 be shown on new year.
would be great if some1 could make that.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Offline Optimus

  • Emperor
  • **
  • Posts: 1 474
  • Karma: +13/-1
(No subject)
« Reply #13 on: 08 December, 2003, 13:23:20 »
Yhea guy's give Plop some help, who can make him some (verry Nice) ASCII picture...  ;)

Offline [ES]latinmusic

  • Triple Ace
  • **
  • Posts: 236
  • Karma: +1/-0
(No subject)
« Reply #14 on: 08 December, 2003, 17:16:19 »
Quote
Originally posted by Optimus
Yhea guy's give Plop some help, who can make him some (verry Nice) ASCII picture...  ;)
I, if i have some time

Offline SaintSinner

  • Lord
  • ***
  • Posts: 293
  • Karma: +1/-0
(No subject)
« Reply #15 on: 08 December, 2003, 20:08:39 »
Quote
Originally posted by Optimus
Yhea guy's give Plop some help, who can make him some (verry Nice) ASCII picture...  ;)


Found this one on the intanet

Code: [Select]
_
 _   _                     _    _             _  _             | |
/|   |\                    |\   |\            /  |\            |_|
 |___|  _   _    _         | \  |  _         /   |  _   _  ,_   _
 |   | / | | \  | \  / |   |  \ | /_\ / / |  \___|//_\ / | | ` / \
\|   |/\_|/|_/_/|_/_/\_|  \|   \| \__/\_\_|     /| \__/\_|/|   \_/
     '     |    |     /|        `              ( |
           |    |     \|                        \|
                                                 . `:
                                                : : .
                                                 : .
                                                [""]
                                                |  |
                                                |  |
                                                |  |
                                       :       .'--`.
                   _..-~-.._         : .:     /`.__.'\
                 .'         `.      :    .   /        \
               .'  .-'''''-.  `.   ,-'``'-. ;          ;
              /  ,'   XII   `.  \  |`-..-'| |   ,--.   |
             /  /     /|\     \  \ | .   :| |_.','`.`._|
             | ;       |       ; | | . :  | |--'2004`--|
             | |IX     o    III| | |`-..-'| ||   | | | |
             | ;               ; | \::::::/ ||)|/|)|)|\|
             |  \             /  |  `::::'  |._ ~**~ _.|
       ------|   `.   V I   ,'   |----)(----|  `-..-'  |-------
        _____j     `-.....-'     |    )(    |          |,--.
   ____/ /  /\\ ,-._.--------.-.-' ,-')('-. |          |\`;/
.-()___  :  |`.!,-'`'/`-._  (___) (  '  `  )`-._    _.-'|;,|
`-,    \_\__\`,-'>-.,-._           `-....-'     ````    `--'  
  `-._       (`- `-._`-.`

dammintt wort work in here!!!!!!!
   


Offline SaintSinner

  • Lord
  • ***
  • Posts: 293
  • Karma: +1/-0
(No subject)
« Reply #16 on: 08 December, 2003, 20:22:05 »
ok this should work

newyear
« Last Edit: 08 December, 2003, 20:22:42 by SaintSinner »
   


Offline AlwaysConnected

  • Lord
  • ***
  • Posts: 460
  • Karma: +2/-0
(No subject)
« Reply #17 on: 08 December, 2003, 21:53:07 »
Code: [Select]
                    A  
                    < * >                                                             *
 *                  /.-.\         *                   *                  *
          *         /&\                    *
                 ,@.*;@,                                        *                     *                  *
                  /_o.I \    *      
               / ;--.  ,__  ')             *                               *                  *                   *
             ;@ o O,* ' &\
           *  ( '--)_@ ;o ()\      *                 *              Merry Christmas
            / ;--._ ''--._O'@;                                 And A Happy New Year          *
           /&*,() o ;-.,_  "" )                                    To  All Users                        *
          / ,@ ;+& () o* ;-';\                                
         ( ""--.,_0 +@' &()\                       *                          
         /-.,_      ''--....-' )  *                                                                           *
   *    /@o :;'--,.__   __.'\                                                        *
     ;*,&(); @ &^;  " o;@();         *                   *                  
     /(); o^ ; & ().o@*& ;&\                                              *
   "="==""==,,,.,="=="==="                                          
  __.----.(\-''#####---...___...-----


kerst

or this one ^

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #18 on: 08 December, 2003, 22:20:36 »
I can feel Christmas is comming closer when i look at those "pictures" :)
Guarding    

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #19 on: 09 December, 2003, 02:47:12 »
ran a test 2day on 3 different way's of sync-ing, 2 failed.
so rewriten the sync part and should work fine 2morrow.
used a much saver way now.  lol
untill the last hour it should show the time left every hour.
after that it jumps from 15 mins, to 5 mins to 1, to 15 secs, to 5 secs, and starts 2 countdown from 10 to 0 then shows a text file and wishes happy new year from all the folks here on the forum.  lol
pray for me that it all works 2morrow.  lol

have 2 thk chilla allready for his cool julianday with hours,mins, seconds, that made it a lot easyer.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Offline pHaTTy

  • Forum Legend
  • ***
  • Posts: 1 916
  • Karma: +5/-1
(No subject)
« Reply #20 on: 09 December, 2003, 02:52:17 »
Sounding nice plop
Resistance is futile!

Offline Masterload

  • Member
  • ***
  • Posts: 36
  • Karma: +0/-0
thxx
« Reply #21 on: 09 December, 2003, 14:23:14 »
lol  thxx again all for the time ...
hehe feeling the spirrit to here :))

my kids are counting down already
hm, i have to reinstall ,get a working exe
then ill wil try to create a nice ASCII picture's
first time do :P

thxx all in here for ur "time" lolz

sounds great plop :)
magmarnet

visit me at home....

 

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #22 on: 10 December, 2003, 00:39:59 »
tada, tested and working.
Code: [Select]
------------------------------------------------------------------------------
-------                  countdown bot by plop                         -------
-------             original julian day made by tezlo                  -------
-------      modifyd by chilla 2 also handle hours, mins, seconds      -------
------------------------------------------------------------------------------

------------------------------------------------------------------------------
-------           THE TEXT FILE LOADS ON BOT START                     -------
------------------------------------------------------------------------------
------- this may sound weird but this 2 make sure it shows on time,    -------
-------      as i allready seen some big ascii's come by               -------
------------------------------------------------------------------------------


------------------------------------------------------------------------------
Bot = "newyear"
--This the date the timer has 2 stop @ midnight
-- year (2 numbers), month, day
SylYear,SylMonth,SylDay = 03,12,31
-- this is the file 2 be shown
file = "happynewyear.txt"
------------------------------------------------------------------------------


------------------------------------------------------------------------------
function OnTimer()
   if last == 0 then
      SendToAll(Bot, TimeLeft())
      Sync()
   elseif last == 1 then
      SendAscii() -- send the msg
      StopTimer() -- kill the timer
   end
end
------------------------------------------------------------------------------
function jdatehms(d, m, y,ho,mi,se)
local a, b, c = 0, 0, 0
if m <= 2 then
y = y - 1
m = m + 12
end
if (y*10000 + m*100 + d) >= 15821015 then
a = floor(y/100)
b = 2 - a + floor(a/4)
end
if y <= 0 then c = 0.75 end
return floor(365.25*y - c) + floor(30.6001*(m+1) + d + 1720994 + b),ho*3600+mi*60+se
end
------------------------------------------------------------------------------
function TimeLeft()
   local curday,cursec = jdatehms(tonumber(date("%d")),tonumber(date("%m")),tonumber(date("%y")),tonumber(date("%H")),tonumber(date("%M")),tonumber(date("%S")))
local sylday,sylsec = jdatehms(SylDay,SylMonth,SylYear,24,0,0)
local tmp = sylsec-cursec
local hours, minutes,seconds = floor(mod(tmp/3600, 60)), floor(mod(tmp/60, 60)), floor(mod(tmp/1, 60))
return ("Time left till new year: "..sylday-curday.." Day's, "..hours.." Hours, "..minutes.." Minutes, "..seconds.." Seconds")
end
------------------------------------------------------------------------------
function ShowAscii()
   text ="\r\n\r\n"
   readfrom(file)
   while 1 do
      local line = read()
      if line == nil then
         readfrom()
         break
      end
      text = text..line.."\r\n"
   end
end
------------------------------------------------------------------------------
function SendAscii()
   SendToAll(Bot, text.." |")
   SendToAll(Bot, "happy new year 2 everybody from all the guy's/girls/bot's from the lua forum|")
end
------------------------------------------------------------------------------
function DataArrival(user, data)
   if( strsub(data, 1, 1) == "<" ) then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if cmd == "!daysleft" then
         user:SendData(Bot, TimeLeft().."|")
         return 1
      end
   end
end
------------------------------------------------------------------------------
function NewUserConnected(user)
   user:SendData(Bot, TimeLeft().."|")
end
------------------------------------------------------------------------------
function OpConnected(user)
   user:SendData(Bot, TimeLeft().."|")
end
------------------------------------------------------------------------------
function Main()
SetTimer(100 * 1000)
StartTimer()
   SendToAll(Bot, TimeLeft().."|")
   Sync()
   ShowAscii()
   last = 0
end
------------------------------------------------------------------------------
function Sync()
   local curday,cursec = jdatehms(tonumber(date("%d")),tonumber(date("%m")),tonumber(date("%y")),tonumber(date("%H")),tonumber(date("%M")),tonumber(date("%S")))
local sylday,sylsec = jdatehms(SylDay,SylMonth,SylYear,24,0,0)
   local tmp = sylsec-cursec
   local hours, minutes,seconds = floor(mod(tmp/3600, 60)), floor(mod(tmp/60, 60)), floor(mod(tmp/1, 60))
   if tmp > 3600 then  --- every hours a msg
      adjust = (floor(mod(minutes, 60))*60)+seconds
      if adjust ~= 0 then
         SetTimer(adjust * 1000)
      else
         SetTimer(3600 * 1000)
      end
   elseif tmp > 900 then  -- every 15 mins a msg
      adjust = (floor(mod(minutes, 15))*60)+seconds
      if adjust ~= 0 then
         SetTimer(adjust * 1000)
      else
         SetTimer(900 * 1000)
      end
   elseif tmp > 300 then  -- every 5 mins a msg
      adjust = (floor(mod(minutes, 5))*60)+seconds
      if adjust ~= 0 then
         SetTimer(adjust * 1000)
      else
         SetTimer(300 * 1000)
      end
   elseif tmp > 60 then  -- every min a msg
      adjust = (floor(mod(minutes, 1))*60)+seconds
      if adjust ~= 0 then
         SetTimer(adjust * 1000)
      else
         SetTimer(60 * 1000)
      end
   elseif tmp > 15 then  -- every 15 secs a msg
      adjust = floor(mod(seconds, 15))
      if adjust ~= 0 then
         SetTimer(adjust * 1000)
      else
         SetTimer(15 * 1000)
      end
   elseif tmp > 10 then  -- every 10 secs a msg
      adjust = floor(mod(seconds, 10))
      if adjust ~= 0 then
         SetTimer(adjust * 1000)
      else
         SetTimer(5 * 1000)
      end
   elseif tmp > 1 then
      SetTimer(1 * 1000)
   else
      last = 1
      SetTimer(1 * 1000)
   end
end
------------------------------------------------------------------------------
happy new year.  lol
can offcourse be used for anything you like, birthday's etc...
just enter the date and file name it has 2 show.
script header allready shows it but i'll repeat it.
the text/ascii loads on the start of the bot, this 2 make sure it shows on time as i seen some big ascii's come by.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #23 on: 10 December, 2003, 00:45:44 »
Very Nice :D
Guarding    

Offline c h i l l a

  • Lord
  • ***
  • Posts: 347
  • Karma: +1/-0
(No subject)
« Reply #24 on: 10 December, 2003, 08:30:11 »
really nice one :)).

I like your idea with the smaller timer intervalls when coming nearer to sylvester.

PtokaX forum

(No subject)
« Reply #24 on: 10 December, 2003, 08:30:11 »