summaryrefslogtreecommitdiff
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
parent9a7eed8dfd8a79e8e4584943e636e1fe9b9337f9 (diff)
downloadserverdata-82d862ee85bbacf76118b59bf707ab037771144b.tar.gz
serverdata-82d862ee85bbacf76118b59bf707ab037771144b.tar.bz2
serverdata-82d862ee85bbacf76118b59bf707ab037771144b.tar.xz
serverdata-82d862ee85bbacf76118b59bf707ab037771144b.zip
Eternal Swamps main logic etc. + rebalance
-rw-r--r--npc/009-1/guards.txt24
-rw-r--r--npc/011-3/_mobs.txt4
-rw-r--r--npc/011-3/flood.txt57
-rw-r--r--npc/014-2/guards.txt27
-rw-r--r--npc/021-4/main.txt6
5 files changed, 108 insertions, 10 deletions
diff --git a/npc/009-1/guards.txt b/npc/009-1/guards.txt
index 7574fd07f..50df598ee 100644
--- a/npc/009-1/guards.txt
+++ b/npc/009-1/guards.txt
@@ -13,9 +13,27 @@
mesn;
mesq l("Was not it only flooded constantly, the graveyard is not too far. If you stray away from the path, you'll get lost.");
next;
- mesn;
- mesq l("Various people already went missing, including GMs. This is why if you plan to cross, @@.", b(l("You won't be allowed to walk sideways, except to avoid a monster or two.")));
- mesc l("If you try to walk west or east too much, you'll hit an \"invisible wall\" to prevent you from getting lost.");
+ .@fd=!(getmapmask("011-3")&1024); // .@fd - is flooded?
+ if (!.@fd) {
+ mesn;
+ mesq l("Various people already went missing, including GMs. This is why if you plan to cross, @@.", b(l("You won't be allowed to walk sideways, except to avoid a monster or two.")));
+ mesc l("If you try to walk west or east too much, you'll hit an \"invisible wall\" to prevent you from getting lost.");
+ next;
+ select
+ l("I'm fine, thanks."),
+ l("My equipment is good, let me through!");
+ mes "";
+ if (@menu == 2) {
+ warp "011-3", 37, 219;
+ closedialog;
+ close;
+ }
+ } else {
+ mesn;
+ mesq l("In fact, it is flooded at the moment. Come back later.");
+ next;
+ }
+
if (GHQUEST)
GHQ_Assign(Snake, "Halinarzo");
end;
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;
+}
diff --git a/npc/014-2/guards.txt b/npc/014-2/guards.txt
index 71c458d89..e2a2f463e 100644
--- a/npc/014-2/guards.txt
+++ b/npc/014-2/guards.txt
@@ -4,20 +4,37 @@
// Description:
// Access to Eternal Swamps
-014-2,41,56,0 script Guard Jennifer NPC_GUARD2,{
+014-2,58,103,0 script Guard Jennifer NPC_GUARD2,{
mesn;
mesq l("Halt! Beyond this gate, is the Great River and the Eternal Swamps.");
next;
mesn;
mesq l("Was not it only flooded constantly, the graveyard is not too far. If you stray away from the path, you'll get lost.");
next;
- mesn;
- mesq l("Various people already went missing, including GMs. This is why if you plan to cross, @@.", b(l("You won't be allowed to walk sideways, except to avoid a monster or two.")));
- mesc l("If you try to walk west or east too much, you'll hit an \"invisible wall\" to prevent you from getting lost.");
+ .@fd=!(getmapmask("011-3")&1024); // .@fd - is flooded?
+ if (!.@fd) {
+ mesn;
+ mesq l("Various people already went missing, including GMs. This is why if you plan to cross, @@.", b(l("You won't be allowed to walk sideways, except to avoid a monster or two.")));
+ mesc l("If you try to walk west or east too much, you'll hit an \"invisible wall\" to prevent you from getting lost.");
+ next;
+ select
+ l("I'm fine, thanks."),
+ l("My equipment is good, let me through!");
+ mes "";
+ if (@menu == 2) {
+ warp "011-3", 37, 219;
+ closedialog;
+ close;
+ }
+ } else {
+ mesn;
+ mesq l("In fact, it is flooded at the moment. Come back later.");
+ next;
+ }
close;
OnInit:
- .sex = G_OTHER;
+ .sex = G_FEMALE;
.distance = 5;
end;
}
diff --git a/npc/021-4/main.txt b/npc/021-4/main.txt
index cab80adf3..6c6ea7df2 100644
--- a/npc/021-4/main.txt
+++ b/npc/021-4/main.txt
@@ -72,6 +72,7 @@ L_Reset:
}
end;
+// Timeout
L_Reckless:
announce("People failed to rescue Cindy!"), bc_all|bc_npc;
areatimer "021-4", 20, 20, 100, 80, 10, "Cindy#Outside::OnFail";
@@ -98,6 +99,7 @@ L_Start:
}
close;
+// Begin
L_Begin:
initnpctimer;
enablenpc "#CindySwitch_06";
@@ -140,6 +142,7 @@ OnFail:
heal -1, -1;
end;
+// For all players finishing the quest
OnReward:
if (ispcdead()) {
recovery(getcharid(3));
@@ -170,8 +173,11 @@ L_CleanUp:
changemusic "021-4", "water_prelude.ogg";
end;
+// Main loop
OnTimer2500:
.@y=mobcount("021-4", "Cindy#Outside::OnPetDeath");
+
+ // This finishes the quest
if (.@y == 0 && .canfinish) {
$@CINDY_STATE=gettimetick(2)+60*rand(55,65)*rand(4,36); // It is way too random to I say how long it takes (220min ~ 39 hours)
mapannounce "021-4", "Nivalis: Cindy is now safe!",bc_all|bc_npc;