summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/ferry.txt
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-06-18 21:58:47 -0700
committerBen Longbons <b.r.longbons@gmail.com>2011-06-19 14:19:55 -0700
commitbae4b92e560c2694eaaf0e8b4d9e95e56204471b (patch)
tree4acc120f6a94cfbf9694bf344658493de5aaa67b /world/map/npc/functions/ferry.txt
parent319f80526f8585ecadaec986e37c9bd326f4d363 (diff)
downloadserverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.tar.gz
serverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.tar.bz2
serverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.tar.xz
serverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.zip
Move to a subdirectory
Diffstat (limited to 'world/map/npc/functions/ferry.txt')
-rw-r--r--world/map/npc/functions/ferry.txt73
1 files changed, 73 insertions, 0 deletions
diff --git a/world/map/npc/functions/ferry.txt b/world/map/npc/functions/ferry.txt
new file mode 100644
index 00000000..95a176ec
--- /dev/null
+++ b/world/map/npc/functions/ferry.txt
@@ -0,0 +1,73 @@
+// The ferry system
+
+function script Ferry {
+ if (BaseLevel < 20) goto L_LowerCost;
+ set @cost_tulimshar, 500;
+ set @cost_hurnscald, 500;
+
+L_Start:
+ set @cost_candor, 1500;
+ mes "Where would you like to go?";
+ next;
+ if (BaseLevel < 40) goto L_PlainMenu;
+ goto L_MenuWithCandor;
+
+
+L_PlainMenu:
+ menu
+ "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar,
+ "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald,
+ "Nevermind", -;
+ close;
+
+L_MenuWithCandor:
+ menu
+ "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar,
+ "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald,
+ "Candor (" + @cost_candor + "GP)", L_Candor,
+ "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_Candor:
+ if (@loc == DOCK_candor)
+ goto L_AlreadyThere;
+ if (zeny < @cost_candor)
+ goto L_NotEnoughGP;
+
+ set zeny, zeny - @cost_candor;
+ warp "029-1.gat", 25, 37;
+ close;
+
+L_AlreadyThere:
+ mes "You're already here!";
+ close;
+
+L_NotEnoughGP:
+ mes "You don't have enough money to go there!";
+ close;
+
+L_LowerCost:
+ set @cost_tulimshar, 250;
+ set @cost_hurnscald, 250;
+ goto L_Start;
+}