gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
75210 Posts in 13169 Topics by 2633 Members - Latest Member: SammyR. June 26, 2017, 05:19:08 am
*
gfx*gfx
gfx
WinMX World :: Forum  |  Metis Scripts and Help  |  Other Metis scripts  |  Countdown Timer
gfx
gfxgfx
 

Author Topic: Countdown Timer  (Read 2276 times)

0 Members and 1 Guest are viewing this topic.

Offline ripper

  • Forum Member
Countdown Timer
« on: March 07, 2009, 06:21:20 pm »
Hi all. I was wondering if there is a script out there,or can 1 be made,that countdowns and displays a timer.For example,lets say the time is 1pm on Friday..and you are hosting a quiz at 4pm Saturday.Can a script be made that allows you to enter the quiz time,and then the bot displays every hour(or however long you want)..the time remaining?  Thanks in advance :)

Offline F£¥è®

  • Forum Member
Re: Countdown Timer
« Reply #1 on: March 09, 2009, 07:20:53 pm »
Hi Ripper,
Sorry for the late reply but I only saw the thread today.As with all timer scripts it's best to run this script in it's own Bot
I've only tested this for a limited time (it worked fine) so I can't say it will auto end every time.To end it manually the
command is !timerend, to start type !start timer and follow the input requests,The delay is set at aproximately 45 mins
but you can alter the interval value to suit (don't set it above an hour delay or it def won't auto end).
Hope this is what you want,
F£¥è®
Code: [Select]
<config>
<command type = "script">
<in>!start timer</in>
<out type = "pop" extdata = "timeup"/>
<out type = "pop" extdata = "endtime"/>
<out type = "pop" extdata = "endday"/>
<out type = "push" extdata = "user">%NAME%</out>
<out>#c7#Please input the end day.  #c16#eg.  !end friday</out>
</command>
<command type = "script">
<in>!end %PARAM%</in>
<out type = "push" extdata = "endday">%PARAM%</out>
<out>#c7#Please input the end time.  #c16#eg. !time 15#c7#:#c16#30</out>
</command>
<command type = "script">
<in>!time %PARAM%</in>
<out type = "push" extdata = "timeup">1</out>
<out type = "push" extdata = "endtime">%PARAM%</out>
<out type = "push" extdata = "hourendtime"><operator type = "strtrm" lvalue = "$endtime$" rvalue = "2"/></out>
<out type = "push" extdata = "shortendtime"><operator type = "strright" lvalue = "$endtime$" rvalue = "3"/></out>
<out type = "push" extdata = "shortendtime"><operator type = "strrem" lvalue = "$shortendtime$" rvalue = ":"/></out>
<out type = "push" extdata = "shortendtime"><operator type = "strtrm" lvalue = "$shortendtime$" rvalue = "2"/></out>
<out>#c7#The timer has started</out>
</command>
<OnTimer type = "script" interval = "2700" condition = "1" lvalue = "$timeup$" rvalue = "1">
<out type = "push" extdata = "time">%LOCALTIME%</out>
<out type = "push" extdata = "hourtime"><operator type = "strtrm" lvalue = "$time$" rvalue = "2"/></out>
<out type = "push" extdata = "shortime"><operator type = "strright" lvalue = "$time$" rvalue = "3"/></out>
<out type = "push" extdata = "shortime"><operator type = "strrem" lvalue = "$shortime$" rvalue = ":"/></out>
<out type = "push" extdata = "shortime"><operator type = "strtrm" lvalue = "$shortime$" rvalue = "2"/></out>
<out type = "push" extdata = "shortime"><operator type = "+" lvalue = "$shortime$" rvalue = "2"/></out>
<out type = "push" extdata = "wkdy">%DAY-OF-WEEK%</out>
<out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "0">sunday</out>
<out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "1">monday</out>
<out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "2">tueday</out>
<out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "3">wednesday</out>
<out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "4">thursday</out>
<out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "5">friday</out>
<out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "6">saturday</out>
<out>#c16#It is now #c8#%LOCALTIME% on  #c7#%LONGDATE% #c16#(#c8#Whatever text you want#c16#)#c7#will start on #c16#$endday$ at #c8#$endtime$</out>
<out type = "goto" extdata = "3" condition = "0" lvalue = "$endday$" rvalue = "$wkday$"/>
<out type = "goto" extdata = "2" condition = "0" lvalue = "$hourendtime$" rvalue = "$hourtime$"/>
<out type = "self" condition = "2" lvalue = "$shortendtime$" rvalue = "$shortime$">!timerend</out>
<out></out>
</OnTimer>
<command type = "script" users = "_BOT_SELF_TRIGGER_;user;">
<in>!timerend</in>
<out type = "push" extdata = "timeup">0</out>
<out>#c7#Timer finished</out>
</command>
</config>
OS Microsoft® Windows Vista™ Home Premium, Processor Intel(R) Core(TM)2 Quad CPU  Q8200  @ 2.33GHz, 2331 Mhz, 4 Core(s), 4 Logical Processor(s), Installed Physical Memory (RAM) 6.00 GB

