Difference between revisions of "Isnight"

From Hercules Wiki
Jump to: navigation, search
m (Haru moved page Isday to Isnight over redirect: The isday() command was removed. Only isnight() stays.)
(removed isday info)
 
Line 1: Line 1:
 
==Syntax==
 
==Syntax==
*'''isday'''();
 
 
*'''isnight'''();
 
*'''isnight'''();
  
 
==Description==
 
==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.
+
These functions determine whether server day or night cycle is currently in effect or not. If the server night is in effect, isnight will return true, otherwise false.
  
 
==Examples==
 
==Examples==
  [[if]](!isday())
+
  [[if]](!isnight())
 
  {
 
  {
 
     [[mes]] "I do not work at day, come again tomorrow.";
 
     [[mes]] "I do not work at day, come again tomorrow.";

Latest revision as of 18:27, 16 September 2016

Syntax

  • isnight();

Description

These functions determine whether server day or night cycle is currently in effect or not. If the server night is in effect, isnight will return true, otherwise false.

Examples

if(!isnight())
{
    mes "I do not work at day, 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.