1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
// This file is part of the Tutorial
// Author: Jenalya
// if you enter the tutorial area from outside, it is set to be already done
// Tutorial
// Nibble 0
// 1-4: Sorfina
// 5-7: Tanisha
// 8-13: Kaan & Hasan
// 14: Hasan Complete
// 15: Open
// Nibble 1
// 4: Sorfina Bit
// 5: Tanisha Bit
// 6: Valon Start
// 7: Valon Done
// Nibble 2
// 1: Maggots
// 2: House Maggots
// 3: TameScorpion
// 4: Scorpion
// 5-15: Open
// Nibble 3
// 1-15: Count
// Nibble 4
// 16: Start
// 17: Barrel
// 18: Barrel
// 19: Barrel
// Nibble 5
// 20: Barrel
// 21: Barrel
// 22: Barrel
// 23: Found
// Nibble 6
// 1: Seen
// 2: Started
// 3:
// 24: Magic
// 25:
// 26:
// 27:
// Nibble 7
// 28: Magic Start
// 29: Magic End
// 30: Zegas Met
// 31: Hasan Complete
-|script|#TutorialConfig|-1,
{
end;
OnInit:
set $@ScorpionFighter, 0;
set $@ScorpionTimer, 0;
set $@ScorpDeath, 0;
set $@SorfinaHasanBit, (1 << 4);
set $@TanishaHasanBit, (1 << 5);
set $@HasanCompleteBit, (1 << 31);
end;
}
function|script|TutorialState|,
{
callfunc "ClearVariables";
set @tutorial, ((TUTORIAL & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
set @sorfina_hasan, (TUTORIAL & $@SorfinaHasanBit);
set @tanisha_hasan, (TUTORIAL & $@TanishaHasanBit);
set @hasan_complete, (TUTORIAL & $@HasanCompleteBit);
return;
}
function|script|SetTutorialMask|,
{
set TUTORIAL, (TUTORIAL & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
set @tutorial_tmp, 0;
return;
}
function|script|TutorialCompleted|,
{
set FLAGS, FLAGS | FLAG_TUTORIAL_DONE;
callfunc "ClearVariables";
return;
}
|