Offline ripper

  • Forum Member
Re: Countdown Timer
« Reply #2 on: March 11, 2009, 02:21:16 pm »
Thanks for the script Flyer..works great.:It is now 09:44.37 on Wednesday, March 11, 2009 (Quiz)will start on Saturday at 18:00 .Not quite what I was looking for,I was looking for something that had the time remaining..eg,Time remaining for (Quiz) is (x)days,(x)hours,(x)minutes..and displays that every 45 minutes or so. I appreciate you writing this script and will use this if no other 1 can be made.Cheers Flyer and thx again!!!

Offline F£¥è®

  • Forum Member
Re: Countdown Timer
« Reply #3 on: March 12, 2009, 12:46:34 am »
Hi ripper,
I hope this is more like what you want, please note all the inputs are in lower case or it won't work correctly.
All the best   F£¥è®.

Code: [Select]
<config>
<command type = "script">
<in>!timerstart</in>
<out type = "push" extdata = "name">%NAME%</out>
<out type = "pop" extdata = "count"/>
<out>#c16#Please input the event day  eg.   #c8#!ed monday</out>
</command>

<command type = "script">
<in>!ed %PARAM%</in>
<out type = "push" extdata = "ed">%PARAM%</out>
<out>#c16#Please input the event time   eg.   #c8#!et 12#c16#:#c8#15</out>
</command>

<command type = "script">
<in>!et %PARAM%</in>
<out type = "push" extdata = "activate">1</out>
<out type = "push" extdata = "currentday">%DAY-OF-WEEK%</out>
<out type = "push" extdata = "et">%PARAM%</out>
<out type = "push" extdata = "ethours"><operator type = "strtrm" lvalue = "$et$" rvalue = "2"/></out>
<out type = "push" extdata = "etmins"><operator type = "*" lvalue = "$ethours$" rvalue = "60"/></out>
<out type = "push" extdata = "etextramins"><operator type = "strright" lvalue = "$et$" rvalue = "3"/></out>
<out type = "push" extdata = "etmins"><operator type = "+" lvalue = "$etmins$" rvalue = "$etextramins$"/></out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "sunday">0</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "monday">1</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "tuesday">2</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "wednesday">3</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "thursday">4</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "friday">5</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "saturday">6</out>
<out type = "push" extdata = "endday" condition = "2" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "+" lvalue = "$endday$" rvalue = "7"/></out>
<out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$endday$" rvalue = "$currentday$"/></out>
<out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$numdays$" rvalue = "1"/></out>
<out type = "push" extdata = "dayhours"><operator type = "*" lvalue = "$numdays$" rvalue = "24"/></out>
<out type = "push" extdata = "daymins"><operator type = "*" lvalue = "$dayhours$" rvalue = "60"/></out>
<out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$etmins$"/></out>
<out type = "push" extdata = "time">%LOCALTIME%</out>
<out type = "push" extdata = "hourtime"><operator type = "strtrm" lvalue = "$time$" rvalue = "2"/></out>
<out type = "push" extdata = "mintime"><operator type = "*" lvalue = "$hourtime$" rvalue = "60"/></out>
<out type = "push" extdata = "extramintime"><operator type = "strright" lvalue = "$time$" rvalue = "3"/></out>
<out type = "push" extdata = "extramintime"><operator type = "strtrm" lvalue = "$extramintime$" rvalue = "2"/></out>
<out type = "push" extdata = "mintime"><operator type = "+" lvalue = "$mintime$" rvalue = "$extramintime$"/></out>
<out type = "push" extdata = "extradaymins"><operator type = "*" lvalue = "24" rvalue = "60"/></out>
<out type = "push" extdata = "extradaymins"><operator type = "-" lvalue = "$extradaymins$" rvalue = "$mintime$"/></out>
<out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$extradaymins$"/></out>
<out>#c7#The Countdown Timer has been started on #c8#%LONGDATE% #c7#at #c8#%LOCALTIME% #c7#for the #c16#(#c8#event#c16#) #c7#starting at $et$ on $ed$.</out>
</command>

