-
Notifications
You must be signed in to change notification settings - Fork 1
/
Synergy.gsc
2481 lines (2091 loc) · 93.8 KB
/
Synergy.gsc
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
#include scripts\cp\cp_weapon;
return_toggle(variable) {
return isDefined(variable) && variable;
}
really_alive() {
return isAlive(self) && !return_toggle(self.lastStand);
}
get_menu() {
return self.syn["menu"];
}
get_cursor() {
return self.cursor[self get_menu()];
}
get_title() {
return self.syn["title"];
}
set_menu(menu) {
if(isDefined(menu)) {
self.syn["menu"] = menu;
}
}
set_cursor(cursor, menu) {
if(isDefined(cursor)) {
self.cursor[isDefined(menu) ? menu : self get_menu()] = cursor;
}
}
set_title(title) {
if(isDefined(title)) {
self.syn["title"] = title;
}
}
has_menu() {
return return_toggle(self.syn["user"].has_menu);
}
in_menu() {
return return_toggle(self.in_menu);
}
set_state() {
self.in_menu = !return_toggle(self.in_menu);
}
execute_function(function, argument_1, argument_2, argument_3, argument_4) {
if(!isDefined(function)) {
return;
}
if(isDefined(argument_4)) {
return self thread [[function]](argument_1, argument_2, argument_3, argument_4);
}
if(isDefined(argument_3)) {
return self thread [[function]](argument_1, argument_2, argument_3);
}
if(isDefined(argument_2)) {
return self thread [[function]](argument_1, argument_2);
}
if(isDefined(argument_1)) {
return self thread [[function]](argument_1);
}
return self thread [[function]]();
}
set_slider(scrolling, index) {
menu = self get_menu();
index = isDefined(index) ? index : self get_cursor();
storage = (menu + "_" + index);
if(!isDefined(self.slider[storage])) {
self.slider[storage] = isDefined(self.structure[index].array) ? 0 : self.structure[index].start;
}
if(!isDefined(self.structure[index].array)) {
self notify("increment_slider");
if(scrolling == -1)
self.slider[storage] += self.structure[index].increment;
if(scrolling == 1)
self.slider[storage] -= self.structure[index].increment;
if(self.slider[storage] > self.structure[index].maximum)
self.slider[storage] = self.structure[index].minimum;
if(self.slider[storage] < self.structure[index].minimum)
self.slider[storage] = self.structure[index].maximum;
position = abs((self.structure[index].maximum - self.structure[index].minimum)) / ((50 - 8));
if(!self.structure[index].text_slider) {
self.syn["hud"]["slider"][0][index] setValue(self.slider[storage]);
} else {
self.syn["hud"]["slider"][0][index].x = self.syn["utility"].x_offset + 85;
if(self.structure[index].slider_text == "outline") {
self.syn["hud"]["slider"][0][index] setText(self.syn["outline_colors"][self.slider[storage]]);
}
}
self.syn["hud"]["slider"][2][index].x = (self.syn["hud"]["slider"][1][index].x + (abs((self.slider[storage] - self.structure[index].minimum)) / position));
}
}
clear_option() {
for(i = 0; i < self.syn["utility"].element_list.size; i++) {
clear_all(self.syn["hud"][self.syn["utility"].element_list[i]]);
self.syn["hud"][self.syn["utility"].element_list[i]] = [];
}
}
check_option(player, menu, cursor) {
if(isDefined(self.structure) && self.structure.size) {
for(i = 0; i < self.structure.size; i++) {
if(player.structure[cursor].text == self.structure[i].text && self get_menu() == menu) {
return true;
}
}
}
return false;
}
create_text(text, font, font_scale, align_x, align_y, x, y, color, alpha, z_index, hide_when_in_menu, archive) {
textElement = newHudElem();
textElement.font = font;
textElement.fontscale = font_scale;
textElement.alpha = alpha;
textElement.sort = z_index;
textElement.foreground = true;
if(isDefined(hide_when_in_menu)) {
textElement.hideWhenInMenu = hide_when_in_menu;
} else {
textElement.hideWhenInMenu = true;
}
if(isDefined(archive)) {
textElement.archived = archive;
} else {
textElement.archived = false;
}
textElement.x = x;
textElement.y = y;
textElement.alignX = align_x;
textElement.alignY = align_y;
textElement.horzAlign = align_x;
textElement.vertAlign = align_y;
if(color != "rainbow") {
textElement.color = color;
} else {
textElement.color = level.rainbow_color;
textElement thread start_rainbow();
}
if(isnumber(text)) {
textElement setValue(text);
} else {
textElement set_text(text);
}
return textElement;
}
set_text(text) {
if(!isDefined(self) || !isDefined(text)) {
return;
}
self.text = text;
self setText(text);
}
create_shader(shader, align_x, align_y, x, y, width, height, color, alpha, z_index) {
shaderElement = newHudElem();
shaderElement.elemType = "icon";
shaderElement.children = [];
shaderElement.alpha = alpha;
shaderElement.sort = z_index;
shaderElement.archived = true;
shaderElement.foreground = true;
shaderElement.hidden = false;
shaderElement.hideWhenInMenu = true;
shaderElement.x = x;
shaderElement.y = y;
shaderElement.alignX = align_x;
shaderElement.alignY = align_y;
shaderElement.horzAlign = align_x;
shaderElement.vertAlign = align_y;
if(color != "rainbow") {
shaderElement.color = color;
} else {
shaderElement.color = level.rainbow_color;
shaderElement thread start_rainbow();
}
shaderElement set_shader(shader, width, height);
return shaderElement;
}
set_shader(shader, width, height) {
if(!isDefined(shader)) {
if(!isDefined(self.shader)) {
return;
}
shader = self.shader;
}
if(!isDefined(width)) {
if(!isDefined(self.width)) {
return;
}
width = self.width;
}
if(!isDefined(height)) {
if(!isDefined(self.height)) {
return;
}
height = self.height;
}
self.shader = shader;
self.width = width;
self.height = height;
self setShader(shader, width, height);
}
clear_all(array) {
if(!isDefined(array)) {
return;
}
keys = getArrayKeys(array);
for(a = 0; a < keys.size; a++) {
if(isArray(array[keys[a]])) {
forEach(value in array[keys[a]])
if( isDefined(value)) {
value destroy();
}
} else {
if(isDefined(array[keys[a]])) {
array[keys[a]] destroy();
}
}
}
}
add_menu(title, menu_size, extra) {
if(isDefined(title)) {
self set_title(title);
if(isDefined(extra)) {
self.syn["hud"]["title"][0].x = self.syn["utility"].x_offset + 86 - menu_size - extra;
} else {
self.syn["hud"]["title"][0].x = self.syn["utility"].x_offset + 86 - menu_size;
}
}
self.structure = [];
}
add_option(text, function, argument_1, argument_2, argument_3) {
option = spawnStruct();
option.text = text;
option.function = function;
option.argument_1 = argument_1;
option.argument_2 = argument_2;
option.argument_3 = argument_3;
self.structure[self.structure.size] = option;
}
add_toggle(text, function, toggle, array, argument_1, argument_2, argument_3) {
option = spawnStruct();
option.text = text;
option.function = function;
option.toggle = return_toggle(toggle);
option.argument_1 = argument_1;
option.argument_2 = argument_2;
option.argument_3 = argument_3;
if(isDefined(array)) {
option.slider = true;
option.array = array;
}
self.structure[self.structure.size] = option;
}
add_string(text, function, array, argument_1, argument_2, argument_3) {
option = spawnStruct();
option.text = text;
option.function = function;
option.slider = true;
option.array = array;
option.argument_1 = argument_1;
option.argument_2 = argument_2;
option.argument_3 = argument_3;
self.structure[self.structure.size] = option;
}
add_increment(text, function, start, minimum, maximum, increment, text_slider, slider_text, argument_1, argument_2, argument_3) {
option = spawnStruct();
option.text = text;
option.function = function;
option.slider = true;
option.text_slider = text_slider;
option.slider_text = slider_text;
option.start = start;
option.minimum = minimum;
option.maximum = maximum;
option.increment = increment;
option.argument_1 = argument_1;
option.argument_2 = argument_2;
option.argument_3 = argument_3;
self.structure[self.structure.size] = option;
}
add_category(text) {
option = spawnStruct();
option.text = text;
option.category = true;
self.structure[self.structure.size] = option;
}
new_menu(menu) {
if(!isDefined(menu)) {
menu = self.previous[(self.previous.size - 1)];
self.previous[(self.previous.size - 1)] = undefined;
} else {
self.previous[self.previous.size] = self get_menu();
}
self set_menu(menu);
self clear_option();
self create_option();
}
initial_variable() {
self.syn["utility"] = spawnStruct();
self.syn["utility"].font = "objective";
self.syn["utility"].font_scale = 0.7;
self.syn["utility"].option_limit = 10;
self.syn["utility"].option_spacing = 14;
self.syn["utility"].x_offset = 600;
self.syn["utility"].y_offset = 100;
self.syn["utility"].element_list = ["text", "subMenu", "toggle", "category", "slider"];
self.syn["visions"][0] = ["None", "AC-130", "AC-130 Enhanced", "AC-130 inverted", "Aftermath", "Aftermath Glow", "Aftermath Post", "Apex", "Black & White", "Lobby", "Afterlife", "Zombies", "Zombies in Spaceland", "Zombies in Spaceland Black & White", "Zombies in Spaceland Ghost Path", "Zombies in Spaceland Basement", "Zombies in Spaceland Triton", "Default", "Default Night", "Night Vision", "Dronehive", "Endgame", "Europa", "Jackal", "Last Stand", "MP Map Select", "Missile Cam", "MP Intro", "MP Outro", "MP Nuke", "MP Nuke Aftermath", "Frontier", "Out of Bounds", "Nuke Flash", "Optic Wave", "RC8", "Thor Bright", "Thor", "Venom Gas"];
self.syn["visions"][1] = ["", "ac130", "ac130_enhanced_mp", "ac130_inverted", "aftermath", "aftermath_glow", "aftermath_post", "apex_mp", "black_bw", "cp_frontend", "cp_zmb_afterlife", "cp_zmb_alien", "cp_zmb", "cp_zmb_bw", "cp_zmb_ghost_path", "cp_zmb_int_basement", "cp_zmb_int_triton_main", "default", "default_night", "default_night_mp", "dronehive_mp", "end_game", "europa", "jackal_streak_mp", "last_stand_cp_zmb", "map_select_mp", "missilecam", "mpintro", "mpoutro", "mpnuke", "mpnuke_aftermath", "mp_frontier", "mp_out_of_bounds", "nuke_global_flash", "opticwave_mp", "rc8_mp", "thorbright_mp", "thor_mp", "venomgas_mp"];
self.syn["powerups"][0] = ["Nuke", "Max Ammo", "Instakill", "Double Money", "Carpenter", "Pack-a-Punch", "Fire Sale", "Infinite Ammo", "Infinite Grenades"];
self.syn["powerups"][1] = ["kill_50", "ammo_max", "instakill_30", "cash_2", "board_windows", "upgrade_weapons", "fire_30", "infinite_20", "grenade_30"];
self.syn["weapons"]["category"] = ["Assault Rifles", "Sub Machine Guns", "Light Machine Guns", "Sniper Rifles", "Shotguns", "Pistols", "Launchers", "Classic Weapons", "Melee Weapons", "Specialist Weapons", "Map Specific Weapons", "Other Weapons"];
// Weapon IDs Plus 1 Default Attachment
self.syn["weapons"]["assault_rifles"][0] = ["iw7_m4_zm", "iw7_sdfar_zm", "iw7_ar57_zm", "iw7_fmg_zm+akimbofmg_zm", "iw7_ake_zmr", "iw7_rvn_zm+meleervn", "iw7_vr_zm", "iw7_gauss_zm", "iw7_erad_zm"];
self.syn["weapons"]["sub_machine_guns"][0] = ["iw7_fhr_zm", "iw7_crb_zml+crblscope_camo", "iw7_ripper_zmr", "iw7_ump45_zml+ump45lscope_camo", "iw7_crdb_zm", "iw7_mp28_zm", "iw7_tacburst_zm+gltacburst"];
self.syn["weapons"]["light_machine_guns"][0] = ["iw7_sdflmg_zm", "iw7_mauler_zm", "iw7_lmg03_zm", "iw7_minilmg_zm", "iw7_unsalmg_zm"];
self.syn["weapons"]["sniper_rifles"][0] = ["iw7_kbs_zm", "iw7_m8_zm", "iw7_cheytac_zmr", "iw7_m1_zm", "iw7_ba50cal_zm", "iw7_longshot_zm+longshotlscope_zm"];
self.syn["weapons"]["shotguns"][0] = ["iw7_devastator_zm", "iw7_sonic_zmr", "iw7_sdfshotty_zm+sdfshottyscope_camo", "iw7_spas_zmr", "iw7_mod2187_zm"];
self.syn["weapons"]["pistols"][0] = ["iw7_emc_zm", "iw7_nrg_zm", "iw7_g18_zmr", "iw7_revolver_zm", "iw7_udm45_zm+udm45scope", "iw7_mag_zm"];
self.syn["weapons"]["launchers"][0] = ["iw7_lockon_zm", "iw7_glprox_zm", "iw7_chargeshot_zm+chargeshotscope_camo"];
self.syn["weapons"]["classics"][0] = ["iw7_m1c_zm", "iw7_g18c_zm", "iw7_ump45c_zm", "iw7_spasc_zm", "iw7_arclassic_zm", "iw7_cheytacc_zm"];
self.syn["weapons"]["melees"][0] = ["iw7_axe_zm"];
self.syn["weapons"]["specials"][0] = ["iw7_atomizer_mp", "iw7_penetrationrail_mp+penetrationrailscope", "iw7_steeldragon_mp", "iw7_claw_mp", "iw7_blackholegun_mp+blackholegunscope"];
// Weapon Names
self.syn["weapons"]["assault_rifles"][1] = ["NV4", "R3K", "KBAR-32", "Type-2", "Volk", "R-VN", "X-Con", "G-Rail", "Erad"];
self.syn["weapons"]["sub_machine_guns"][1] = ["FHR-40", "Karma-45", "RPR Evo", "HVR", "VPR", "Trencher", "Raijin-EMX"];
self.syn["weapons"]["light_machine_guns"][1] = ["R.A.W.", "Mauler", "Titan", "Auger", "Atlas"];
self.syn["weapons"]["sniper_rifles"][1] = ["KBS Longbow", "EBR-800", "Widowmaker", "DMR-1", "Trek-50", "Proteus"];
self.syn["weapons"]["shotguns"][1] = ["Reaver", "Banshee", "DCM-8", "Rack-9", "M.2187"];
self.syn["weapons"]["pistols"][1] = ["EMC", "Oni", "Kendall 44", "Hailstorm", "UDM", "Stallion 44"];
self.syn["weapons"]["launchers"][1] = ["Spartan SA3", "Howitzer", "P-Law"];
self.syn["weapons"]["classics"][1] = ["M1", "Hornet", "MacTav-45", "S-Ravage", "OSA", "TF-141"];
self.syn["weapons"]["melees"][1] = ["Axe"];
self.syn["weapons"]["specials"][1] = ["Eraser", "Ballista EM3", "Steel Dragon", "Claw", "Gravity Vortex Gun"];
// Weapon Pack-a-Punch Prefixes
self.syn["weapons"]["assault_rifles"][2] = ["m4", "sdfar", "ar57", "fmg", "ake", "rvn", "vr", "gauss", "erad"];
self.syn["weapons"]["sub_machine_guns"][2] = ["fhr", "crb", "ripper", "ump", "crdb", "mp28", "tacburst"];
self.syn["weapons"]["light_machine_guns"][2] = ["sdflmg", "mauler", "lmg03", "minilmg", "unsalmg"];
self.syn["weapons"]["sniper_rifles"][2] = ["kbs", "m8", "cheytac", "m1", "ba50cal", "longshot"];
self.syn["weapons"]["shotguns"][2] = ["dev", "sonic", "sdfs", "spas", "mod2187"];
self.syn["weapons"]["pistols"][2] = ["emc", "nrg", "g18", "revolver", "udm", "mag"];
self.syn["weapons"]["launchers"][2] = ["lockon", "gl", "cs"];
self.syn["weapons"]["classics"][2] = ["m1c", "g18c", "umpc", "spasc", "arc", "cheytacc"];
self.syn["weapons"]["melees"][2] = [""];
self.syn["weapons"]["specials"][2] = ["", "", "", "", "", "", ""];
// Weapon Additional Default Attachments
self.syn["weapons"]["assault_rifles"][3] = ["", "", "", "+fmgscope_camo", "", "+rvnscope", "+vrscope", "+gaussscope", "+eradscope_camo"];
self.syn["weapons"]["sub_machine_guns"][3] = ["", "", "+ripperrscope_zm", "", "", "", "+tacburstscope"];
self.syn["weapons"]["light_machine_guns"][3] = ["", "", "+lmg03scope_camo", "+minilmgscope", ""];
self.syn["weapons"]["sniper_rifles"][3] = ["+kbsscope_zm_camo", "+m8scope_zm_camo", "+cheytacrscope_camo", "+m1scope_camo", "+ba50calscope", ""];
self.syn["weapons"]["shotguns"][3] = ["", "+sonicrscope_camo", "", "", "+mod2187scope"];
self.syn["weapons"]["pistols"][3] = ["", "", "", "", "", ""];
self.syn["weapons"]["launchers"][3] = ["+lockonscope_camo", "+glproxscope_camo", ""];
self.syn["weapons"]["classics"][3] = ["", "", "", "", "+glarclassic", "+cheytacscope_camo"];
self.syn["weapons"]["melees"][3] = [""];
self.syn["weapons"]["specials"][3] = ["", "", "", "", "", "", ""];
// Spaceland Weapons
self.syn["weapons"]["cp_zmb"][0] = ["iw7_forgefreeze_zm+forgefreezealtfire", "iw7_dischord_zm", "iw7_facemelter_zm", "iw7_headcutter_zm", "iw7_shredder_zm", "iw7_spaceland_wmd"];
self.syn["weapons"]["cp_zmb"][1] = ["Forge Freeze", "Dischord", "Face Melter", "Head Cutter", "Shredder", "NX 2.0"];
self.syn["weapons"]["cp_zmb"][2] = ["", "", "", "", "", ""];
self.syn["weapons"]["cp_zmb"][3] = ["", "", "", "", "", ""];
// Rave in the Redwoods Weapons
self.syn["weapons"]["cp_rave"][0] = ["iw7_golf_club_mp", "iw7_spiked_bat_mp", "iw7_two_headed_axe_mp", "iw7_machete_mp", "iw7_harpoon1_zm", "iw7_harpoon2_zm", "iw7_harpoon3_zm+akimbo", "iw7_harpoon4_zm"];
self.syn["weapons"]["cp_rave"][1] = ["Golf Club", "Spiked Bat", "2 Headed Axe", "Machete", "Harpoon Gun 1", "Harpoon Gun 2", "Harpoon Gun 3", "Harpoon Gun 4"];
self.syn["weapons"]["cp_rave"][2] = ["", "", "", "", "", "", "", ""];
self.syn["weapons"]["cp_rave"][3] = ["", "", "", "", "", "", "", ""];
// Shaolin Shuffle Weapons
self.syn["weapons"]["cp_disco"][0] = ["iw7_katana_zm", "iw7_nunchucks_zm"];
self.syn["weapons"]["cp_disco"][1] = ["Katana", "Nunchucks"];
self.syn["weapons"]["cp_disco"][2] = ["", "", "", "", "", ""];
self.syn["weapons"]["cp_disco"][3] = ["", "", "", "", "", ""];
// Attack of the Radioactive Thing Weapons
self.syn["weapons"]["cp_town"][0] = ["iw7_cutie_zm"];
self.syn["weapons"]["cp_town"][1] = ["Modular Atomic Disintegrator"];
self.syn["weapons"]["cp_town"][2] = [""];
self.syn["weapons"]["cp_town"][3] = [""];
// Beast from Beyond Weapons
self.syn["weapons"]["cp_final"][0] = ["iw7_venomx_zm"];
self.syn["weapons"]["cp_final"][1] = ["Venom-X"];
self.syn["weapons"]["cp_final"][2] = [""];
self.syn["weapons"]["cp_final"][3] = [""];
// Misc Weapons
self.syn["weapons"]["other"][0] = ["iw7_fists_zm", "iw7_entangler_zm"];
self.syn["weapons"]["other"][1] = ["Fists", "Entangler"];
self.syn["weapons"]["other"][2] = ["", ""];
self.syn["weapons"]["other"][3] = ["", ""];
// Melee Weapons
self.syn["melee"]["cp_town"][0] = ["iw7_knife_zm_cleaver", "iw7_knife_zm_crowbar"];
self.syn["melee"]["cp_town"][1] = ["Cleaver", "Crowbar"];
// PaP Camos
self.syn["camos"]["cp_zmb"] = ["+camo1", "+camo4"];
self.syn["camos"]["cp_rave"] = ["+camo204", "+camo205"];
self.syn["camos"]["cp_disco"] = ["+camo211", "+camo212"];
self.syn["camos"]["cp_town"] = ["+camo92", "+camo93"];
self.syn["camos"]["cp_final"] = ["+camo32", "+camo34"];
// Spaceland Teleport Names
self.syn["Main Teleports"]["cp_zmb"][0] = ["PaP Room", "Spawn", "Main Portal", "Afterlife Arcade"];
self.syn["Map Setup Teleports"]["cp_zmb"][0] = ["Spawn Power", "Journey Power", "Kepler Power", "Polar Peak Power", "Arcade Power", "Journey Teleporter", "Kepler Teleporter", "Polar Peak Teleporter", "Arcade Teleporter"];
self.syn["Mystery Wheel Teleports"]["cp_zmb"][0] = ["Journey 1", "Journey 2", "Journey 3", "Astrocade", "Polar Peak", "Kepler 1", "Kepler 2", "Kepler 3"];
self.syn["Main Quest Teleports"]["cp_zmb"][0] = ["Calculator 1", "Calculator 2", "Calculator 3", "Boom Box 1", "Boom Box 2", "Boom Box 3", "Umbrella 1", "Umbrella 2", "Umbrella 3", "DJ Booth 1", "DJ Booth 2", "DJ Booth 3"];
self.syn["Extra Teleports"]["cp_zmb"][0] = ["N31L's Head", "N31L Auxiliary Battery 1", "N31L Auxiliary Battery 2", "N31L Auxiliary Battery 3", "N31L Auxiliary Battery 4", "N31L Auxiliary Battery 5", "N31L Auxiliary Battery 6", "N31L Floppy Disk 1", "N31L Floppy Disk 2", "N31L Floppy Disk 3", "N31L Floppy Disk 4", "N31L Floppy Disk 5"];
// Spaceland Teleport Origins
self.syn["Main Teleports"]["cp_zmb"][1] = [(-10245, 740, -1630), (465, 3680, 0), (650, 970, 0), (-9885, -70, -1795)];
self.syn["Map Setup Teleports"]["cp_zmb"][1] = [(1075, 3720, 0), (4695, 1250, 115), (-1365, -65, 380), (-695, -2795, 560), (2390, -1825, 115), (3640, 1165, 55), (-2150, -35, 225), (-1490, -2650, 360), (2285, -1615, 115)];
self.syn["Mystery Wheel Teleports"]["cp_zmb"][1] = [(1470, 1045, 0), (4065, 2135, 55), (3690, 420, 55), (2575, -865, 240), (955, -2260, 440), (-1950, 1830, 365), (-1900, -530, 380), (-845, -1492, 360)];
self.syn["Main Quest Teleports"]["cp_zmb"][1] = [(540, 1060, 0), (-2520, 805, 365), (2960, -850, 240), (595, 2125, -65), (-1415, -175, 380), (1375, -590, -195), (155, -505, 0), (-1890, -3040, 360), (3640, 2335, 115), (-1000, 1495, 225), (-2710, -2480, 360), (2926, 1305, 0)];
self.syn["Extra Teleports"]["cp_zmb"][1] = [(475, -265, 0), (-1800, -2825, 360), (-535, -3265, 390), (-757, -2415, 560), (-2775, 1565, 365), (-3045, 730, 365), (-1230, 1625, 225), (000, 000, 000), (000, 000, 000), (000, 000, 000), (000, 000, 000), (000, 000, 000)];
// Spaceland Teleport Angles
self.syn["Main Teleports"]["cp_zmb"][2] = [90, -90, -90];
self.syn["Map Setup Teleports"]["cp_zmb"][2] = [-90, 0, -90, 90, 180, 0, -45, 20, -90];
self.syn["Mystery Wheel Teleports"]["cp_zmb"][2] = [180, 90, 0, -90, 0, -45, -90, 0];
self.syn["Main Quest Teleports"]["cp_zmb"][2] = [0, 0, 90, 45, 0, 90, 160, 90, -90, 0, -90, 0];
self.syn["Extra Teleports"]["cp_zmb"][2] = [-90, 180, -90, 0, 0, 0, 90, 0, 0, 0, 0, 0];
// Rave in the Redwoods Teleport Names
self.syn["Main Teleports"]["cp_rave"][0] = ["PaP Room", "Spawn", "Cellar", "Kevin's Cabin", "Afterlife Arcade"];
self.syn["Mystery Wheel Teleports"]["cp_rave"][0] = ["Rave Stage", "Dock", "Main Fire", "Mess Hall", "Cellar", "Bear Lodge", "Camp Wolf"];
// Rave in the Redwoods Teleport Origins
self.syn["Main Teleports"]["cp_rave"][1] = [(-10245, 750, -1630), (-940, -1620, 225), (-395, -1815, 55), (-6035, 4890, 120), (-9885, -70, -1795)];
self.syn["Map Setup Teleports"]["cp_rave"][1] = [(000, 000, 000), (000, 000, 000)];
self.syn["Mystery Wheel Teleports"]["cp_rave"][1] = [(2205, -1390, -15), (-2900, 2275, -150), (145, 1125, 50), (-3355, -3365, 150), (-560, -1895, 55), (-950, -1150, 390), (-2585, -4575, 255)];
self.syn["Main Quest Teleports"]["cp_rave"][1] = [(000, 000, 000), (000, 000, 000)];
self.syn["Extra Teleports"]["cp_rave"][1] = [(000, 000, 000), (000, 000, 000)];
// Rave in the Redwoods Teleport Angles
self.syn["Main Teleports"]["cp_rave"][2] = [90, 165, 130, 100, 0];
self.syn["Map Setup Teleports"]["cp_rave"][2] = [0, 0];
self.syn["Mystery Wheel Teleports"]["cp_rave"][2] = [100, 140, 90, -50, -180, -90, -75];
self.syn["Main Quest Teleports"]["cp_rave"][2] = [0, 0];
self.syn["Extra Teleports"]["cp_rave"][2] = [0, 0];
// Shaolin Shuffle Teleport Names
self.syn["Main Teleports"]["cp_disco"][0] = ["PaP Room", "Spawn", "Sewer", "Afterlife Arcade"];
self.syn["Mystery Wheel Teleports"]["cp_disco"][0] = ["Alleyway", "Rooftop", "Garden", "Disco Roof", "Subway Station 1", "Subway Station 2", "Disco"];
self.syn["Extra Teleports"]["cp_disco"][0] = ["Pink Cat Flier 1", "Pink Cat Flier 2", "Pink Cat Flier 3", "Pink Cat Flier 4", "Token"];
// Shaolin Shuffle Teleport Origins
self.syn["Main Teleports"]["cp_disco"][1] = [(-10245, 750, -1630), (580, 3025, 285), (-875, 1820, 180), (-9885, -35, -1795)];
self.syn["Map Setup Teleports"]["cp_disco"][1] = [(-1915, 4620, 750), (1590, 1290, 750), (-810, 765, 925), (-1110, 3435, 1120), (-1075, 2795, 260)];
self.syn["Mystery Wheel Teleports"]["cp_disco"][1] = [(105, 1300, 750), (15, 665, 935), (-3515, 1165, 975), (-2100, 2795, 1175), (375, 2065, 525), (-2450, 3610, 500), (-1185, 3735, 750)];
self.syn["Main Quest Teleports"]["cp_disco"][1] = [(000, 000, 000), (000, 000, 000)];
self.syn["Extra Teleports"]["cp_disco"][1] = [(000, 000, 000), (000, 000, 000)];
// Shaolin Shuffle Teleport Angles
self.syn["Main Teleports"]["cp_disco"][2] = [90, -145, 90, 0];
self.syn["Map Setup Teleports"]["cp_disco"][2] = [-180, -30, 90, 0, 180];
self.syn["Mystery Wheel Teleports"]["cp_disco"][2] = [-90, 90, -180, 180, -180, 90. -20];
self.syn["Main Quest Teleports"]["cp_disco"][2] = [0, 0];
self.syn["Extra Teleports"]["cp_disco"][2] = [0, 0];
// Attack of the Radioactive Thing Teleport Names
self.syn["Main Teleports"]["cp_town"][0] = ["PaP Room", "Spawn", "Studio", "Afterlife Arcade"];
self.syn["Map Setup Teleports"]["cp_town"][0] = ["Power Handle", "Power Station", "Telepad 1", "Telepad 2", "Telepad 3", "Telepad 4"];
self.syn["Mystery Wheel Teleports"]["cp_town"][0] = ["Power Station", "Beach Mart", "RV Park", "Pool", "Studio", "Trail"];
self.syn["Main Quest Teleports"]["cp_town"][0] = ["Elvira's Book", "Zombie Head", "Zombie Torso", "Zombie Arm 1", "Zombie Arm 2", "Zombie Leg"];
self.syn["Extra Teleports"]["cp_town"][0] = ["Cleaver", "Crowbar", "M.A.D. Attachment 1", "M.A.D. Attachment 2", "M.A.D. Attachment 3"];
// Attack of the Radioactive Thing Teleport Origins
self.syn["Main Teleports"]["cp_town"][1] = [(-10245, 750, -1630), (3939, -4515, 15), (235, -2555, 520), (-9885, -70, -1795)];
self.syn["Map Setup Teleports"]["cp_town"][1] = [(3205, 1815, -105), (6440, -2770, 105), (5375, -2800, 195), (4795, -180, 330), (490, 4115, 395), (-937, -2695, 520)];
self.syn["Mystery Wheel Teleports"]["cp_town"][1] = [(6440, -1955, 105), (6210, 1075, 330), (-790, 3840, 400), (-255, -590, 410), (-480, -3410, 515), (340, -4710, 255)];
self.syn["Main Quest Teleports"]["cp_town"][1] = [(5405, -4720, -15), (-295, 3665, 425), (6245, -550, 335), (3205, 1815, -105), (470, 2200, 395), (-1175, -4219, 335)];
self.syn["Extra Teleports"]["cp_town"][1] = [(6015, -820, 335), (1270, -130, 475), (-1055, 3505, 400), (4260, 1620, 335), (-130, -3045, 520)];
// Attack of the Radioactive Thing Teleport Angles
self.syn["Main Teleports"]["cp_town"][2] = [90, 60, 0, 0];
self.syn["Map Setup Teleports"]["cp_town"][2] = [65, 20, -160, -90, 100, -180];
self.syn["Mystery Wheel Teleports"]["cp_town"][2] = [-65, 0, 150, 180, -90, -80];
self.syn["Main Quest Teleports"]["cp_town"][2] = [45, -170, 75, 65, 30, 80];
self.syn["Extra Teleports"]["cp_town"][2] = [-85, -30, 100, -180, 90];
// Beast from Beyond Teleport Names
self.syn["Main Teleports"]["cp_final"][0] = ["PaP Room", "Spawn", "Control Room", "Theatre", "Afterlife Arcade"];
self.syn["Map Setup Teleports"]["cp_final"][0] = ["N31L's Head", "N31L", "Open Theatre Portal"];
self.syn["Mystery Wheel Teleports"]["cp_final"][0] = ["Spawn", "Water Room", "Main Room", "Hallway", "Storage Room", "Theatre", "Outside"];
self.syn["Extra Teleports"]["cp_final"][0] = ["PaP Bridge Part 1", "PaP Bridge Part 2", "PaP Bridge Part 3", "PaP Bridge", "Mephistopheles Arena"];
// Beast from Beyond Teleport Origins
self.syn["Main Teleports"]["cp_final"][1] = [(5135, -5180, 285), (-760, 2920, 90), (730, 5065, 90), (5515, -4515, -20), (2080, -4520, 330)];
self.syn["Map Setup Teleports"]["cp_final"][1] = [(-1210, 5040, -70), (45, 3840, 25), (1920, 3470, 15)];
self.syn["Mystery Wheel Teleports"]["cp_final"][1] = [(-90, 2880, 25), (-1215, 4755, -205), (645, 5710, 60), (1510, 4010, 15), (1470, 3565, -175), (5700, -4050, -70), (2185, 6275, 95)];
self.syn["Main Quest Teleports"]["cp_final"][1] = [(000, 000, 000), (000, 000, 000)];
self.syn["Extra Teleports"]["cp_final"][1] = [(-855, 5435, -70), (1755, 3110, -290), (4990, -6835, 50), (3465, 6640, 165), (-13300, -325, -105)];
// Beast from Beyond Teleport Angles
self.syn["Main Teleports"]["cp_final"][2] = [90, 20, -45, 90, 0];
self.syn["Map Setup Teleports"]["cp_final"][2] = [-155, 90, 90];
self.syn["Mystery Wheel Teleports"]["cp_final"][2] = [-90, -130, 180, 90, 60, 0, -50];
self.syn["Main Quest Teleports"]["cp_final"][2] = [0, 0];
self.syn["Extra Teleports"]["cp_final"][2] = [-55, 60, -100, 45, 0];
// Spaceland Zombies
self.syn["zombies"]["cp_zmb"][0] = ["generic_zombie", "zombie_clown", "zombie_cop", "zombie_brute", "zombie_ghost", "the_hoff"];
self.syn["zombies"]["cp_zmb"][1] = ["Normal Zombie", "Clown", "Cop", "Brute", "Ghost", "David Hasselhoff"];
self.syn["zombies"]["cp_zmb"][2] = ["axis", "axis", "axis", "axis", "axis", "allies"];
// Rave in the Redwoods Zombies
self.syn["zombies"]["cp_rave"][0] = ["generic_zombie", "lumberjack", "zombie_sasquatch", "slasher", "superslasher"];
self.syn["zombies"]["cp_rave"][1] = ["Normal Zombie", "Lumberjack", "Sasquatch", "Slasher", "Super Slasher"];
self.syn["zombies"]["cp_rave"][2] = ["axis", "axis", "axis", "axis", "axis"];
// Shaolin Shuffle Zombies
self.syn["zombies"]["cp_disco"][0] = ["generic_zombie", "karatemaster", "skater", "ratking", "pamgrier"];
self.syn["zombies"]["cp_disco"][1] = ["Normal Zombie", "Karate Zombie", "Skater", "Rat King", "Pam Grier"];
self.syn["zombies"]["cp_disco"][2] = ["axis", "axis", "axis", "axis", "allies"];
// Attack of the Radioactive Thing Zombies
self.syn["zombies"]["cp_town"][0] = ["generic_zombie", "crab_mini", "crab_brute", "crab_boss", "elvira"];
self.syn["zombies"]["cp_town"][1] = ["Normal Zombie", "Crog", "Crog Brute", "Crog Boss", "Elvira"];
self.syn["zombies"]["cp_town"][2] = ["axis", "axis", "axis", "axis", "allies"];
// Beast from Beyond Zombies
self.syn["zombies"]["cp_final"][0] = ["generic_zombie", "alien_goon", "alien_phantom", "alien_rhino", "dlc4_boss"];
self.syn["zombies"]["cp_final"][1] = ["Normal Zombie", "Cryptid", "Phantom", "Rhino", "Mephistopheles"];
self.syn["zombies"]["cp_final"][2] = ["axis", "axis", "axis", "axis", "axis"];
// Common Perks
self.syn["perks"][0] = ["perk_machine_revive", "perk_machine_tough", "perk_machine_rat_a_tat", "perk_machine_flash", "perk_machine_run", "perk_machine_boom", "perk_machine_more", "perk_machine_zap", "perk_machine_fwoosh"];
self.syn["perks"][1] = ["Up N' Atoms", "Tuff Nuff", "Bang Bangs", "Quickies", "Racin' Stripes", "Bombstoppers", "Mule Munchies", "Blue Bolts", "Trail Blazers"];
// Zombies in Spaceland Perk
self.syn["perks"]["cp_zmb"][0] = ["perk_machine_smack"];
self.syn["perks"]["cp_zmb"][1] = ["Slappy Taffy"];
// Shaolin Shuffle Extra Perk
self.syn["perks"]["cp_disco"][0] = ["perk_machine_deadeye"];
self.syn["perks"]["cp_disco"][1] = ["Deadeye Dewdrops"];
// Attack of the Radioactive Thing and Beast from Beyond Extra Perks
self.syn["perks"]["cp_town"][0] = ["perk_machine_smack", "perk_machine_deadeye", "perk_machine_change"];
self.syn["perks"]["cp_town"][1] = ["Slappy Taffy", "Deadeye Dewdrops", "Change Chews"];
self.syn["perks"]["cp_final"][0] = ["perk_machine_smack", "perk_machine_deadeye", "perk_machine_change"];
self.syn["perks"]["cp_final"][1] = ["Slappy Taffy", "Deadeye Dewdrops", "Change Chews"];
self.syn["maps"]["cp_zmb"] = "Zombies in Spaceland";
self.syn["maps"]["cp_rave"] = "Rave in the Redwoods";
self.syn["maps"]["cp_disco"] = "Shaolin Shuffle";
self.syn["maps"]["cp_town"] = "Attack of the Radioactive Thing";
self.syn["maps"]["cp_final"] = "The Beast from Beyond";
self.syn["outline_colors"] = ["White", "Red", "Green", "Aqua", "Orange", "Yellow"];
self.syn["utility"].interaction = true;
self.syn["utility"].color[0] = (0.752941176, 0.752941176, 0.752941176); // Selected Slider Thumb and Category Text
self.syn["utility"].color[1] = (0.074509804, 0.070588235, 0.078431373); // Title Background and Unselected Slider Background
self.syn["utility"].color[2] = (0.074509804, 0.070588235, 0.078431373); // Main Background, Selected Slider Background
self.syn["utility"].color[3] = (0.243137255, 0.22745098, 0.247058824); // Cursor, Scrollbar Background, Unselected Slider Thumb, and Unchecked Toggle
self.syn["utility"].color[4] = (1, 1, 1); // Text Color
self.syn["utility"].color[5] = "rainbow"; // Outline and Separators
self.cursor = [];
self.previous = [];
self set_menu("Synergy");
self set_title(self get_menu());
}
initial_monitor() {
self endOn("disconnect");
level endOn("game_ended");
while(true) {
if(self really_alive()) {
if(!self in_menu()) {
if(self adsButtonPressed() && self meleeButtonPressed()) {
if(return_toggle(self.syn["utility"].interaction)) {
self playSoundToPlayer("entrance_sign_power_on_build", self);
}
close_controls_menu();
self open_menu();
wait .15;
}
} else {
menu = self get_menu();
cursor = self get_cursor();
if(self meleeButtonPressed()) {
if(return_toggle(self.syn["utility"].interaction)) {
self playSoundToPlayer("zmb_powerup_activate", self);
}
if(isDefined(self.previous[(self.previous.size - 1)])) {
self new_menu(self.previous[menu]);
} else {
self close_menu();
}
wait .75; // Knife Cooldown
}
else if(self adsButtonPressed() && !self attackButtonPressed() || self attackButtonPressed() && !self adsButtonPressed()) {
if(isDefined(self.structure) && self.structure.size >= 2) {
if(return_toggle(self.syn["utility"].interaction)) {
self playSoundToPlayer("zmb_powerup_activate", self);
}
scrolling = self attackButtonPressed() ? 1 : -1;
self set_cursor((cursor + scrolling));
self update_scrolling(scrolling);
}
wait .25; // Scroll Cooldown
}
else if(self fragButtonPressed() && !self secondaryOffhandButtonPressed() || self secondaryOffhandButtonPressed() && !self fragButtonPressed()) {
if(return_toggle(self.structure[cursor].slider)) {
if(return_toggle(self.syn["utility"].interaction)) {
self playSoundToPlayer("zmb_wheel_wpn_acquired", self);
}
scrolling = self secondaryOffhandButtonPressed() ? 1 : -1;
self set_slider(scrolling);
}
wait .07;
}
else if(self useButtonPressed()) {
if(isDefined(self.structure[cursor].function)) {
if(return_toggle(self.syn["utility"].interaction)) {
self playSoundToPlayer("part_pickup", self);
}
if(return_toggle(self.structure[cursor].slider)) {
self thread execute_function(self.structure[cursor].function, isDefined(self.structure[cursor].array) ? self.structure[cursor].array[self.slider[menu + "_" + cursor]] :self.slider[menu + "_" + cursor], self.structure[cursor].argument_1, self.structure[cursor].argument_2, self.structure[cursor].argument_3);
} else {
self thread execute_function(self.structure[cursor].function, self.structure[cursor].argument_1, self.structure[cursor].argument_2, self.structure[cursor].argument_3);
}
if(isDefined(self.structure[cursor].toggle)) {
self update_menu(menu, cursor);
}
}
wait .2;
}
}
}
wait .05;
}
}
open_menu(menu) {
if(!isDefined(menu)) {
menu = isDefined(self get_menu()) && self get_menu() != "Synergy" ? self get_menu() : "Synergy";
}
if(!isDefined(self.syn["hud"])) {
self.syn["hud"] = [];
}
self.syn["hud"]["title"][0] = self create_text(self get_title(), self.syn["utility"].font, self.syn["utility"].font_scale, "left", "CENTER", (self.syn["utility"].x_offset + 86), (self.syn["utility"].y_offset + 2), self.syn["utility"].color[4], 1, 10); // Title Text
self.syn["hud"]["title"][1] = self create_text("______", self.syn["utility"].font, self.syn["utility"].font_scale * 1.5, "left", "CENTER", (self.syn["utility"].x_offset + 4), (self.syn["utility"].y_offset - 4), self.syn["utility"].color[5], 1, 10); // Title Separator
self.syn["hud"]["title"][2] = self create_text("______", self.syn["utility"].font, self.syn["utility"].font_scale * 1.5, "left", "CENTER", (self.syn["utility"].x_offset + 157), (self.syn["utility"].y_offset - 4), self.syn["utility"].color[5], 1, 10); // Title Separator
self.syn["hud"]["background"][0] = self create_shader("white", "left", "CENTER", self.syn["utility"].x_offset - 1, (self.syn["utility"].y_offset - 1), 202, 30, self.syn["utility"].color[5], 1, 1); // Outline
self.syn["hud"]["background"][1] = self create_shader("white", "left", "CENTER", (self.syn["utility"].x_offset), self.syn["utility"].y_offset, 200, 28, self.syn["utility"].color[1], 1, 2); // Main Background
self.syn["hud"]["foreground"][1] = self create_shader("white", "left", "CENTER", (self.syn["utility"].x_offset), (self.syn["utility"].y_offset + 14), 194, 14, self.syn["utility"].color[3], 1, 4); // Cursor
self.syn["hud"]["foreground"][2] = self create_shader("white", "left", "CENTER", (self.syn["utility"].x_offset + 195), (self.syn["utility"].y_offset + 14), 4, 14, self.syn["utility"].color[3], 1, 4); // Scrollbar Background
self set_menu(menu);
self create_option();
self set_state();
}
close_menu() {
self clear_option();
self clear_all(self.syn["hud"]);
self set_state();
}
create_title(title) {
self.syn["hud"]["title"][0] set_text(isDefined(title) ? title : self get_title());
}
create_option() {
self clear_option();
self menu_index();
if(!isDefined(self.structure) || !self.structure.size) {
self add_option("Currently No Options To Display");
}
if(!isDefined(self get_cursor())) {
self set_cursor(0);
}
start = 0;
if((self get_cursor() > int(((self.syn["utility"].option_limit - 1) / 2))) && (self get_cursor() < (self.structure.size - int(((self.syn["utility"].option_limit + 1) / 2)))) && (self.structure.size > self.syn["utility"].option_limit)) {
start = (self get_cursor() - int((self.syn["utility"].option_limit - 1) / 2));
}
if((self get_cursor() > (self.structure.size - (int(((self.syn["utility"].option_limit + 1) / 2)) + 1))) && (self.structure.size > self.syn["utility"].option_limit)) {
start = (self.structure.size - self.syn["utility"].option_limit);
}
self create_title();
if(isDefined(self.structure) && self.structure.size) {
limit = min(self.structure.size, self.syn["utility"].option_limit);
for(i = 0; i < limit; i++) {
index = (i + start);
cursor = (self get_cursor() == index);
color[0] = cursor ? self.syn["utility"].color[0] : self.syn["utility"].color[4];
color[1] = return_toggle(self.structure[index].toggle) ? cursor ? self.syn["utility"].color[0] : self.syn["utility"].color[4] : cursor ? self.syn["utility"].color[2] : self.syn["utility"].color[3];
if(isDefined(self.structure[index].function) && self.structure[index].function == ::new_menu) {
self.syn["hud"]["subMenu"][index] = self create_text(">", self.syn["utility"].font, self.syn["utility"].font_scale, "left", "CENTER", (self.syn["utility"].x_offset + 185), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 16)), self.syn["utility"].color[4], 1, 10);
}
if(isDefined(self.structure[index].toggle)) {
self.syn["hud"]["toggle"][1][index] = self create_shader("white", "left", "CENTER", (self.syn["utility"].x_offset + 4), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 17)), 8, 8, color[1], 1, 10); // Toggle Box
}
for(x = 0; x < 15; x++) {
if(x != self get_cursor()) {
if(isDefined(self.syn["hud"]["arrow"][0][x])) {
self.syn["hud"]["arrow"][0][x] destroy();
self.syn["hud"]["arrow"][1][x] destroy();
}
}
}
if(return_toggle(self.structure[index].slider)) {
if(isDefined(self.structure[index].array)) {
self.syn["hud"]["slider"][0][index] = self create_text(self.structure[index].array[self.slider[self get_menu() + "_" + index]], self.syn["utility"].font, self.syn["utility"].font_scale, "left", "CENTER", (self.syn["utility"].x_offset + 155), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 16)), color[0], 1, 10);
} else {
if(cursor) {
self.syn["hud"]["slider"][0][index] = self create_text(self.slider[self get_menu() + "_" + index], self.syn["utility"].font, (self.syn["utility"].font_scale - 0.1), "left", "CENTER", (self.syn["utility"].x_offset + 155), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 17)), self.syn["utility"].color[4], 1, 10);
self.syn["hud"]["arrow"][0][self get_cursor()] = self create_text("<", self.syn["utility"].font, self.syn["utility"].font_scale, "left", "CENTER", (self.syn["utility"].x_offset + 129), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 16)), self.syn["utility"].color[4], 1, 10); // Slider Arrow
self.syn["hud"]["arrow"][1][self get_cursor()] = self create_text(">", self.syn["utility"].font, self.syn["utility"].font_scale, "left", "CENTER", (self.syn["utility"].x_offset + 185), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 16)), self.syn["utility"].color[4], 1, 10); // Slider Arrow
} else {
self.syn["hud"]["arrow"][0][index] destroy();
self.syn["hud"]["arrow"][1][index] destroy();
}
self.syn["hud"]["slider"][1][index] = self create_shader("white", "left", "CENTER", (self.syn["utility"].x_offset + 135), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 17)), 50, 8, cursor ? self.syn["utility"].color[2] : self.syn["utility"].color[1], 1, 8); // Slider Background
self.syn["hud"]["slider"][2][index] = self create_shader("white", "left", "CENTER", (self.syn["utility"].x_offset + 149), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 17)), 8, 8, cursor ? self.syn["utility"].color[0] : self.syn["utility"].color[3], 1, 9); // Slider Thumb
}
self set_slider(undefined, index);
}
if(return_toggle(self.structure[index].category)) {
self.syn["hud"]["category"][0][index] = self create_text(self.structure[index].text, self.syn["utility"].font, self.syn["utility"].font_scale, "left", "CENTER", (self.syn["utility"].x_offset + 88), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 17)), self.syn["utility"].color[0], 1, 10);
self.syn["hud"]["category"][1][index] = self create_text("______", self.syn["utility"].font, self.syn["utility"].font_scale * 1.5, "left", "CENTER", (self.syn["utility"].x_offset + 4), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 11)), self.syn["utility"].color[5], 1, 10); // Category Separator
self.syn["hud"]["category"][2][index] = self create_text("______", self.syn["utility"].font, self.syn["utility"].font_scale * 1.5, "left", "CENTER", (self.syn["utility"].x_offset + 157), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 11)), self.syn["utility"].color[5], 1, 10); // Category Separator
}
else {
if(return_toggle(self.shader_option[self get_menu()])) {
self.syn["hud"]["text"][index] = self create_shader(isDefined(self.structure[index].text) ? self.structure[index].text : "white", "left", "CENTER", (self.syn["utility"].x_offset + ((i * 20) - ((limit * 10) - 110))), (self.syn["utility"].y_offset + 27), isDefined(self.structure[index].argument_2) ? self.structure[index].argument_2 : 18, isDefined(self.structure[index].argument_3) ? self.structure[index].argument_3 : 18, isDefined(self.structure[index].argument_1) ? self.structure[index].argument_1 : (1, 1, 1), cursor ? 1 : 0.2, 10);
} else {
self.syn["hud"]["text"][index] = self create_text(return_toggle(self.structure[index].slider) ? self.structure[index].text + ":" : self.structure[index].text, self.syn["utility"].font, self.syn["utility"].font_scale, "left", "CENTER", isDefined(self.structure[index].toggle) ? (self.syn["utility"].x_offset + 15) : (self.syn["utility"].x_offset + 4), (self.syn["utility"].y_offset + ((i * self.syn["utility"].option_spacing) + 16)), color[0], 1, 10);
}
}
}
if(!isDefined(self.syn["hud"]["text"][self get_cursor()])) {
self set_cursor((self.structure.size - 1));
}
}
self update_resize();
}
update_scrolling(scrolling) {
if(return_toggle(self.structure[self get_cursor()].category)) {
self set_cursor((self get_cursor() + scrolling));
return self update_scrolling(scrolling);
}
if((self.structure.size > self.syn["utility"].option_limit) || (self get_cursor() >= 0) || (self get_cursor() <= 0)) {
if((self get_cursor() >= self.structure.size) || (self get_cursor() < 0)) {
self set_cursor((self get_cursor() >= self.structure.size) ? 0 : (self.structure.size - 1));
}
self create_option();
}
self update_resize();
}
update_resize() {
limit = min(self.structure.size, self.syn["utility"].option_limit);
height = int((limit * self.syn["utility"].option_spacing));
adjust = (self.structure.size > self.syn["utility"].option_limit) ? int(((94 / self.structure.size) * limit)) : height;
position = (self.structure.size - 1) / (height - adjust);
if(!return_toggle(self.shader_option[self get_menu()])) {
if(!isDefined(self.syn["hud"]["foreground"][1])) {
self.syn["hud"]["foreground"][1] = self create_shader("white", "left", "CENTER", (self.syn["utility"].x_offset), (self.syn["utility"].y_offset + 14), 194, 14, self.syn["utility"].color[3], 1, 4); // Cursor
}
if(!isDefined(self.syn["hud"]["foreground"][2])) {
self.syn["hud"]["foreground"][2] = self create_shader("white", "left", "CENTER", (self.syn["utility"].x_offset + 195), (self.syn["utility"].y_offset + 14), 4, 14, self.syn["utility"].color[3], 1, 4); // Scrollbar
}
}
self.syn["hud"]["background"][0] set_shader(self.syn["hud"]["background"][0].shader, self.syn["hud"]["background"][0].width, return_toggle(self.shader_option[self get_menu()]) ? 42 : (height + 16));
self.syn["hud"]["background"][1] set_shader(self.syn["hud"]["background"][1].shader, self.syn["hud"]["background"][1].width, return_toggle(self.shader_option[self get_menu()]) ? 40 : (height + 14));
self.syn["hud"]["foreground"][0] set_shader(self.syn["hud"]["foreground"][0].shader, self.syn["hud"]["foreground"][0].width, return_toggle(self.shader_option[self get_menu()]) ? 26 : height);
self.syn["hud"]["foreground"][2] set_shader(self.syn["hud"]["foreground"][2].shader, self.syn["hud"]["foreground"][2].width, adjust);
if(isDefined(self.syn["hud"]["foreground"][1])) {
self.syn["hud"]["foreground"][1].y = (self.syn["hud"]["text"][self get_cursor()].y - 2);
}
self.syn["hud"]["foreground"][2].y = (self.syn["utility"].y_offset + 14);
if(self.structure.size > self.syn["utility"].option_limit) {
self.syn["hud"]["foreground"][2].y += (self get_cursor() / position);
}
}
update_menu(menu, cursor) {
if(isDefined(menu) && !isDefined(cursor) || !isDefined(menu) && isDefined(cursor)) {
return;
}
if(isDefined(menu) && isDefined(cursor)) {
forEach(player in level.players) {
if(!isDefined(player) || !player in_menu()) {
continue;
}
if(player get_menu() == menu || self != player && player check_option(self, menu, cursor)) {
if(isDefined(player.syn["hud"]["text"][cursor]) || player == self && player get_menu() == menu && isDefined(player.syn["hud"]["text"][cursor]) || self != player && player check_option(self, menu, cursor)) {
player create_option();
}
}
}
} else {
if(isDefined(self) && self in_menu()) {
self create_option();
}
}
}
create_rainbow_color() {
x = 0; y = 0;
r = 0; g = 0; b = 0;
level.rainbow_color = (0, 0, 0);
while(true) {
if (y >= 0 && y < 258) {
r = 255;
g = 0;
b = x;
} else if (y >= 258 && y < 516) {
r = 255 - x;
g = 0;
b = 255;
} else if (y >= 516 && y < 774) {
r = 0;
g = x;
b = 255;
} else if (y >= 774 && y < 1032) {
r = 0;
g = 255;
b = 255 - x;
} else if (y >= 1032 && y < 1290) {
r = x;
g = 255;
b = 0;
} else if (y >= 1290 && y < 1545) {
r = 255;
g = 255 - x;
b = 0;
}
x += 3;
if (x > 255)
x = 0;
y += 3;
if (y > 1545)
y = 0;
level.rainbow_color = (r/255, g/255, b/255);
wait .05;
}
}
start_rainbow() {
while(isDefined(self)) {
self fadeOverTime(.05);
self.color = level.rainbow_color;
wait .05;
}
}
init() {
level thread onPlayerConnect();
}
on_event() {
self endOn("disconnect");
self.syn = [];
self.syn["user"] = spawnStruct();
while (true) {
if(!isDefined(self.syn["user"].has_menu)) {
self.syn["user"].has_menu = true;
self initial_variable();
self thread initial_monitor();
}
break;
}
}
on_ended() {
level waitTill("game_ended");
if(self in_menu()) {
self close_menu();
}
level notify("on_close_ended");
level endOn("on_close_ended");
}
onPlayerConnect() {
for(;;) {
level waitTill("connected", player);
executeCommand("sv_cheats 1");
get_map_name();
player thread onPlayerSpawned();
}
}
onPlayerSpawned() {
self endOn("disconnect");
level endOn("game_ended");
for(;;) {
self waitTill("spawned_player");
self thread on_event();
self thread on_ended();
if(self isHost()) {
self freezeControls(false);
}
level thread create_rainbow_color();
level thread create_text("SyndiShanX", "default", 1, "left", "top", 5, 10, "rainbow", 1, 3);
if(!self.menuInit) {
open_controls_menu("Controls");
self.menuInit = true;
}
}
}
/*
^0 = Black
^1 = Red
^2 = Green
^3 = Gold
^4 = Blue
^5 = Aqua
^6 = Purple
^7 = White
^8 is a color that changes depending what level you are on.
American maps = Dark Green
Russian maps = Dark Red