diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-02-22 16:01:44 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-02-22 16:01:44 -0300 |
commit | 510049c468560d366bb29009da2a4e97ea4edcc9 (patch) | |
tree | ce4d9892301e292ae009ae4976ce010ad2796f84 /npc/functions | |
parent | 973617e2bb8b5d065ef59dd17afc3830bf498572 (diff) | |
download | serverdata-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.txt | 5 |
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."); |