summaryrefslogtreecommitdiff
path: root/npc/functions/savepoint.txt
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2012-04-06 00:59:27 +0200
committerReid <reidyaro@gmail.com>2012-04-06 00:59:58 +0200
commit68b2c7637be46da83768518a8dd65561519c898a (patch)
tree81221ec2da466ca0caf65c83197ab0c902d008e7 /npc/functions/savepoint.txt
parent9772c572b1b7a5189b532b924f6705dd64a17522 (diff)
downloadserverdata-68b2c7637be46da83768518a8dd65561519c898a.tar.gz
serverdata-68b2c7637be46da83768518a8dd65561519c898a.tar.bz2
serverdata-68b2c7637be46da83768518a8dd65561519c898a.tar.xz
serverdata-68b2c7637be46da83768518a8dd65561519c898a.zip
Add savepoint NPC function,
Add some change in mob_db.
Diffstat (limited to 'npc/functions/savepoint.txt')
-rw-r--r--npc/functions/savepoint.txt57
1 files changed, 57 insertions, 0 deletions
diff --git a/npc/functions/savepoint.txt b/npc/functions/savepoint.txt
new file mode 100644
index 00000000..95aee41f
--- /dev/null
+++ b/npc/functions/savepoint.txt
@@ -0,0 +1,57 @@
+// Evol scripts.
+// Authors:
+// Reid
+// Description:
+// Add new save point localisation
+
+function script SavePoint {
+ mesn "Narrator";
+ mes col(l("There is a nice place to stay beside you."), 9);
+ next;
+ mes col(l("What do you wish to do?"), 9);
+ next;
+
+ menu
+ l("Take a nap"), -,
+ l("Nothing"), L_Return;
+
+ if (PlayerInformations_SavePoint == 1)
+ goto L_Shortversion;
+
+ mesn "Narrator";
+ mes col(l("You close your eyes some seconds..."), 9);
+ next;
+ mes col(l("..."), 9);
+ next;
+ mes col(l("..."), 9);
+ next;
+ mes col(l("..."), 9);
+ next;
+ mes col(l("Your position get saved."), 9);
+ next;
+
+ set PlayerInformations_SavePoint, 1;
+ goto L_Save;
+
+L_Shortversion:
+ mesn "Narrator";
+ mes col(l("Your position get saved."), 9);
+ next;
+
+L_Save:
+ if (@x == 0 && @y == 0)
+ goto L_FindPoint;
+
+L_Do_Save:
+ savepoint @map$, @x, @y;
+ goto L_Return;
+
+L_FindPoint:
+ set @n, rand(getarraysize(@Xs));
+ set @x, @Xs[@n];
+ set @y, @Ys[@n];
+ goto L_Do_Save;
+
+L_Return:
+ return;
+}