mIRC Homepage
Posted By: Zero6 help for time left - 26/05/05 06:27 PM
Need some sort of code for example event to come so it will show time left in weeks, days, hours, minutes, seconds...i used to have one, but since my both hd's broke obviously dont have one anymore

back then i placed it to alias if i remember correctly and
/trigger to display some event time left etc... really good for upcoming tv shows listing etc...

if u guys can help me out, it would be nice smile
Posted By: SladeKraven Re: help for time left - 26/05/05 07:14 PM
$duration($calc($ctime(25/12/05) - $ctime)) - Weeks etc till christmas.
Posted By: defiant Re: help for time left - 26/05/05 07:23 PM
You can find the next in mIRC help though (/help $ctime)

" $duration( $calc($ctime(26/5/2005 21:20:00) - $ctime)) "

for example;
Code:
alias time_till {
  if !$2 { 
    echo -a Use: /time_till dd/mm/yyyy HH:nn:ss
    echo -a Example: /time_till 30/05/2005 23:59:59
    return
  }
  else {
    echo -a Time till: $1- = $duration( $calc($ctime($1 $2) - $ctime))
    return
  }
}


Put this in your remote script, and type in mIRC: /time_till


(To make this code work, copy all code, open wordpad paste & copy again, open mIRC remote script, and paste)
Posted By: Zero6 Re: help for time left - 27/05/05 06:11 AM
thanks for help guys o/
Posted By: SkyD Re: help for time left - 27/05/05 11:46 AM
It works! It shows me: Time till: 17/06/2005 10:00 = 2wks 6days 19hrs 20mins 47secs ,but how i make to show 2 nedelas 6dienas ... ??? "nedelas and dienas" is in latvian Please help me! wink
Posted By: SladeKraven Re: help for time left - 27/05/05 11:59 AM
$replace($duration($calc($ctime($1 $2) - $ctime)),wk,nedela,day,diena)

-Andy
Posted By: SkyD Re: help for time left - 27/05/05 12:08 PM
OuU tnx! wink) you're the best programmer! wink)
Posted By: SladeKraven Re: help for time left - 27/05/05 12:17 PM
I'm not a programmer, I don't think I have the time and patience to be one, but alot of people here started with mIRC and did become a programmer, because mIRC has a scripting language in it's own. But mIRC is alot easier than any other programming language, you'll find it's probably alot easier to create a dialog in mIRC than it is in C++, unless you're an experienced programmer then you could probably argue for and against. I do know a bit about mIRC scripting but not enough yet to be labelled a skilled scripter.

-Andy
© mIRC Discussion Forums