-
Notifications
You must be signed in to change notification settings - Fork 3
/
EVENTSMISC2.CON
5012 lines (4786 loc) · 151 KB
/
EVENTSMISC2.CON
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
onevent EVENT_USEMEDKIT
ifvare mainmenu 1 state setreturn-1
else
{
ifvarl FIRSTAIDCURRENT 1
{
state checkportablemedikits
ifvarg ITEMARRAYID_AMOUNTTEMP 0 state use_portablemedikit_player
}
else state usemedikit
state setreturn-1
}
endevent
onevent EVENT_EGS
/*
getactor[THISACTOR].picnum picnum
switch picnum
case FIRELASER
case FIRELASERP
setactor[THISACTOR].xoffset -32
break
endswitch
*/
ifactor MORTER
{
getactor[THISACTOR].owner TEMP
getactor[TEMP].picnum TEMP
ifvare TEMP APLAYER
{
setvarvar TEMP2 PLAYERATTACK
mulvar TEMP2 2
addvar TEMP2 50
ifvare CHARACTERSELECTED? 7 { mulvar TEMP2 5 divvar TEMP2 3 }
setactorvar[THISACTOR].ACTORATTACK TEMP2
setactor[THISACTOR].owner THISACTOR
}
else
ifvare TEMP MORTER
{
getactor[THISACTOR].extra TEMP
setactorvar[THISACTOR].ACTORATTACK TEMP
setactor[THISACTOR].owner THISACTOR
setactor[THISACTOR].extra 50
}
}
ifactor TRIPBOMB
{
getactor[THISACTOR].owner TEMP
getactor[TEMP].picnum TEMP
//addlogvar THISACTOR
ifvare TEMP APLAYER
{
setvarvar TEMP2 PLAYERATTACK
mulvar TEMP2 4
addvar TEMP2 100
//addlogvar TEMP2
ifvarg PLAYERLEVEL 0
{
setvarvar TEMP3 PLAYERLEVEL
mulvar TEMP3 3 divvar TEMP3 2
addvar TEMP3 100
//addlogvar TEMP3
mulvarvar TEMP2 TEMP3
divvar TEMP2 100
//addlogvar TEMP2
}
ifvare CHARACTERSELECTED? 7
{
mulvar TEMP2 5
divvar TEMP2 3
//addlogvar TEMP2
}
setactorvar[THISACTOR].ACTORATTACK TEMP2
setactor[THISACTOR].owner THISACTOR
setactorvar[THISACTOR].PLAYERTRIPBOMB? 1
}
else
ifvare TEMP TRIPBOMB
{
state calculatetripbombatk
}
}
ifactor HEAVYHBOMB
{
getactor[THISACTOR].owner TEMP
getactor[TEMP].picnum TEMP
ifvare TEMP APLAYER setactorvar[THISACTOR].ACTORATTACK PLAYERATTACK
// PipeBomb Velocities [based on strength]
setvar tempd 1000 // 1000 = 100.0%
ifvare CHARACTERSELECTED? 1 setvar tempd 1000
ifvare CHARACTERSELECTED? 2 setvar tempd 950
ifvare CHARACTERSELECTED? 3 setvar tempd 920
ifvare CHARACTERSELECTED? 4 setvar tempd 800
ifvare CHARACTERSELECTED? 5 setvar tempd 1100
ifvare CHARACTERSELECTED? 6 setvar tempd 1200
ifvare CHARACTERSELECTED? 7 setvar tempd 970
ifvare CHARACTERSELECTED? 8 setvar tempd 850
ifvare CHARACTERSELECTED? 9 setvar tempd 1250
ifvare CHARACTERSELECTED? 10 setvar tempd 880
ifvare CHARACTERSELECTED? 11 setvar tempd 830
ifvare CHARACTERSELECTED? 12 setvar tempd 960
ifvare CHARACTERSELECTED? 13 setvar tempd 900
ifvare CHARACTERSELECTED? 14 setvar tempd 1500
ifvare CHARACTERSELECTED? 15 setvar tempd 910
// Check for Hyper Wrist Equippable items
//addlogvar tempd
setvar DAMAGEMODIFIER 100
ifvare PLAYEREQUIPSLOTITEM1 18 addvar DAMAGEMODIFIER 25
ifvare PLAYEREQUIPSLOTITEM2 18 addvar DAMAGEMODIFIER 25
ifvare PLAYEREQUIPSLOTITEM3 18 addvar DAMAGEMODIFIER 25
ifvare PLAYEREQUIPSLOTITEM4 18 addvar DAMAGEMODIFIER 25
ifvare PLAYEREQUIPSLOTITEM5 18 addvar DAMAGEMODIFIER 25
ifvare PLAYEREQUIPSLOTITEM6 18 addvar DAMAGEMODIFIER 25
ifvare PLAYEREQUIPSLOTITEM7 18 addvar DAMAGEMODIFIER 25
ifvare PLAYEREQUIPSLOTITEM8 18 addvar DAMAGEMODIFIER 25
mulvarvar tempd DAMAGEMODIFIER
divvar tempd 100
// Check for Steroids Equippable items
ifp ponsteroids { mulvar tempd 1250 divvar tempd 1000 }
//addlogvar tempd
//addlogvar temp addlogvar tempb addlogvar tempc
getactor[THISACTOR].xvel temp mulvarvar temp tempd divvar temp 1000 setactor[THISACTOR].xvel temp
getactor[THISACTOR].yvel tempb mulvarvar tempb tempd divvar tempb 1000 setactor[THISACTOR].yvel tempb
getactor[THISACTOR].zvel tempc mulvarvar tempc tempd divvar tempc 1000 setactor[THISACTOR].zvel tempc
//addlogvar temp addlogvar tempb addlogvar tempc
}
ifactor PIGCOP
{
ifspawnedby RECON
{
getactor[THISACTOR].owner TEMPVAR6
getactor[TEMPVAR6].pal TEMPVAR7
setactor[THISACTOR].pal TEMPVAR7
//addlogvar TEMPVAR6
//addlogvar TEMPVAR7
}
}
// Monster Spawner
ifactor EGG state respawnspritefix
ifactor SHARK state respawnspritefix
ifactor ROTATEGUN state respawnspritefix
ifactor LIZTROOP state respawnspritefix
ifactor LIZTROOPSTAYPUT state respawnspritefix
ifactor LIZTROOPDUCKING state respawnspritefix
ifactor LIZTROOPRUNNING state respawnspritefix
ifactor LIZTROOPJETPACK state respawnspritefix
ifactor LIZTROOPSHOOT state respawnspritefix
ifactor LIZTROOPONTOILET state respawnspritefix
ifactor LIZTROOPJUSTSIT state respawnspritefix
ifactor LIZMAN state respawnspritefix
ifactor LIZMANSTAYPUT state respawnspritefix
ifactor LIZMANJUMP state respawnspritefix
ifactor LIZMANSPITTING state respawnspritefix
ifactor DRONE state respawnspritefix
ifactor OCTABRAIN state respawnspritefix
ifactor OCTABRAINSTAYPUT state respawnspritefix
ifactor PIGCOP state respawnspritefix
ifactor PIGCOPSTAYPUT state respawnspritefix
ifactor PIGCOPDIVE state respawnspritefix
ifactor COMMANDER state respawnspritefix
ifactor COMMANDERSTAYPUT state respawnspritefix
ifactor TANK state respawnspritefix
ifactor NEWBEAST state respawnspritefix
ifactor NEWBEASTSTAYPUT state respawnspritefix
ifactor NEWBEASTHANG state respawnspritefix
ifactor NEWBEASTJUMP state respawnspritefix
ifactor SCORPIONTANK state respawnspritefix
ifactor BOSS1 state respawnspritefix
ifactor BOSS1STAYPUT state respawnspritefix
ifactor BOSS1SHOOT state respawnspritefix
ifactor BOSS1LOB state respawnspritefix
ifactor BOSS2 state respawnspritefix
ifactor BOSS2STAYPUT state respawnspritefix
ifactor BOSS2SHOOT state respawnspritefix
ifactor BOSS2BREATH state respawnspritefix
ifactor BOSS3 state respawnspritefix
ifactor BOSS3STAYPUT state respawnspritefix
ifactor BOSS3LOB state respawnspritefix
ifactor BOSS4 state respawnspritefix
ifactor BOSS4STAYPUT state respawnspritefix
ifactor EMPTYTANK state respawnspritefix
// Item Spawner
ifactor DONUTS state respawnspriteitemfix
ifactor DONUTS2 state respawnspriteitemfix
ifactor STEROIDS state respawnspriteitemfix
ifactor BOOTS state respawnspriteitemfix
ifactor HEATSENSOR state respawnspriteitemfix
ifactor SHIELD state respawnspriteitemfix
ifactor AIRTANK state respawnspriteitemfix
ifactor HOLODUKE state respawnspriteitemfix
ifactor JETPACK state respawnspriteitemfix
ifactor AMMO state respawnspriteitemfix
ifactor FREEZEAMMO state respawnspriteitemfix
ifactor AMMOLOTS state respawnspriteitemfix
ifactor SHOTGUNAMMO state respawnspriteitemfix
ifactor CRYSTALAMMO state respawnspriteitemfix
ifactor GROWAMMO state respawnspriteitemfix
ifactor BATTERYAMMO state respawnspriteitemfix
ifactor DEVISTATORAMMO state respawnspriteitemfix
ifactor RPGAMMO state respawnspriteitemfix
ifactor HBOMBAMMO state respawnspriteitemfix
ifactor RPGSPRITE state respawnspriteitemfix
ifactor SHOTGUNSPRITE state respawnspriteitemfix
ifactor FIRSTGUNSPRITE state respawnspriteitemfix
ifactor TRIPBOMBSPRITE state respawnspriteitemfix
ifactor SHRINKERSPRITE state respawnspriteitemfix
ifactor CHAINGUNSPRITE state respawnspriteitemfix
ifactor FREEZESPRITE state respawnspriteitemfix
ifactor DEVISTATORSPRITE state respawnspriteitemfix
ifactor COLA state respawnspriteitemfix
ifactor SIXPAK state respawnspriteitemfix
ifactor ATOMICHEALTH state respawnspriteitemfix
ifactor FIRSTAID state respawnspriteitemfix
ifactor PENNY state respawnspriteitemfix
ifactor NICKEL state respawnspriteitemfix
ifactor DIME state respawnspriteitemfix
ifactor QUARTER state respawnspriteitemfix
ifactor HALFDOLLAR state respawnspriteitemfix
ifactor SACDOLLAR state respawnspriteitemfix
ifactor ONEDOLLAR state respawnspriteitemfix
ifactor TWODOLLARS state respawnspriteitemfix
ifactor TWODOLLARBUNDLE state respawnspriteitemfix
ifactor FIVEDOLLARS state respawnspriteitemfix
ifactor FIVEDOLLARBUNDLE state respawnspriteitemfix
ifactor NINEDOLLARBUNDLE state respawnspriteitemfix
ifactor TENDOLLARS state respawnspriteitemfix
ifactor TENDOLLARBUNDLE state respawnspriteitemfix
ifactor TWENTYDOLLARS state respawnspriteitemfix
ifactor FIFTYDOLLARS state respawnspriteitemfix
ifactor EIGHTYDOLLARBUNDLE state respawnspriteitemfix
ifactor ONEHUNDREDDOLLARS state respawnspriteitemfix
ifactor FIVEHUNDREDDOLLARS state respawnspriteitemfix
ifactor ONETHOUSANDDOLLARS state respawnspriteitemfix
ifactor FIVETHOUSANDDOLLARS state respawnspriteitemfix
ifactor TENTHOUSANDDOLLARS state respawnspriteitemfix
ifactor ONEHUNDREDTHOUSANDDOLLARS state respawnspriteitemfix
ifactor ONEMILLIONDOLLARS state respawnspriteitemfix
ifactor ONEBILLIONDOLLARS state respawnspriteitemfix
ifactor SWMEDIKIT state respawnspriteitemfix
ifactor SWBIGMEDIKIT state respawnspriteitemfix
ifactor MEDPACK state respawnspriteitemfix
ifactor SURGERYKIT state respawnspriteitemfix
ifactor MAXHPUP state respawnspriteitemfix
ifactor MAXAPUP state respawnspriteitemfix
ifactor MAXHPAPUP state respawnspriteitemfix
ifactor ATKUP state respawnspriteitemfix
ifactor DEFUP state respawnspriteitemfix
ifactor SPDUP state respawnspriteitemfix
ifactor AIRTIMEBONUS state respawnspriteitemfix
ifactor MANTLEBONUS state respawnspriteitemfix
ifactor AIRJUMPBONUS state respawnspriteitemfix
ifactor SATCHEL_SMALL state respawnspriteitemfix
ifactor SATCHEL_LARGE state respawnspriteitemfix
ifactor SUPERATOM state respawnspriteitemfix
ifactor COLORSHIELD state respawnspriteitemfix
ifactor SUPERSHIELD state respawnspriteitemfix
ifactor ICONOFTHEDEFENDER state respawnspriteitemfix
ifactor QUADDAMAGE state respawnspriteitemfix
ifactor REGENITEM state respawnspriteitemfix
ifactor APREGENITEM state respawnspriteitemfix
ifactor VAMPIREITEM state respawnspriteitemfix
ifactor COILS state respawnspriteitemfix
ifactor FORTUNECOOKIE state respawnspriteitemfix
ifactor ONELIFETSHIRT state respawnspriteitemfix
ifactor TWOLIFETSHIRT state respawnspriteitemfix
ifactor CONTINUEITEM state respawnspriteitemfix
ifactor RESURRECTIONCHALICE state respawnspriteitemfix
ifactor EYEDROP state respawnspriteitemfix
ifactor ANTIDOTE state respawnspriteitemfix
ifactor FOGHORN state respawnspriteitemfix
ifactor ENERGYSHELL state respawnspriteitemfix
ifactor ENERGYSHELL_UPGRADED state respawnspriteitemfix
ifactor ENERGYCELL_SMALL state respawnspriteitemfix
ifactor ENERGYCELL_MEDIUM state respawnspriteitemfix
ifactor ENERGYCELL_LARGE state respawnspriteitemfix
ifactor MERCURYCOMPUTER state respawnspriteitemfix
ifactor HACKERVISION state respawnspriteitemfix
ifactor AFAS_DROP state respawnspriteitemfix
ifactor FAUXLEVELUP state respawnspriteitemfix
ifactor SUNRING state respawnspriteitemfix
ifactor AQUARING state respawnspriteitemfix
ifactor PLASMARING state respawnspriteitemfix
ifactor SPIRITRING state respawnspriteitemfix
ifactor CHARMANKH state respawnspriteitemfix
ifactor MIRRORSHIELD state respawnspriteitemfix
ifactor EXPBADGE state respawnspriteitemfix
ifactor RANKBADGE state respawnspriteitemfix
ifactor MONEYBADGE state respawnspriteitemfix
ifactor RIOTSHIELD state respawnspriteitemfix
ifactor NYXGLOVEPAIR state respawnspriteitemfix
ifactor RABBITSFOOT state respawnspriteitemfix
ifactor HEADJIB1 state changejibcolor_egs
ifactor LEGJIB1 state changejibcolor_egs
ifactor ARMJIB1 state changejibcolor_egs
ifactor LIZMANHEAD1 state changejibcolor_egs
ifactor LIZMANLEG1 state changejibcolor_egs
ifactor LIZMANARM1 state changejibcolor_egs
ifactor JIBS1 state changejibcolor_egs
ifactor JIBS2 state changejibcolor_egs
ifactor JIBS3 state changejibcolor_egs
ifactor JIBS4 state changejibcolor_egs
ifactor JIBS5 state changejibcolor_egs
ifactor JIBS6 state changejibcolor_egs
ifactor RPG
{
ifspawnedby LIZTROOP state properRPG
else ifspawnedby PIGCOP state properRPG
else ifspawnedby LIZMAN state properRPG
else ifspawnedby OCTABRAIN state properRPG
else ifspawnedby DRONE state properRPG
else ifspawnedby TANK state properRPG
else ifspawnedby SCORPIONTANK state properRPG
}
getactor[THISACTOR].picnum ACTORPICNUM
switch ACTORPICNUM
case ZAPPER1
iffloordistl 16 nullop else
{
getactor[THISACTOR].z z
addvar z 768
setactor[THISACTOR].z z
}
break
case ZAPPER2
iffloordistl 16 nullop else
{
getactor[THISACTOR].z z
addvar z 1536
setactor[THISACTOR].z z
}
break
case ZAPPER3
iffloordistl 16 nullop else
{
getactor[THISACTOR].z z
addvar z 3072
setactor[THISACTOR].z z
}
break
case LEADER_RPG
iffloordistl 16 nullop else
{
getactor[THISACTOR].z z
addvar z 1536
setactor[THISACTOR].z z
}
break
case BAALO_RPG
iffloordistl 16 nullop else
{
getactor[THISACTOR].z z
addvar z 3072
setactor[THISACTOR].z z
}
break
endswitch
endevent
onevent EVENT_INVENTORYLEFT // Opens the Menu [also cancels selections/closes menu]
ifvare oldskoolmode 0
{
state getpartime
addvar mpresstime 1
ifvarvare temppartime mpresstime nullop else
{
ifvare shop_id -1
{
ifvare atm_id -1
{
ifvare mainmenu 0
{
setvar mainmenu 1
ifvare mainmenusubmenu 0
{
ifvarg CHARACTERSELECTED? 0 ifvarl CHARACTERSELECTED? 9 setvar mainmenupage 0
ifvare CHARACTERSELECTED? 1 setvar mainmenuselection 0
ifvare CHARACTERSELECTED? 2 setvar mainmenuselection 1
ifvare CHARACTERSELECTED? 3 setvar mainmenuselection 2
ifvare CHARACTERSELECTED? 4 setvar mainmenuselection 3
ifvare CHARACTERSELECTED? 5 setvar mainmenuselection 4
ifvare CHARACTERSELECTED? 6 setvar mainmenuselection 5
ifvare CHARACTERSELECTED? 7 setvar mainmenuselection 6
ifvare CHARACTERSELECTED? 8 setvar mainmenuselection 7
ifvarg CHARACTERSELECTED? 8 ifvarl CHARACTERSELECTED? 17 setvar mainmenupage 1
ifvare CHARACTERSELECTED? 9 setvar mainmenuselection 0
ifvare CHARACTERSELECTED? 10 setvar mainmenuselection 1
ifvare CHARACTERSELECTED? 11 setvar mainmenuselection 2
ifvare CHARACTERSELECTED? 12 setvar mainmenuselection 3
ifvare CHARACTERSELECTED? 13 setvar mainmenuselection 4
ifvare CHARACTERSELECTED? 14 setvar mainmenuselection 5
ifvare CHARACTERSELECTED? 15 setvar mainmenuselection 6
ifvare CHARACTERSELECTED? 16 setvar mainmenuselection 7
}
sound MENU_ENTER
stopsound MENU_EXIT
}
else
{
ifvare itemidinuse -1
{
ifvare skillidinuse -1
{
ifvare equipmenuinuse -1
{
state exit_mainmenu
}
else
{
setvar equipmenuinuse -1
setvar equipmenupage 0
setvar equipmenuselection 0
setvar equipcharacter 0
sound MENU_EXIT
}
}
else
{
setvar skillidinuse -1
sound MENU_EXIT
}
}
else
{
setvar itemidinuse -1
sound MENU_EXIT
}
}
}
else state atm-lowerrightbutton // ifvarn atm_id -1
}
else // ifvarn shop_id -1
{
setvar shop_id -1
setvar shoppage 0
setvar shopselection 0
setvar shopmode 0
setvar shopowner -1
setvar shopownerhealth -1
sound MENU_EXIT
}
}
setvarvar mpresstime temppartime
state setreturn-1
}
endevent
onevent EVENT_INVENTORYRIGHT
ifvare oldskoolmode 0
{
state getpartime
addvar mpresstime 1
ifvarvare temppartime mpresstime nullop else
{
ifvare mainmenu 1 ifvarg mainmenutransitiontimer 6
{
ifvare itemidinuse -1
{
ifvare skillidinuse -1
{
ifvare equipmenuinuse -1
{
ifvare mainmenusubmenu 0 // Characters Submenu
{
ifvare mainmenupage 0
{
setvar TEMPMOD 0
state checkpg2characters
ifvarg TEMPMOD 0
{
addvar mainmenupage 1
ifvarg mainmenupage 1 subvar mainmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
else
{
sound MENU_ERROR
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
}
else
ifvare mainmenupage 1
{
setvar TEMPMOD 0
state checkpg1characters
ifvarg TEMPMOD 0
{
addvar mainmenupage 1
ifvarg mainmenupage 1 subvar mainmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
else
{
sound MENU_ERROR
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
}
}
ifvare mainmenusubmenu 1 // Items Submenu
{
addvar mainmenupage 1
ifvarg mainmenupage 5 subvar mainmenupage 6
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
ifvare mainmenusubmenu 2
{
addvar mainmenupage 1
ifvarg mainmenupage 1 subvar mainmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
ifvare mainmenusubmenu 3
{
state menuerrorsound
stopsound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
ifvare mainmenusubmenu 4
{
state menuerrorsound
stopsound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
ifvare mainmenusubmenu 5
{
state menuerrorsound
stopsound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
ifvare mainmenusubmenu 6
{
state menuerrorsound
stopsound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
ifvare mainmenusubmenu 7 // Worldtiles
{
addvar mainmenupage 1
ifvarg mainmenupage 10 subvar mainmenupage 11
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
}
else // ifvarn equipmenuinuse -1
{
ifvare equipmenupage 0
{
setvar TEMPMOD 0
state checkpg2equippables
ifvarg TEMPMOD 0
{
addvar equipmenupage 1
ifvarg equipmenupage 1 subvar equipmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
else
{
sound MENU_ERROR
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
}
else
ifvare equipmenupage 1
{
setvar TEMPMOD 0
state checkpg1equippables
ifvarg TEMPMOD 0
{
addvar equipmenupage 1
ifvarg equipmenupage 1 subvar equipmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
else
{
sound MENU_ERROR
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
}
/*
addvar equipmenupage 1
ifvarg equipmenupage 1 subvar equipmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_ENTER
stopsound MENU_EXIT
*/
}
}
else // ifvarn skillidinuse -1
{
ifvare skillmenupage 0
{
setvar TEMPMOD 0
state checkpg2characters
ifvarn VEHICLEID -1 addvar TEMPMOD 1
ifvarg TEMPMOD 0
{
addvar skillmenupage 1
ifvarg skillmenupage 1 subvar skillmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
else
{
sound MENU_ERROR
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
}
else
ifvare skillmenupage 1
{
setvar TEMPMOD 0
state checkpg1characters
ifvarg TEMPMOD 0
{
addvar skillmenupage 1
ifvarg skillmenupage 1 subvar skillmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
else
{
sound MENU_ERROR
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
}
}
}
else // ifvarn itemidinuse -1
{
ifvare itemmenupage 0
{
setvar TEMPMOD 0
state checkpg2characters
ifvarn VEHICLEID -1 addvar TEMPMOD 1
ifvarg TEMPMOD 0
{
addvar itemmenupage 1
ifvarg itemmenupage 1 subvar itemmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
else
{
sound MENU_ERROR
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
}
else
ifvare itemmenupage 1
{
setvar TEMPMOD 0
state checkpg1characters
ifvarg TEMPMOD 0
{
addvar itemmenupage 1
ifvarg itemmenupage 1 subvar itemmenupage 2
sound MENU_SHIFTPAGE
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
else
{
sound MENU_ERROR
stopsound MENU_SELECTED
stopsound MENU_EXIT
stopsound MENU_ENTER
}
}
}
}
else
{
ifvare shop_id -1
{
ifvare atm_id -1
{
ifvare CHARACTERSELECTED? 8
ifvare HAVEENERGYSHIELD? 1
{
ifvare ENERGYSHIELDMODE 0
{
setvar ENERGYSHIELDMODE 1
redefinequote 335 ^14BIO-CELL ENERGY SHIELD ACTIVATED!
}
else
{
setvar ENERGYSHIELDMODE 0
redefinequote 335 ^14BIO-CELL ENERGY SHIELD DEACTIVATED!
}
globalsound ESHIELD_TOGGLE
setvarvar fta fta_normal setvar ftq 335
}
}
else state atm-lowerleftbutton // if in an ATM?
}
else // if in a shop?
{
ifvarg shoptransitiontimer 6 state shop_shiftpage
}
}
}
setvarvar mpresstime temppartime
state setreturn-1
}
endevent
onevent EVENT_USE
ifvare mainmenu 1 ifvarg mainmenutransitiontimer 6 state menu-usingmenu
else // ifvare mainmenu 0
{
ifvarn shop_id -1 ifvarg shoptransitiontimer 6
{
state setreturn-1
state getpartime
addvar upresstime 1
ifvarvare temppartime upresstime nullop else state shop_selection
setvarvar upresstime temppartime
}
else
{
ifvarn atm_id -1
{
state setreturn-1
state getpartime
addvar upresstime 1
setvarvar upresstime temppartime
}
else
{
ifvarn EDGEGRAPPLING 0
{
state setreturn-1
state getpartime
addvar upresstime 1
setvarvar upresstime temppartime
}
else
{
ifvarand extbits 12 // Holding down Strafe Left & Strafe Right as well
{
// Lisa's new ability to charge her Bioshield via EP [Key Combo of Strafe-Left/Strafe-Right/Use required]
ifvare CHARACTERSELECTED? 8 ifvare HAVEENERGYSHIELD? 1 ifvare ENERGYSHIELDMODE 1 ifvarg CURRENTENERGYPOINTS 0
{
ifvarvare CURRENTCELLS MAXCELLS ifvarvare DAMAGEINCELL ESHIELDDMGFACTOR
{
setvar ESHIELDCHARGETIMER 0
}
else
{
setvarvar ESHIELDCHARGEMULTI ESHIELDCHARGETIMER divvar ESHIELDCHARGEMULTI 52 addvar ESHIELDCHARGEMULTI 1
subvarvar CURRENTENERGYPOINTS ESHIELDCHARGEMULTI
ifvare ESHIELDADVANCEMENT 1 addvar TEMPVAR 8 else addvar TEMPVAR 3
setvarvar tempb ESHIELDDMGFACTOR
divvar tempb 32
addvarvar TEMPVAR tempb
switch SKILLLEVEL
case 0 mulvar TEMPVAR 12 break
case 1 mulvar TEMPVAR 11 break
case 2 mulvar TEMPVAR 10 break
case 3 mulvar TEMPVAR 9 break
case 4 mulvar TEMPVAR 8 break
case 5 mulvar TEMPVAR 7 break
case 6 mulvar TEMPVAR 6 break
case 7 mulvar TEMPVAR 5 break
case 8 mulvar TEMPVAR 4 break
case 9 mulvar TEMPVAR 3 break
endswitch
divvar TEMPVAR 4
ifvarl TEMPVAR 1 setvar TEMPVAR 1
mulvarvar TEMPVAR ESHIELDCHARGEMULTI
// addlogvar TEMPVAR
addvarvar DAMAGEINCELL TEMPVAR
ifvarn player[THISACTOR].over_shoulder_on 0 ifvare CHARACTERSELECTED? 8 ifvare HAVEENERGYSHIELD? 1
{
ifvarg TEMPVAR 0
{
setvarvar SHOWDAMAGE TEMPVAR
setvar SHOWDAMAGETYPE 5
setvarvar SHOWDAMAGEACTORID PLAYERID
state showdamage
}
}
ifvarvare CURRENTCELLS MAXCELLS
{
ifvarvare DAMAGEINCELL ESHIELDDMGFACTOR { setvarvar DAMAGEINCELL ESHIELDDMGFACTOR soundonce ESHIELD_CHARGEDMAX }
ifvarvarg DAMAGEINCELL ESHIELDDMGFACTOR { setvarvar DAMAGEINCELL ESHIELDDMGFACTOR soundonce ESHIELD_CHARGEDMAX }
}
else
{
ifvarvarg DAMAGEINCELL ESHIELDDMGFACTOR { addvar CURRENTCELLS 1 subvarvar DAMAGEINCELL ESHIELDDMGFACTOR }
}
addvar ESHIELDCHARGETIMER 1
}
}
else
{
setvar ESHIELDCHARGETIMER 0
}
}
else
{
setvar ESHIELDCHARGETIMER 0
}
}
}
}
}
endevent
onevent EVENT_PROCESSINPUT
getinput[THISACTOR].bits bits
getinput[THISACTOR].extbits extbits
ifvarand bits 1 // Jump
{
ifvarg ONAWALL? 0
{
/*
ifvare WALLTYPE 4 // Rope/Vine/Pole type
{
ifvare ONAWALL? 1
{
setvar ONAWALL? -10 // can't grab another wall for 10 tics
getplayer[THISACTOR].ang dodgeang
setvar dodge 6
}
}
else
{
}
*/
setvar ONAWALL? -6
setplayer[THISACTOR].jumping_toggle 1
}
else
{
getplayer[THISACTOR].player_par temp
addvar jpresstime 1
ifp pjetpack nullop else
ifvare sector[PLAYERSECTOR].lotag 2 nullop else
{
getplayer[THISACTOR].jetpack_amount tempc
ifvarvare temp jpresstime ifvare multijumpflag 0 nullop else
{
ifp ponground nullop
else ifvare sector[PLAYERSECTOR].lotag 2 nullop
else ifvarvarl multijumpflag PLAYERMAXAIRJUMPS
{
ifvarvarn temp jpresstime
{
ifvare mainmenu 0 state extrajump
}
}
}
}
setvarvar jpresstime temp
}
}
ifvarand bits 2 // Crouch
{
ifvare mainmenu 0
{
ifvare EDGEGRAPPLING 1 setvar EDGEGRAPPLING -10
}
}
/*
ifvarand bits 4 // Fire
{
}
ifvarand bits 8 // Aim Up
{
}
ifvarand bits 16 // Aim Down
{
}
ifvarand bits 32 // Running Key
{
}
ifvarand bits 64 // Looking Left
{
}
ifvarand bits 128 // Looking Right
{
}
ifvarand bits 2097152 // Pause
{
}
*/
ifvarand bits 536870912 // Open
{
ifvare mainmenu 0
{
ifvare EDGEGRAPPLING 1
{
ifvarg EDGEGRAPPLEDELAY 10 setvar EDGEGRAPPLING 2 // begin the ascent
}
}
}
endevent
onevent EVENT_MOVEFORWARD // Up Key
ifvare mainmenu 1 ifvarg mainmenutransitiontimer 6
{
state setreturn-1
state getpartime
addvar fpresstime 1
ifvarvare temppartime fpresstime nullop else
{
ifvare mainmenu 1 ifvarg mainmenutransitiontimer 6
{
ifvare itemidinuse -1
{
ifvare skillidinuse -1
{
ifvare equipmenuinuse -1
{