Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 402 lines (356 sloc) 7.633 kB
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
1 #include "zcommon.acs"
2
3 #library "strfhelp"
4
5 #define VDOORSPEED 16
6 #define VDOORWAIT 150
7
8 str QuestItems[32] =
9 {
10 "QuestItemThatDoesNotExist",
11 "QuestItem1", "QuestItem2", "QuestItem3",
12 "QuestItem4", "QuestItem5", "QuestItem6", "QuestItem7",
13 "QuestItem8", "QuestItem9", "QuestItem10", "QuestItem11",
14 "QuestItem12", "QuestItem13", "QuestItem14", "QuestItem15",
15 "QuestItem16", "QuestItem17", "QuestItem18", "QuestItem19",
16 "QuestItem20", "QuestItem21", "QuestItem22", "QuestItem23",
17 "QuestItem24", "QuestItem25", "QuestItem26", "QuestItem27",
18 "QuestItem28", "QuestItem29", "QuestItem30", "QuestItem31"
19 };
20
21 str MusicNames[34] =
22 {
23 "",
24 "d_action",
25 "d_tavern",
26 "d_danger",
27 "d_fast",
28 "d_intro",
29 "d_darker",
30 "d_strike",
31 "d_slide",
32 "d_tribal",
33 "d_march",
34 "d_danger",
35 "d_mood",
36 "d_castle",
37 "d_darker",
38 "d_action",
39 "d_fight",
40 "d_spense",
41 "d_slide",
42 "d_strike",
43 "d_dark",
44 "d_tech",
45 "d_slide",
46 "d_drone",
47 "d_panthr",
48 "d_sad",
49 "d_instry",
50 "d_tech",
51 "d_action",
52 "d_instry",
53 "d_drone",
54 "d_fight",
55 "d_happy",
56 "d_end"
57 };
58
59 // Script 0 is used to implement several of Strife's unique line types.
60 // It's also used to implement the sky change after the Programmer dies.
61
62 script << 0 >> (int type, int tag)
63 {
64 int i;
65
66 switch (type)
67 {
68 // WALK TRIGGERS
69
70 case 230:
71 i = GetLineRowOffset() & 31;
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
72 if (CheckInventory (QuestItems[i]) || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
73 {
74 Door_Open (tag, VDOORSPEED);
75 clearlinespecial ();
76 }
77 break;
78
79 case 227:
80 i = GetLineRowOffset() & 31;
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
81 if (CheckInventory (QuestItems[i]) || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
82 {
83 Door_Close (tag, VDOORSPEED);
84 clearlinespecial ();
85 }
86 break;
87
88 case 228:
89 if (CheckInventory ("QuestItem24"))
90 {
91 if (CheckInventory ("QuestItem28"))
92 {
93 LocalAmbientSound ("svox/voc130", 127);
94 }
95 else
96 {
97 LocalAmbientSound ("svox/voc128", 127);
98 }
99 clearlinespecial ();
100 }
101 break;
102
103 case 196:
104 if (GetSigilPieces() > 1)
105 {
106 Floor_LowerToLowest (tag, 8);
107 clearlinespecial ();
108 }
109 break;
110
111 case 197:
112 if (GetSigilPieces() > 1)
113 {
114 Door_Close (tag, VDOORSPEED*4);
115 clearlinespecial ();
116 }
117 break;
118
119 case 212:
120 if (CheckInventory ("FlameThrower"))
121 {
122 Floor_LowerToLowest (tag, 8);
123 clearlinespecial ();
124 }
125 break;
126
127 case 193:
128 i = GetLineRowOffset() & 31;
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
129 if (CheckInventory (QuestItems[i]) || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
130 {
131 Floor_LowerToLowest (tag, 8);
132 clearlinespecial ();
133 }
134 break;
135
136 case 52:
137 tag /= 100;
138 if (tag == 0)
139 {
140 Exit_Normal (0);
141 }
142 else
143 {
144 Teleport_NewMap (tag, 0, FALSE);
145 }
146 break;
147
148 case 187:
149 i = GetLineRowOffset() & 31;
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
150 if (CheckInventory (QuestItems[i]) || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
151 {
152 ClearForceField (tag);
153 clearlinespecial ();
154 }
155 break;
156
157 case 188:
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
158 if (CheckInventory ("QuestItem16") || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
159 {
160 Door_Open (tag, VDOORSPEED);
161 clearlinespecial ();
162 }
163 break;
164
165 case 200:
166 if (CheckInventory ("Sigil"))
167 {
168 Door_Open (tag, VDOORSPEED);
169 clearlinespecial ();
170 }
171 break;
172
173 case 215:
174 i = (tag % 100) & 31;
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
175 if (CheckInventory (QuestItems[i]) || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
176 {
177 SendToCommunicator (tag/100, 0, 1, 0);
178 clearlinespecial ();
179 }
180 break;
181
182 case 204:
183 case 203:
184 if (tag >= 0 && tag <= 33)
185 {
186 SetMusic (MusicNames[tag]);
187 }
188 break;
189
190
191 // WALK RETRIGGERS
192
193 case 216:
194 i = GetLineRowOffset() & 31;
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
195 if (CheckInventory (QuestItems[i]) || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
196 {
197 Door_Raise (tag, VDOORSPEED, VDOORWAIT);
198 }
199 break;
200
201 case 186:
202 if (lineside() != LINE_FRONT)
203 break;
204 case 145:
205 if (gametype() == GAME_NET_DEATHMATCH)
206 {
207 Floor_RaiseByValue (tag, 128, 64);
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
208 clearlinespecial();
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
209 }
210 else
211 {
212 Teleport_NewMap (tag/100, tag%100, TRUE);
213 }
214 break;
215
216 case 175:
217 if (GetActorFloorZ(0) + 16.0 > GetActorZ(0))
218 {
219 NoiseAlert (0, 0);
220 }
221 break;
222
223 case 198:
224 if (!CheckInventory ("OfficersUniform"))
225 {
226 NoiseAlert (0, 0);
227 }
228 break;
229
230 case 208:
231 if (CheckInventory ("FlameThrower"))
232 {
233 NoiseAlert (0, 0);
234 }
235 break;
236
237 case 206:
238 if (CheckInventory ("OfferingChalice"))
239 {
240 NoiseAlert (0, 0);
241 }
242 break;
243
244 case 184:
245 if (Plat_UpNearestWaitDownStay (tag, 16, 35))
246 {
247 // FIXME
248 }
249 break;
250
251 case 213:
252 if (!CheckInventory ("OfferingChalice"))
253 {
254 print (s:"You need the chalice !");
255 activatorsound ("*usefail", 127);
256 SetResultValue (0);
257 }
258 else
259 {
260 SetResultValue (Door_Raise (0, VDOORSPEED, VDOORWAIT, tag));
261 }
262 break;
263
264 case 232:
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
265 if (!CheckInventory ("QuestItem18") && gametype() != GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
266 {
267 print (s:"You need the Oracle Pass!");
268 activatorsound ("*usefail", 127);
269 SetResultValue (0);
270 }
271 else
272 {
273 SetResultValue (Door_Raise (0, VDOORSPEED, VDOORWAIT, tag));
274 }
275 break;
276
277 case 180:
278 case 181:
279 SetResultValue (Floor_RaiseByValueTxTy (tag, 8, 512));
280 break;
281
282 case 194:
283 if (Door_Open (tag, VDOORSPEED))
284 {
285 print (s:"You've freed the prisoners!");
286 GiveInventory ("QuestItem13", 1);
287 }
288 else
289 {
290 SetResultValue (0);
291 }
292 break;
293
294 case 199:
295 if (Ceiling_LowerAndCrush (tag, 8, 10))
296 {
297 print (s:"You've destroyed the Converter!");
298 GiveInventory ("QuestItem25", 1);
1e57f83 - Deleted the programmer death script from strifehelp.acs because it …
graf authored
299 GiveInventory ("UpgradeStamina", 10);
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
300 GiveInventory ("UpgradeAccuracy", 1);
301 }
302 else
303 {
304 SetResultValue (0);
305 }
306 break;
307
308 case 209:
309 if (CheckInventory ("OfferingChalice"))
310 {
311 SetResultValue (Generic_Stairs (tag, 16, 16, 0, 0));
312 }
313 else
314 {
315 print (s:"You need the chalice!");
316 activatorsound ("*usefail", 127);
317 SetResultValue (0);
318 }
319 break;
320
321 case 219:
322 case 220:
323 SetResultValue (Floor_LowerToHighest (tag, 8, 128));
324 break;
325
326 case 226:
327 if (Floor_LowerToHighest (tag, 8, 128))
328 {
69333d6 Forgot to copy the correct strifehelp.acs from my ACC compile directory.
graf authored
329 GiveInventory ("UpgradeStamina", 10);
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
330 GiveInventory ("UpgradeAccuracy", 1);
331 print (s:"Congratulations! You have completed the training area");
332 }
333 else
334 {
335 SetResultValue (0);
336 }
337 break;
338
339 case 154:
340 SetResultValue (Plat_DownWaitUpStayLip (tag, 32, 105, 0));
341 break;
342
343 case 177:
344 SetResultValue (Plat_DownWaitUpStayLip (tag, 32, 105, 0));
345 break;
346
347 case 214: // This only needs to be ACS for the long delay
348 SetResultValue (Plat_DownWaitUpStayLip (tag, 8, 1050, 0, 1));
349 break;
350
351 case 235:
352 if (GetSigilPieces() < 5)
353 {
354 SetResultValue (0);
355 break;
356 }
357 // Intentional fall-through
358 case 174:
359 case 40:
360 case 189:
361 case 233:
362 i = Door_Open (tag, VDOORSPEED/2);
363 i = i | Floor_LowerToLowest (tag, VDOORSPEED/2);
364 SetResultValue (i);
365 if (type == 233 && i)
366 {
367 SendToCommunicator (70, 0, 0, 0);
368 }
369 break;
370
371 case 183:
372 i = Door_Open (tag, VDOORSPEED/2);
373 i = i | Floor_LowerToHighest (tag, VDOORSPEED/2, 128);
374 SetResultValue (i);
375 break;
376
377 case 229:
378 SetResultValue (0);
379 if (GetSigilPieces() == 5)
380 {
381 SetResultValue (Door_Animated (tag, 4, 105));
382 }
383 break;
384
385 case 234:
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
386 if (CheckInventory ("QuestItem3") || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
387 {
388 SetResultValue (Door_Raise (tag, VDOORSPEED, VDOORWAIT));
389 }
390 else
391 {
392 SetResultValue (Door_LockedRaise (0, 0, 0, 102));
393 }
394 break;
395
396 case 256:
397 // Not a line type, but used by the Programmer death script.
398 ChangeSky ("SKYMNT01", "SKYMNT01");
399 break;
400 }
401 }
Something went wrong with that request. Please try again.