mIRC Home    About    Download    Register    News    Help

Print Thread
#253166 28/05/15 02:13 PM
Joined: Aug 2012
Posts: 59
Maelish Offline OP
Babel fish
OP Offline
Babel fish
Joined: Aug 2012
Posts: 59
Is there a way to do an IF statement between two time. For example, 04:00 and 10:00?


Find Gamers, my player finder for tabletop RPGers and Wargamers.
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
if (($time(HH:nn) > 04:00) && ($v1 < 10:00))

Last edited by splinny; 28/05/15 02:51 PM.

Dont give a fish - teach to fish!
Joined: Aug 2012
Posts: 59
Maelish Offline OP
Babel fish
OP Offline
Babel fish
Joined: Aug 2012
Posts: 59
Here is my test that seems to fail.

Code:
on *:TEXT:test-phrase:#channel:{
  if (($time > 04:00:00) && ($time < 12:00:00)) {
    //msg #channel Morning 
  }
}


Ah never mind. This does work, there was a broken bit of code above this script that kept it from running.

Last edited by Maelish; 28/05/15 03:41 PM.

Find Gamers, my player finder for tabletop RPGers and Wargamers.

Link Copied to Clipboard