Jump to content
  • 0

Automatic Day and Night


Deviszh

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.02
  • Content Count:  173
  • Reputation:   3
  • Joined:  09/04/16
  • Last Seen:  

as the title says, i find some scripts but it giving me error in mapserver.  /yawn

 

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites

  • 1

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  895
  • Reputation:   117
  • Joined:  05/23/12
  • Last Seen:  

Better use this script because to use an atcommand isnt needed and if you restart/reload the server after 18 o'clock it will be always day.

-	script	DaynNight	-1,{

OnInit:
	if(gettime(3) >= 18 || gettime(3) < 6){night;}
	else {day;}
	end;

OnClock0600:
	day;
	end;

OnClock1800:
	night;
	end;
}

Rynbef~

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  65
  • Reputation:   0
  • Joined:  05/09/12
  • Last Seen:  

- script pagi -1,{

end;

OnClock0600:

atcommand "@day";

end;

}

- script malam -1,{

end;

OnClock1800:

atcommand "@night";

end;

}

 

Edited by Emistry
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.02
  • Content Count:  173
  • Reputation:   3
  • Joined:  09/04/16
  • Last Seen:  

 

 

-	script	pagi	-1,{
end;

OnClock0600:
atcommand "@day";
end;
}


-	script	malam	-1,{
end;

OnClock1800:
atcommand "@night";
end;
}

 

 

Better use this script because to use an atcommand isnt needed and if you restart/reload the server after 18 o'clock it will be always day.

-	script	DaynNight	-1,{

OnInit:
	if(gettime(3) >= 18 || gettime(3) < 6){night;}
	else {day;}
	end;

OnClock0600:
	day;
	end;

OnClock1800:
	night;
	end;
}

Rynbef~

 

Thank you all! But my game time is permanent Day time. How to change this?  /whisp

 

screenr_Athena012.jpg

Edited by Kinkkynipps
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

Read Emistry's post.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.02
  • Content Count:  173
  • Reputation:   3
  • Joined:  09/04/16
  • Last Seen:  

Read Emistry's post.

 

i cant find, link?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

// Choose if server begin with night (yes) or day (no)

night_at_start: no

// Define duration in msec of the day (default: 7200000 = 2 hours)

// Set to 0 to disable day cycle (but not @day GM command).

// Except 0, minimum is 60000 (1 minute)

day_duration: 0

// Define duration in msec of the night (default: 1800000 = 30 min)

// Set to 0 to disable night cycle (but not @night GM command).

// Except 0, minimum is 60000 (1 minute)

night_duration: 0

 

Edited by Emistry
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.02
  • Content Count:  173
  • Reputation:   3
  • Joined:  09/04/16
  • Last Seen:  

// Choose if server begin with night (yes) or day (no)
night_at_start: no

// Define duration in msec of the day (default: 7200000 = 2 hours)
// Set to 0 to disable day cycle (but not @day GM command).
// Except 0, minimum is 60000 (1 minute)
day_duration: 0

// Define duration in msec of the night (default: 1800000 = 30 min)
// Set to 0 to disable night cycle (but not @night GM command).
// Except 0, minimum is 60000 (1 minute)
night_duration: 0

thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...