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
81
82
83
84
85
|
051-3.gat,47,30,0|script|#BndtRnfrcmtsTrigger|32767,2,3,
{
set @step, 2;
if ($@illia_progress < @step) goto L_ShouldNotBeHere;
if ($@illia_level_2_progress == 2) goto L_CallReinforcements;
end;
L_CallReinforcements:
donpcevent "Door::OnRnfrcmts";
end;
L_ShouldNotBeHere:
percentheal -100, 0;
end;
}
051-3.gat,37,24,0|script|Door|400,
{
set @step, 2;
if ($@illia_progress < @step) goto L_ShouldNotBeHere;
mes "Try open the door?";
menu
"Yes", L_TryOpen,
"Do nothing", L_Close;
L_ShouldNotBeHere:
percentheal -100, 0;
end;
L_TryOpen:
if ($@illia_level_2_progress < 4)
goto L_KeyNotFound;
goto L_Warp;
L_KeyNotFound:
mes "You do not see a way to open this door.";
close;
L_Warp:
mes "You place the key in the door and open the lock.";
warp "051-1.gat", 118, 55;
close;
OnRnfrcmts:
set $@illia_level_2_progress, 3;
// Spawn 20 bandits
areamonster "051-3.gat", 29, 25, 48, 39, "", 1064, 18, "Door::OnB";
// Spawn 4 bandit lords
areamonster "051-3.gat", 29, 25, 48, 39, "", 1065, 3, "Door::OnB";
initnpctimer;
mapannounce "051-3.gat", "Bandit Lords : Do not let them escape!!" , 0;
areatimer "051-3.gat", 25, 20, 80, 85, 10, "Door::OnDRnfrcmts";
end;
OnB:
end;
OnDRnfrcmts:
message strcharinfo(0), "Oh no, reinforcements! We must kill them all!";
end;
OnTimer2000:
setnpctimer 0;
if ($@illia_level_2_progress != 3 || $@illia_progress != 2)
end;
if (mobcount("051-3.gat", "Door::OnB") < 0)
goto L_OpenDoor;
end;
L_OpenDoor:
set $@illia_level_2_progress, 4;
set $@illia_progress, 3;
callfunc "UpdateIlliaProgress";
set $@illia_max_time, $@illia_max_time + 300;
areatimer "051-3.gat", 25, 20, 80, 85, 10, "Door::OnKeyFound";
stopnpctimer;
setnpctimer 0;
end;
OnKeyFound:
message strcharinfo(0), "One of the defeated bandit lords had a door key attached to his belt.";
end;
L_Close:
close;
}
|