mIRC Home    About    Download    Register    News    Help

Print Thread
Help with displaying hours and minutes #247325 29/07/14 09:02 AM
Joined: Jul 2014
Posts: 2
T
TPB Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
T
Joined: Jul 2014
Posts: 2
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.

Re: Help with displaying hours and minutes [Re: TPB] #247333 30/07/14 03:07 PM
Joined: Jun 2014
Posts: 248
B
Belhifet Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
$duration($calc($ctime - $ctime(time song started)))


Something like dat...You're gonna need to have a variable somewhere that records when you started.

Re: Help with displaying hours and minutes [Re: Belhifet] #247430 02/08/14 06:13 AM
Joined: Jul 2014
Posts: 2
T
TPB Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
T
Joined: Jul 2014
Posts: 2
Hey, I wanted to say thank you; this really pointed me in the right direction