mIRC Home    About    Download    Register    News    Help

Print Thread
#217252 06/01/10 03:51 AM
Joined: Jan 2010
Posts: 10
O
oddvent Offline OP
Pikka bird
OP Offline
Pikka bird
O
Joined: Jan 2010
Posts: 10
Hi all.

i need your help with a script that returns the amount of hours since a certain date when a user types !hours. i am currently using this script:

on *:TEXT:!hours:#: {
notice $nick There has been a total of $calc((($ctime)-($ctime(December 10 2009)))/60/60) hours since dec 10th 2009.
}


The problem with this is that it returns the amount of hours on a 24 hourly basis. i want it to return the amount of hours on a one hourly basis instead.
The beginning time of the script is Decmeber 10th 2009 at 00:00 hours.

how can i achieve this? thanks

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Try $int($calc(($ctime - $ctime(December 10 2009 00:00)) /3600)) smile

Joined: Jan 2010
Posts: 10
O
oddvent Offline OP
Pikka bird
OP Offline
Pikka bird
O
Joined: Jan 2010
Posts: 10
that works wonderfully Horstl, thank you


Link Copied to Clipboard