From 99bbfaeb1d183a85705a0a42b288883537229e71 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 23 Dec 2018 14:57:02 -0200 Subject: Notify players in a global broadcast about day/night cycle changes. This way, even inside a cave, you can keep track of time changes. PS. Take care when fishing. --- npc/functions/weather.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt index af07f3051..264c16bd7 100644 --- a/npc/functions/weather.txt +++ b/npc/functions/weather.txt @@ -152,17 +152,25 @@ OnMinute45: removemapflag(.@key$, mf_nightenabled); removemapmask .@key$, MASK_NIGHT; } - } htidelete(.@hti); // During night, normal monsters respawn 30% faster. (Bifs and Bosses are immune) - if (is_night()) + // + // Also, announce to players about day/night cycle changes + // 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) { + announce("The night falls.", bc_all|bc_npc); setbattleflag("mob_spawn_delay", 70); - else + } else if (!is_night() && $@WEATHER_NIGHT) { + announce("The day rises.", bc_all|bc_npc); setbattleflag("mob_spawn_delay", 100); + } + $@WEATHER_NIGHT=is_night(); - debugmes "[Weather.sys] Weather reloaded"; + //debugmes "[Weather.sys] Weather reloaded"; end; // Function to check stuff -- cgit v1.2.3-60-g2f50