Isnight

From Hercules Wiki
Revision as of 02:19, 7 August 2013 by Via (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Syntax

  • isday();
  • isnight();

Description

These functions determine whether server day or night cycle is currently in effect or not. If the server night is in effect, isday and isnight will return 0 and 1, otherwise 1 and 0 respectively.

Examples

if(!isday())
{
    mes "I do not work at night, come again tomorrow.";
    close;
}
if(isnight())
{
    mes "I do not work at night, come again tomorrow.";
    close;
}

These two script fragments achieve the same effect.