summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2016-02-16 17:47:19 +0100
committerReid <reidyaro@gmail.com>2016-02-16 17:47:19 +0100
commit0068a563a466b478ba965f28c76793f0995ff58c (patch)
tree8fd9dd13443a64bc17f5ec1b14742825a42a2a7a /npc
parentf687f0fa015b049b34664a441d77d15ca548e1f1 (diff)
downloadserverdata-0068a563a466b478ba965f28c76793f0995ff58c.tar.gz
serverdata-0068a563a466b478ba965f28c76793f0995ff58c.tar.bz2
serverdata-0068a563a466b478ba965f28c76793f0995ff58c.tar.xz
serverdata-0068a563a466b478ba965f28c76793f0995ff58c.zip
Launch the training session only if the PC is inside the area and enable dynamic collision.
Diffstat (limited to 'npc')
-rw-r--r--npc/001-2-36/training_room_npc.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/npc/001-2-36/training_room_npc.txt b/npc/001-2-36/training_room_npc.txt
index cdbb9623..ae07db99 100644
--- a/npc/001-2-36/training_room_npc.txt
+++ b/npc/001-2-36/training_room_npc.txt
@@ -59,6 +59,14 @@ start:
if (FIGHT_TRAINING >= 1)
goto JobIsDone;
+ getmapxy(.@map$, .@x, .@y, 0);
+ if (.@x < 24 || .@x > 32 || .@y < 33 || .@y > 43)
+ {
+ speech 1, l("Please enter the combat zone on the left.");
+ close;
+ }
+
+ setcells "001-2-36", 33, 35, 33, 38, 1, "fence";
initnpctimer;
setnpctimer 0;
startnpctimer;
@@ -120,10 +128,12 @@ FinishedTraining:
stopnpctimer;
setnpctimer 0;
set $@CURRENT_WAVE_LEVEL, 0;
+ delcells "fence";
if (FIGHT_TRAINING >= 1)
end;
set FIGHT_TRAINING, 1;
end;
+
JobIsDone:
mes "Well done, you should talk to \"" + $@NPCNEXTNAME$ + "\"...";
close;