Skip to content
Newer
Older
100644 413 lines (366 sloc) 7.58 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
a29209d - Fix strife linetype 11 again, courtesy of Gez.
rheit authored
136 case 11:
137 if (tag == 0)
138 {
139 Exit_Normal (0);
140 }
141 else
142 {
143 Teleport_NewMap (tag, 0, FALSE);
144 }
145 break;
146
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
147 case 52:
148 tag /= 100;
149 if (tag == 0)
150 {
151 Exit_Normal (0);
152 }
153 else
154 {
155 Teleport_NewMap (tag, 0, FALSE);
156 }
157 break;
158
159 case 187:
160 i = GetLineRowOffset() & 31;
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
161 if (CheckInventory (QuestItems[i]) || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
162 {
163 ClearForceField (tag);
164 clearlinespecial ();
165 }
166 break;
167
168 case 188:
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
169 if (CheckInventory ("QuestItem16") || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
170 {
171 Door_Open (tag, VDOORSPEED);
172 clearlinespecial ();
173 }
174 break;
175
176 case 200:
177 if (CheckInventory ("Sigil"))
178 {
179 Door_Open (tag, VDOORSPEED);
180 clearlinespecial ();
181 }
182 break;
183
184 case 215:
185 i = (tag % 100) & 31;
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
186 if (CheckInventory (QuestItems[i]) || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
187 {
188 SendToCommunicator (tag/100, 0, 1, 0);
189 clearlinespecial ();
190 }
191 break;
192
193 case 204:
194 case 203:
195 if (tag >= 0 && tag <= 33)
196 {
197 SetMusic (MusicNames[tag]);
198 }
199 break;
200
201
202 // WALK RETRIGGERS
203
204 case 216:
205 i = GetLineRowOffset() & 31;
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
206 if (CheckInventory (QuestItems[i]) || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
207 {
208 Door_Raise (tag, VDOORSPEED, VDOORWAIT);
209 }
210 break;
211
212 case 186:
213 if (lineside() != LINE_FRONT)
214 break;
215 case 145:
216 if (gametype() == GAME_NET_DEATHMATCH)
217 {
218 Floor_RaiseByValue (tag, 128, 64);
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
219 clearlinespecial();
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
220 }
221 else
222 {
223 Teleport_NewMap (tag/100, tag%100, TRUE);
224 }
225 break;
226
227 case 175:
228 if (GetActorFloorZ(0) + 16.0 > GetActorZ(0))
229 {
230 NoiseAlert (0, 0);
231 }
232 break;
233
234 case 198:
235 if (!CheckInventory ("OfficersUniform"))
236 {
237 NoiseAlert (0, 0);
238 }
239 break;
240
241 case 208:
242 if (CheckInventory ("FlameThrower"))
243 {
244 NoiseAlert (0, 0);
245 }
246 break;
247
248 case 206:
249 if (CheckInventory ("OfferingChalice"))
250 {
251 NoiseAlert (0, 0);
252 }
253 break;
254
255 case 184:
256 if (Plat_UpNearestWaitDownStay (tag, 16, 35))
257 {
258 // FIXME
259 }
260 break;
261
262 case 213:
263 if (!CheckInventory ("OfferingChalice"))
264 {
265 print (s:"You need the chalice !");
266 activatorsound ("*usefail", 127);
267 SetResultValue (0);
268 }
269 else
270 {
271 SetResultValue (Door_Raise (0, VDOORSPEED, VDOORWAIT, tag));
272 }
273 break;
274
275 case 232:
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
276 if (!CheckInventory ("QuestItem18") && gametype() != GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
277 {
278 print (s:"You need the Oracle Pass!");
279 activatorsound ("*usefail", 127);
280 SetResultValue (0);
281 }
282 else
283 {
284 SetResultValue (Door_Raise (0, VDOORSPEED, VDOORWAIT, tag));
285 }
286 break;
287
288 case 180:
289 case 181:
290 SetResultValue (Floor_RaiseByValueTxTy (tag, 8, 512));
291 break;
292
293 case 194:
294 if (Door_Open (tag, VDOORSPEED))
295 {
296 print (s:"You've freed the prisoners!");
297 GiveInventory ("QuestItem13", 1);
298 }
299 else
300 {
301 SetResultValue (0);
302 }
303 break;
304
305 case 199:
306 if (Ceiling_LowerAndCrush (tag, 8, 10))
307 {
308 print (s:"You've destroyed the Converter!");
309 GiveInventory ("QuestItem25", 1);
1e57f83 - Deleted the programmer death script from strifehelp.acs because it …
graf authored
310 GiveInventory ("UpgradeStamina", 10);
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
311 GiveInventory ("UpgradeAccuracy", 1);
312 }
313 else
314 {
315 SetResultValue (0);
316 }
317 break;
318
319 case 209:
320 if (CheckInventory ("OfferingChalice"))
321 {
322 SetResultValue (Generic_Stairs (tag, 16, 16, 0, 0));
323 }
324 else
325 {
326 print (s:"You need the chalice!");
327 activatorsound ("*usefail", 127);
328 SetResultValue (0);
329 }
330 break;
331
332 case 219:
333 case 220:
334 SetResultValue (Floor_LowerToHighest (tag, 8, 128));
335 break;
336
337 case 226:
338 if (Floor_LowerToHighest (tag, 8, 128))
339 {
69333d6 Forgot to copy the correct strifehelp.acs from my ACC compile directory.
graf authored
340 GiveInventory ("UpgradeStamina", 10);
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
341 GiveInventory ("UpgradeAccuracy", 1);
342 print (s:"Congratulations! You have completed the training area");
343 }
344 else
345 {
346 SetResultValue (0);
347 }
348 break;
349
350 case 154:
351 SetResultValue (Plat_DownWaitUpStayLip (tag, 32, 105, 0));
352 break;
353
354 case 177:
355 SetResultValue (Plat_DownWaitUpStayLip (tag, 32, 105, 0));
356 break;
357
358 case 214: // This only needs to be ACS for the long delay
359 SetResultValue (Plat_DownWaitUpStayLip (tag, 8, 1050, 0, 1));
360 break;
361
362 case 235:
363 if (GetSigilPieces() < 5)
364 {
365 SetResultValue (0);
366 break;
367 }
368 // Intentional fall-through
369 case 174:
370 case 40:
371 case 189:
372 case 233:
373 i = Door_Open (tag, VDOORSPEED/2);
374 i = i | Floor_LowerToLowest (tag, VDOORSPEED/2);
375 SetResultValue (i);
376 if (type == 233 && i)
377 {
378 SendToCommunicator (70, 0, 0, 0);
379 }
380 break;
381
382 case 183:
383 i = Door_Open (tag, VDOORSPEED/2);
384 i = i | Floor_LowerToHighest (tag, VDOORSPEED/2, 128);
385 SetResultValue (i);
386 break;
387
388 case 229:
389 SetResultValue (0);
390 if (GetSigilPieces() == 5)
391 {
392 SetResultValue (Door_Animated (tag, 4, 105));
393 }
394 break;
395
396 case 234:
b4a31b2 - Fixed: Strife's quest based line actions also work in Deathmatch.
graf authored
397 if (CheckInventory ("QuestItem3") || gametype() == GAME_NET_DEATHMATCH)
9ef5b01 Directory restructuring to make it easier to version projects that do…
rheit authored
398 {
399 SetResultValue (Door_Raise (tag, VDOORSPEED, VDOORWAIT));
400 }
401 else
402 {
403 SetResultValue (Door_LockedRaise (0, 0, 0, 102));
404 }
405 break;
406
407 case 256:
408 // Not a line type, but used by the Programmer death script.
409 ChangeSky ("SKYMNT01", "SKYMNT01");
410 break;
411 }
412 }
Something went wrong with that request. Please try again.