From 6b4dd44ae618c4aae6fe6708a951ddd6a82b4f10 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 23 Jun 2018 18:26:59 -0300 Subject: Allow @w to change another map. Experimental and ugly. --- npc/functions/weather.txt | 14 ++++++++------ 1 file 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 -- cgit v1.2.3-60-g2f50