diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-12-23 14:57:02 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-12-23 14:57:02 -0200 |
commit | 99bbfaeb1d183a85705a0a42b288883537229e71 (patch) | |
tree | 5bd1dd4707e6a6843e8f42266addff4e6fd56f93 | |
parent | 26c5d4401fbfc65f5c847a01aca8e384584cd487 (diff) | |
download | serverdata-99bbfaeb1d183a85705a0a42b288883537229e71.tar.gz serverdata-99bbfaeb1d183a85705a0a42b288883537229e71.tar.bz2 serverdata-99bbfaeb1d183a85705a0a42b288883537229e71.tar.xz serverdata-99bbfaeb1d183a85705a0a42b288883537229e71.zip |
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.
-rw-r--r-- | npc/functions/weather.txt | 16 |
1 files changed, 12 insertions, 4 deletions
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 |