<OnTimer type = "script" interval = "60" condition = "1" lvalue = "$activate$" rvalue = "1">
<out type = "push" extdata = "count"><operator type = "+" lvalue = "$count$" rvalue = "1"/></out>
<out type = "push" extdata = "daymins"><operator type = "-" lvalue = "$daymins$" rvalue = "1"/></out>
<out type = "push" extdata = "hour"><operator type = "/" lvalue = "$daymins$" rvalue = "60"/></out>
<out type = "push" extdata = "minute"><operator type = "%" lvalue = "$daymins$" rvalue = "60"/></out>
<out condition = "1" lvalue = "$count$" rvalue = "45">#c7#The #c16#(#c8#whatever text you want #c16#) #c7#will begin in #c8#$hour$ #c7#hours #c16#: #c8#$minute$ #c7#minutes</out>
<out type = "push" extdata = "count" condition = "1" lvalue = "$count$" rvalue = "45">0</out>
<out type = "push" extdata = "activate" condition = "2" lvalue = "$daymins$" rvalue = "1">0</out>
</OnTimer>

<command type = "script" users = "$name$">
<in>!stoptimer</in>
<out type = "push" extdata = "activate">0</out>
<out>#c7#Timer Stopped</out>
</command>

</config>
OS Microsoft® Windows Vista™ Home Premium, Processor Intel(R) Core(TM)2 Quad CPU  Q8200  @ 2.33GHz, 2331 Mhz, 4 Core(s), 4 Logical Processor(s), Installed Physical Memory (RAM) 6.00 GB

Offline wonderer

  • MX Hosts
  • *****
  • ***
Re: Countdown Timer
« Reply #4 on: March 12, 2009, 10:01:21 am »
This is a nice script though I wonder how well it keeps on time in the long run.
The OnTimer function of Metis tends to run far out of sync after a few days.

Let me know if I'm right, there is a better solution.

Offline F£¥è®

  • Forum Member
Re: Countdown Timer
« Reply #5 on: March 12, 2009, 01:14:09 pm »
@ wanderer,
I have no qualms whatsoever with constructive criticism of my scripts,I am well aware of the deficienct aspects of the Metis Bot.Anyone who uses the OnTimer function must  know that it does not keep perfect time and I am well aware theres always more than one way to do things.
What I do find objectionable is the
Quote
Let me know if I'm right, there is a better solution.
I'm sure there are much better solutions from far better scripters than me,but please back the comment up by posting it and let us all benefit from your wisdom.
Regards F£¥è®
OS Microsoft® Windows Vista™ Home Premium, Processor Intel(R) Core(TM)2 Quad CPU  Q8200  @ 2.33GHz, 2331 Mhz, 4 Core(s), 4 Logical Processor(s), Installed Physical Memory (RAM) 6.00 GB

