summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/functions/weather.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt
index f764f6350..30af46010 100644
--- a/npc/functions/weather.txt
+++ b/npc/functions/weather.txt
@@ -126,10 +126,12 @@ OnMinute45:
end;
// Function to check stuff
- // WeatherSwitch ( MASK )
+ // WeatherSwitch ( MASK, MAP )
function WeatherSwitch {
// Get map
getmapxy(.@key$,.@a,.@b,0);
+ if (getarg(1,0) != 0)
+ .@key$=getarg(1,.@key$);
// Sanitize
.@m$ = htget(.wcore, .@key$, "Not found");
@@ -144,23 +146,23 @@ OnMinute45:
// Some commands, for GMs manually override weather
OnRain:
- WeatherSwitch(MASK_RAIN);
+ WeatherSwitch(MASK_RAIN, getarg(0,0));
end;
OnSand:
- WeatherSwitch(MASK_SANDSTORM);
+ WeatherSwitch(MASK_SANDSTORM, getarg(0,0));
end;
OnSnow:
- WeatherSwitch(MASK_SNOW);
+ WeatherSwitch(MASK_SNOW, getarg(0,0));
end;
OnNight:
- WeatherSwitch(MASK_NIGHT);
+ WeatherSwitch(MASK_NIGHT, getarg(0,0));
end;
OnEvil:
- WeatherSwitch(MASK_EVILSANCTUM);
+ WeatherSwitch(MASK_EVILSANCTUM, getarg(0,0));
end;
// Clear works on any map