From 781d1fd070e7565af741a8606447cd1a98f7f076 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 19 Jun 2018 09:07:17 -0300 Subject: @wnight should, in theory, do what @night would do and could affect skills. Don't talk about ingrav with me, Saulc. That skill is no more. --- npc/functions/weather.txt | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'npc/functions/weather.txt') diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt index 17894535e..cc7285721 100644 --- a/npc/functions/weather.txt +++ b/npc/functions/weather.txt @@ -7,6 +7,20 @@ 000-0,0,0,0 script #WeatherCore NPC_HIDDEN,{ end; +/* + * removemapflag("", ) + * setmapflag("", {, }) + * getmapflag("", ) + + mf_snow: 16 + + mf_jexp: 39 + mf_bexp: 40 + + setmapflag(.@key$, mf_nightenabled); + removemapflag(.@key$, mf_nightenabled); + +*/ OnInit: // Bind commands @@ -95,10 +109,13 @@ OnMinute45: // Is it night time? // For convenience, night time is from 00:15 to 00:45, every hour. // 2 = GETTIME_MINUTE - if (gettime(2) >= 15 && gettime(2) < 45) + if (gettime(2) >= 15 && gettime(2) < 45) { + setmapflag(.@key$, mf_nightenabled); addmapmask .@key$, MASK_NIGHT; - else if (getmapmask(.@key$) & MASK_NIGHT) + } else if (getmapmask(.@key$) & MASK_NIGHT) { + removemapflag(.@key$, mf_nightenabled); removemapmask .@key$, MASK_NIGHT; + } } htidelete(.@hti); -- cgit v1.2.3-70-g09d2