Offline ripper

  • Forum Member
Re: Countdown Timer
« Reply #6 on: March 12, 2009, 02:03:39 pm »
THXXXXXxxxxxxxxxxxxxxxx  Flyer! Testing that 2nd script out now. Your scripts are MUCH appriciated!!! CHEERS!!

Offline ripper

  • Forum Member
Re: Countdown Timer
« Reply #7 on: March 12, 2009, 03:07:23 pm »
For some reason it is not showing the remaining time.Did the following:
1)typed : !timerstart ,RESULT : Please input the event day eg. !ed monday

2) typed : !ed thursday ,RESULT : Please input the event time eg. !et 12:15

3) typed : !et 13:15 ,RESULT : The Countdown Timer has been started on Thursday, March 12, 2009 at 10:05.39 for the (QUIZ) starting at 13:15 on thursday.

Does nothing after that,been a little over an hour,will keep it running for a bit yet.Thxxx again Flyer!!

Offline F£¥è®

  • Forum Member
Re: Countdown Timer
« Reply #8 on: March 12, 2009, 05:53:35 pm »
Hi ripper,
This is my bad,  I never envisaged the end day inputted for the same day.If you have at least one days difference it will work fine.
I've had a quick look at the script and will rework it to run correctly later tonight.Thanks for letting me know.
F£¥è®
OS Microsoft® Windows Vista™ Home Premium, Processor Intel(R) Core(TM)2 Quad CPU  Q8200  @ 2.33GHz, 2331 Mhz, 4 Core(s), 4 Logical Processor(s), Installed Physical Memory (RAM) 6.00 GB

Offline ripper

  • Forum Member
Re: Countdown Timer
« Reply #9 on: March 12, 2009, 06:33:45 pm »
Thxx again flyer!! Sry to put ya through so much work .
Testing again with :
1)typed : !timerstart ,RESULT : Please input the event day eg. !ed monday

2) typed : !ed saturday ,RESULT : Please input the event time eg. !et 12:15

3) typed : !et 18:00 ,RESULT : The Countdown Timer has been started on Thursday, March 12, 2009 at 14:28.00 for the (QUIZ) starting at 18:00 on saturday.

Cheers!

Offline wonderer

  • MX Hosts
  • *****
  • ***
Re: Countdown Timer
« Reply #10 on: March 12, 2009, 07:25:16 pm »
@F£¥è®

My post was not meant as criticism at your script, in contrary, if it does the job I don't feel the need to script a more precise one though it is not too difficult. It is just I know about the OnTimer problems in Metis.

Offline ripper

  • Forum Member
Re: Countdown Timer
« Reply #11 on: March 12, 2009, 09:39:48 pm »
Update: Working great Flyer!! lookin forward to the updated version!! But,,,there is a problem ,,i Just thought of something else while sitting here lol.How hard would it be update it so it does the following:
when the timer is ended,it does an action,like /kick (whoever).I guess you would need to enter a param ,eg. Please input person to be kicked or whatever.I shoulda thought of this beforehand lol.Just update the previous version as you were Flyer.please.Maybe i'll ask for this other script some other time. I appricate all you do.MUCH!! THX!!!!!!!!!!!!

Offline F£¥è®

  • Forum Member
Re: Countdown Timer
« Reply #12 on: March 12, 2009, 10:27:01 pm »
Hi again ripper,
As promised here is the revised version (it only needed an extra three lines), this should now work from the present day up to six days ahead.
Please let me know of any bugs and I'll do my best to sort them.

The feature you ask for above is very easily added and I will do so in the very near future.  :yes:

Regards F£¥è®

Code: [Select]
<config>
<command type = "script">
<in>!timerstart</in>
<out type = "push" extdata = "name">%NAME%</out>
<out type = "pop" extdata = "count"/>
<out>#c16#Please input the event day  eg.   #c8#!ed monday</out>
</command>

<command type = "script">
<in>!ed %PARAM%</in>
<out type = "push" extdata = "ed">%PARAM%</out>
<out>#c16#Please input the event time   eg.   #c8#!et 12#c16#:#c8#15</out>
</command>

