summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-02-22 16:01:44 -0300
committerJesusaves <cpntb1@ymail.com>2020-02-22 16:01:44 -0300
commit510049c468560d366bb29009da2a4e97ea4edcc9 (patch)
treece4d9892301e292ae009ae4976ce010ad2796f84 /npc/functions
parent973617e2bb8b5d065ef59dd17afc3830bf498572 (diff)
downloadserverdata-510049c468560d366bb29009da2a4e97ea4edcc9.tar.gz
serverdata-510049c468560d366bb29009da2a4e97ea4edcc9.tar.bz2
serverdata-510049c468560d366bb29009da2a4e97ea4edcc9.tar.xz
serverdata-510049c468560d366bb29009da2a4e97ea4edcc9.zip
Weather is broken at server startup
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/weather.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt
index 039c2e7a9..36bd99fec 100644
--- a/npc/functions/weather.txt
+++ b/npc/functions/weather.txt
@@ -49,6 +49,7 @@ function script is_night {
*/
OnInit:
+ .@init=true;
// Bind commands
bindatcmd "wsnow", "#WeatherCore::OnSnow", 80, 80, 1;
bindatcmd "wrain", "#WeatherCore::OnRain", 80, 80, 1;
@@ -202,7 +203,7 @@ OnMinute45:
// The fastest you'll get is 30 minutes for night cycle.
// It's 2 messages every 3 hours. (r7.5)
// Player might be on cave, and this will help them tracking time.
- if (is_night() && !$@WEATHER_NIGHT) {
+ if (is_night() && (!$@WEATHER_NIGHT || .@init)) {
.@c = getunits(BL_PC, .@players, MAX_CYCLE_PC);
for (.@i = 0; .@i < .@c; .@i++) {
message(.@players[.@i], "The night falls.");
@@ -213,7 +214,7 @@ OnMinute45:
//charcommand("@reloadbattleconf"); // Careful!
donpcevent("@exprate::OnInheirtedReload");
//donpcevent("@droprate::OnReload");
- } else if (!is_night() && $@WEATHER_NIGHT) {
+ } else if (!is_night() && ($@WEATHER_NIGHT || .@init)) {
.@c = getunits(BL_PC, .@players, MAX_CYCLE_PC);
for (.@i = 0; .@i < .@c; .@i++) {
message(.@players[.@i], "The day rises.");