summaryrefslogtreecommitdiff
path: root/npc/functions/weather.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-23 18:26:59 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-23 18:26:59 -0300
commit6b4dd44ae618c4aae6fe6708a951ddd6a82b4f10 (patch)
treedb3eaed5e36f04c937a79c9a08d41fcfcacb08ac /npc/functions/weather.txt
parent9de77a0a1a086877a60afdf29456749dfde1862c (diff)
downloadserverdata-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/weather.txt')
-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