forked from pa1nki113r/Project_Brutality
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcvars
1794 lines (1529 loc) · 41.6 KB
/
cvars
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#library "CVARS"
#include "zcommon.acs"
//This file is an utter disaster and I apologize to anybody viewing this abomination in advance
// Side dashing / dodging scripts by KeksDose
#libdefine SD_TIMEFRAME 8 // Tics during which you must double press
#libdefine SD_DASHDELAY 25 // Tics before being able to dash again
#libdefine SD_DASHSPEED 8.0 // Dash speed whilst in the air
#libdefine SD_DASHJUMP 6.0 // Adds a little z-velocity while in the air
#libdefine SD_DASHSTRONG 16.0 // And dash speed whilst grounded
#libdefine SD_SOUNDVOLUME 0.8 // How loud the dash sound is played
str dashSound = "DBLJUMP";
// Global variables:
int settings[4][2] = {
{ BT_FORWARD, 0.00 },
{ BT_MOVELEFT | BT_LEFT, 0.25 },
{ BT_BACK, 0.50 },
{ BT_MOVERIGHT | BT_RIGHT, 0.75 }
};
function int IsButtonPressed (int input, int oldInput, int mask)
{
//Checks For Classic Mode or CVARs
if((GetCvar("donotsidestep") == 1)||(GetCvar("bd_classicmonsters") == 1) ||(GetCvar("bd_TraditionalMode") == 1) || (CheckInventory("GoFatality") == 1))
{
return false;
}
if(input & mask && !(oldinput & mask))
{
return true;
}
return false;
}
script "KD Side Dodge" enter Net
{
int input;
int oldInput;
int taps;
int tics;
int last;
int angle;
int velX;
int velY;
int velZ;
while(GetActorProperty(0, APROP_HEALTH) > 0)
{
input = GetPlayerInput(-1, INPUT_BUTTONS);
oldInput = GetPlayerInput(-1, INPUT_OLDBUTTONS);
for(int i = 0; i < 4; i++)
{
if(IsButtonPressed(input, oldInput, settings[i][0]) == true && (GetActorZ(0) - GetActorFloorZ(0) == 0))
{
taps++;
tics = SD_TIMEFRAME;
if(taps == 2 && last == i)
{
taps = 0;
angle = GetActorAngle(0) + settings[i][1];
velX = FixedMul(cos(angle), SD_DASHSTRONG);
velY = FixedMul(sin(angle), SD_DASHSTRONG);
velZ = 0.0;
SetActorVelocity(0, velX, velY, velZ, true, false);
PlaySound(0, dashSound, CHAN_BODY, SD_SOUNDVOLUME);
Delay(const:SD_DASHDELAY);
while(GetActorVelZ(0) < 0.0)
{
Delay(const:1);
}
}
last = i;
}
}
if(tics)
{
tics--;
if(!tics)
{
taps = 0;
}
}
Delay(const:1);
}
}
script "KD Resurrect Side Dodge" death Net
{
while(GetActorProperty(0, APROP_HEALTH) <= 0)
Delay(const:1);
ACS_NamedExecuteAlways("KD Side Dodge", 0);
}
script "KD Reactivate Side Dodge" respawn Net
{
ACS_NamedExecuteAlways("KD Side Dodge", 0);
}
script "DoubleJumpScript" enter
{
int maxDblJumps = 1;
int dblJumpThrust = 30;
int lastZ = GetActorZ(0);
int olderZ;
int counter = 0;
int x, y, ang;
while( true )
{
olderZ = lastZ;
lastZ = GetActorZ(0);
delay(1);
if((CheckInventory("TimeFreezer") == 1) || (CheckInventory("TimeSphere") == 1) || (CheckInventory("DemonVision") == 1) || (GetCvar("donotdoublejump") == 1)||(GetCvar("bd_classicmonsters") == 1) ||(GetCvar("bd_TraditionalMode") == 1) )
{
//terminate;
}
else if( (GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_JUMP) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_JUMP) && (GetActorProperty(0, APROP_HEALTH) >= 1))
{
if( (GetActorZ(0) > lastZ) && (lastZ <= olderZ) )
{
counter = 0;
} else {
if(counter < maxDblJumps)
{
thing_stop(0);
x = GetPlayerInput(-1, INPUT_FORWARDMOVE);
y = -GetPlayerInput(-1, INPUT_SIDEMOVE);
ang = getactorangle(0)+vectorangle(x, y);
if(x || y) ThrustThing (ang>>8, 12, 1, 0);
ThrustThingZ(0, dblJumpThrust, 0, 0);
ACS_NamedExecute("Recoil375", 0, 0, 0, 0);
ActivatorSound("JMPBOOT",127);
counter++;
}
}
} else if( (olderZ == lastZ) && (lastZ == GetActorZ(0)) )
{ counter = 0; }
}
}
//Open Level Scripts should be guaranteed to run on level load-up
int num_coop_lives = 8;
script "CoopLivesScript" OPEN NET
{
// GiveInventory("CheckMarines", 1);
if (GetCvar("bd_cooplives") == 1 || GameType () == GAME_NET_COOPERATIVE)
{
num_coop_lives = GetCvar("bd_numcooplives");
}
}
script "CoopLivesDecrementOnDeath" DEATH NET
{
if (GetCvar("bd_cooplives") == 1 && GameType () == GAME_NET_COOPERATIVE)
{
num_coop_lives--;
if(num_coop_lives < 0)
{
str LevelLump = StrParam(n: PRINTNAME_LEVEL);
PrintBold(s:"Lives Depleted! Restarting Level!");
delay(30);
//Teleport_NewMap(GetLevelInfo(LEVELINFO_LEVELNUM), 0, 0);
ChangeLevel(LevelLump, 0, CHANGELEVEL_NOINTERMISSION | CHANGELEVEL_RESETHEALTH | CHANGELEVEL_RESETINVENTORY, -1);
}
else
PrintBold(s:"Lives Remaining: ", d:num_coop_lives);
}
}
script "CheckMarinesOnLevelEntrance" enter
{
GiveInventory("CheckMarines", 1);
}
Script "GuranteeGameMode" ENTER NET
{
if (GameType () == GAME_SINGLE_PLAYER)
{
if(PlayerClass(PlayerNumber()) == 2) {
//PrintBold(s:"PLAYER CLASS 2");
SetCVar("bd_classicmonsters", 1);
SetCVar("bd_TraditionalMode", 1);
}
else if(PlayerClass(PlayerNumber()) == 1) {
//PrintBold(s:"PLAYER CLASS 1");
SetCVar("bd_classicmonsters", 1);
SetCVar("bd_TraditionalMode", 0);
}
else if(PlayerClass(PlayerNumber()) == 0) {
//PrintBold(s:"PLAYER CLASS 0");
SetCVar("bd_classicmonsters", 0);
SetCVar("bd_TraditionalMode", 0);
}
}
}
script "StarterPackDynamicProgressionFix" (void) NET
{
//Initialize variables
str LevelName = StrParam(n: PRINTNAME_LEVELNAME);
str LevelLump = StrParam(n: PRINTNAME_LEVEL);
//PrintBold(s:LevelName);
if(GetCvar("BrutalSpawnBalance") == 671)
{
//Episode I
if((StrCmp(LevelName, StrParam(s: "Hangar")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY01"))== 0))
{
SetActorState(0, "DiceTier1");
}
if((StrCmp(LevelName, StrParam(s: "Nukage Processing")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY02"))== 0))
{
SetActorState(0, "DiceTier1");
}
if((StrCmp(LevelName, StrParam(s: "Communications Center")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY03"))== 0))
{
SetActorState(0, "DiceTier1");
}
if((StrCmp(LevelName, StrParam(s: "Life Support Facility")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY04"))== 0))
{
SetActorState(0, "DiceTier1");
}
if((StrCmp(LevelName, StrParam(s: "Marine HQ")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY05"))== 0))
{
SetActorState(0, "DiceTier1");
}
if((StrCmp(LevelName, StrParam(s: "Nuclear Power Plant")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY06"))== 0))
{
SetActorState(0, "DiceTier2");
}
if((StrCmp(LevelName, StrParam(s: "Staging Area")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY07"))== 0))
{
SetActorState(0, "DiceTier2");
}
if((StrCmp(LevelName, StrParam(s: "Lab Complex Entrance")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY08"))== 0))
{
SetActorState(0, "DiceTier2");
}
if((StrCmp(LevelName, StrParam(s: "Bio Labs")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY09"))== 0))
{
SetActorState(0, "DiceTier2");
}
if((StrCmp(LevelName, StrParam(s: "Portal Testing Labs")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY10"))== 0))
{
SetActorState(0, "DiceTier2");
}
//Episode II
if((StrCmp(LevelName, StrParam(s: "Return to Earth")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY11"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelName, StrParam(s: "Roadblocks")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY12"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelName, StrParam(s: "Industrial District")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY13"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelName, StrParam(s: "Warzone")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY14"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelName, StrParam(s: "Twisted Neighborhood")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY15"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelName, StrParam(s: "Dead Streets")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY16"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelName, StrParam(s: "Final Destination")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY17"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelName, StrParam(s: "Eye of the Storm")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY18"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelLump, StrParam(s: "EDAY19"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelName, StrParam(s: "The Tower")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY20"))== 0))
{
SetActorState(0, "DiceTier3");
}
//Episode III
if((StrCmp(LevelLump, StrParam(s: "EDAY21"))== 0))
{
SetActorState(0, "DiceTier4");
}
if((StrCmp(LevelName, StrParam(s: "Blood Swamp")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY22"))== 0))
{
SetActorState(0, "DiceTier4");
}
if((StrCmp(LevelName, StrParam(s: "Stronghold")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY23"))== 0))
{
SetActorState(0, "DiceTier4");
}
if((StrCmp(LevelName, StrParam(s: "House of the Hell Nobles")) == 0) && (StrCmp(LevelLump, StrParam(s: "EDAY24"))== 0))
{
SetActorState(0, "DiceTier4");
}
if((StrCmp(LevelLump, StrParam(s: "EDAY25"))== 0))
{
SetActorState(0, "DiceTier4");
}
if((StrCmp(LevelLump, StrParam(s: "EDAY26"))== 0))
{
SetActorState(0, "DiceTier4");
}
if((StrCmp(LevelLump, StrParam(s: "EDAY27"))== 0))
{
SetActorState(0, "DiceTier4");
}
if((StrCmp(LevelLump, StrParam(s: "EDAY28"))== 0))
{
SetActorState(0, "DiceTier4");
}
if((StrCmp(LevelLump, StrParam(s: "EDAY29"))== 0))
{
SetActorState(0, "DiceTier4");
}
if((StrCmp(LevelLump, StrParam(s: "EDAY30"))== 0))
{
SetActorState(0, "DiceTier4");
}
//Secret Levels (Nazi map not necessary)
if((StrCmp(LevelLump, StrParam(s: "EDAY31"))== 0))
{
SetActorState(0, "DiceTier3");
}
if((StrCmp(LevelLump, StrParam(s: "EDAY32"))== 0))
{
SetActorState(0, "DiceTier3");
}
//For the Valiant megawad
if((StrCmp(LevelName, StrParam(s: "The Eagle Has Landed")) == 0) && (StrCmp(LevelLump, StrParam(s: "MAP25"))== 0))
{
SetActorState(0, "HighLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Blast Wave")) == 0) && (StrCmp(LevelLump, StrParam(s: "MAP26"))== 0))
{
SetActorState(0, "HighLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Rocket Zone II")) == 0) && (StrCmp(LevelLump, StrParam(s: "MAP27"))== 0))
{
SetActorState(0, "HighLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "A Lightbridge Too Far")) == 0) && (StrCmp(LevelLump, StrParam(s: "MAP28"))== 0))
{
SetActorState(0, "HighLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Red Shift")) == 0) && (StrCmp(LevelLump, StrParam(s: "MAP29"))== 0))
{
SetActorState(0, "HighLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Electric Nightmare")) == 0) && (StrCmp(LevelLump, StrParam(s: "MAP30"))== 0))
{
SetActorState(0, "HighLevelSpawn");
}
//For KDiZD
if((StrCmp(LevelName, StrParam(s: "Hangar")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M1"))== 0))
{
SetActorState(0, "EarlyLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Nuclear Plant")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M2"))== 0))
{
SetActorState(0, "EarlyLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Toxin Refinery")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M3"))== 0))
{
SetActorState(0, "LowLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Command Control")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M4"))== 0))
{
SetActorState(0, "LowLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Phobos Lab")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M5"))== 0))
{
SetActorState(0, "LowLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Central Processing")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M6"))== 0))
{
SetActorState(0, "MidLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Computer Station")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M7"))== 0))
{
SetActorState(0, "MidLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Phobos Anomaly")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M8"))== 0))
{
SetActorState(0, "MidLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Military Base")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M9"))== 0))
{
SetActorState(0, "HighLevelSpawn");
}
if((StrCmp(LevelName, StrParam(s: "Penultimate Evil")) == 0) && (StrCmp(LevelLump, StrParam(s: "Z1M10"))== 0))
{
SetActorState(0, "HighLevelSpawn");
}
}
}
Script "StarterPackWolfensteinBuzzsawFix" (void) NET
{
//Initialize variables
str LevelName = StrParam(n: PRINTNAME_LEVELNAME);
str LevelLump = StrParam(n: PRINTNAME_LEVEL);
if((StrCmp(LevelName, StrParam(s: "Wolfenstein")) == 0) && (StrCmp(LevelLump, StrParam(s: "MAP32"))== 0))
{
SetActorState(0, "BuzzSawSpawn");
}
}
Script "ValientMap18BarrelFix" (void) NET
{
//Initialize variables
str LevelName = StrParam(n: PRINTNAME_LEVELNAME);
str LevelLump = StrParam(n: PRINTNAME_LEVEL);
if((StrCmp(LevelName, StrParam(s: "The Mancubian Candidate")) == 0) && (StrCmp(LevelLump, StrParam(s: "MAP07"))== 0))
{
SetActorState(0, "SpawnValientExplosiveBarrel");
}
if((StrCmp(LevelName, StrParam(s: "Crush Depth")) == 0) && (StrCmp(LevelLump, StrParam(s: "MAP18"))== 0))
{
SetActorState(0, "SpawnValientExplosiveBarrel");
}
}
int current_player_health = 0;
int current_player_armor = 0;
script "DemonMorphHealthReset" (VOID) NET
{
SetActorProperty(0, APROP_HEALTH, current_player_health);
GiveInventory("ArmorBonus", current_player_armor);
}
script "DemonMorphTimer" (VOID) NET
{
int demon_timer = 0;
while(demon_timer < 2500)
{
demon_timer++;
delay(1);
}
delay(1);
ACS_NamedExecuteAlways("DemonMorphHealthReset",0);
}
script "BaronMorphModeEnable" (VOID) NET
{
current_player_health = GetActorProperty(0,APROP_Health);
current_player_armor = CheckInventory("Armor");
delay(1);
MorphActor(0, "BaronPlayer", "", 2500, 0,"none","none");
GiveInventory("DemonVision", 1);
ACS_NamedExecuteAlways("DemonMorphTimer",0);
}
script "RevenantMorphModeEnable" (VOID) NET
{
current_player_health = GetActorProperty(0,APROP_Health);
current_player_armor = CheckInventory("Armor");
delay(1);
MorphActor(0, "RevenantPlayer", "", 2500, 0,"none","none");
GiveInventory("DemonVision", 1);
ACS_NamedExecuteAlways("DemonMorphTimer",0);
}
script "BaronMorphModeDisable" (VOID) NET
{
UnMorphActor(0, TRUE);
ACS_NamedTerminate("DemonMorphTimer",0);
TakeInventory("HasSpawnedAsBaronDemon", 1);
TakeInventory("DemonVision", 1);
Delay(1);
ACS_NamedExecuteAlways("DemonMorphHealthReset",0);
}
script "RevenantMorphModeDisable" (VOID) NET
{
UnMorphActor(0, TRUE);
ACS_NamedTerminate("DemonMorphTimer",0);
TakeInventory("HasSpawnedAsRevenantDemon", 1);
TakeInventory("DoomerJetpackActivated", 1);
TakeInventory("PowerFlight2", 1);
TakeInventory("DemonVision", 1);
Delay(1);
ACS_NamedExecuteAlways("DemonMorphHealthReset",0);
}
script "PlayerEnterLevelScript" enter NET
{
setfont("BLASCR");
if (GameType () == GAME_SINGLE_PLAYER)
{
HudMessageBold(s:"a"; HUDMSG_FADEOUT, 1, CR_BLACK, 1.2, 0.1, 0.5, 1.0);
}
setfont("SmallFONT");
str CurrentLevelName = StrParam(n: PRINTNAME_LEVELNAME);
str CurrentLevelLump = StrParam(n: PRINTNAME_LEVEL);
//Compatibility issue solutions
if((StrCmp(CurrentLevelName, StrParam(s: "The Temple of Edfu")) == 0) && (StrCmp(CurrentLevelLump, StrParam(s: "MAP07"))== 0))
{
SetPlayerProperty(0, 1, 1);
delay(445);
SetPlayerProperty(0, 0, 1);
}
if((StrCmp(CurrentLevelName, StrParam(s: "PB_Introduction")) == 0) && (StrCmp(CurrentLevelLump, StrParam(s: "TITLEMAP"))== 0))
{
HealThing(100);
}
if (GetCvar("sv_corpsequeuesize") < 128 && GetCvar("sv_corpsequeuesize") >= 0)
{
delay(120);
print (s:"Warning: sv_corpsequeuesize set at low value. This means that you will not see persistent gore. This can be changed in Project Brutality -> Rendering Settings");
}
//Sets the player's TID to a number, useful for functions that indirectly reference players
Thing_ChangeTID(0, 800 + PlayerNumber());
}
Script "Regen" ENTER
{
int health;
While(1)
{
if (GetCVar("cl_regen"))
{
health = GetActorProperty(0, APROP_Health);
if(health < GetCVar("cl_regenamount"))
{
if (!GetCVar("sv_forceregen"))
HealThing(1);
else
SetActorProperty(0, APROP_Health, health+1);
}
}
Delay(35);
}
}
script "PBUpgradeChecker_LMG" (void)
{
for (int p = 0; p < 8; p++) {
if (CheckActorInventory(800 + p, "LMG")) {
SetActorState(0,"SpawnQuadSSG");
}
}
}
script "PBUpgradeChecker_QuadSSG" (void)
{
for (int p = 0; p < 8; p++) {
if (CheckActorInventory(800 + p, "Quad_SSG")) {
SetActorState(0,"SpawnAutoshotgunUpgrade");
}
}
}
script "PBUpgradeChecker_ASG" (void)
{
for (int p = 0; p < 8; p++) {
if (CheckActorInventory(800 + p, "AutoshotgunDrumMag")) {
SetActorState(0,"SpawnMinigunUpgrade");
}
}
}
script "PBUpgradeChecker_Minigun" (void)
{
for (int p = 0; p < 8; p++) {
if (CheckActorInventory(800 + p, "AdvancedBackpackCounter")) {
SetActorState(0,"SpawnDragonBreathUpgrade");
}
}
}
script "PBUpgradeChecker_DragonsBreath" (void)
{
for (int p = 0; p < 8; p++) {
if (CheckActorInventory(800 + p, "DragonBreathUpgrade")) {
SetActorState(0,"SpawnPulseCannon");
}
}
}
script "PBUpgradeChecker_PulseCannon" (void)
{
for (int p = 0; p < 8; p++) {
if (CheckActorInventory(800 + p, "PulseCannon")) {
SetActorState(0,"SpawnRifleUpgrade");
}
}
}
script "PBUpgradeChecker_RifleUpgrade" (void)
{
for (int p = 0; p < 8; p++) {
if (CheckActorInventory(800 + p, "HasUnderBarrelGrenadeLauncher")) {
SetActorState(0,"SpawnUnmakerUpgrade");
}
}
}
script "PBUpgradeChecker_UnmakerUpgrade" (void)
{
for (int p = 0; p < 8; p++) {
if (CheckActorInventory(800 + p, "Unmaker")) {
SetActorState(0,"SpawnM2Upgrade");
}
}
}
script "PBUpgradeChecker_M2Upgrade" (void)
{
for (int p = 0; p < 8; p++) {
if (CheckActorInventory(800 + p, "HasLightningGunUpgrade") && !CheckActorInventory(800 + p, "LMG")) {
SetActorState(0,"SpawnLMG");
}
else if (CheckActorInventory(800 + p, "HasLightningGunUpgrade") && CheckActorInventory(800 + p, "LMG")) {
SetActorState(0,"BackpackSpawn");
}
}
}
script "Recoil282" (void) NET CLIENTSIDE
{
Thing_ChangeTID(800+PlayerNumber(),0);
Thing_ChangeTID(0,800+PlayerNumber());
int playerTid = 800+PlayerNumber();
SetActivator(playerTID);
SetActorPitch(playerTID, (GetActorPitch(0) - 500));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Terminate;
}
script "Recoil374" (void) NET CLIENTSIDE
{
Thing_ChangeTID(800+PlayerNumber(),0);
Thing_ChangeTID(0,800+PlayerNumber());
int playerTid = 800+PlayerNumber();
SetActivator(playerTID);
SetActorPitch(playerTID, (GetActorPitch(0) - 500));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Terminate;
}
script "Recoil375" (void) NET CLIENTSIDE
{
Thing_ChangeTID(800+PlayerNumber(),0);
Thing_ChangeTID(0,800+PlayerNumber());
int playerTid = 800+PlayerNumber();
SetActivator(playerTID);
SetActorPitch(playerTID, (GetActorPitch(0) - 1000));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Delay(1);
SetActorPitch(playerTID, (GetActorPitch(0) + 100));
Terminate;
}
Script "CheckIfSinglePlayerGame" (VOID) NET
{
if (GameType() != GAME_SINGLE_PLAYER)
{
SetActorState(0, "MultiplayerSpawn");
}
}
Script "DetermineUserBloodAmount" (VOID)
{
if
(GetCvar("isrunningzandronum") == 1)
{
if (GetCvar("bd_bloodamount") == 0) { SetActorState(0,"LowBlood"); }
if (GetCvar("bd_bloodamount") == 1) { SetActorState(0,"LowBlood"); }
if (GetCvar("bd_bloodamount") == 3) { SetActorState(0,"LotsOfBlood"); }
if (GetCvar("bd_bloodamount") >= 4) { SetActorState(0,"AbsurdBlood"); }
}
if
(GetCvar("isrunningzandronum") == 0)
{
if (GetCvar("zdoombrutalblood") == 0) { SetActorState(0,"LowBlood"); }
if (GetCvar("zdoombrutalblood") == 1) { SetActorState(0,"LowBlood"); }
if (GetCvar("zdoombrutalblood") == 3) { SetActorState(0,"LotsOfBlood"); }
if (GetCvar("zdoombrutalblood") >= 4) { SetActorState(0,"AbsurdBlood"); }
}
if
(GetCvar("isrunningzandronum") == 1)
{
if (GetCvar("bd_bloodamount") == 666)
{
SetActorState(0,"AbsurdBlood");
GiveInventory("AnimuGore", 1);
}
}
if
(GetCvar("isrunningzandronum") == 0)
{
if (GetCvar("zdoombrutalblood") == 666)
{
SetActorState(0,"AbsurdBlood");
GiveInventory("AnimuGore", 1);
}
}
}
Script 798 (VOID)
{
if (GetCvar("bd_lowgraphicsmode") == 1) { GiveInventory("LowGraphicsMode", 1); }
if (GetCvar("zdoombrutaljanitor") == 1) { GiveInventory("LowGraphicsMode", 1); }
else {TakeInventory("LowGraphicsMode", 1);}
}
Script "PerformanceMode" (VOID)
{
if (GetCvar("performancemode") == 1)
{
SetActorState(0,"Performance");
SetResultValue(1);
}
}
Script "MonsterPerformanceMode" (VOID)
{
if (GetCvar("performancemode") == 1) { GiveInventory("PerformanceMode", 1); }
else {TakeInventory("PerformanceMode", 1);}
}
//Project Brutality for casings
Script 7798 (VOID)
{
if (GetCvar("zdoombrutaljanitorcasings") == 1) { GiveInventory("CasingsJanitor", 1); }
else {TakeInventory("CasingsJanitor", 1);}
}
Script 797 (VOID)
{
if (GetCvar("bd_bloodamount") == 1) { SetActorState(0,"Vanish"); }
if (GetCvar("bd_bloodamount") == 0) { SetActorState(0,"Vanish"); }
}
Script 796 (VOID)
{
if (GetCvar("bd_classicmonsters") == 1) { SetActorState(0,"ReplaceVanilla"); }
}
Script 719 (VOID)
{
if (GameType () == GAME_NET_DEATHMATCH)
SetActorState(0,"DM");
}
Script 728 (VOID)
{
if (GetCvar("bd_nobulletpenetration") == 0) { TakeInventory("nopenetration", 1);}
if (GetCvar("bd_nobulletpenetration") == 1) { GiveInventory("nopenetration", 1);}
}
Script "GrenadeHotkey" (VOID) NET
{
GiveInventory("DoGrenade", 1);
}
Script 5922 (VOID) NET
{
//Sets the player's height to 28 and reduces their speed for slide kicks
SetActorProperty(0, APROP_HEIGHT, 28);
SetActorProperty(0, APROP_SPEED, 0.0);
}
Script 5923 (VOID) NET
{
//Sets the player's height to 58 and resets their speed to normal after slide kicking
SetActorProperty(0, APROP_HEIGHT, 58);
SetActorProperty(0, APROP_SPEED, 1.0);
}
Script "PromixityMineHotkey" (VOID) NET
{
GiveInventory("DoMine", 1);
}
script 32754 (VOID) NET
{
ThrustThing(GetActorAngle(0) >> 8, 20, 1, 0);
}
script "CrueltyBonus" (VOID) NET
{
if(GetCvar("nodoomguytalk") == 1)
{
SetActorProperty(0, APROP_HEALTH, GetActorProperty(0,APROP_HEALTH)+5);
}
else
{
ActivatorSound("CrueltyBonus",127);
SetActorProperty(0, APROP_HEALTH, GetActorProperty(0,APROP_HEALTH)+5);
}
}
script "CrueltyBonus10" (VOID) NET
{
SetActorProperty(0, APROP_HEALTH, GetActorProperty(0,APROP_HEALTH)+10);
}
//Based on Trial Blazer's "Macheterang" script since I couldn't figure this out myself...
script "DemonSoulSeeker" (void)
{
int machposx, machposy, playposx, playposy, totalposx, totalposy;
machposx = GetActorX(0);
machposy = GetActorY(0);
SetActivatorToTarget(0);
playposx = GetActorX(0);
playposy = GetActorY(0);
totalposx = (machposx - playposx) >> 16;
totalposy = (machposy - playposy) >> 16;
if (sqrt(totalposx*totalposx + totalposy*totalposy) <= 48)
{
SetResultValue(True);
}
else {SetResultValue(False);}
}
script "WeaponSwapSound" (VOID) NET
{
ActivatorSound("weapons/swapping",127);
}
Script "ReplaceRestrictedMode" (VOID)
{
if (GetCvar("bd_restrictedmode") == 1) { SetActorState(0,"ReplaceRestricted"); }
}
Script "ReplaceMarines" (VOID) NET
{
if (GetCvar("bd_replacemarines") == 1) { SetActorState(0,"ReplaceMarine"); }
}
Script 363 (VOID) NET
{
GiveInventory("Unloading", 1);
GiveInventory("GoSpecial", 1);
}
Script "ZombieManGrenades" (VOID) NET
{
if (GetCvar("bd_NoZmanGrenade") == 1) { GiveInventory("NoZombieGrenade", 1); }
}
Script "ZombieManAdvancedAttacks" (VOID) NET
{
if (GetCvar("bd_NoZmanAdvancedAttacks") == 1) { GiveInventory("NoZombieManAdvancedAttacks", 1); }
}
Script "CeilingClimbingImps" (VOID) NET
{
if (GetCvar("bd_GroundImps") == 1)
{
GiveInventory("NoCeilingClimb", 1);
}
SetResultValue(1);
}
Script "PinkyHealthFood" (VOID) NET
{
if (GetCvar("bd_HungryPinky") == 1) { GiveInventory("NoFoodHealth", 1); }
}
Script "JetpackRevenant" (VOID) NET
{
if (GetCvar("bd_GroundRevenant") == 1)
{
GiveInventory("NoJetpack", 1);
}
SetResultValue(1);
}
Script "ChargingHellknight" (VOID) NET
{
if (GetCvar("bd_NoKnightCharge") == 1) { GiveInventory("NoHellknightCharge", 1); }
}
Script "BaronBarrelFun" (VOID) NET
{
if (GetCvar("bd_NoBaronBarrel") == 1)
{
GiveInventory("NoBaronBarrels", 1);
}
}
Script "ArchvileBigHeal" (VOID) NET
{
if (GetCvar("bd_NoArchvileHeal") == 1) { GiveInventory("NoBigHeal", 1); }
}
Script "ArchvileDemonSummon" (VOID) NET