summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorjesusalva <cpntb1@ymail.com>2018-02-09 18:58:41 -0200
committerjesusalva <cpntb1@ymail.com>2018-02-09 18:58:41 -0200
commite5439ada23860bf478a53221ce28eecafdc1a967 (patch)
tree1ec23efa1ec3e511b66363113f42e980661e99a6 /npc
parent8e4dfe9c9c6763a3bdbb900d88513b2761228f45 (diff)
downloadserverdata-e5439ada23860bf478a53221ce28eecafdc1a967.tar.gz
serverdata-e5439ada23860bf478a53221ce28eecafdc1a967.tar.bz2
serverdata-e5439ada23860bf478a53221ce28eecafdc1a967.tar.xz
serverdata-e5439ada23860bf478a53221ce28eecafdc1a967.zip
Include Soul Menhir scripts. This is still a work in progress.
Diffstat (limited to 'npc')
-rw-r--r--npc/005-1/_import.txt3
-rw-r--r--npc/005-1/soul-menhir.txt15
-rw-r--r--npc/functions/soul_menhir.txt55
-rw-r--r--npc/scripts.conf1
4 files changed, 73 insertions, 1 deletions
diff --git a/npc/005-1/_import.txt b/npc/005-1/_import.txt
index b2de1340f..a8d19df94 100644
--- a/npc/005-1/_import.txt
+++ b/npc/005-1/_import.txt
@@ -4,7 +4,8 @@
"npc/005-1/_warps.txt",
"npc/005-1/aahna.txt",
"npc/005-1/ayasha.txt",
-"npc/005-1/maya.txt",
"npc/005-1/liana.txt",
+"npc/005-1/maya.txt",
+"npc/005-1/soul-menhir.txt",
"npc/005-1/warpcandorbattle.txt",
"npc/005-1/zegas.txt",
diff --git a/npc/005-1/soul-menhir.txt b/npc/005-1/soul-menhir.txt
new file mode 100644
index 000000000..67168bbfc
--- /dev/null
+++ b/npc/005-1/soul-menhir.txt
@@ -0,0 +1,15 @@
+
+005-1,36,87,0 script Soul Menhir#candor NPC_PLAYER,{
+ @map$ = "005-1"; // 101→90
+ setarray @Xs, 35, 36, 37, 35, 37, 35, 36, 37;
+ setarray @Ys, 89, 89, 89, 90, 90, 91, 91, 91;
+ @x = 0;
+ @y = 0;
+ callfunc "SoulMenhir";
+ @map$ = "";
+ cleararray @Xs[0], 0, getarraysize(@Xs);
+ cleararray @Ys[0], 0, getarraysize(@Ys);
+ @x = 0;
+ @y = 0;
+ close;
+}
diff --git a/npc/functions/soul_menhir.txt b/npc/functions/soul_menhir.txt
new file mode 100644
index 000000000..75079c33a
--- /dev/null
+++ b/npc/functions/soul_menhir.txt
@@ -0,0 +1,55 @@
+function script SoulMenhir {
+ mes "[Soul Menhir]";
+ mes "(A mystical aura surrounds this stone. You feel mysteriously attracted to it. Something tells you to touch it. What do you do?)";
+
+ menu
+ "Touch it.", L_Bind,
+ "Leave it alone.", L_Return;
+
+//L_Towel:
+// if (TowelLastUsed > (gettimetick(2) - 1800))
+// goto L_DontPanic;
+// TowelLastUsed = gettimetick(2);
+// mes "[Soul Menhir]";
+// mes "(You touch the mysterious stone. Somehow it feels hard and soft at the same time.)";
+// getitem "HitchhikersTowel", 1;
+// goto L_Return;
+
+L_Bind:
+ if (Menhir_Activated == 1)
+ goto L_Shortversion;
+
+ mes "[Soul Menhir]";
+ mes "(You touch the mysterious stone. Somehow it feels warm and cold at the same time.)";
+ mes "(Suddenly a strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone.)";
+ mes "(As suddenly as the feeling started it stops. The strange attraction is away from one moment to the next and the menhir feels like just an ordinary stone.)";
+ Menhir_Activated = 1;
+ goto L_Save;
+
+L_Shortversion:
+ mes "[Soul Menhir]";
+ mes "(A strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone. As suddenly as the feeling started it stops.)";
+ goto L_Save;
+
+L_Save:
+ if (@x == 0 && @y == 0)
+ goto L_FindPoint;
+ goto L_Do_Save;
+
+L_DontPanic:
+ message strcharinfo(0), "(A strange barrier keeps you from touching the stone at this time.)";
+ goto L_Return;
+
+L_Do_Save:
+ savepoint @map$, @x, @y;
+ goto L_Return;
+
+L_FindPoint:
+ @n = rand(getarraysize(@Xs));
+ @x = @Xs[@n];
+ @y = @Ys[@n];
+ goto L_Do_Save;
+
+L_Return:
+ return;
+}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 83fb0348a..4dcf99a9a 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -44,6 +44,7 @@
"npc/functions/bank.txt",
"npc/functions/confused-tree-dict.txt",
"npc/functions/util.txt",
+"npc/functions/soul_menhir.txt",
// quest debug
"npc/functions/quest-debug/functions.txt",