summaryrefslogtreecommitdiff
path: root/npc/051-3/ambush.txt
blob: d596984ef154a05ed3e2ef24c28fc1d342ee0961 (plain) (blame)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
051-3,40,52,0	script	#WayBlockedTrigger	NPC32767,2,2,{
    message strcharinfo(0), "There is no way I can pass here. Let's find another way.";
    end;
}

051-3,31,70,0	script	#AmbushReadyTrigger	NPC32767,2,2,{
    @step = 2;
    if ($@illia_progress < @step) goto L_ShouldNotBeHere;
    if (strcharinfo(0) == $@iLLIA_HERO$ && $@illia_level_2_progress == 0) goto L_PrepareAmbush;
    end;

L_PrepareAmbush:
    disablenpc "Sneaky Bandit";
    disablenpc "Another Sneaky Bandit";
    end;

L_ShouldNotBeHere:
    die();
    end;

}

051-3,31,93,0	script	#BanditAmbushTrigger	NPC32767,3,3,{
    @step = 2;
    if ($@illia_progress < @step) goto L_ShouldNotBeHere;
    if ($@illia_level_2_progress == 0 && strcharinfo(0) == $@iLLIA_HERO$) goto L_MakeAmbush;
    end;

L_MakeAmbush:
    $@illia_level_2_progress = 1;
    donpcevent "#BndtTl::OnCommandAmbush";
    end;

L_ShouldNotBeHere:
    die();
    message strcharinfo(0), "Your throat got cut by a sneaky bandit!";
    end;
}

051-3,1,1,0	script	#BndtTl	NPC32767,{
    end;

OnCommandAmbush:
    initnpctimer;
    end;

OnTimer1000:
    enablenpc "Sneaky Bandit";
    donpcevent "Sneaky Bandit::OnCommandTalk";
    enablenpc "Another Sneaky Bandit";
    donpcevent "Another Sneaky Bandit::OnCommandTalk";
    end;

OnTimer9000:
    areawarp "051-3", 22, 45, 42, 97, "051-3", 101, 13;
    end;

OnTimer11000:
    areatimer 0, "051-3", 22, 12, 102, 97, 500, "#BndtTl::OnOuch";
    areatimer 0, "051-3", 22, 12, 102, 97, 3000, "#BndtTl::OnA";
    stopnpctimer;
    setnpctimer 0;
    end;

OnOuch:
    message strcharinfo(0), "Ouch my head...";
    end;

OnA:
    if (strcharinfo(0) == $@iLLIA_HERO$)
        goto L_CaptureHero;
    if (strcharinfo(0) == $@iLLIA_HELPER1$)
        goto L_CaptureHelper1;
    if (strcharinfo(0) == $@iLLIA_HELPER2$)
        goto L_CaptureHelper2;
    if (strcharinfo(0) == $@iLLIA_HELPER3$)
        goto L_CaptureHelper3;
    // kill that player otherwise, since not part of the quest.
    die();
    end;

L_CaptureHero:
    // Simulate the capture of the player.
    // Unequip all equipments
    nude;
    // put the health at 40%.
    heal MaxHp, 0;
    heal ((MaxHp/100) * -60), 0;
    warp "051-3", 69, 109;
    message strcharinfo(0), "Meh... Where am I?";
    end;

L_CaptureHelper1:
    // Simulate the capture of the player.
    // Unequip all equipments
    nude;
    // put the health at 40%.
    heal MaxHp, 0;
    heal ((MaxHp/100) * -60), 0;
    warp "051-3", 64, 102;
    message strcharinfo(0), "Meh... Where am I?";
    end;

L_CaptureHelper2:
    // Simulate the capture of the player.
    // Unequip all equipments
    nude;
    // put the health at 40%.
    heal MaxHp, 0;
    heal ((MaxHp/100) * -60), 0;
    warp "051-3", 62, 102;
    message strcharinfo(0), "Meh... Where am I?";
    end;

L_CaptureHelper3:
    // Simulate the capture of the player.
    // Unequip all equipments
    nude;
    // put the health at 40%.
    heal MaxHp, 0;
    heal ((MaxHp/100) * -60), 0;
    warp "051-3", 58, 102;
    message strcharinfo(0), "Meh... Where am I?";
    end;

}

051-3,29,94,0	script	Sneaky Bandit	NPC32767,{
    end;

OnCommandTalk:
    initnpctimer;
    end;

OnTimer100:
    npctalk "Did you think you could sneak in our den without a problem?";
    end;

OnTimer3600:
    npctalk "Drop your weapons, and come with us!";
    stopnpctimer;
    setnpctimer 0;
    end;

}

051-3,33,95,0	script	Another Sneaky Bandit	NPC32767,{
    end;

OnCommandTalk:
    initnpctimer;
    end;

OnTimer1500:
    npctalk "W00t! More slaves!";
    end;

OnTimer5500:
    npctalk "Ahaha, that was easy! Ok, knock them out!";
    stopnpctimer;
    setnpctimer 0;
    end;

}