<command type = "script">
<in>!et %PARAM%</in>
<out type = "push" extdata = "activate">1</out>
<out type = "push" extdata = "currentday">%DAY-OF-WEEK%</out>
<out type = "push" extdata = "et">%PARAM%</out>
<out type = "push" extdata = "ethours"><operator type = "strtrm" lvalue = "$et$" rvalue = "2"/></out>
<out type = "push" extdata = "etmins"><operator type = "*" lvalue = "$ethours$" rvalue = "60"/></out>
<out type = "push" extdata = "etextramins"><operator type = "strright" lvalue = "$et$" rvalue = "3"/></out>
<out type = "push" extdata = "etmins"><operator type = "+" lvalue = "$etmins$" rvalue = "$etextramins$"/></out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "sunday">0</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "monday">1</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "tuesday">2</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "wednesday">3</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "thursday">4</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "friday">5</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "saturday">6</out>
<out type = "goto" extdata = "7" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/>
<out type = "push" extdata = "endday" condition = "2" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "+" lvalue = "$endday$" rvalue = "7"/></out>
<out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$endday$" rvalue = "$currentday$"/></out>
<out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$numdays$" rvalue = "1"/></out>
<out type = "push" extdata = "dayhours"><operator type = "*" lvalue = "$numdays$" rvalue = "24"/></out>
<out type = "push" extdata = "daymins"><operator type = "*" lvalue = "$dayhours$" rvalue = "60"/></out>
<out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$etmins$"/></out>
<out type = "push" extdata = "time">%LOCALTIME%</out>
<out type = "push" extdata = "hourtime"><operator type = "strtrm" lvalue = "$time$" rvalue = "2"/></out>
<out type = "push" extdata = "mintime"><operator type = "*" lvalue = "$hourtime$" rvalue = "60"/></out>
<out type = "push" extdata = "extramintime"><operator type = "strright" lvalue = "$time$" rvalue = "3"/></out>
<out type = "push" extdata = "extramintime"><operator type = "strtrm" lvalue = "$extramintime$" rvalue = "2"/></out>
<out type = "push" extdata = "mintime"><operator type = "+" lvalue = "$mintime$" rvalue = "$extramintime$"/></out>
<out type = "goto" extdata = "3" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/>
<out type = "push" extdata = "extradaymins"><operator type = "*" lvalue = "24" rvalue = "60"/></out>
<out type = "push" extdata = "extradaymins"><operator type = "-" lvalue = "$extradaymins$" rvalue = "$mintime$"/></out>
<out type = "push" extdata = "daymins" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "-" lvalue = "$etmins$" rvalue = "$mintime$"/></out>
<out type = "goto" extdata = "2" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/>
<out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$extradaymins$"/></out>
<out>#c7#The Countdown Timer has been started on #c8#%LONGDATE% #c7#at #c8#%LOCALTIME% #c7#for the #c16#(#c8#event#c16#) #c7#starting at $et$ on $ed$.</out>
</command>

<OnTimer type = "script" interval = "60" condition = "1" lvalue = "$activate$" rvalue = "1">
<out type = "push" extdata = "count"><operator type = "+" lvalue = "$count$" rvalue = "1"/></out>
<out type = "push" extdata = "daymins"><operator type = "-" lvalue = "$daymins$" rvalue = "1"/></out>
<out type = "push" extdata = "hour"><operator type = "/" lvalue = "$daymins$" rvalue = "60"/></out>
<out type = "push" extdata = "minute"><operator type = "%" lvalue = "$daymins$" rvalue = "60"/></out>
<out condition = "1" lvalue = "$count$" rvalue = "45">#c7#The #c16#(#c8#whatever text you want #c16#) #c7#will begin in #c8#$hour$ #c7#hours #c16#: #c8#$minute$ #c7#minutes</out>
<out type = "push" extdata = "count" condition = "1" lvalue = "$count$" rvalue = "45">0</out>
<out type = "push" extdata = "activate" condition = "2" lvalue = "$daymins$" rvalue = "1">0</out>
</OnTimer>

