diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-06-23 18:26:59 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-06-23 18:26:59 -0300 |
commit | 6b4dd44ae618c4aae6fe6708a951ddd6a82b4f10 (patch) | |
tree | db3eaed5e36f04c937a79c9a08d41fcfcacb08ac /npc/functions | |
parent | 9de77a0a1a086877a60afdf29456749dfde1862c (diff) | |
download | serverdata-6b4dd44ae618c4aae6fe6708a951ddd6a82b4f10.tar.gz serverdata-6b4dd44ae618c4aae6fe6708a951ddd6a82b4f10.tar.bz2 serverdata-6b4dd44ae618c4aae6fe6708a951ddd6a82b4f10.tar.xz serverdata-6b4dd44ae618c4aae6fe6708a951ddd6a82b4f10.zip |
Allow @w<weather> to change another map. Experimental and ugly.
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/weather.txt | 14 |
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 |