summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-17 02:07:30 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-17 02:07:30 -0300
commite76563cd2770678f00b177e2baa74f79f9a27c71 (patch)
tree782b771b6e667d604961106aa69d1a6d1be9ccbf
parente6d42426f7d4cbb1677a0e2528f5e66ced9bdbbf (diff)
downloadserverdata-e76563cd2770678f00b177e2baa74f79f9a27c71.tar.gz
serverdata-e76563cd2770678f00b177e2baa74f79f9a27c71.tar.bz2
serverdata-e76563cd2770678f00b177e2baa74f79f9a27c71.tar.xz
serverdata-e76563cd2770678f00b177e2baa74f79f9a27c71.zip
Release Lilit already I'm sleepy
-rw-r--r--conf/map/maps.conf1
-rw-r--r--db/map_index.txt91
-rw-r--r--maps/re/017-1.mcachebin4355 -> 4371 bytes
-rw-r--r--maps/re/018-5-0.mcachebin0 -> 89 bytes
-rw-r--r--npc/017-1/_import.txt1
-rw-r--r--npc/017-1/drowned_man.txt163
-rw-r--r--npc/018-5-0/_import.txt5
-rw-r--r--npc/018-5-0/_mobs.txt3
-rw-r--r--npc/018-5-0/_warps.txt3
-rw-r--r--npc/018-5-0/core.txt28
-rw-r--r--npc/_import.txt1
-rw-r--r--npc/functions/main.txt3
12 files changed, 253 insertions, 46 deletions
diff --git a/conf/map/maps.conf b/conf/map/maps.conf
index 312d2e5d8..df785678e 100644
--- a/conf/map/maps.conf
+++ b/conf/map/maps.conf
@@ -116,6 +116,7 @@ map_list: (
"018-4-1",
"018-4-2",
"018-4",
+ "018-5-0",
"018-5-1",
"018-5-2",
"018-5-boss",
diff --git a/db/map_index.txt b/db/map_index.txt
index 0180c573b..a768f2b6c 100644
--- a/db/map_index.txt
+++ b/db/map_index.txt
@@ -113,48 +113,49 @@
018-4-1 113
018-4-2 114
018-4 115
-018-5-1 116
-018-5-2 117
-018-5-boss 118
-018-5 119
-019-1-1 120
-019-1 121
-019-2 122
-019-3 123
-019-4-1 124
-019-4 125
-020-1 126
-020-2 127
-020-3 128
-020-4 129
-020-5 130
-020-6 131
-021-1 132
-021-2 133
-021-3 134
-021-4 135
-022-1 136
-023-1 137
-023-2 138
-024-1 139
-024-10 140
-024-11 141
-024-12 142
-024-13 143
-024-14 144
-024-2 145
-024-3 146
-024-4 147
-024-5 148
-024-6 149
-024-7 150
-024-8 151
-024-9 152
-boss 153
-botcheck 154
-guilds 155
-sec_pri 156
-soren-2 157
-soren 158
-test 159
-testbg 160
+018-5-0 116
+018-5-1 117
+018-5-2 118
+018-5-boss 119
+018-5 120
+019-1-1 121
+019-1 122
+019-2 123
+019-3 124
+019-4-1 125
+019-4 126
+020-1 127
+020-2 128
+020-3 129
+020-4 130
+020-5 131
+020-6 132
+021-1 133
+021-2 134
+021-3 135
+021-4 136
+022-1 137
+023-1 138
+023-2 139
+024-1 140
+024-10 141
+024-11 142
+024-12 143
+024-13 144
+024-14 145
+024-2 146
+024-3 147
+024-4 148
+024-5 149
+024-6 150
+024-7 151
+024-8 152
+024-9 153
+boss 154
+botcheck 155
+guilds 156
+sec_pri 157
+soren-2 158
+soren 159
+test 160
+testbg 161
diff --git a/maps/re/017-1.mcache b/maps/re/017-1.mcache
index 5b89e6d45..7ddbc7b4f 100644
--- a/maps/re/017-1.mcache
+++ b/maps/re/017-1.mcache
Binary files differ
diff --git a/maps/re/018-5-0.mcache b/maps/re/018-5-0.mcache
new file mode 100644
index 000000000..dc4adda94
--- /dev/null
+++ b/maps/re/018-5-0.mcache
Binary files differ
diff --git a/npc/017-1/_import.txt b/npc/017-1/_import.txt
index b122baf2e..51b49f981 100644
--- a/npc/017-1/_import.txt
+++ b/npc/017-1/_import.txt
@@ -4,6 +4,7 @@
"npc/017-1/_mobs.txt",
"npc/017-1/_warps.txt",
"npc/017-1/boringnpc.txt",
+"npc/017-1/drowned_man.txt",
"npc/017-1/estate.txt",
"npc/017-1/fairy_collector.txt",
"npc/017-1/guards.txt",
diff --git a/npc/017-1/drowned_man.txt b/npc/017-1/drowned_man.txt
new file mode 100644
index 000000000..1b0477b08
--- /dev/null
+++ b/npc/017-1/drowned_man.txt
@@ -0,0 +1,163 @@
+// TMW2/TMWBR Script
+// Author:
+// Jesusalva
+// Description:
+// Access to Lilit - He aids you in jumping off the bridge and reaching Lilit
+// Of course, to swim such large distance, you need to have plenty vit and str...
+// Right spot: (164,230) - Between the crack (shallow) and the plant (shallow).
+
+// .@q = LilitQuest_Access
+// 0 - Access not granted
+// 1 - Access granted
+// 2 - Tree Minigame complete.
+
+// TODO: Only allow "I want to swim" if the game knows you know about Lilit
+// That is what Saulc wants, after all
+
+017-1,160,227,0 script #DrownedMan NPC_NO_SPRITE,{
+ if (!isin("017-1", 158, 222, 1))
+ end;
+ mesc l("Someone seems to be drowned in the water.");
+ select
+ l("Hello! Do you need help?"),
+ l("Why shouldn't I jump here?"),
+ l("But I want to swim!");
+ mes "";
+ switch (@menu)
+ {
+ case 1:
+ mesn l("Drowned Man");
+ mesq l("I'm afraid you can't help me... I still have one HP left.");
+ next;
+ mesn l("Drowned Man");
+ mesq l("I also broke my bones, and I was equipping a weapon which prevents HP regen...");
+ next;
+ mesn l("Drowned Man");
+ mesq l("I did some tritan friends, though. They teached me how to breath underwater. It's not so bad.");
+ next;
+ mesn l("Drowned Man");
+ mesq l("In the first eight months I wanted to go back, but now I'm pretty used to living here. Please don't rescue me.");
+ break;
+ case 2:
+ mesn l("Drowned Man");
+ mesq l("Because it may be a fatal fall!");
+ next;
+ mesn l("Drowned Man");
+ mesq l("Look the height of this bridge! Worse, the water around here is pretty shallow.");
+ next;
+ mesn l("Drowned Man");
+ mesq l("Well, there might be a deep water spot, but it would still be dangerous.");
+ next;
+ mesn l("Drowned Man");
+ mesq l("Unless you're looking forward a death penalty, DO NOT JUMP!");
+ // We're in town, are you stupid >.>
+ break;
+ case 3:
+ mesn l("Drowned Man");
+ mesq l("Well, you see, you can't jump very far. And the water near land is shallow.");
+ next;
+ mesn l("Drowned Man");
+ mesq l("I guess, there might be a single spot where water is a bit deeper, but I wasn't lucky.");
+ next;
+ mesn l("Drowned Man");
+ mes l("Remember to store somewhere any heavy stuff you might be carrying.");
+ mes l("I guess you cannot bring more than 1kg with full health. Less, if you're hurt.");
+ next;
+ mesn l("Drowned Man");
+ mesq l("Also, you need vitality and strength to survive the swimming trip. The closest island is very far away.");
+ mesc l("You need at least 35 str and 35 vit to do the trip safely - bonuses not counted - or you will lose HP."); // Can be safely mixed
+ break;
+ }
+ close;
+
+OnWarn:
+ npctalkonce l("@@, don't jump there! It may be fatal!", strcharinfo(0));
+ end;
+
+// DO NOT LOWER
+OnInit:
+ .distance=7;
+ end;
+}
+
+// Warning Event
+017-1,158,222,0 script #DrownedManArea NPC_NO_SPRITE,0,0,{
+ end;
+OnTouch:
+ doevent("#DrownedMan::OnWarn");
+ end;
+OnInit:
+ .distance=1;
+ end;
+}
+
+
+// Any Jump. Code is obfuscated to inhibit cheaters :<
+// Of course, I could use a blackbox too, but this is not the purpose.
+// You don't want to solve the map hint, then you'll solve my formula!! /tableflip
+017-1,162,226,0 script #JumpArea01 NPC_NO_SPRITE,0,0,{
+ // TODO: Check if you want to jump
+ if (!isin("017-1", 158, 222, 1))
+ end;
+ mesc l("Are you really going to jump here?");
+ next;
+ if (askyesno() == ASK_YES) {
+ closeclientdialog;
+ slide .x, .y;
+ if (VarDiffValue(5220, 5270, .x*32) && VarDiffValue(7330, 7390, .y*32))
+ goto L_GoodJump;
+ dispbottom l("The water was too shallow...");
+ percentheal -100, -100;
+ end;
+ }
+ closeclientdialog;
+ end;
+
+L_GoodJump:
+ dispbottom l("You jump in deep waters.");
+ // You can only carry exact 1kg with full health.
+ // Weight will be 1000g - so penalty will be 100% HP.
+ .@penalty=max(0, (Weight/10)-1);
+ percentheal -.@penalty, 0;
+
+ // vit/str counts on swimming minigame
+ mesn l("Drowned Man");
+ mesq l("Good job! I wish you luck, because now you need to SWIM!");
+ next;
+ closeclientdialog;
+ addtimer(3000, "#01850SwimmingCtrl::OnLoop");
+ warp "018-5-0", 20, 25;
+ end;
+
+OnInit:
+ .distance=9;
+ end;
+}
+
+017-1,162,227,0 duplicate(#JumpArea01) #JumpArea02 NPC_NO_SPRITE
+017-1,162,228,0 duplicate(#JumpArea01) #JumpArea03 NPC_NO_SPRITE
+017-1,162,229,0 duplicate(#JumpArea01) #JumpArea04 NPC_NO_SPRITE
+017-1,162,230,0 duplicate(#JumpArea01) #JumpArea05 NPC_NO_SPRITE
+017-1,162,231,0 duplicate(#JumpArea01) #JumpArea06 NPC_NO_SPRITE
+
+017-1,163,226,0 duplicate(#JumpArea01) #JumpArea07 NPC_NO_SPRITE
+017-1,163,227,0 duplicate(#JumpArea01) #JumpArea08 NPC_NO_SPRITE
+017-1,163,228,0 duplicate(#JumpArea01) #JumpArea09 NPC_NO_SPRITE
+017-1,163,229,0 duplicate(#JumpArea01) #JumpArea10 NPC_NO_SPRITE
+017-1,163,230,0 duplicate(#JumpArea01) #JumpArea11 NPC_NO_SPRITE
+017-1,163,231,0 duplicate(#JumpArea01) #JumpArea12 NPC_NO_SPRITE
+
+017-1,164,226,0 duplicate(#JumpArea01) #JumpArea13 NPC_NO_SPRITE
+017-1,164,227,0 duplicate(#JumpArea01) #JumpArea14 NPC_NO_SPRITE
+017-1,164,228,0 duplicate(#JumpArea01) #JumpArea15 NPC_NO_SPRITE
+017-1,164,229,0 duplicate(#JumpArea01) #JumpArea16 NPC_NO_SPRITE
+017-1,164,230,0 duplicate(#JumpArea01) #JumpArea17 NPC_NO_SPRITE
+017-1,164,231,0 duplicate(#JumpArea01) #JumpArea18 NPC_NO_SPRITE
+
+017-1,165,226,0 duplicate(#JumpArea01) #JumpArea19 NPC_NO_SPRITE
+017-1,165,227,0 duplicate(#JumpArea01) #JumpArea20 NPC_NO_SPRITE
+017-1,165,228,0 duplicate(#JumpArea01) #JumpArea21 NPC_NO_SPRITE
+017-1,165,229,0 duplicate(#JumpArea01) #JumpArea22 NPC_NO_SPRITE
+017-1,165,230,0 duplicate(#JumpArea01) #JumpArea23 NPC_NO_SPRITE
+017-1,165,231,0 duplicate(#JumpArea01) #JumpArea24 NPC_NO_SPRITE
+
diff --git a/npc/018-5-0/_import.txt b/npc/018-5-0/_import.txt
new file mode 100644
index 000000000..d7a946e8f
--- /dev/null
+++ b/npc/018-5-0/_import.txt
@@ -0,0 +1,5 @@
+// Map 018-5-0: Heroes' Hold - Exchange Hall
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-5-0/_mobs.txt",
+"npc/018-5-0/_warps.txt",
+"npc/018-5-0/core.txt",
diff --git a/npc/018-5-0/_mobs.txt b/npc/018-5-0/_mobs.txt
new file mode 100644
index 000000000..90eb88b59
--- /dev/null
+++ b/npc/018-5-0/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-5-0: Heroes' Hold - Exchange Hall mobs
+018-5-0,79,38,59,18 monster Bluepar 1177,40,30000,30000
diff --git a/npc/018-5-0/_warps.txt b/npc/018-5-0/_warps.txt
new file mode 100644
index 000000000..2b05b6099
--- /dev/null
+++ b/npc/018-5-0/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-5-0: Heroes' Hold - Exchange Hall warps
+018-5-0,139,25,0 warp #018-5-0_139_25 0,9,018-5,39,133
diff --git a/npc/018-5-0/core.txt b/npc/018-5-0/core.txt
new file mode 100644
index 000000000..38bef9df1
--- /dev/null
+++ b/npc/018-5-0/core.txt
@@ -0,0 +1,28 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Controls the swimming minigame. Basically, you lose 1% HP if lack total status.
+
+018-5-0,0,0,0 script #01850SwimmingCtrl NPC_HIDDEN,{
+ end;
+
+OnLoop:
+ if (getmap() != "018-5-0")
+ end;
+ if (ispcdead())
+ end;
+ // Sum everything - you can have 70 str instead of splitting in 35 str and 35 vit
+ .@status=readparam(bStr)+readparam(bVit);
+ .@reqst=.reqstr+.reqvit;
+ debugmes "Got %d/%d (%d), heal %d", .@status,.@reqst,.@status-.@reqst,min(0, .@status-.@reqst);
+ //percentheal min(0, .@status-.@reqst), 0;
+ heal (min(0, .@status-.@reqst)*3), 0;
+ addtimer(3000, "#01850SwimmingCtrl::OnLoop");
+ end;
+
+OnInit:
+ .reqstr=35;
+ .reqvit=35;
+ end;
+}
diff --git a/npc/_import.txt b/npc/_import.txt
index 046ca49b6..bf599254f 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -115,6 +115,7 @@
@include "npc/018-4-1/_import.txt"
@include "npc/018-4-2/_import.txt"
@include "npc/018-4/_import.txt"
+@include "npc/018-5-0/_import.txt"
@include "npc/018-5-1/_import.txt"
@include "npc/018-5-2/_import.txt"
@include "npc/018-5-boss/_import.txt"
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 56090e926..01559de24 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -257,7 +257,8 @@ function script any_of {
/////////////////////////////////////////////
// Function meant to be used by Grand Hunter Quest
-// VarDiffValue ( old, new, target)
+// result is: lower < target <= higher
+// VarDiffValue ( lower, higher, target)
function script VarDiffValue {
.@val=getarg(2);
return (getarg(0) < .@val && getarg(1) >= .@val);