summaryrefslogtreecommitdiff
path: root/npc/011-3
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-01 18:05:39 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-01 18:05:39 -0300
commit82d862ee85bbacf76118b59bf707ab037771144b (patch)
treeff5c6a4c533e5af6ca2d283ec7aab3e75060ae80 /npc/011-3
parent9a7eed8dfd8a79e8e4584943e636e1fe9b9337f9 (diff)
downloadserverdata-82d862ee85bbacf76118b59bf707ab037771144b.tar.gz
serverdata-82d862ee85bbacf76118b59bf707ab037771144b.tar.bz2
serverdata-82d862ee85bbacf76118b59bf707ab037771144b.tar.xz
serverdata-82d862ee85bbacf76118b59bf707ab037771144b.zip
Eternal Swamps main logic etc. + rebalance
Diffstat (limited to 'npc/011-3')
-rw-r--r--npc/011-3/_mobs.txt4
-rw-r--r--npc/011-3/flood.txt57
2 files changed, 59 insertions, 2 deletions
diff --git a/npc/011-3/_mobs.txt b/npc/011-3/_mobs.txt
index 2b7eb0b88..dbeec9e0d 100644
--- a/npc/011-3/_mobs.txt
+++ b/npc/011-3/_mobs.txt
@@ -1,11 +1,11 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 011-3: Eternal Swamps - Landbridge mobs
-011-3,39,205,19,14 monster Angry Red Scorpion 1130,20,100000,30000
+011-3,39,205,19,14 monster Angry Red Scorpion 1130,15,100000,30000
011-3,40,206,19,14 monster Fire Goblin 1067,20,100000,30000
011-3,38,207,19,14 monster Old Snake 1199,5,100000,30000
011-3,38,173,18,13 monster Sarracenus 1125,10,100000,30000
011-3,37,175,18,13 monster Black Scorpion 1074,5,100000,30000
-011-3,39,174,18,13 monster Snake 1122,15,100000,30000
+011-3,39,174,18,13 monster Snake 1122,10,100000,30000
011-3,39,144,19,11 monster Snake 1122,5,100000,30000
011-3,38,144,19,11 monster Sarracenus 1125,5,100000,30000
011-3,38,145,19,11 monster Desert Bandit 1124,5,100000,30000
diff --git a/npc/011-3/flood.txt b/npc/011-3/flood.txt
index 2880e3504..8d12fdfe9 100644
--- a/npc/011-3/flood.txt
+++ b/npc/011-3/flood.txt
@@ -7,4 +7,61 @@
// Flood happens at random and causes BluePar to be spawn. Runs every 10 minutes.
// At the 6th minute of an hour (6, 16, 26, 36, 46, 56)
+011-3,0,0,0 script #EternalSwampCore NPC_HIDDEN,{
+ end;
+
+OnSwampMob:
+ end;
+
+OnInit:
+ addmapmask "011-3", 1024;
+
+OnMinute06:
+OnMinute16:
+OnMinute26:
+OnMinute36:
+OnMinute46:
+OnMinute56:
+ .@fd=!(getmapmask("011-3")&1024); // .@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;
+ delcells "EterSwampBridge1";
+ delcells "EterSwampBridge2";
+ delcells "EterSwampBridge3";
+ delcells "EterSwampBridge4";
+ delcells "EterSwampBridge5";
+ delcells "EterSwampBridge6";
+ delcells "EterSwampBridge7";
+ mapannounce "011-3", "Eternal Swamps: The flood ceases!",bc_all|bc_npc;
+ } else {
+ // 40% chances to flood, 75% during night
+ .@odds=40;
+ if (is_night())
+ .@odds+=35;
+
+ // Maybe we should flood it
+ if (rand(0,100) < .@odds) {
+ removemapmask "011-3", 1024;
+
+ setcells "011-3", 37, 22, 39, 24, 3, "EterSwampBridge1";
+ setcells "011-3", 37, 34, 39, 41, 3, "EterSwampBridge2";
+ setcells "011-3", 31, 67, 33, 73, 3, "EterSwampBridge3";
+ setcells "011-3", 40, 96, 42, 102, 3, "EterSwampBridge4";
+ setcells "011-3", 38, 130, 40, 136, 3, "EterSwampBridge5";
+ setcells "011-3", 41, 157, 43, 163, 3, "EterSwampBridge6";
+ setcells "011-3", 36, 187, 38, 193, 3, "EterSwampBridge7";
+
+ areamonster "011-3", 20, 20, 60, 220, "Bluepar", Bluepar, rand(8,26), "#EternalSwampCore::OnSwampMob";
+ mapannounce "011-3", "Eternal Swamps: A flood starts!",bc_all|bc_npc;
+
+ // TODO: Handle players in bridges
+ }
+
+ }
+
+ end;
+}