From 510049c468560d366bb29009da2a4e97ea4edcc9 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 22 Feb 2020 16:01:44 -0300 Subject: Weather is broken at server startup --- npc/functions/weather.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'npc/functions/weather.txt') 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."); -- cgit v1.2.3-70-g09d2