summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/const.txt3
-rw-r--r--npc/008-1_Hurnscald_outskirts/_import.txt2
-rw-r--r--npc/008-1_Hurnscald_outskirts/dock.txt6
-rw-r--r--npc/008-1_Hurnscald_outskirts/dock_worker.txt7
-rw-r--r--npc/022-1_Tulimshar/_import.txt3
-rw-r--r--npc/022-1_Tulimshar/dock.txt6
-rw-r--r--npc/022-1_Tulimshar/elanore.txt3
-rw-r--r--npc/022-1_Tulimshar/ferry_master.txt16
-rw-r--r--npc/functions/ferry.txt42
-rw-r--r--npc/scripts.conf1
10 files changed, 81 insertions, 8 deletions
diff --git a/db/const.txt b/db/const.txt
index 190e9755..3c7400ed 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -222,3 +222,6 @@ MFLAG_KNOWS_IMP 4096 // Knows about the imprisoned forest spirit
MFLAG_KNOWS_OLD_WIZARD 8192 // Knows Bjorn's old wizard
MFLAG_MADE_CONC_POTION 16384 // Made a concentration potion with T15 and/or T16
MFLAG_ELANORE_OMAR 32768 // Told Omar about Elanore's involvement
+
+DOCK_tulimshar 1
+DOCK_hurnscald 2
diff --git a/npc/008-1_Hurnscald_outskirts/_import.txt b/npc/008-1_Hurnscald_outskirts/_import.txt
index ee2463a5..2bdd6303 100644
--- a/npc/008-1_Hurnscald_outskirts/_import.txt
+++ b/npc/008-1_Hurnscald_outskirts/_import.txt
@@ -2,6 +2,6 @@ map: 008-1.gat
npc: npc/008-1_Hurnscald_outskirts/_mobs.txt
npc: npc/008-1_Hurnscald_outskirts/_warps.txt
npc: npc/008-1_Hurnscald_outskirts/andra.txt
-npc: npc/008-1_Hurnscald_outskirts/dock_worker.txt
+npc: npc/008-1_Hurnscald_outskirts/dock.txt
npc: npc/008-1_Hurnscald_outskirts/george.txt
npc: npc/008-1_Hurnscald_outskirts/hinnak.txt
diff --git a/npc/008-1_Hurnscald_outskirts/dock.txt b/npc/008-1_Hurnscald_outskirts/dock.txt
new file mode 100644
index 00000000..46aa5a92
--- /dev/null
+++ b/npc/008-1_Hurnscald_outskirts/dock.txt
@@ -0,0 +1,6 @@
+// The ferry dock
+
+008-1.gat,140,64,0 script #hurnscalddock 127,2,1,{
+ set @loc, DOCK_hurnscald;
+ callfunc "Ferry";
+}
diff --git a/npc/008-1_Hurnscald_outskirts/dock_worker.txt b/npc/008-1_Hurnscald_outskirts/dock_worker.txt
deleted file mode 100644
index 1da75718..00000000
--- a/npc/008-1_Hurnscald_outskirts/dock_worker.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-//
-
-008-1.gat,136,65,0 script Construction Worker 155,{
- mes "[Construction worker]";
- mes "\"I'm builing a dock here. I don't know any details about how it will be used. Sorry.\"";
- close;
-}
diff --git a/npc/022-1_Tulimshar/_import.txt b/npc/022-1_Tulimshar/_import.txt
index e3e6f0d8..f2c7098b 100644
--- a/npc/022-1_Tulimshar/_import.txt
+++ b/npc/022-1_Tulimshar/_import.txt
@@ -1,3 +1,6 @@
map: 022-1.gat
npc: npc/022-1_Tulimshar/_mobs.txt
npc: npc/022-1_Tulimshar/_warps.txt
+npc: npc/022-1_Tulimshar/dock.txt
+npc: npc/022-1_Tulimshar/elanore.txt
+npc: npc/022-1_Tulimshar/ferry_master.txt
diff --git a/npc/022-1_Tulimshar/dock.txt b/npc/022-1_Tulimshar/dock.txt
new file mode 100644
index 00000000..72d28486
--- /dev/null
+++ b/npc/022-1_Tulimshar/dock.txt
@@ -0,0 +1,6 @@
+// The ferry dock
+
+022-1.gat,84,72,0 script #tulimshardock 127,6,1,{
+ set @loc, DOCK_tulimshar;
+ callfunc "Ferry";
+}
diff --git a/npc/022-1_Tulimshar/elanore.txt b/npc/022-1_Tulimshar/elanore.txt
new file mode 100644
index 00000000..f94344a7
--- /dev/null
+++ b/npc/022-1_Tulimshar/elanore.txt
@@ -0,0 +1,3 @@
+//
+
+022-1.gat,68,79,0 duplicate(Elanore#_M) Elanore 108
diff --git a/npc/022-1_Tulimshar/ferry_master.txt b/npc/022-1_Tulimshar/ferry_master.txt
new file mode 100644
index 00000000..3cc10ce3
--- /dev/null
+++ b/npc/022-1_Tulimshar/ferry_master.txt
@@ -0,0 +1,16 @@
+//
+
+022-1.gat,73,71,0 script Ferry Master 138,{
+ mes "[Ferry Master]";
+ mes "\"Hello! Do you need something?\"";
+ next;
+ menu
+ "How do I use the ferry?", L_Explain,
+ "Nothing I guess", -;
+ close;
+
+L_Explain:
+ mes "[Ferry Master]";
+ mes "\"You'll setup on the dock and select your destination. Each destination has an associated price that you need to pay. You don't have to go anywhere. Choosing the current port will result in nothing.\"";
+ close;
+}
diff --git a/npc/functions/ferry.txt b/npc/functions/ferry.txt
new file mode 100644
index 00000000..0e33c6ac
--- /dev/null
+++ b/npc/functions/ferry.txt
@@ -0,0 +1,42 @@
+// The ferry system
+
+function script Ferry {
+ set @cost_tulimshar, 5;
+ set @cost_hurnscald, 5;
+ mes "Where would you like to go?";
+ next;
+
+ menu
+ "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar,
+ "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald,
+ "Nevermind", -;
+ close;
+
+L_Tulimshar:
+ if (@loc == DOCK_tulimshar)
+ goto L_AlreadyThere;
+ if (zeny < @cost_tulimshar)
+ goto L_NotEnoughGP;
+
+ set zeny, zeny - @cost_tulimshar;
+ warp "022-1.gat", 76, 72;
+ close;
+
+L_Hurnscald:
+ if (@loc == DOCK_hurnscald)
+ goto L_AlreadyThere;
+ if (zeny < @cost_hurnscald)
+ goto L_NotEnoughGP;
+
+ set zeny, zeny - @cost_hurnscald;
+ warp "008-1.gat", 137, 64;
+ close;
+
+L_AlreadyThere:
+ mes "You're already here!";
+ close;
+
+L_NotEnoughGP:
+ mes "You don't have enough money to go there!";
+ close;
+}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index dda7d1ff..a419722f 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -4,6 +4,7 @@
npc: npc/functions/banker.txt
npc: npc/functions/barber.txt
npc: npc/functions/clear_vars.txt
+npc: npc/functions/ferry.txt
npc: npc/functions/game_rules.txt
npc: npc/functions/inn.txt
npc: npc/functions/magic.txt