summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-09-22 10:56:42 -0600
committerJared Adams <jaxad0127@gmail.com>2009-09-22 10:56:42 -0600
commit90309d65eec85483792f68877970b85078e6018b (patch)
treecc0fcc19d795fc9561cc241723fae6a809081763 /npc/functions
parentb5f7dfdee450a0cd90f15bfc1a6f7845b6060198 (diff)
downloadserverdata-90309d65eec85483792f68877970b85078e6018b.tar.gz
serverdata-90309d65eec85483792f68877970b85078e6018b.tar.bz2
serverdata-90309d65eec85483792f68877970b85078e6018b.tar.xz
serverdata-90309d65eec85483792f68877970b85078e6018b.zip
Add a basic ferry system
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/ferry.txt42
1 files changed, 42 insertions, 0 deletions
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;
+}