<command type = "script" users = "$name$;">
<in>!stoptimer</in>
<out type = "push" extdata = "activate">0</out>
<out>#c7#Timer Stopped</out>
</command>
</config>

@wonderer,
Your comments were not taken as criticism,  the point I was trying to make is if you have something better then post it rather than just alluding to it.
All the Best F£¥è®
OS Microsoft® Windows Vista™ Home Premium, Processor Intel(R) Core(TM)2 Quad CPU  Q8200  @ 2.33GHz, 2331 Mhz, 4 Core(s), 4 Logical Processor(s), Installed Physical Memory (RAM) 6.00 GB

Offline ripper

  • Forum Member
Re: Countdown Timer
« Reply #13 on: March 13, 2009, 12:23:35 am »
THXXXXxxxxxxxxxx again Flyer!!  Your scripts are tops!!! Thxx in the future for the other script!! Pretty cool the way you help people out! We all truly appreciate it!! CHEERS!!

Offline F£¥è®

  • Forum Member
Re: Countdown Timer
« Reply #14 on: March 13, 2009, 09:59:45 pm »
Hi again ripper,
This is the asked for update,you need to make a list in notepad of the names you may want to kick this is easily edited later if need be.
 eg.
name1
name2
name3
etc.
This prevents users in the room seeing who's been picked.Save this file as remove.ini to your metis plugins folder.
Edit the "readfile" nvalue to point to your plugins folder.
The command is then! !n line number(the line in the remove file that contains the name you want to kick) eg. !n 4
NB. the bot must have enough admin rights to kick.

Code: [Select]
<config>
<command type = "script">
<in>!timerstart</in>
<out type = "push" extdata = "name">%NAME%</out>
<out type = "pop" extdata = "count"/>
<out>#c16#Please input the event day  eg.   #c8#!ed monday</out>
</command>

<command type = "script">
<in>!ed %PARAM%</in>
<out type = "push" extdata = "ed">%PARAM%</out>
<out>#c16#Please input the event time   eg.   #c8#!et 12#c16#:#c8#15</out>
</command>

<command type = "script">
<in>!n %PARAM%</in>
<out type="push" extdata="remove"><operator type="readfile" nvalue="E:\Program Files\Metis 2.8\Plugins\remove.ini" lvalue="l" rvalue="%PARAM%"/></out>
<out>/message $name$ You have chosen $remove$ to be kicked when the timer ends</out>
</command>

