mIRC Homepage
Posted By: TPB Help with displaying hours and minutes - 29/07/14 09:02 AM
Hello everyone,
I'm having trouble with my script and I was hoping someone could help me out. I'd like to have the a duration displayed when someone says "!now" in hours and minutes, This is what I have so far, which works for me

on *:TEXT:!now:#: {
if ((%floodnow) || ($($+(%,floodnow.,$nick),2))) { return }
set -u8 %floodnow On
set -u15 %floodnow. $+ $nick On
msg $chan Sure, $nick Now Playing: ❝Summertime Mix❞ 【Amateur Hour】 »House«▕ My Rating 〔out of 10〕: 7.2 ★ˢ▏⌛ℝuntime: 192 Minutes of this Set █HERE_IS_WHERE_I'D_LIKE_DISPLAYED_THE_DURATION_ $+
}

If there were some way to set display HERE_IS_WHERE_I'D_LIKE_DISPLAYED_THE_DURATION_ in hours and minutes that would be great. I feel like I'm a little out of my league as I cannot understand anything related to $ctime or timers. I've tried hard scouring the internet and other forums for an answer and I cannot find one and I've never asked for help on any forum or forums before; Help me Obi-won, you're my only hope.
Posted By: Belhifet Re: Help with displaying hours and minutes - 30/07/14 03:07 PM
$duration($calc($ctime - $ctime(time song started)))


Something like dat...You're gonna need to have a variable somewhere that records when you started.
Posted By: TPB Re: Help with displaying hours and minutes - 02/08/14 06:13 AM
Hey, I wanted to say thank you; this really pointed me in the right direction
© mIRC Discussion Forums