-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneric Logic v11f.cs
3145 lines (2783 loc) · 159 KB
/
Generic Logic v11f.cs
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
// Generic custom logic v11 by Erwin Smith#6637 / Lithrun
// This logic was made for the Expeditions Beyond the Walls community (https://discord.gg/Xd9sS8J)
// Made with love, patience and chocolate milk <3
// Latest version available at: https://github.com/Lithrun/aottg-generic-logic
// TERMS AND CONDITIONS
// 1. Do not alter the OnRoundStart message. The people worked hard on this logic, and removing their effort is disrespectfull.
// 2. You're free to modify this logic based on your needs. It is advised however to only modify the OnRoundStart and adding additional commands at the OnChatInput
// 3. For code improvements and new featuers, please pop a pull request at https://github.com/Lithrun/aottg-generic-logic
OnRoundStart()
{
// -- CONFIGURE THESE SETTINGS TO YOUR OWN PREFERENCE --
// EXPEDITION DIFFICULTY - 0 = easy, 1 = normal, 2 = hard. See --Expedition Difficulty Settings-- to change factors.
VariableInt.Set("ExpeditionDifficulty", 1);
// -- TOGGABLE SETTINGS --
VariableBool.Set("EnablePlayerScaling", false); // Default true
VariableBool.Set("EnableRandomTitanAnimation", false); // Default false
VariableBool.Set("EnableRandomTitanSpeed", true); // Default true
VariableBool.Set("EnableRandomTitanSkins", true); // Default true
VariableBool.Set("EnableTitanHealth", true); // Default true
VariableBool.Set("EnableTitanRegeneration", false); // Default false
VariableBool.Set("EnableTitanViewDistance", false); // Default false
VariableBool.Set("EnableAntiSkating", true); // Default true
VariableBool.Set("EnableWagonNuke", false); // While set to true, everyone will die once the MC dies
// Credits message. Do not alter.
Game.PrintMessage("<size=15><color=#2ecc71>Generic logic v11 loaded</color></size>");
Game.PrintMessage("<size=12><color=#123456>Created with passion and love by Erwin Smith#6637</color></size>");
Game.PrintMessage("<size=12><color=#654321>Special thanks to Syeo Potato Axel Tic P2 & Marazul</color></size>");
// Timer message - Credits to Potato
VariableString.Set("0", "<b><color=#00FF00>[Commander]</color>: Advance In 10 Seconds!</b>");
VariableString.Set("1", "<b> 10</b>");
VariableString.Set("2", "<b> 9</b>");
VariableString.Set("3", "<b> 8</b>");
VariableString.Set("4", "<b> 7</b>");
VariableString.Set("5", "<b> 6</b>");
VariableString.Set("6", "<b> 5</b>");
VariableString.Set("7", "<b> 4</b>");
VariableString.Set("8", "<b> 3</b>");
VariableString.Set("9", "<b> 2</b>");
VariableString.Set("10", "<b> 1</b>");
VariableString.Set("11", "<b><color=#00FF00>[Commander]</color>: All Soldiers! Advance!!!</b>");
// -- TITAN SETTINGS --
// TITAN TYPE: 0 = normie, 1 = abby, 2 = jumper, 3 = crawler, 4 = punk
// TITAN CLASS: 0 = small, 1 = medium, 2 = large, 3 = extreme
// TitanTypeX = The chance that this titan type spawns
// TitanClassX_Chance = the chance for this class to spawn
// Min size = the minumun size of this titan class
// Max size = the maximun size of this titan class
// HP Min = the minumun HP this class has
// HP Max = the maximun HP this class has
// Speed Min = Randomize how much less speed this class can have
// Speed Max = Randomize how much more speed this class can have
// Regen limit = the max HP this titan class can regenerate to
// Regen ticks = the amount of HP this titan class will regenarate per second
// Min Animation = the minumun Animation Speed this class has
// Max Animation = the maximun Animation Speed this class has
// Titan eye = A random eye skin that may be chosen
// Titan skin = A random body skin that may be chosen
// -- TITAN TYPE CHANCES --
VariableInt.Set("TitanType0", 1); // Default 15 - 0 = 15 percentage chance
VariableInt.Set("TitanType1", 50); // Default 50 - 15 = 35 percentage chance
VariableInt.Set("TitanType2", 82); // Default 75 - 50 = 25 percentage chance
VariableInt.Set("TitanType3", 83); // Default 83 - 75 = 8 percentage chance
VariableInt.Set("TitanType4", 100); // Default 100 - 83 = 17 percentage chance
// -- TITAN CLASS TYPES --
VariableInt.Set("TitanClass_Chance0", 3); // Default 10 - 0 = 10 percentage chance
VariableInt.Set("TitanClass_Chance1", 25); // Default 45 - 10 = 35 percentage chance
VariableInt.Set("TitanClass_Chance2", 95); // Default 95 - 45 = 50 percentage chance
VariableInt.Set("TitanClass_Chance3", 100); // Default 100 - 95 = 5 percentage chance
// -- TITAN CLASS SMALL --
VariableFloat.Set("TitanClass_MinSize0", 1.5); // Default 1.5
VariableFloat.Set("TitanClass_MaxSize0", 2.1); // Default 2.1
VariableInt.Set("TitanClass_HPMin0", 200); // Default 200
VariableInt.Set("TitanClass_HPMax0", 500); // Default 500
VariableInt.Set("TitanClass_MinSpeed0", -5); // Default -5
VariableInt.Set("TitanClass_MaxSpeed0", 5); // Default 5
VariableInt.Set("TitanClass_RegenLimit0", 500); // Default 500
VariableInt.Set("TitanClass_RegenTicks0", 1); // Default 1
VariableFloat.Set("TitanClass_MinAnimation0", 1.0); // Default 1.0
VariableFloat.Set("TitanClass_MaxAnimation0", 1.0); // Default 1.0
VariableInt.Set("TitanClass_ViewDistance0", 1250); // Default 1250
// -- TITAN CLASS Medium --
VariableFloat.Set("TitanClass_MinSize1", VariableFloat("TitanClass_MaxSize0"));
VariableFloat.Set("TitanClass_MaxSize1", 3.5); // Default 3.5
VariableInt.Set("TitanClass_HPMin1", 500); // Default 500
VariableInt.Set("TitanClass_HPMax1", 700); // Default 700
VariableInt.Set("TitanClass_MinSpeed1", -10); // Default -10
VariableInt.Set("TitanClass_MaxSpeed1", 10); // Default 10
VariableInt.Set("TitanClass_RegenLimit1", 1000); // Default 1000
VariableInt.Set("TitanClass_RegenTicks1", 2); // Default 2
VariableFloat.Set("TitanClass_MinAnimation1", 1.0); // Default 1.0
VariableFloat.Set("TitanClass_MaxAnimation1", 1.0); // Default 1.0
VariableInt.Set("TitanClass_ViewDistance1", 2500); // Default 2500
// -- TITAN CLASS Large --
VariableFloat.Set("TitanClass_MinSize2", VariableFloat("TitanClass_MaxSize1"));
VariableFloat.Set("TitanClass_MaxSize2", 4.1); // Default 4.1
VariableInt.Set("TitanClass_HPMin2", 700); // Default 700
VariableInt.Set("TitanClass_HPMax2", 900); // Default 900
VariableInt.Set("TitanClass_MinSpeed2", -10); // Default -10
VariableInt.Set("TitanClass_MaxSpeed2", 10); // Default 10
VariableInt.Set("TitanClass_RegenLimit2", 1500); // Default 1500
VariableInt.Set("TitanClass_RegenTicks2", 5); // Default 5
VariableFloat.Set("TitanClass_MinAnimation2", 1.0); // Default 1.0
VariableFloat.Set("TitanClass_MaxAnimation2", 1.0); // Default 1.0
VariableInt.Set("TitanClass_ViewDistance2", 4000); // Default 4000
// -- TITAN CLASS Extreme --
VariableFloat.Set("TitanClass_MinSize3", VariableFloat("TitanClass_MaxSize2"));
VariableFloat.Set("TitanClass_MaxSize3", 6.0); // Default 6.0
VariableInt.Set("TitanClass_HPMin3", 1000); // Default 1000
VariableInt.Set("TitanClass_HPMax3", 1500); // Default 1500
VariableInt.Set("TitanClass_MinSpeed3", -10); // Default -10
VariableInt.Set("TitanClass_MaxSpeed3", 10); // Default 10
VariableInt.Set("TitanClass_RegenLimit3", 5000); // Default 5000
VariableInt.Set("TitanClass_RegenTicks3", 10); // Default 10
VariableFloat.Set("TitanClass_MinAnimation3", 1.0); // Default 1.0
VariableFloat.Set("TitanClass_MaxAnimation3", 1.0); // Default 1.0
VariableInt.Set("TitanClass_ViewDistance3", 6000); // Default 6000
// -- TITAN SKINS --
// Titan Eyes
VariableInt.Set("TitanEyes", 24); // total eye skins + 1
VariableString.Set("Titan_Eye", "");
VariableString.Set("TitanEye1", "https://i[d]imgur[d]com/M46iSTN[d]png");
VariableString.Set("TitanEye2", "https://i[d]imgur[d]com/wWyInov[d]png");
VariableString.Set("TitanEye3", "https://i[d]imgur[d]com/nsicIz4[d]png");
VariableString.Set("TitanEye4", "https://i[d]imgur[d]com/yUfAQYj[d]png");
VariableString.Set("TitanEye5", "https://i[d]imgur[d]com/qCw4nMn[d]png");
VariableString.Set("TitanEye6", "https://i[d]imgur[d]com/gvb3sXU[d]png");
VariableString.Set("TitanEye7", "https://i[d]imgur[d]com/oOHxljH[d]png");
VariableString.Set("TitanEye8", "https://i[d]imgur[d]com/1P3OlhG[d]png");
VariableString.Set("TitanEye9", "https://i[d]imgur[d]com/4uiRysJ[d]png");
VariableString.Set("TitanEye10", "https://i[d]imgur[d]com/IMWBdYD[d]png");
VariableString.Set("TitanEye11", "https://i[d]imgur[d]com/RLOsdR1[d]png");
VariableString.Set("TitanEye12", "https://i[d]imgur[d]com/iuoGmvH[d]png");
VariableString.Set("TitanEye13", "https://i[d]imgur[d]com/oCIx7eT[d]png");
VariableString.Set("TitanEye14", "https://i[d]imgur[d]com/RZmgVUO[d]png");
VariableString.Set("TitanEye15", "https://i[d]imgur[d]com/7OLuuAG[d]png");
VariableString.Set("TitanEye16", "https://i[d]imgur[d]com/kexoLC3[d]png");
VariableString.Set("TitanEye17", "https://i[d]imgur[d]com/zxyZIqs[d]png");
VariableString.Set("TitanEye18", "https://i[d]imgur[d]com/Bdo948X[d]png");
VariableString.Set("TitanEye19", "https://i[d]imgur[d]com/UnHQSzy[d]png");
VariableString.Set("TitanEye20", "https://i[d]imgur[d]com/vehpqWR[d]png");
VariableString.Set("TitanEye21", "https://i[d]imgur[d]com/tCoMbY1[d]png");
VariableString.Set("TitanEye22", "https://i[d]imgur[d]com/RjjvCW8[d]png");
VariableString.Set("TitanEye23", "https://i[d]imgur[d]com/gUnCyHr[d]png");
VariableString.Set("TitanEye24", "");
VariableString.Set("TitanEye25", "");
// Titan bodies
VariableInt.Set("TitanSkins", 14); // Total body skins + 1
VariableString.Set("Titan_Skin", "");
VariableString.Set("TitanSkin1", "https://i[d]imgur[d]com/C6pqM6h[d]png");
VariableString.Set("TitanSkin2", "https://i[d]imgur[d]com/NmAlltS[d]png");
VariableString.Set("TitanSkin3", "https://i[d]imgur[d]com/vJflnpT[d]png");
VariableString.Set("TitanSkin4", "https://i[d]imgur[d]com/KoTo8O6[d]jpg");
VariableString.Set("TitanSkin5", "https://i[d]imgur[d]com/EyQ7gQQ[d]jpg");
VariableString.Set("TitanSkin6", "https://i[d]imgur[d]com/9jN6rBK[d]png");
VariableString.Set("TitanSkin7", "https://i[d]imgur[d]com/xaBLbqC[d]jpg");
VariableString.Set("TitanSkin8", "https://i[d]imgur[d]com/GPLE4hG[d]png");
VariableString.Set("TitanSkin9", "https://i[d]imgur[d]com/Zz7CXR0[d]png");
VariableString.Set("TitanSkin10", "https://i[d]imgur[d]com/BnMmaJN[d]png");
VariableString.Set("TitanSkin11", "https://i[d]imgur[d]com/J3K2Cam[d]png");
VariableString.Set("TitanSkin12", "https://i[d]imgur[d]com/B9ItWAb[d]png");
VariableString.Set("TitanSkin13", "https://i[d]imgur[d]com/rpmDZvX[d]jpg");
VariableString.Set("TitanSkin14", "");
VariableString.Set("TitanSkin15", "");
VariableString.Set("TitanSkin16", "");
VariableString.Set("TitanSkin17", "");
VariableString.Set("TitanSkin18", "");
// -- OTHER TITAN SETTINGS --
VariableInt.Set("SpawnTitansAtRegionAmount", 10); // How many titans will spawn at /titans command. Uses player scaling!
// -- EXPEDITION DIFFICULTY SETTINGS --
// -- Difficulty easy --
VariableFloat.Set("HealthFactor0", 0.4);
VariableFloat.Set("SpeedFactor0", 0.8);
VariableFloat.Set("RegenSpeedFactor0", 0.5);
VariableFloat.Set("RegenLimitFactor0", 0.7);
VariableFloat.Set("TitanAmountFactor0", 0.8);
VariableFloat.Set("ViewDistanceFactor0", 0.8);
// -- Difficulty normal --
VariableFloat.Set("HealthFactor1", 1.0);
VariableFloat.Set("SpeedFactor1", 1.0);
VariableFloat.Set("RegenSpeedFactor1", 1.0);
VariableFloat.Set("RegenLimitFactor1", 1.0);
VariableFloat.Set("TitanAmountFactor1", 1.0);
VariableFloat.Set("ViewDistanceFactor1", 1.0);
// -- Difficulty hard --
VariableFloat.Set("HealthFactor2", 1.4);
VariableFloat.Set("SpeedFactor2", 1.3);
VariableFloat.Set("RegenSpeedFactor2", 4.0);
VariableFloat.Set("RegenLimitFactor2", 1.7);
VariableFloat.Set("TitanAmountFactor2", 1.2);
VariableFloat.Set("ViewDistanceFactor2", 2.0);
// Titan speed default values
// Speed = X * size + Z
VariableFloat.Set("TitanSpeedX0", 2.171); // Default 2.371
VariableFloat.Set("TitanSpeedZ0", 6.900); // Default 6.900
VariableFloat.Set("TitanSpeedX1", 7.054); // Default 7.254
VariableFloat.Set("TitanSpeedZ1", 28.03); // Default 20.03
VariableFloat.Set("TitanSpeedX2", 7.054); // Default 7.254
VariableFloat.Set("TitanSpeedZ2", 28.03); // Default 20.03
VariableFloat.Set("TitanSpeedX3", 10.22); // Default 14.22
VariableFloat.Set("TitanSpeedZ3", 48.47); // Default 40.47
VariableFloat.Set("TitanSpeedX4", 7.054); // Default 7.254
VariableFloat.Set("TitanSpeedZ4", 28.03); // Default 20.03
// -- SCORE VARIABLES --
VariableInt.Set("TimePoints", -1); // -1 point / time
VariableInt.Set("RevivePoints", -25); // -25 points / revive
VariableInt.Set("KillPoints", 50); // 10 points / kill
VariableInt.Set("DeathPoints", -25); // -25 points / death
VariableInt.Set("ObjectivePoints", 1000); // 1000 points / objective
VariableInt.Set("BonusObjectivePoints", 500); // 500 points / objective
// -- PLAYER SCALING --
VariableFloat.Set("PlayerFactorSmall", 0.7); // Less than 10 players
VariableFloat.Set("PlayerFactorMedium", 1.0); // 10 to 15 players
VariableFloat.Set("PlayerFactorLarge", 1.2); // 15 to 20 players
VariableFloat.Set("PlayerFactorExtreme", 1.5); // 20+
// END OF CONFIGURABLE SETTINGS IGNORE THE SETTINGS BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
VariableBool.Set("CountDown", false);
VariablePlayer.Set("MCPlayer", VariablePlayer("null")); // MC player
VariablePlayer.Set("EPlayer", VariablePlayer("null")); // Player Collection Variable
VariablePlayer.Set("CPlayer", VariablePlayer("null"));
VariableInt.Set("Score", 0); // The total score
VariableBool.Set("Timer", false);
VariableInt.Set("Time", 0); // Total time
VariableInt.Set("Revives", 0); // Total amount of revives
VariableInt.Set("Kills", 0); // Total kills
VariableInt.Set("Objectives", 0); // Total objectives completed
VariableInt.Set("BonusObjectives", 0); // Total objectives completed
// Revive cords
VariableFloat.Set("Revive_X", 0.0); // used for /reviveatpos
VariableFloat.Set("Revive_Y", 0.0); // used for /reviveatpos
VariableFloat.Set("Revive_Z", 0.0); // used for /reviveatpos
// Region cords
VariableFloat.Set("X+", 2500.0); // positive X
VariableFloat.Set("X-", -2500.0); // negative X
VariableFloat.Set("Y+", 2500.0); // positive Y
VariableFloat.Set("Y-", -2500.0); // negative Y
// Safety region cords - no titans will spawn within this range
VariableFloat.Set("SafetyX+", 400.0); // positive X
VariableFloat.Set("SafetyX-", -400.0); // negative X
VariableFloat.Set("SafetyY+", 400.0); // positive Y
VariableFloat.Set("SafetyY-", -400.0); // negative Y
// Titan variables - ommit default values otherwise NullReferrenceExceptions!
VariableFloat.Set("Titan_X", 0.0); // titan X cord
VariableFloat.Set("Titan_Y", 0.0); // titan Y cord
VariableFloat.Set("Titan_Z", 0.0); // titan Z cord
VariableInt.Set("Titan_Type", 0); // 0 - normie, 1 abby, 2 jump, 3 crawler, 4 punk
VariableInt.Set("Titan_Class", 0); // 0 - small, 1 - medium, 2 - large, 3 - extreme
VariableFloat.Set("Titan_Size", 1.0); // 1 - 1000
VariableInt.Set("Titan_HP", 0);
VariableInt.Set("Titan_Speed", 0);
VariableFloat.Set("Titan_Animation", 1.0);
VariableInt.Set("Titan_ViewDistance", 2500);
VariableInt.Set("TitanAmount", 0);
// Titan difficulty
VariableFloat.Set("HealthFactor", 1.0);
VariableFloat.Set("SpeedFactor", 1.0);
VariableFloat.Set("RegenLimitFactor", 1.0);
VariableFloat.Set("RegenSpeedFactor", 1.0);
VariableFloat.Set("TitanAmountFactor", 1.0);
VariableFloat.Set("ViewDistanceFactor", 1.0);
VariableString.Set("Message", "");
// Player balance
VariableInt.Set("TotalPlayers", 0);
VariableInt.Set("TotalPlayersTimer", 0);
VariableFloat.Set("PlayerFactor", 1.0); // Default 1.0
// Auto player revive
VariableBool.Set("AutoPosRevive", false);
VariableInt.Set("AutoPosReviveTimer", 0);
VariableInt.Set("AutoPosReviveTimeLimit", 30); // Auto revive every 30s
// V6 additions
VariableBool.Set("SetVariableNameValue", false);
VariableBool.Set("SetVariableTypeValue", false);
VariableBool.Set("SetVariable", false);
VariableString.Set("SetVariableName", "");
VariableInt.Set("SetVariableType", 0); // 0 = integer, 1 = boolean, 2 = string, 3 = float
VariableString.Set("SetVariableName", "WhileCommand");
VariableInt.Set("GateHeight", 60);
// V8 additions
VariableFloat.Set("SpeedCounterLimit", 7.0);
VariableFloat.Set("SpeedCounter", 0.0);
VariableFloat.Set("SpeedMeter0", 0.0);
VariableFloat.Set("HeightMeter0", 0.0);
VariableFloat.Set("radius", 100.0);
VariableInt.Set("revTime", 5);
VariableInt.Set("deathTime", 120);
VariableInt.Set("cooldown", 30);
VariableInt.Set("counterMain", 0);
VariableInt.Set("cooldown0", 0);
VariableInt.Set("cooldown1", 0);
VariableInt.Set("cooldown2", 0);
VariableInt.Set("cooldown3", 0);
VariableInt.Set("cooldown4", 0);
VariableInt.Set("cooldown5", 0);
VariableInt.Set("cooldown6", 0);
VariableInt.Set("cooldown7", 0);
VariableInt.Set("cooldown8", 0);
VariableInt.Set("cooldown9", 0);
VariableInt.Set("cooldown10", 0);
VariableInt.Set("cooldown11", 0);
VariableInt.Set("cooldown12", 0);
VariableInt.Set("cooldown13", 0);
VariableInt.Set("cooldown14", 0);
VariableInt.Set("cooldown15", 0);
VariableInt.Set("cooldown16", 0);
VariableInt.Set("cooldown17", 0);
VariableInt.Set("cooldown18", 0);
VariableInt.Set("cooldown19", 0);
VariableInt.Set("cooldown20", 0);
VariableInt.Set("cooldown21", 0);
VariableInt.Set("cooldown22", 0);
VariableInt.Set("cooldown23", 0);
VariableInt.Set("cooldown24", 0);
VariableInt.Set("cooldown25", 0);
VariableInt.Set("cooldown26", 0);
VariableInt.Set("cooldown27", 0);
VariableInt.Set("cooldown28", 0);
VariableInt.Set("cooldown29", 0);
VariableInt.Set("cooldown30", 0);
VariableInt.Set("cooldown31", 0);
VariableInt.Set("cooldown32", 0);
VariableInt.Set("cooldown33", 0);
VariableInt.Set("cooldown34", 0);
VariableInt.Set("cooldown35", 0);
VariableInt.Set("cooldown36", 0);
VariableInt.Set("cooldown37", 0);
VariableInt.Set("cooldown38", 0);
VariableString.Concat("radiusWhat", "<size=10>revive</size><size=1>___</size><size=10>radius</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableFloat("radius").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>meters</size>");
Game.PrintMessage(VariableString("radiusWhat"));
VariableString.Concat("revTimeWhat", "<size=10>revive</size><size=1>___</size><size=10>time</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableInt("revTime").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
Game.PrintMessage(VariableString("revTimeWhat"));
VariableString.Concat("deathWhat", "<size=10>death</size><size=1>___</size><size=10>time</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableInt("deathTime").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
Game.PrintMessage(VariableString("deathWhat"));
VariableString.Concat("cooldownWhat", "<size=10>cooldown</size><size=1>___</size><size=10>time</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableInt("cooldown").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
Game.PrintMessage(VariableString("cooldownWhat"));
//V9 automatic titans
VariableBool.Set("EnableAutoTitans", false);
VariableInt.Set("AutoTitanLimit", 35); // limit of auto titans
VariableInt.Set("AutoTitanAmount", 3); // How many titans should spawn per interval
VariableInt.Set("AutoTitanInterval", 15); // AutoTitanAmount titans will spawn every X seconds
VariableInt.Set("AutoTitanCounter", 0);
//V10 boss update
VariableFloat.Set("UnkillableTitanSize", 4.50001);
VariableInt.Set("UnkillableTitanHealth", 3000);
VariableFloat.Set("SantaSize", 4.50002);
VariableInt.Set("SantaCounter", 0);
VariableFloat.Set("ColossalSize", 60.00001);
VariableInt.Set("ColossalCounter", 90);
VariableInt.Set("ColossalExplosionCounter", 0);
VariableInt.Set("ColossalExplosionCounterLimit", 120); // After how many seconds will the colossal explode
VariableInt.Set("ColossalExplosionLimit", 30); // How many explosions will the colossal cause
VariableFloat.Set("BeastSize", 4.50003);
VariableInt.Set("BeastCounter", 35);
VariableInt.Set("BeastCounterLimit", 60); // After how many seconds will the beast throw
VariableInt.Set("BeastRockCounter", 0);
VariableInt.Set("BeastRockLimit", 5); // After how many seconds will the beast do another volley
VariableInt.Set("BeastRockVolleyCounter", 0);
VariableInt.Set("BeastRockVolleyLimit", 4); // How many volleys will the beast titan do
VariableInt.Set("BeastRocks", 200); // How rocks will the beast throw per volley
VariableFloat.Set("SantaSize", 4.50002);
VariableInt.Set("SantaCounter", 0);
VariableInt.Set("WagonNukeCounter", 10);
VariableBool.Set("DestroyLife", false);
//V11 Medic Overhaul
//------Gobal Counter---------
VariableInt.Set("timeCounter", 0);
//------------Init------------
VariableBool.Set("firstestRun", true);
VariableBool.Set("runScript", false);
//----------First Run----------
VariableBool.Set("firstRun", true);
Game.PrintMessage("EM/Commands//startup"); // Execute a few commands on start up
}
// Titan kill count
OnTitanDie("DeadTitan", "MurdererPlayer")
{
VariableInt.Add("Kills", 1);
}
OnUpdate()
{
// Auto titan spawner
If(Bool.Equals(VariableBool("EnableAutoTitans"), true))
{
VariableInt.Add("AutoTitanCounter", 1);
If(VariableInt.GreaterThanOrEqual(VariableInt("AutoTitanCounter"), VariableInt("AutoTitanInterval")))
{
VariableInt.Set("TotalTitans", 0);
ForeachTitan("ATT")
{
VariableInt.Add("TotalTitans", 1);
}
If(VariableInt.LessThanOrEqual(VariableInt("TotalTitans"), VariableInt("AutoTitanLimit")))
{
VariableString.Concat("Command", "EM/Commands//titans", VariableInt("AutoTitanAmount").ConvertToString());
Game.PrintMessage(VariableString("Command"));
VariableInt.Set("AutoTitanCounter", 0);
}
}
}
// Titan regeneration
If(Bool.Equals(VariableBool("EnableTitanRegeneration"), true))
{
VariableString.Concat("RegenLimitF", "RegenLimitFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
VariableString.Concat("RegenSpeedF", "RegenLimitFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
ForeachTitan("RTitan")
{
VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
VariableFloat.Set("TitanSize", VariableTitan("RTitan").GetSize());
// Titan class small
If(Float.LessThan(VariableFloat("TitanSize"), VariableFloat("TitanClass_MaxSize0")))
{
VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit0").ConvertToFloat());
VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
{
VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks0").ConvertToFloat());
VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
}
}
// titan class medium
If(Float.GreaterThanOrEqual(VariableFloat("TitanSize"), VariableFloat("TitanClass_MinSize1")))
{
If(Float.LessThan(VariableFloat("TitanSize"), VariableFloat("TitanClass_MaxSize1")))
{
VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit1").ConvertToFloat());
VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
{
VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks1").ConvertToFloat());
VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
}
}
}
// titan class large
If(Float.GreaterThanOrEqual(VariableFloat("TitanSize"), VariableFloat("TitanClass_MinSize2")))
{
If(Float.LessThan(VariableFloat("TitanSize"), VariableFloat("TitanClass_MaxSize2")))
{
VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit2").ConvertToFloat());
VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
{
VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks2").ConvertToFloat());
VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
}
}
}
// titan class extreme
If(Float.GreaterThanOrEqual(VariableFloat("TitanSize"), VariableFloat("TitanClass_MinSize3")))
{
VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit3").ConvertToFloat());
VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
{
VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks3").ConvertToFloat());
VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
}
}
}
}
// Time count
If(Bool.Equals(VariableBool("Timer"), true))
{
VariableInt.Add("Time", 1); // Add 1 / seconds
}
// Exp start counter
If(Bool.Equals(VariableBool("CountDown"), true))
{
VariableString.Set("Temp", VariableInt("Count").ConvertToString());
Game.PrintMessage(VariableString(VariableString("Temp")));
VariableInt.Add("Count", 1);
VariableInt.Add("GateHeight", 5);
VariableString.Concat("GateMessage", "EM/Commands/moveobjects[-]Gate[-]-1620[-]", VariableInt("GateHeight").ConvertToString(), "[-]12522[-]0[-]90[-]0[-]-4[-]0[-]0");
Game.PrintMessage(VariableString("GateMessage"));
If(VariableInt.Equals(VariableInt("Count"), 12))
{
VariableBool.Set("CountDown", false);
}
}
// Player scaling
If(Bool.Equals(VariableBool("EnablePlayerScaling"), true))
{
// Player balance. Check amount of players every 5 minutes for player balancing
If(VariableInt.GreaterThanOrEqual(VariableInt("TotalPlayersTimer"), 300))
{
VariableInt.Set("TotalPlayers", 0);
VariableInt.Set("TotalPlayersTimer", 0);
ForeachPlayer("EPlayer")
{
VariableInt.Add("TotalPlayers", 1);
}
Game.PrintMessage("EM/Commands//setplayerfactor");
}
VariableInt.Add("TotalPlayersTimer", 1);
}
// Auto player revive
If(Bool.Equals(VariableBool("AutoPosRevive"), true))
{
VariableInt.Add("AutoPosReviveTimer", 1);
If(VariableInt.GreaterThanOrEqual(VariableInt("AutoPosReviveTimer"), VariableInt("AutoPosReviveTimeLimit")))
{
Game.PrintMessage("EM/Commands//revpos");
VariableInt.Set("AutoPosReviveTimer", 0);
}
}
// Santa and Chaser
ForeachTitan("RTitan")
{
VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
VariableFloat.Set("TitanSize", VariableTitan("RTitan").GetSize());
// Chaser
If(Float.Equals(VariableFloat("TitanSize"), VariableFloat("UnkillableTitanSize")))
{
Titan.SetHealth(VariableTitan("RTitan"), VariableInt("UnkillableTitanHealth"));
}
// Santa
If(Float.Equals(VariableFloat("TitanSize"), VariableFloat("SantaSize")))
{
VariableInt.Add("SantaCounter", 1);
If(Int.GreaterThanOrEqual(VariableInt("SantaCounter"), 30))
{
VariableInt.Set("SantaCounter", 0);
VariableFloat.Set("Titan_SX", VariableTitan("RTitan").GetPositionX());
VariableFloat.Set("Titan_SY", VariableTitan("RTitan").GetPositionY());
VariableFloat.Set("Titan_SZ", VariableTitan("RTitan").GetPositionZ());
Game.PrintMessage("Santa has a present for all");
VariableString.Concat("SantaMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]5[-]5[-]5");
Game.PrintMessage(VariableString("SantaMessage"));
VariableFloat.Add("Titan_SY", 25.0);
VariableString.Concat("SantaMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]5[-]5[-]5");
Game.PrintMessage(VariableString("SantaMessage"));
VariableFloat.Add("Titan_SY", 25.0);
VariableString.Concat("SantaMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]5[-]5[-]5");
Game.PrintMessage(VariableString("SantaMessage"));
VariableFloat.Add("Titan_SY", 25.0);
VariableString.Concat("SantaMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]10[-]10[-]10");
Game.PrintMessage(VariableString("SantaMessage"));
VariableFloat.Add("Titan_SX", 25.0);
VariableString.Concat("SantaMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]5[-]5[-]5");
Game.PrintMessage(VariableString("SantaMessage"));
VariableFloat.Add("Titan_SZ", 25.0);
VariableString.Concat("SantaMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]5[-]5[-]5");
Game.PrintMessage(VariableString("SantaMessage"));
VariableFloat.Add("Titan_SY", 25.0);
VariableString.Concat("SantaMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]5[-]5[-]5");
Game.PrintMessage(VariableString("SantaMessage"));
VariableFloat.Add("Titan_SY", 25.0);
VariableString.Concat("SantaMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]5[-]5[-]5");
Game.PrintMessage(VariableString("SantaMessage"));
VariableFloat.Add("Titan_SY", 25.0);
VariableString.Concat("SantaMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]5[-]5[-]5");
Game.PrintMessage(VariableString("SantaMessage"));
VariableString.Concat("SantaMessage", "EM/Commands//titans3");
Game.PrintMessage(VariableString("SantaMessage"));
}
}
// Colossal
If(Float.Equals(VariableFloat("TitanSize"), VariableFloat("ColossalSize")))
{
VariableInt.Add("ColossalCounter", 1);
VariableInt.Set("ColossalExplosionWarning", VariableInt("ColossalExplosionCounterLimit"));
VariableInt.Subtract("ColossalExplosionWarning", 10);
If(Int.Equals(VariableInt("ColossalCounter"), VariableInt("ColossalExplosionWarning")))
{
Game.PrintMessage("<size=15><color=#903333>SCOUT:</color>DISENGAGE THE COLOSSAL!!!</size>");
}
If(Int.GreaterThanOrEqual(VariableInt("ColossalCounter"), VariableInt("ColossalExplosionCounterLimit")))
{
VariableInt.Add("ColossalExplosionCounter", 1);
If(Int.GreaterThanOrEqual(VariableInt("ColossalExplosionCounter"), VariableInt("ColossalExplosionLimit")))
{
VariableInt.Set("ColossalCounter", 0);
VariableInt.Set("ColossalExplosionCounter", 0);
}
VariableFloat.Set("Titan_SX", VariableTitan("RTitan").GetPositionX());
VariableFloat.Set("Titan_SY", VariableTitan("RTitan").GetPositionY());
VariableFloat.Set("Titan_SZ", VariableTitan("RTitan").GetPositionZ());
VariableInt.Set("ExplosionCount", 15);
While(Int.GreaterThan(VariableInt("ExplosionCount"), 0))
{
VariableString.Concat("ColossalMessage", "EM/Commands//explosion[-]",VariableFloat("Titan_SX").ConvertToString(),"[-]",VariableFloat("Titan_SY").ConvertToString(),"[-]",VariableFloat("Titan_SZ").ConvertToString(),"[-]100[-]100[-]100");
Game.PrintMessage(VariableString("ColossalMessage"));
VariableFloat.Add("Titan_SY", 50.0);
VariableInt.Subtract("ExplosionCount", 1);
}
}
}
// Beast
If(Float.Equals(VariableFloat("TitanSize"), VariableFloat("BeastSize")))
{
VariableInt.Add("BeastCounter", 1);
VariableInt.Set("BeastWarning", VariableInt("BeastCounterLimit"));
VariableInt.Subtract("BeastWarning", 10);
If(Int.Equals(VariableInt("BeastCounter"), VariableInt("BeastCounterLimit")))
{
VariableFloat.Set("Beast_X", VariableTitan("RTitan").GetPositionX());
VariableFloat.Set("Beast_Y", VariableTitan("RTitan").GetPositionY());
VariableFloat.Set("Beast_Z", VariableTitan("RTitan").GetPositionZ());
VariableFloat.Set("Beast_X_Min", VariableFloat("Beast_X"));
VariableFloat.Set("Beast_X_Max", VariableFloat("Beast_X"));
VariableFloat.Set("Beast_Z_Min", VariableFloat("Beast_Z"));
VariableFloat.Set("Beast_Z_Max", VariableFloat("Beast_Z"));
VariableFloat.Subtract("Beast_X_Min", 2000.0);
VariableFloat.Add("Beast_X_Max", 2000.0);
VariableFloat.Subtract("Beast_Z_Min", 2000.0);
VariableFloat.Add("Beast_Z_Max", 2000.0);
Game.PrintMessage("<size=15><color=#903333>SCOUT:</color>ROCKS INCOMING!!!</size>");
}
If(Int.GreaterThanOrEqual(VariableInt("BeastCounter"), VariableInt("BeastCounterLimit")))
{
VariableInt.Add("BeastRockCounter", 1);
If(Int.GreaterThanOrEqual(VariableInt("BeastRockCounter"), VariableInt("BeastRockLimit")))
{
VariableInt.Set("BeastRockCounter", 0);
VariableInt.Add("BeastRockVolleyCounter", 1);
// Do a volley
VariableInt.Set("RockCount", VariableInt("BeastRocks"));
While(Int.GreaterThan(VariableInt("RockCount"), 0))
{
VariableFloat.SetRandom("BeastX", VariableFloat("Beast_X_Min"), VariableFloat("Beast_X_Max"));
VariableFloat.Set("BeastY", VariableFloat("Beast_Y"));
VariableFloat.SetRandom("BeastZ", VariableFloat("Beast_Z_Min"), VariableFloat("Beast_Z_Max"));
VariableString.Concat("BeastMessage", "EM/Commands//explosion[-]",VariableFloat("BeastX").ConvertToString(),"[-]",VariableFloat("BeastY").ConvertToString(),"[-]",VariableFloat("BeastZ").ConvertToString(),"[-]20[-]20[-]20");
Game.PrintMessage(VariableString("BeastMessage"));
VariableInt.Subtract("RockCount", 1);
}
}
If(Int.GreaterThanOrEqual(VariableInt("BeastRockVolleyCounter"), VariableInt("BeastRockVolleyLimit")))
{
VariableInt.Set("BeastRockVolleyCounter", 0);
VariableInt.Set("BeastCounter", 0);
}
}
}
}
// Wagon nuke
If(Bool.Equals(VariableBool("EnableWagonNuke"), true))
{
If(Bool.Equals(VariableBool("DestroyLife"), false))
{
If(Bool.Equals(VariablePlayer("MCPlayer").GetIsAlive(), false))
{
Game.PrintMessage("<size=15><color=#903333>WAGON NUKE STABILIZER IS DESTROYED!!!</color></size>");
VariableBool.Set("DestroyLife", true);
}
}
If(Bool.Equals(VariableBool("DestroyLife"), true))
{
VariableInt.Subtract("WagonNukeCounter", 1);
Game.PrintMessage(VariableInt("WagonNukeCounter").ConvertToString());
If(Int.LessThanOrEqual(VariableInt("WagonNukeCounter"), 0))
{
ForeachPlayer("player")
{
VariableFloat.Set("x", VariablePlayer("player").GetPositionX());
VariableFloat.Set("y", VariablePlayer("player").GetPositionY());
VariableFloat.Set("z", VariablePlayer("player").GetPositionZ());
VariableString.Concat("NukeMessage", "EM/Commands//explosion[-]",VariableFloat("x").ConvertToString(),"[-]",VariableFloat("y").ConvertToString(),"[-]",VariableFloat("z").ConvertToString(),"[-]25[-]25[-]25");
Game.PrintMessage(VariableString("NukeMessage"));
}
Game.PrintMessage("EM/Commands//killtit");
Game.PrintMessage("EM/Commands//setdaylightcolor 10");
Game.PrintMessage("Kaboom");
VariableBool.Set("EnableWagonNuke", false);
}
}
}
// MEDIC LOGIC
//setting up automatic initiate
//this is per player, meaning you need to change it for you specifically
If(Bool.Equals(VariableBool("firstestRun"), true))
{
VariablePlayer.Set("player", VariablePlayer("null"));
ForeachPlayer("player")
{
VariablePlayer.Set("mc", VariablePlayer("player"));
}
//this part of the logic will attempt to strip the whitespace character from your name
//GetName() can be GetGuildName(), whichever one has a space in it
//i will use GetName(), since my in game name is "[8c002c]Player 2[ffffff]", which contains a space
VariableString.Set("char63SetName", VariablePlayer("mc").GetName());
//setting the first part of the name, before the whitespace
VariableString.Set("priorNamePart", "[8c002c]Player");
//setting the second part of the name, after the whitespace
VariableString.Set("anteriorNamePart", "2[ffffff]");
//seeing if mc name matches both name parts
VariableBool.Set("else", true);
If(String.StartsWith(VariableString("char63SetName"), VariableString("priorNamePart")))
{
If(String.EndsWith(VariableString("char63SetName"), VariableString("anteriorNamePart")))
{
//removing name parts
VariableString.Replace("char63SetName", VariableString("priorNamePart"), "");
VariableString.Replace("char63SetName", VariableString("anteriorNamePart"), "");
//setting whitespace char
VariableString.Set("char63", VariableString("char63SetName"));
//gogogogo
VariableBool.Set("runScript", true);
VariableBool.Set("else", false);
}
}
//if name doesn't match
If(Bool.Equals(VariableBool("else"), true))
{
Game.PrintMessage("Please<size=1>____</size>type<size=1>____</size>'/init<size=1>____</size>'<size=1>____</size>to<size=1>____</size>initialize<size=1>____</size>the<size=1>____</size>medic<size=1>____</size>script");
Game.PrintMessage("Include<size=1>____</size>the<size=1>____</size>space");
}
//
VariableBool.Set("firstestRun", false);
}
//-----------Init-------------
If(Bool.Equals(VariableBool("runScript"), true))
{
//----------First Run----------
If(Bool.Equals(VariableBool("firstRun"), true))
{
VariableBool.Set("firstRun", false);
//----Player Tracker-----
VariableInt.Set("knownPlayerCounter", 0);
VariableFloat.Set("playerStartingCoordsX", 0.0);
VariableFloat.Set("playerStartingCoordsY", -999999.0);
VariableFloat.Set("playerStartingCoordsZ", 0.0);
//-------Medic Variables-------
VariableString.Set("medicHex", "[1fcfc1][1fcfc1]");
VariableFloat.Set("flareRotationX", -0.1);
VariableString.Concat("flareRotation", VariableFloat("flareRotationX").ConvertToString(), "[-]0[-]0[-]1");
VariableInt.Set("defaultLives", 5);
VariableInt.Set("defaultReviveKits", 20);
VariableInt.Set("cooldown", 10);
VariableInt.Set("revTime", 20);
VariableInt.Set("deathTime", 120);
VariableFloat.Set("radius", 50.0);
VariableBool.Set("deathMarker", true);
VariableBool.Set("resetPlayerVarsOnMCRev", false);
//--------Medic Objects------------
//cheers mara
VariableString.Set("redFlare", "EM/Commands/object_load[-]Resources[-]fx/flarebullet2");
Game.PrintMessage(VariableString("redFlare"));
//-------Hex Stripper Variables---------
VariableString.Set("char0", "0");
VariableString.Set("char1", "1");
VariableString.Set("char2", "2");
VariableString.Set("char3", "3");
VariableString.Set("char4", "4");
VariableString.Set("char5", "5");
VariableString.Set("char6", "6");
VariableString.Set("char7", "7");
VariableString.Set("char8", "8");
VariableString.Set("char9", "9");
VariableString.Set("char10", "a");
VariableString.Set("char11", "b");
VariableString.Set("char12", "c");
VariableString.Set("char13", "d");
VariableString.Set("char14", "e");
VariableString.Set("char15", "f");
VariableString.Set("char16", "A");
VariableString.Set("char17", "B");
VariableString.Set("char18", "C");
VariableString.Set("char19", "D");
VariableString.Set("char20", "E");
VariableString.Set("char21", "F");
VariableString.Set("char22", "g");
VariableString.Set("char23", "h");
VariableString.Set("char24", "i");
VariableString.Set("char25", "j");
VariableString.Set("char26", "k");
VariableString.Set("char27", "l");
VariableString.Set("char28", "m");
VariableString.Set("char29", "n");
VariableString.Set("char30", "o");
VariableString.Set("char31", "p");
VariableString.Set("char32", "q");
VariableString.Set("char33", "r");
VariableString.Set("char34", "s");
VariableString.Set("char35", "t");
VariableString.Set("char36", "u");
VariableString.Set("char37", "v");
VariableString.Set("char38", "w");
VariableString.Set("char39", "x");
VariableString.Set("char40", "y");
VariableString.Set("char41", "z");
VariableString.Set("char42", "G");
VariableString.Set("char43", "H");
VariableString.Set("char44", "I");
VariableString.Set("char45", "J");
VariableString.Set("char46", "K");
VariableString.Set("char47", "L");
VariableString.Set("char48", "M");
VariableString.Set("char49", "N");
VariableString.Set("char50", "O");
VariableString.Set("char51", "P");
VariableString.Set("char52", "Q");
VariableString.Set("char53", "R");
VariableString.Set("char54", "S");
VariableString.Set("char55", "T");
VariableString.Set("char56", "U");
VariableString.Set("char57", "V");
VariableString.Set("char58", "W");
VariableString.Set("char59", "X");
VariableString.Set("char60", "Y");
VariableString.Set("char61", "Z");
VariableString.Set("char62", "'");
//
//-----print-----
VariableString.Concat("scriptInitialized", "Script", VariableString("char63"), "initialized");
Game.PrintMessage(VariableString("scriptInitialized"));
}
//-------Player Tracker---------
VariablePlayer.Set("player", VariablePlayer("null"));
ForeachPlayer("player")
{
//-------seeing if player matches any from known player directory---------------
VariableBool.Set("currentPlayerIsKnown", false);
VariableInt.Set("i", 0);
While(Int.LessThan(VariableInt("i"), VariableInt("knownPlayerCounter")))
{
VariableString.Concat("testKnownPlayerDir", "player", VariableInt("i").ConvertToString());
VariableBool.Set("else", true);
If(Player.Equals(VariablePlayer("player"), VariablePlayer(VariableString("testKnownPlayerDir"))))
{
VariableBool.Set("currentPlayerIsKnown", true);
VariableBool.Set("else", false);
}
If(Bool.Equals(VariableBool("else"), true))
{
//ensuring that this player isn't still in game, so that more that 2 or more players can't be matched to same player vars
VariableString.Concat("currentPlayerIsInGameDir", VariableString("testKnownPlayerDir"), "IsInGame");
If(Bool.Equals(VariableBool(VariableString("currentPlayerIsInGameDir")), false))
{
//seeing if not in game player has matching name
VariableString.Concat("currentPlayerRawNameDir", VariableString("testKnownPlayerDir"), "RawName");
If(String.Equals(VariablePlayer("player").GetName(), VariableString(VariableString("currentPlayerRawNameDir"))))
{
//player is recognized, and is restored
VariablePlayer.Set(VariableString("testKnownPlayerDir"), VariablePlayer("player"));
VariableBool.Set("currentPlayerIsKnown", true);
VariableString.Concat("currentPlayerHasBeenDeadForDir", VariableString("testKnownPlayerDir"), "HasBeenDeadFor");
If(Int.Equals(VariableInt(VariableString("currentPlayerHasBeenDeadForDir")), 0))
{
VariableString.Concat("currentPlayerAttemptToReviveDir", VariableString("testKnownPlayerDir"), "AttemptToRevive");
VariableBool.Set(VariableString("currentPlayerAttemptToReviveDir"), true);