diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-03-01 20:06:13 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-03-01 20:06:13 -0300 |
commit | d42c5abada38ebeea92e2109b8c1b6aac1a167e5 (patch) | |
tree | 5e3b7648bb500d0593f444c5a59123dca3e21a33 | |
parent | 06d3d39041b2b3aa02c4db017328f651d9c95cd9 (diff) | |
download | serverdata-d42c5abada38ebeea92e2109b8c1b6aac1a167e5.tar.gz serverdata-d42c5abada38ebeea92e2109b8c1b6aac1a167e5.tar.bz2 serverdata-d42c5abada38ebeea92e2109b8c1b6aac1a167e5.tar.xz serverdata-d42c5abada38ebeea92e2109b8c1b6aac1a167e5.zip |
Special() biom: May have fog instead of monster attack.
-rw-r--r-- | db/constants.conf | 2 | ||||
-rw-r--r-- | npc/011-3/flood.txt | 10 | ||||
-rw-r--r-- | npc/functions/weather.txt | 17 |
3 files changed, 24 insertions, 5 deletions
diff --git a/db/constants.conf b/db/constants.conf index f51d8913e..f3f133287 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -3880,6 +3880,8 @@ constants_db: { MASK_SNOW: 64 MASK_CHRISTMAS: 128 MASK_AUTUMN: 256 + MASK_UNUSED: 512 + MASK_SPECIAL: 1024 comment__: "speechflags" S_FIRST_BLANK_LINE: 1 diff --git a/npc/011-3/flood.txt b/npc/011-3/flood.txt index 0fd0212f5..2d1d0abbb 100644 --- a/npc/011-3/flood.txt +++ b/npc/011-3/flood.txt @@ -3,7 +3,7 @@ // Jesusalva // Description: // Controls Eternal Swamps. -// Contains functions to flood the map (hide the bridges - mask 1024) +// Contains functions to flood the map (hide the bridges - mask 1024 + mask 2) // Flood happens at random and causes BluePar to be spawn. Runs every 6/4 minutes. // At the 6th minute of an hour (6, 16, 26, 36, 46, 56) // At the 2nd minute of an hour (2, 14 ... 44, 54) @@ -15,7 +15,7 @@ OnSwampMob: end; OnInit: - addmapmask "011-3", 1024; + addmapmask "011-3", MASK_SPECIAL; end; OnMinute02: @@ -30,12 +30,12 @@ OnMinute42: OnMinute46: OnMinute52: OnMinute56: - .@fd=!(getmapmask("011-3")&1024); // .@fd - is flooded? + .@fd=!(getmapmask("011-3")&MASK_SPECIAL); // .@fd - is flooded? if (.@fd) { // If it is flooded, unflood it to prevent players getting struck for too long killmonster("011-3", "#EternalSwampCore::OnSwampMob"); - addmapmask "011-3", 1024; + addmapmask "011-3", MASK_SPECIAL; delcells "EterSwampBridge1"; delcells "EterSwampBridge2"; delcells "EterSwampBridge3"; @@ -52,7 +52,7 @@ OnMinute56: // Maybe we should flood it if (rand(0,100) < .@odds) { - removemapmask "011-3", 1024; + removemapmask "011-3", MASK_SPECIAL; setcells "011-3", 37, 22, 39, 24, 3, "EterSwampBridge1"; setcells "011-3", 37, 34, 39, 41, 3, "EterSwampBridge2"; diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt index 437b84400..ec161fa20 100644 --- a/npc/functions/weather.txt +++ b/npc/functions/weather.txt @@ -89,6 +89,10 @@ OnInit: htput(.wcore, "020-1", "iceland"); htput(.wcore, "022-1", "iceland"); + // Special + htput(.wcore, "011-3", "special"); + + debugmes "[Weather.sys] Total Maps = " + htsize(.wcore); // No "end" here, so server starts with weather OnMinute00: @@ -136,6 +140,19 @@ OnMinute45: else if (.@r < 300) .@mk=.@mk|MASK_SNOW; + } else if (.@type$ == "special") { + // This biom is too hot for snow. But it may rain. + if (.@r < 300) + .@mk=.@mk|MASK_RAIN; + + // Fog? (Evil Sanctum and Monster Attack) Or Sandstorm? + if (.@r % 4 == 2) + .@mk=.@mk|MASK_EVILSANCTUM; + else if (.@r % 4 == 1) + .@mk=.@mk|MASK_SANDSTORM; + else if (.@r % 4 == 3) + .@mk=.@mk|MASK_MATTACK; + } else { debugmes "Warning warning, blame Saulc! Weather system error on map "+.@key$; announce("ERROR BLAME SAULC! WEATHER SYSTEM CORRUPTED.", bc_all); |