summaryrefslogtreecommitdiff
path: root/world/map/npc/042-1/tutorial.txt
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2014-08-24 22:09:43 -0500
committerwushin <pasekei@gmail.com>2014-08-24 22:40:01 -0500
commit2c07459b6d045f7a510811c507533e204319473a (patch)
treeeea6c599f268ecfd86cb95aecdb19c4a2ef87805 /world/map/npc/042-1/tutorial.txt
parentd8e03d3b02cd6c2964b94e3c4bc3f40dad9e9888 (diff)
downloadserverdata-2c07459b6d045f7a510811c507533e204319473a.tar.gz
serverdata-2c07459b6d045f7a510811c507533e204319473a.tar.bz2
serverdata-2c07459b6d045f7a510811c507533e204319473a.tar.xz
serverdata-2c07459b6d045f7a510811c507533e204319473a.zip
Quest Log Fixed STARTAREA
Diffstat (limited to 'world/map/npc/042-1/tutorial.txt')
-rw-r--r--world/map/npc/042-1/tutorial.txt61
1 files changed, 59 insertions, 2 deletions
diff --git a/world/map/npc/042-1/tutorial.txt b/world/map/npc/042-1/tutorial.txt
index 3129faaa..d51c30be 100644
--- a/world/map/npc/042-1/tutorial.txt
+++ b/world/map/npc/042-1/tutorial.txt
@@ -1,10 +1,67 @@
// This file is part of the Tutorial
// Author: Jenalya
-// if you enter the tutorial area, it is set to be already done
+// if you enter the tutorial area from outside, it is set to be already done
+-|script|#TutorialConfig|-1,
+{
+ end;
+OnInit:
+ set $@ScorpionFighter, 0;
+ set $@ScorpionTimer, 0;
+ set $@ScorpDeath, 0;
+ set $@SpokeToKaan, (1 << 31);
+ end;
+}
+function|script|TutorialState|,
+{
+ callfunc "ClearVariables";
+ set @tutorial, ((STARTAREA & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
+ set @kaan_talked, (STARTAREA & $@SpokeToKaan);
+ return;
+}
+function|script|SetTutorialMask|,
+{
+ set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
+ set @tutorial_tmp, 0;
+ return;
+}
+042-2.gat,21,26,0|script|TutDebug|154,
+{
+ mes "[TutDebug]";
+ mes "Reset?";
+ menu
+ "Yes.",L_Reset,
+ "No.",L_End;
+
+L_Reset:
+ set TUT_var, 0;
+ set @tutorial_tmp, 0;
+ set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
+ set STARTAREA, STARTAREA &~ $@SpokeToKaan;
+ mes "Reset!";
+ goto L_End;
+
+L_End:
+ end;
+
+OnInit:
+ if(!debug)
+ disablenpc "TutDebug";
+ end;
+}
042-1.gat,63,47,0|script|#tutorialoutside|45,0,0
{
- callfunc "TutorialCompleted";
+ callfunc "TutorialState";
+ if (@tutorial >= 8)
+ goto L_Warp;
+ goto L_ResetTutorial;
+
+L_ResetTutorial:
+ set @tutorial_tmp, 8;
+ callfunc "SetTutorialMask";
+ goto L_Warp;
+
+L_Warp:
warp "042-2.gat", 114, 92;
end;
}