<command type = "script">
<in>!et %PARAM%</in>
<out type = "push" extdata = "activate">1</out>
<out type = "push" extdata = "currentday">%DAY-OF-WEEK%</out>
<out type = "push" extdata = "et">%PARAM%</out>
<out type = "push" extdata = "ethours"><operator type = "strtrm" lvalue = "$et$" rvalue = "2"/></out>
<out type = "push" extdata = "etmins"><operator type = "*" lvalue = "$ethours$" rvalue = "60"/></out>
<out type = "push" extdata = "etextramins"><operator type = "strright" lvalue = "$et$" rvalue = "3"/></out>
<out type = "push" extdata = "etmins"><operator type = "+" lvalue = "$etmins$" rvalue = "$etextramins$"/></out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "sunday">0</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "monday">1</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "tuesday">2</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "wednesday">3</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "thursday">4</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "friday">5</out>
<out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "saturday">6</out>
<out type = "goto" extdata = "7" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/>
<out type = "push" extdata = "endday" condition = "2" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "+" lvalue = "$endday$" rvalue = "7"/></out>
<out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$endday$" rvalue = "$currentday$"/></out>
<out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$numdays$" rvalue = "1"/></out>
<out type = "push" extdata = "dayhours"><operator type = "*" lvalue = "$numdays$" rvalue = "24"/></out>
<out type = "push" extdata = "daymins"><operator type = "*" lvalue = "$dayhours$" rvalue = "60"/></out>
<out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$etmins$"/></out>
<out type = "push" extdata = "time">%LOCALTIME%</out>
<out type = "push" extdata = "hourtime"><operator type = "strtrm" lvalue = "$time$" rvalue = "2"/></out>
<out type = "push" extdata = "mintime"><operator type = "*" lvalue = "$hourtime$" rvalue = "60"/></out>
<out type = "push" extdata = "extramintime"><operator type = "strright" lvalue = "$time$" rvalue = "3"/></out>
<out type = "push" extdata = "extramintime"><operator type = "strtrm" lvalue = "$extramintime$" rvalue = "2"/></out>
<out type = "push" extdata = "mintime"><operator type = "+" lvalue = "$mintime$" rvalue = "$extramintime$"/></out>
<out type = "goto" extdata = "3" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/>
<out type = "push" extdata = "extradaymins"><operator type = "*" lvalue = "24" rvalue = "60"/></out>
<out type = "push" extdata = "extradaymins"><operator type = "-" lvalue = "$extradaymins$" rvalue = "$mintime$"/></out>
<out type = "push" extdata = "daymins" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "-" lvalue = "$etmins$" rvalue = "$mintime$"/></out>
<out type = "goto" extdata = "2" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/>
<out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$extradaymins$"/></out>
<out>#c7#The Countdown Timer has been started on #c8#%LONGDATE% #c7#at #c8#%LOCALTIME% #c7#for the #c16#(#c8#event#c16#) #c7#starting at $et$ on $ed$.</out>
</command>

<OnTimer type = "script" interval = "60" condition = "1" lvalue = "$activate$" rvalue = "1">
<out type = "push" extdata = "count"><operator type = "+" lvalue = "$count$" rvalue = "1"/></out>
<out type = "push" extdata = "daymins"><operator type = "-" lvalue = "$daymins$" rvalue = "1"/></out>
<out type = "push" extdata = "hour"><operator type = "/" lvalue = "$daymins$" rvalue = "60"/></out>
<out type = "push" extdata = "minute"><operator type = "%" lvalue = "$daymins$" rvalue = "60"/></out>
<out condition = "1" lvalue = "$count$" rvalue = "45">#c7#The #c16#(#c8#whatever text you want #c16#) #c7#will begin in #c8#$hour$ #c7#hours #c16#: #c8#$minute$ #c7#minutes</out>
<out type = "push" extdata = "count" condition = "1" lvalue = "$count$" rvalue = "45">0</out>
<out type = "usercmd" condition = "2" lvalue = "$daymins$" rvalue = "1">/kick $remove$</out>
<out type = "push" extdata = "activate" condition = "2" lvalue = "$daymins$" rvalue = "1">0</out>
</OnTimer>

<command type = "script" users = "$name$;">
<in>!stoptimer</in>
<out type = "push" extdata = "activate">0</out>
<out>#c7#Timer Stopped</out>
</command>
</config>

Please don't hesitate to ask if you need anything else.
Regards F£¥è®.
OS Microsoft® Windows Vista™ Home Premium, Processor Intel(R) Core(TM)2 Quad CPU  Q8200  @ 2.33GHz, 2331 Mhz, 4 Core(s), 4 Logical Processor(s), Installed Physical Memory (RAM) 6.00 GB

Offline ripper

  • Forum Member
Re: Countdown Timer
« Reply #15 on: March 16, 2009, 01:53:51 pm »
THXXXXXXxxxxxx  Flyer!! Works GREAT!!!!!!!!  The Private feature was good idea too!! Thx Alot!! Cheers!!

WinMX World :: Forum  |  Metis Scripts and Help  |  Other Metis scripts  |  Countdown Timer
 

gfxgfx
gfx
©2005-2017 WinMXWorld.com. All rights reserved.
SMF 2.0.14 | SMF © 2017, Simple Machines
Page created in 0.037 seconds with 18 queries.
Helios Multi © Bloc
gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!