summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-19 09:07:17 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-19 09:07:17 -0300
commit781d1fd070e7565af741a8606447cd1a98f7f076 (patch)
tree7f1d19d4d6b435111b4a5978632921f91826d739
parent577b6b5249794a5f3b5c9600c637c8e82429f1dd (diff)
downloadserverdata-781d1fd070e7565af741a8606447cd1a98f7f076.tar.gz
serverdata-781d1fd070e7565af741a8606447cd1a98f7f076.tar.bz2
serverdata-781d1fd070e7565af741a8606447cd1a98f7f076.tar.xz
serverdata-781d1fd070e7565af741a8606447cd1a98f7f076.zip
@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.
-rw-r--r--npc/functions/weather.txt21
1 files changed, 19 insertions, 2 deletions
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("<map name>", <flag>)
+ * setmapflag("<map name>", <flag>{, <val>})
+ * getmapflag("<map name>", <flag>)
+
+ 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);