-
Notifications
You must be signed in to change notification settings - Fork 0
/
TrueBalancer.cs
8455 lines (7395 loc) · 454 KB
/
TrueBalancer.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
/* Copyright 2011 Panther
This plugin is made for PRoCon.
BFBC2 PRoCon is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
BF3 PRoCon is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with BF3 PRoCon. If not, see <http://www.gnu.org/licenses/>.
Use this script at your own risk!
*/
/* support:
* https://forum.myrcon.com/showthread.php?7169-TrueBalancer-BF3-BF4-0-5-RC
*
* grizzlybeer
* https://forum.myrcon.com/member.php?13930-grizzlybeer
*
* TODO:
* - remove tb-move cmds (use procons !move)
* ok - exclude commanders, spectators
* ok - persona id fix
*
*
*
*/
using System;
using System.IO;
using System.Text;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Text.RegularExpressions;
using System.Web;
using System.Net;
using System.Threading;
using System.Diagnostics;
using PRoCon.Core;
using PRoCon.Core.Plugin;
using PRoCon.Core.Plugin.Commands;
using PRoCon.Core.Players;
using PRoCon.Core.Players.Items;
using PRoCon.Core.Battlemap;
using PRoCon.Core.Maps;
namespace PRoConEvents {
public class TrueBalancer : PRoConPluginAPI, IPRoConPluginInterface {
#region Variables and Constructors
//Proconvariables
private string m_strHostName;
private string m_strPort;
private string m_strPRoConVersion;
private string Servertype;
private DateTime lastupdatecheck=DateTime.Now.AddHours(-4);
//TrueBalancer Variables
BattlelogClient bclient;
private Dictionary<string, CPlayerJoinInf> dicPlayerCache = new Dictionary<string, CPlayerJoinInf>();
private Dictionary<int, CPlayerScoreInf> dicPlayerScore = new Dictionary<int, CPlayerScoreInf>();
private Dictionary<int, CSquadScoreInf> dicSquadScore = new Dictionary<int, CSquadScoreInf>();
private Dictionary<string, int> dicSquadList= new Dictionary<string, int>();
private Dictionary<string, bool> OnCommandMove = new Dictionary<string, bool>();
private List<string> OnCommandMoveDone;
private string[] strAWhitelist;
private string[] strAClantagWhitelist;
private string[] strAClantagWhitelistScrambler;
private string[] strAWhitelistComplete;
private List<string> teamswitcher;
private List<string> BalancedPlayers;
//private List<string> PlayersOnServer;
private string strWarning;
private string strLastWarning;
private string strBeenMoved;
private string strMovedPlayer;
private string strJoinedPlayerName;
private string strShameMessage;
private string strScrambleDoneMsg;
private string strScrambleNowMsg;
private string strScrambleRoundMsg;
private string strFinalSquad;
private string strErrorMsg;
private string strdeadplayer;
private int intInterval;
private int intWarnings;
private int intTimerWait;
private int intI;
private int TeamA;
private int TeamB;
private int intPlayerDif;
private int intToTeam;
private int intFromTeam;
private int intNewTeam;
private int intcountWarnings;
private int intWaitSeconds;
private int intScoreTeamA;
private int intScoreTeamB;
private int intTicketcount;
private int bestSquadTeamID;
private int intTicketsdif;
private int intCurrentRoundCount;
private int intMaxSlots;
private int intScrambledPlayers;
private int intSquadA;
private int intSquadB;
private int intScrambleCount;
private int intPlayerCache;
private double dblValueDiffRUSH;
private double dblValueDiffCONQUEST;
private double dblValueDiffDOM;
private double dblValueDiffTDM;
private double dblValueDiffGM;
private int intScoreWTS;
private int intAllowDif;
private int intminScore;
private int intminScoreRUSH;
private int intTreshRUSH;
private int intAllowDif1RUSH;
private int intAllowDif2RUSH;
private int intTreshGM;
private int intAllowDif1GM;
private int intAllowDif2GM;
private int intTreshDF;
private int intAllowDif1DF;
private int intAllowDif2DF;
private int intminScoreCONQUEST;
private int intTreshCONQUEST;
private int intAllowDif1CONQUEST;
private int intAllowDif2CONQUEST;
private int intminScoreDOM;
private int intTreshDOM;
private int intAllowDif1DOM;
private int intAllowDif2DOM;
private int intminScoreOB;
private int intTreshOB;
private int intAllowDif1OB;
private int intAllowDif2OB;
private int intminScoreTDM;
private int intTreshTDM;
private int intAllowDif1TDM;
private int intAllowDif2TDM;
private double rankA;
private double rankB;
private double skillA;
private double skillB;
private double spmA;
private double spmB;
private double spmcombatA;
private double spmcombatB;
private double kdrA;
private double kdrB;
private double TBvalueA;
private double TBvalueB;
private enumBoolYesNo ynbDebugMode;
private enumBoolYesNo ynbDebugModeSkill;
private enumBoolYesNo ynbDebugModeGuard;
private enumBoolYesNo ynbWhitelist;
private enumBoolYesNo ynbShowWarnings;
private enumBoolYesNo ynbShowBallancing;
private enumBoolYesNo ynbShowPlayermessage;
private enumBoolYesNo ynbLoneWolf;
private enumBoolYesNo ynbincludeVIPlist;
private enumBoolYesNo ynbBalancingGuard;
private enumBoolYesNo ynbShameMessage;
private enumBoolYesNo ynbScrambleMessage;
private enumBoolYesNo ynbEnableScrambleNow;
private enumBoolYesNo ynbEnableScrambleRound;
private enumBoolYesNo ynbYellScrambleManuall;
private enumBoolYesNo ynbYellScrambleMessage;
private enumBoolYesNo ynbScrambleRoundViaPRoCon;
private enumBoolYesNo ynbScrambleRoundViaPRoConConf;
private string strScrambleMode;
private enumBoolYesNo ynbenableSkillRUSH;
private enumBoolYesNo ynbScrambleMapRUSH;
private string ScrambleByRUSH;
private enumBoolYesNo ynbenableSkillGM;
private enumBoolYesNo ynbScrambleMapGM;
private string ScrambleByGM;
private enumBoolYesNo ynbenableSkillDF;
private enumBoolYesNo ynbScrambleMapDF;
private string ScrambleByDF;
private enumBoolYesNo ynbenableSkillCONQUEST;
private enumBoolYesNo ynbScrambleMapCONQUEST;
private enumBoolYesNo ynbScrambleEveryRoundCONQUEST;
private int intwonTicketsCONQUEST;
private string strScrambleMessageCONQUEST;
private string ScrambleByCONQUEST;
private enumBoolYesNo ynbenableSkillDOM;
private enumBoolYesNo ynbScrambleMapDOM;
private enumBoolYesNo ynbScrambleEveryRoundDOM;
private int intwonTicketsDOM;
private string strScrambleMessageDOM;
private string ScrambleByDOM;
//private enumBoolYesNo ynbenableSkillOB;
//private enumBoolYesNo ynbScrambleMapOB;
//private string ScrambleByOB;
private enumBoolYesNo ynbenableSkillOB;
private enumBoolYesNo ynbScrambleMapOB;
private enumBoolYesNo ynbScrambleEveryRoundOB;
private int intwonTicketsOB;
private string strScrambleMessageOB;
private string ScrambleByOB;
private enumBoolYesNo ynbenableSkillTDM;
private enumBoolYesNo ynbScrambleMapTDM;
private enumBoolYesNo ynbScrambleEveryRoundTDM;
private int intwonTicketsTDM;
private int intshowTicketsTDM;
private string strScrambleMessageTDM;
private string ScrambleByTDM;
private bool m_isPluginEnabled;
private bool boolplayerexists;
private bool boolneedbalance;
private bool booltimer;
private bool boolstartBalance;
private bool boolFirstOP;
private bool boolLevelStart;
private bool boolLevelLoaded;
private bool boolRoundOver;
private bool boolgametype;
private bool boolafterBalance;
private bool boolfirstwarningWL;
private bool boolmanuellchange;
private bool boolnoplayer;
private bool boolscrambleActive;
private bool boolscrambleNow;
private bool boolTeamsScrambled;
private bool boolRunOnList;
private bool boolplayerleft;
private bool boolticketdif;
private bool boolwaitfordeath;
private bool boolwaitdead;
private bool boolfirstscrambler;
private bool boolscramblefailed;
private bool boolmessagesent;
private bool backswitcher;
private bool boolbalanced;
private bool boolscramblebyadminroundend;
private bool showfirstmove;
private string strcurrentGametype;
private TimeSpan TSWait;
private DateTime DTScramblestarted;
private DateTime DTLevelStart;
private TimeSpan TSLevelStartWait;
private TimeSpan TSForceMove;
private DateTime DTForceMove;
private TimeSpan EndRoundSeconds;
private DateTime EndRoundTime;
private DateTime DTLevelLoaded;
//private Timer myTimer = new Timer();
//private TimeSpan TSWaitforOP;
// private bool boolOnLogin;
//private DateTime DTRoundOver;
private bool boolVirtual;
private enumBoolYesNo ynbVirtualMode;
private int intMaxPlayersToFetch;
private enumBoolYesNo showMoves;
private enumBoolYesNo Check4Update;
public TrueBalancer() {
//lastupdatecheck = DateTime.Now.AddHours(-4);
this.bclient = new BattlelogClient(this);
this.dicPlayerCache = new Dictionary<string, CPlayerJoinInf>();
this.dicPlayerScore = new Dictionary<int, CPlayerScoreInf>();
this.dicSquadScore = new Dictionary<int, CSquadScoreInf>();
this.dicSquadList = new Dictionary<string, int>();
this.OnCommandMove = new Dictionary<string,bool>();
this.OnCommandMoveDone = new List<string>();
this.Servertype = "AUTOMATIC";
//this.strAWhitelist = new string[] { "HRPanter", "Name two", "Name three" };
//this.strAClantagWhitelist = new string[] { "FoC", "ClanTag2", "ClanTag3" };
//this.strAClantagWhitelistScrambler = new string[] { "FoC", "FoCr", "ClanTag3" }; ;
this.strAWhitelist = new string[] { "HRPanter" };
this.strAClantagWhitelist = new string[] { "FoC" };
this.strAClantagWhitelistScrambler = new string[] { "FoC", "FoCr" }; ;
this.strAWhitelistComplete = new string[] { };
this.teamswitcher = new List<string>();
this.BalancedPlayers = new List<string>();
//this.PlayersOnServer = new List<string>(new string[] {"Z1", "Z2", "HRPanter"}); //panter
this.strWarning = "EVEN TEAMS! Autobalancing teams shortly.";
this.strLastWarning = "AUTOBALANCING [Player: %MovedPlayer%]";
this.strBeenMoved = "You got balanced, because you have a low score and died.";
this.strMovedPlayer = "";
this.strJoinedPlayerName = "";
this.strShameMessage = "%TeamSwitcher% tried to switch into the winning team. SHAME ON YOU!";
this.strScrambleDoneMsg = "Teams are scrambled now. Good luck all!";
this.strScrambleNowMsg = "Teams are going to be scrambled now. This may take up to 20 seconds!";
this.strScrambleRoundMsg = "Teams are going to be scrambled on next round!";
this.strFinalSquad = "";
this.strErrorMsg = "";
this.strdeadplayer = "";
this.intInterval = 15;
this.intWarnings = 1;
this.intTimerWait = 15;
this.intI = 0;
this.TeamA = 0;
this.TeamB = 0;
this.intPlayerDif = 0;
this.intToTeam = 0;
this.intFromTeam = 0;
this.intNewTeam = 0;
this.intcountWarnings = 0;
this.intWaitSeconds = 0;
this.intScoreTeamA = 0;
this.intScoreTeamB = 0;
this.bestSquadTeamID = 0;
this.intCurrentRoundCount = 100;
this.intTicketsdif = -1;
this.intMaxSlots = 0;
this.intScrambledPlayers = 0;
this.intSquadA = 0;
this.intSquadB = 0;
this.intScrambleCount = 0;
this.intPlayerCache = 15;
this.dblValueDiffRUSH = 10;
this.dblValueDiffCONQUEST = 10;
this.dblValueDiffDOM = 10;
this.dblValueDiffTDM = 10;
this.dblValueDiffGM = 10;
this.intScoreWTS = 50;
this.intTicketcount = 123987123;
this.rankA = 0;
this.rankB = 0;
this.skillA = 0;
this.skillB = 0;
this.spmA = 0;
this.spmB = 0;
this.spmcombatA = 0;
this.spmcombatB = 0;
this.kdrA = 0;
this.kdrB = 0;
this.TBvalueA = 0;
this.TBvalueB = 0;
this.ynbDebugMode = enumBoolYesNo.No;
this.ynbDebugModeSkill = enumBoolYesNo.No;
this.ynbDebugModeGuard = enumBoolYesNo.No;
//this.ynbWhitelist = enumBoolYesNo.No;
this.ynbWhitelist = enumBoolYesNo.Yes;
this.ynbShowWarnings = enumBoolYesNo.Yes;
this.ynbShowBallancing = enumBoolYesNo.Yes;
this.ynbShowPlayermessage = enumBoolYesNo.Yes;
this.ynbLoneWolf = enumBoolYesNo.Yes;
//this.ynbincludeVIPlist = enumBoolYesNo.No;
this.ynbincludeVIPlist = enumBoolYesNo.Yes;
//this.ynbShameMessage = enumBoolYesNo.Yes;
//this.ynbBalancingGuard = enumBoolYesNo.No;
this.ynbShameMessage = enumBoolYesNo.No;
this.ynbBalancingGuard = enumBoolYesNo.Yes;
this.ynbScrambleMessage = enumBoolYesNo.Yes;
this.ynbEnableScrambleNow = enumBoolYesNo.No;
this.ynbEnableScrambleRound = enumBoolYesNo.Yes;
this.ynbYellScrambleManuall = enumBoolYesNo.Yes;
this.ynbYellScrambleMessage = enumBoolYesNo.Yes;
this.ynbScrambleRoundViaPRoCon = enumBoolYesNo.No;
this.ynbScrambleRoundViaPRoConConf = enumBoolYesNo.No;
this.backswitcher = false;
this.boolplayerleft = false;
this.m_isPluginEnabled = false;
this.boolplayerexists = false;
this.boolneedbalance = false;
this.booltimer = false;
this.boolstartBalance = false;
this.boolLevelStart = false;
this.boolLevelLoaded = true;
this.boolRoundOver = false;
this.boolgametype = false;
this.boolafterBalance = false;
this.boolFirstOP = false;
this.boolfirstwarningWL = false;
this.boolmanuellchange = false;
this.boolnoplayer = false;
this.boolscrambleActive = false;
this.boolscrambleNow = false;
this.boolTeamsScrambled = false;
this.DTScramblestarted = new DateTime();
this.boolRunOnList = false;
this.boolticketdif = false;
this.boolwaitfordeath = false;
this.boolwaitdead = false;
this.boolfirstscrambler = false;
this.boolscramblefailed = false;
this.boolmessagesent = false;
this.boolbalanced = true;
this.boolscramblebyadminroundend = false;
this.showfirstmove = true;
this.TSLevelStartWait = new TimeSpan(0);
this.DTLevelStart = new DateTime();
this.DTLevelLoaded = new DateTime();
this.intAllowDif = 500;
this.intminScore = 500;
this.intminScoreRUSH = 15;
this.intTreshRUSH = 24;
this.intAllowDif1RUSH = 1;
this.intAllowDif2RUSH = 2;
this.intTreshGM = 16;
this.intAllowDif1GM = 1;
this.intAllowDif2GM = 2;
this.intTreshDF = 16;
this.intAllowDif1DF = 1;
this.intAllowDif2DF = 2;
this.intminScoreCONQUEST = 100;
this.intTreshCONQUEST = 24;
this.intAllowDif1CONQUEST = 1;
this.intAllowDif2CONQUEST = 2;
this.intminScoreDOM = 100;
this.intTreshDOM = 24;
this.intAllowDif1DOM = 1;
this.intAllowDif2DOM = 2;
this.intminScoreOB = 1;
this.intTreshOB = 24;
this.intAllowDif1OB = 1;
this.intAllowDif2OB = 2;
this.intminScoreTDM = 25;
this.intTreshTDM = 24;
this.intAllowDif1TDM = 1;
this.intAllowDif2TDM = 2;
//this.strScrambleMode = "Keep squads with two or more clanmates";
this.strScrambleMode = "Keep all Squads";
this.ynbenableSkillRUSH = enumBoolYesNo.No;
this.ynbScrambleMapRUSH = enumBoolYesNo.No;
this.ScrambleByRUSH = "TB-Value";
this.ynbenableSkillGM = enumBoolYesNo.No;
this.ynbScrambleMapGM = enumBoolYesNo.No;
this.ScrambleByGM = "TB-Value";
this.ynbenableSkillDF = enumBoolYesNo.No;
this.ynbScrambleMapDF = enumBoolYesNo.No;
this.ScrambleByDF = "TB-Value";
//this.ynbenableSkillOB = enumBoolYesNo.No;
//this.ynbScrambleMapOB = enumBoolYesNo.No;
//this.ScrambleByOB = "TB-Value";
//this.ynbenableSkillCONQUEST = enumBoolYesNo.No;
this.ynbenableSkillCONQUEST = enumBoolYesNo.Yes;
this.ynbScrambleMapCONQUEST = enumBoolYesNo.No;
this.ynbScrambleEveryRoundCONQUEST = enumBoolYesNo.No;
this.intwonTicketsCONQUEST = 50;
this.strScrambleMessageCONQUEST = "SCRAMBLING teams next round. Ticketdifference too big. Squads will be kept together.";
this.ScrambleByCONQUEST = "TB-Value";
this.ynbenableSkillDOM = enumBoolYesNo.Yes;
this.ynbScrambleMapDOM = enumBoolYesNo.No;
this.ynbScrambleEveryRoundDOM = enumBoolYesNo.No;
this.intwonTicketsDOM = 50;
this.strScrambleMessageDOM = "SCRAMBLING teams next round. Ticketdifference too big. Squads will be kept together.";
this.ScrambleByDOM = "TB-Value";
//this.ynbenableSkillOB = enumBoolYesNo.No;
this.ynbenableSkillOB = enumBoolYesNo.Yes;
this.ynbScrambleMapOB = enumBoolYesNo.No;
this.ynbScrambleEveryRoundOB = enumBoolYesNo.No;
this.intwonTicketsOB = 50;
this.strScrambleMessageOB = "SCRAMBLING teams next round. Ticketdifference too big. Squads will be kept together.";
this.ScrambleByOB = "TB-Value";
//this.ynbenableSkillTDM = enumBoolYesNo.No;
this.ynbenableSkillTDM = enumBoolYesNo.Yes;
this.ynbScrambleMapTDM = enumBoolYesNo.No;
this.ynbScrambleEveryRoundTDM = enumBoolYesNo.No;
this.intwonTicketsTDM = 50;
this.intshowTicketsTDM = 50;
this.strScrambleMessageTDM = "SCRAMBLING teams next round. Ticketdifference too big. Squads will be kept together.";
this.ScrambleByTDM = "TB-Value";
this.TSForceMove = new TimeSpan(0);
this.DTForceMove = new DateTime();
this.EndRoundSeconds = new TimeSpan(0);
this.EndRoundTime = new DateTime();
this.boolVirtual = false;
this.ynbVirtualMode = enumBoolYesNo.No;
this.intMaxPlayersToFetch = 2;
showMoves = enumBoolYesNo.No;
Check4Update = enumBoolYesNo.Yes;
}
#endregion
#region PluginSetup
public string GetPluginName() {
return "TrueBalancer";
}
public string GetPluginVersion() {
return "0.5.3.0";
}
public string GetPluginAuthor() {
return "onegrizzlybeer, versions < 0.5 by Panther";
}
public string GetPluginWebsite() {
return "forum.myrcon.com/showthread.php?7169-TrueBalancer-0-5-0-0";
}
// A note to plugin authors: DO NOT change how a tag works, instead make a whole new tag.
public string GetPluginDescription() {
return @"<p> ... and contributors from the Procon community.</p>
<p>If you like my plugin, please feel free to donate</p>
<blockquote>
<form action=""https://www.paypal.com/cgi-bin/webscr"" method=""post"" target=""_blank"">
<input type=""hidden"" name=""cmd"" value=""_s-xclick"">
<input type=""hidden"" name=""hosted_button_id"" value=""VVZUWJJ8UFA3Q"">
<input type=""image"" src=""https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"" border=""0"" name=""submit"" alt=""PayPal - The safer, easier way to pay online!"">
<img alt="""" border=""0"" src=""https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"" width=""1"" height=""1"">
</form>
</form>
</blockquote>
<br><br>
<h2>Description</h2>
<p>This plugin is used to autobalance Teams in BF3 (All modes except SquadDeathMatch)<br>
There are 3 major parts within TrueBalancer:<br><br>
<u>1. PlayerNumber - Balancer</u> <br>
<i>- The PN-Balancer try to keep the teams even by playernumber. Eg: 30vs30</i><br><br>
<u>2. Skill- Scrambler</u><br>
<i>- The Scrambler trys to even out the teams at roundend by skill. Eg: Even out the teams by SPM, Skill, K/D...</i><br><br>
<u>3. Balancing Guard</u><br>
<i>- Balancing Guard trys to keep teams even by skill during the game. He sorts new players to the teams they fit best and doesn't allow players to switch
into the other team if they would unbalance the teams by PlayerNumber or Skill. In all Conquest Modes and TDM - Modes Balancing Guard doesn't allow winning team switching.</i><br><br>
<b><u>IMPORTANT:</b></u><br>
If you are running the plugins in sandboxmode, make sure you have these ports open:<br>
https://battlelog.battlefield.com 443<br>
http://battlelog.battlefield.com 80
<br><br>
This script is in Beta-Phase. Test at your own Risk. Report back please!</p>
<br><br>
<h2>Tutorials and recommended Settings</h2><br>
<p><center><font size=""+2""><a href=""http://youtu.be/hYG0NqjW5p0"" target=""_blank"" filter:Glow(color=#ff0000, strength=12);>TrueBalancer Part 1 of 3 - PlayerNumber Balancer</a><br>
<a href=""http://youtu.be/c5BhRIZYoFM"" target=""_blank"">TrueBalancer Part 2 of 3 - SkillScrambler</a><br>
<a href=""http://youtu.be/73a8_6jTHGU"" target=""_blank"">TrueBalancer Part 3 of 3 - BalancingGuard</a><br><br>
<a href=""http://www.phogue.net/forumvb/showthread.php?2866-TrueBalancer-for-BF3-(CQ-Rush-TDM)-0-2-7-(30-05-2012)&p=25828&viewfull=1#post25828"" target=""_blank"">RECOMMENDED SETTINGS</a><br>
</font></center></p>
<br><br>
<h2>InGame Commands</h2><br>
<p>@scramblenow: Will scramble the teams now. Use with caution. This will make players angry.<br>
@scrambleround: Will scramble the teams at roundend.<br><br>
Due to BalacingGuard the standart move/fmove are not working. TB has it's own commands:<br>
@tb-fmove: Force move a player into the other team.<br>
@tb-move: Move a player into the other team upon death.<br>
</p>
<br><br>
<h2>Settings</h2><br>
<p>Here is a link for the recommended settings:<br>
<a href=""http://www.phogue.net/forumvb/showthread.php?2866-TrueBalancer-for-BF3-(CQ-Rush-TDM)-0-2-7-(30-05-2012)&p=25828&viewfull=1#post25828"" target=""_blank"">RECOMMENDED SETTINGS</a></p>
<br><br><br>
<h2>Things you need to know:</h2>
<h3>Minimum values for the settings</h3>
<table border ='1'>
<tr><th>Setting</th><th>Minimum Value</th></tr>
<tr><td>How many Warnings?</td><td>1</td></tr>
<tr><td>Allow Player Difference of</td><td>1</td></tr>
<tr><td>Time between Warnings in sec</td><td>1</td></tr>
</table>
<h3>Prefixes for TrueBalance</h3>
<table border ='1'>
<tr><th>Prefix</th><th>Effect</th></tr>
<tr><td>%MovedPlayer%</td><td>Will be replaced by the moved player's name. Usable for: 'Message for moved Player' and 'Balancing Message'</td></tr>
<tr><td>%Warning%</td><td>Will be replaced by the number of the current warning. Usable for: 'Warning Message'</td></tr>
<tr><td>%maxWarnings%</td><td>Will be replaced by the number of maximal warnings. Usable for: 'Warning Message'</td></tr>
</table>
<br>
<h3>Changelog</h3><br>
<b>0.5.3.0</b><br>
- NEW: Added Gamemode Chainlink. Chainlink is treated just like Conquest.<br><br>
<b>0.5.2.0</b><br>
- Fix: Balancing was not working for Carrier Assault. Carrier Assault will use Conquest settings. On Carrier Assault its not possible to stop balancing once a certain point is reached (no proper way to detect for plugins)<br><br>
<b>0.5.1.1</b><br>
- Fix: Commanders and Spectators are now excluded from balancing<br>
- Fix: Persona ID could not be found for some players<br><br>
<b>0.5.1.0</b><br>
- NEW: Automatic Update Check<br>
- Fix: Domination settings block<br>
- Fix: Confirmation msg when scrambling at roundend requested by admin via procon<br>
- Fix: Settings for game mode Obliteration could not be altered.<br><br>
<b>0.5.0.0</b><br>
- NEW: BF4 compatibility<br><br>
<b>0.4.0.7 (Edits by EBastard)</b><br>
- Fix: Added Capture The Flag to plugin settings<br>
- Fix: scrambling for CTF<br><br>
<b>0.4.0.6 (Edits by EBastard)</b><br>
- ADD: Support for Air Superiority. Conquest settings also apply to this gamemodde.<br>
- ADD: Support for Capture the Flag. Gunmaster settings also apply to this gamemode.<br><br>
<b>0.4.0.2 - 0.4.0.5 (Edits by PapaCharlie9)</b><br>
- (0.4.0.5) Restores the tb-move and tb-fmove commands that were lost in the 0.4.0.4 patch<br>
- Reduces lag/delays due to stats fetching (but does not eliminate lag, see https://forum.myrcon.com/showthread.php?5623)<br>
- Reduces Procon panic errors, where the plugin seems to disable itself or disappear<br>
- Adds player name to StatsException messages<br>
- Adds a new plugin setting (see https://forum.myrcon.com/showthread.php?5623)<br><br>
<b>0.4.0.1 (Edit by EBastard)</b><br>
- ADD: Support for Scavenger. Conquest settings also apply to Scavenger.<br><br>
<b>0.4.0.0</b><br>
- ADD: Support for TankSuperiority. Conquest settings also apply to TankSuperiority.<br><br>
<b>0.3.5.5</b><br>
- Small Fix: When ticket till end was reached, the message to balance to server was shown, causing it to spam on high ticket servers. Removed this message.<br>
- Small Fix: Threshold adjusting to make it work as threshold is defined. Playerdifference below and equal to/above threshold.<br><br>
<b>0.3.5.0</b><br>
- HOTFIX: Workaround for ingame bug with 5 players in a squad.<br><br>
<b>0.3.4.0</b><br>
- CHANGE: Changing the scrambling mechanism for 'keep no squads' and 'keep squads with two or more clanmates'.<br><br>
<b>0.3.3.2</b><br>
- Fix: Problems with negativ Skills fixed. Negativ Skills are set to 0.<br>
- FIX: Problem with StatsReset feature. This got fixed by calculating all values by TrueBalancer.<br>
- FIX: Fixing a bug with Rush/GM and the BalancingGuard. Wrong values have been used.<br><br>
<b>0.3.3.1</b><br>
- ADDED: ClanTagWhitelist for the SkillScrambler, when using 'Keep squads with two or more clanmates'. Squads with at least one player, who contains one of the whitelisted ClanTags will not be teared apart. They will still be scrambled<br>
- ADDED: New Value 'TB-Value'. This is a combination of all the information/skills of a player.<br>
- FIX: Fixing a small bug in the scrambler. If a player can't be put into the squad of his mates, TB tries to assign a complete new squad to all playmates.<br><br>
<b>0.3.3</b><br>
- ADDED: TrueBalancer's own move/fmove - commands, to be able to move players, even if BalancingGuard is on.<br>
- ADDED: Possiblity to split squads while scrambling. Admins can choose what they want.<br><br>
<b>0.3.2</b><br>
- CHANGE: Changing form tickets to % in settings: Sramble at % ticketsdiff, stop winning teamswitching at x %.<br>
- CHANGE: TDM settings no need for 'show message at x tickets' anymore <br>
- TWEAK: BalancinGuard tweaked to automatically detect what team is better by all skills.<br>
- FIX: Fixing minor bug for moving dead players only (A player was still marked as dead upon revive)<br>
- FIX: Fixing TrueBalancer, which could get crazy if a manual roundrestart/nextround was requested.<br>
- ADDED: Possiblitly to execute manual command '!scrambleround' via PRoCon<br><br>
<b>0.3.1</b><br>
- FIXING: Domination bug fixed. TB didn't balance at all.<br>
- ADDED: Seperating GunMaster from Rush<br>
- FIXING: Minor issues with settings, not able to be set below a certain number<br><br>
<b>0.3.0</b><br>
- Adding support for CQC<br>
- NEW: Choose what your server should be scrambled/sorted by<br><br>
<b>0.2.8</b><br>
- Tweaking Balancing Guard to let the server breath more (not so tight settings).<br>
- Fixing some minor bugs with Rush<br><br>
<b>0.2.7</b><br>
- Fixing Balancing Guard: Moving Good players to the winning team and bad players to the loosing team on join. (When winning team had a lower SPMAverage than loosing team).<br>
- Fixing Balancing Guard: Definition for 'good' and 'bad' players was missing.<br>
Definition Before:<br>
- If SPM of a player is higher than the winning Teams SPMAverage, he was declared as good player. But a player with a SPM of 250 is far away from being good ;).<br>
Definition Now:<br>
- Good Player SPM >= 450<br>
- Bad Player SPM <= 250<br><br>
<b>0.2.6</b><br>
- Manual commands added to scramble teams now or at the end of a round.<br><br>
<b>0.2.5</b><br>
- Fixing Balancing Guard for Rush<br>
- Fixing TB for the newest Serverversion that could have gone to a critical stage at roundstart.<br><br>
<b>0.2.4</b><br>
- NEW FEATURE: Balancing Guard!<br>
- Does not allow players to teamswtich and unbalance the teams by playernumber.<br>
- Does not allow players to teamswitch to the winning team.<br>
- Sorting new players by SPM and adds them to the team they should be.<br><br>
<b>0.2.2</b><br>
- Added Threshold for all gamemodes: (Playernumberbalancer above and below that threshold can be set sepperate.)<br>
- Seperate settings for all GameModes (SquadDeathMatch is not supported)<br>
- Made the scrambler abit more safe against strane lags that can happen during scrambling.<br><br>
<b>0.2.0</b><br>
- Now scrambling by SPM (Battlelog).<br>
- Scrambling Message is yelled at roundend for 30 seconds.<br>
- NEW method to balance players. Now players are only going to be balanced when they are dead.<br><br>
<b>0.1.6</b><br>
- RUSH: Only way to scramble teams in rush is on every new map.<br><br>
<b>0.1.5</b><br>
- RUSHMode Support<br><br>
<b>0.1.4</b><br>
- FIX: Showing message at roundend when SkillScrambler is deactivated. This bug is fixed.<br><br>
<b>0.1.3</b><br>
- FIX: If the server is full, TB can't scramble the teams. Checking this 40 seconds later gives the player the chance to leave the server.<br>
- TB works now for all modes except SquadDeathMatch <br>
- RUSH: Teams will not be scrambled anymore if the defenders win. (Ticketdifference > 1000)<br>
- NEW: Message near roundend, if the teams will be scrambled next round.<br><br>
<b>0.1.2</b><br>
- VIP-List can now be included into the whitelist.<br>
- Players are not slayed anymore at roundstart. Players get scrambled before the next round starts loading.<br>
(small side effect: The scoretable gets messed during the last 20 seconds at roundend. This has no effect on scores or anyhting else. This is way better than players getting slayed at roundstart.)<br><br>
<b>0.1.0</b><br>
- SquadBug fixed<br>
- Added support for conquestsmall1<br>
- Added a scrambler, which will scrambler the teams at a new map if nessesary.<br><br>
<b>0.0.6</b><br>
Changed the lone wolf option. Now it is lone wolfs first. If there are no lone wolf, than somebody from a squad.<br><br>
<b>0.0.5</b><br>
Added possibility to move lone wolfs only.<br><br>
<b>0.0.4</b><br>
Added more possibilities to edit the ingame messages.<br><br>
<b>0.0.3</b><br>
Added 'Stop balancing, when tickets till end'<br>
Important bug fix, where the jointimes could be deleted at roundstart.<br><br>
<b>0.0.2</b><br>
Added Teamdeathmatch<br><br>
<b>0.0.1</b><br>
First Release!
If you have any Idears for the autobalancer contact me on the Procon - Forums. I'll try to implement every good idea.
";
}
public void OnPluginLoaded(string strHostName, string strPort, string strPRoConVersion) {
this.boolRunOnList = false;
this.boolLevelLoaded = true;
this.boolnoplayer = false;
this.boolscrambleNow = false;
this.boolscrambleActive = false;
this.intTicketsdif = -1;
this.boolTeamsScrambled = false;
this.boolticketdif = false;
this.m_strHostName = strHostName;
this.m_strPort = strPort;
this.m_strPRoConVersion = strPRoConVersion;
this.RegisterEvents(this.GetType().Name, "OnReservedSlotsList",
"OnListPlayers",
"OnPlayerSquadChange",
"OnPlayerMovedByAdmin",
"OnRoundOverPlayers",
"OnRoundOverTeamScores",
"OnPlayerSpawned",
"OnLevelLoaded",
"OnResponseError",
"OnLogin",
"OnServerInfo",
"OnPlayerTeamChange",
"OnPlayerLeft",
"OnRoundOver",
//"BalancingTimer",
"OnPlayerKilled",
"OnRestartLevel",
"OnRunNextLevel");
}
public void OnPluginEnable() {
this.ExecuteCommand("procon.protected.pluginconsole.write", "^bTrueBalancer ^2Enabled! " + GetPluginVersion());
this.boolfirstwarningWL = false;
this.m_isPluginEnabled = true;
this.RegisterAllCommands();
//this.boolOnLogin = true;
this.boolLevelStart = false;
this.boolLevelLoaded = true;
this.boolFirstOP = false;
this.boolgametype = false;
this.DTLevelStart = new DateTime();
this.boolnoplayer = false;
this.intScrambledPlayers = 0;
this.boolscrambleNow = false;
this.boolscrambleActive = false;
this.intTicketsdif = -1;
this.boolTeamsScrambled = false;
this.boolticketdif = false;
this.DTScramblestarted = new DateTime();
this.boolRunOnList = false;
}
public void OnPluginDisable() {
this.UnregisterAllCommands();
this.boolfirstwarningWL = false;
this.m_isPluginEnabled = false;
this.boolneedbalance = false;
if (this.boolscrambleActive){
this.DebugInfoSkill("^8^bScrambler active at Disabled. STOP! Teams partly scrambled!");
this.boolTeamsScrambled = true;
this.intScrambledPlayers = 0;
this.boolscrambleNow = false;
this.boolscrambleActive = false;
this.intScrambleCount = 0;
}
this.dicPlayerCache.Clear();
this.dicPlayerScore.Clear();
this.dicSquadScore.Clear();
this.dicSquadList.Clear();
this.OnCommandMove.Clear();
this.OnCommandMoveDone.Clear();
this.BalancedPlayers.Clear();
this.ExecuteCommand("procon.protected.pluginconsole.write", "^bTrueBalancer ^1Disabled =(");
}
public List<CPluginVariable> GetDisplayPluginVariables() {
List<CPluginVariable> lstReturn = new List<CPluginVariable>();
lstReturn.Add(new CPluginVariable("0. Battlelog Stats|Maximum number of players to fetch at each interval", this.intMaxPlayersToFetch.GetType(), this.intMaxPlayersToFetch));
lstReturn.Add(new CPluginVariable("0. Battlelog Stats|Servertype", "enum.Servertype(AUTOMATIC|BF3|BF4)", this.Servertype));
lstReturn.Add(new CPluginVariable("0. Manual Commands via PRoCon|PRoCon - Scramble Teams on Roundend?", this.ynbScrambleRoundViaPRoCon.GetType(), this.ynbScrambleRoundViaPRoCon));
if (this.ynbScrambleRoundViaPRoCon == enumBoolYesNo.Yes)
{
lstReturn.Add(new CPluginVariable("0. Manual Commands via PRoCon|PRoCon - Scramble Teams on Roundend? Are you sure?", this.ynbScrambleRoundViaPRoConConf.GetType(), this.ynbScrambleRoundViaPRoConConf));
}
lstReturn.Add(new CPluginVariable("1. Playernumber Balancer: Settings|How many warnings?", this.intWarnings.GetType(), this.intWarnings));
lstReturn.Add(new CPluginVariable("1. Playernumber Balancer: Settings|Time between Warnings in sec", this.intInterval.GetType(), this.intInterval));
lstReturn.Add(new CPluginVariable("1. Playernumber Balancer: Settings|Show ingame warnings?", this.ynbShowWarnings.GetType(), this.ynbShowWarnings));
if (this.ynbShowWarnings == enumBoolYesNo.Yes)
{
lstReturn.Add(new CPluginVariable("1. Playernumber Balancer: Settings|Warning Message", this.strWarning.GetType(), this.strWarning));
}
lstReturn.Add(new CPluginVariable("1. Playernumber Balancer: Settings|Show ingame balancing message?", this.ynbShowBallancing.GetType(), this.ynbShowBallancing));
if (this.ynbShowBallancing == enumBoolYesNo.Yes)
{
lstReturn.Add(new CPluginVariable("1. Playernumber Balancer: Settings|Balancing Message", this.strLastWarning.GetType(), this.strLastWarning));
}
lstReturn.Add(new CPluginVariable("1. Playernumber Balancer: Settings|Show private message to moved player?", this.ynbShowPlayermessage.GetType(), this.ynbShowPlayermessage));
if (this.ynbShowPlayermessage == enumBoolYesNo.Yes)
{
lstReturn.Add(new CPluginVariable("1. Playernumber Balancer: Settings|Message for moved Player", this.strBeenMoved.GetType(), this.strBeenMoved));
}
lstReturn.Add(new CPluginVariable("1.1 Playernumber Balancer: RUSH|RUSH-Player Threshold", this.intTreshRUSH.GetType(), this.intTreshRUSH));
lstReturn.Add(new CPluginVariable("1.1 Playernumber Balancer: RUSH|RUSH-Allowing Player Difference below Threshold", this.intAllowDif1RUSH.GetType(), this.intAllowDif1RUSH));
lstReturn.Add(new CPluginVariable("1.1 Playernumber Balancer: RUSH|RUSH-Allowing Player Difference equal to/above Threshold", this.intAllowDif2RUSH.GetType(), this.intAllowDif2RUSH));
lstReturn.Add(new CPluginVariable("1.1 Playernumber Balancer: RUSH|RUSH-Stop balancing, when tickets till end", this.intminScoreRUSH.GetType(), this.intminScoreRUSH));
lstReturn.Add(new CPluginVariable("1.2 Playernumber Balancer: CONQUEST|CQ-Player Threshold", this.intTreshCONQUEST.GetType(), this.intTreshCONQUEST));
lstReturn.Add(new CPluginVariable("1.2 Playernumber Balancer: CONQUEST|CQ-Allowing Player Difference below Threshold", this.intAllowDif1CONQUEST.GetType(), this.intAllowDif1CONQUEST));
lstReturn.Add(new CPluginVariable("1.2 Playernumber Balancer: CONQUEST|CQ-Allowing Player Difference equal to/above Threshold", this.intAllowDif2CONQUEST.GetType(), this.intAllowDif2CONQUEST));
lstReturn.Add(new CPluginVariable("1.2 Playernumber Balancer: CONQUEST|CQ-Stop balancing, when tickets till end", this.intminScoreCONQUEST.GetType(), this.intminScoreCONQUEST));
lstReturn.Add(new CPluginVariable("1.3 Playernumber Balancer: TEAMDEATHMATCH|TDM-Player Threshold", this.intTreshTDM.GetType(), this.intTreshTDM));
lstReturn.Add(new CPluginVariable("1.3 Playernumber Balancer: TEAMDEATHMATCH|TDM-Allowing Player Difference below Threshold", this.intAllowDif1TDM.GetType(), this.intAllowDif1TDM));
lstReturn.Add(new CPluginVariable("1.3 Playernumber Balancer: TEAMDEATHMATCH|TDM-Allowing Player Difference equal to/above Threshold", this.intAllowDif2TDM.GetType(), this.intAllowDif2TDM));
lstReturn.Add(new CPluginVariable("1.3 Playernumber Balancer: TEAMDEATHMATCH|TDM-Stop balancing, when tickets till end", this.intminScoreTDM.GetType(), this.intminScoreTDM));
lstReturn.Add(new CPluginVariable("1.4 Playernumber Balancer: GUN MASTER / CTF|GM/CTF-Player Threshold", this.intTreshGM.GetType(), this.intTreshGM));
lstReturn.Add(new CPluginVariable("1.4 Playernumber Balancer: GUN MASTER / CTF|GM/CTF-Allowing Player Difference below Threshold", this.intAllowDif1GM.GetType(), this.intAllowDif1GM));
lstReturn.Add(new CPluginVariable("1.4 Playernumber Balancer: GUN MASTER / CTF|GM/CTF-Allowing Player Difference equal to/above Threshold", this.intAllowDif2GM.GetType(), this.intAllowDif2GM));
lstReturn.Add(new CPluginVariable("1.5 Playernumber Balancer: DEFUSE|DF-Player Threshold", this.intTreshDF.GetType(), this.intTreshDF));
lstReturn.Add(new CPluginVariable("1.5 Playernumber Balancer: DEFUSE|DF-Allowing Player Difference below Threshold", this.intAllowDif1DF.GetType(), this.intAllowDif1DF));
lstReturn.Add(new CPluginVariable("1.5 Playernumber Balancer: DEFUSE|DF-Allowing Player Difference equal to/above Threshold", this.intAllowDif2DF.GetType(), this.intAllowDif2DF));
lstReturn.Add(new CPluginVariable("1.6 Playernumber Balancer: OBLITERATION|OB-Player Threshold", this.intTreshOB.GetType(), this.intTreshOB));
lstReturn.Add(new CPluginVariable("1.6 Playernumber Balancer: OBLITERATION|OB-Allowing Player Difference below Threshold", this.intAllowDif1OB.GetType(), this.intAllowDif1OB));
lstReturn.Add(new CPluginVariable("1.6 Playernumber Balancer: OBLITERATION|OB-Allowing Player Difference equal to/above Threshold", this.intAllowDif2OB.GetType(), this.intAllowDif2OB));
lstReturn.Add(new CPluginVariable("1.6 Playernumber Balancer: OBLITERATION|OB-Stop balancing, when tickets till end", this.intminScoreOB.GetType(), this.intminScoreOB));
lstReturn.Add(new CPluginVariable("1.7 Playernumber Balancer: DOMINATION|DOM-Player Threshold", this.intTreshDOM.GetType(), this.intTreshDOM));
lstReturn.Add(new CPluginVariable("1.7 Playernumber Balancer: DOMINATION|DOM-Allowing Player Difference below Threshold", this.intAllowDif1DOM.GetType(), this.intAllowDif1DOM));
lstReturn.Add(new CPluginVariable("1.7 Playernumber Balancer: DOMINATION|DOM-Allowing Player Difference equal to/above Threshold", this.intAllowDif2DOM.GetType(), this.intAllowDif2DOM));
lstReturn.Add(new CPluginVariable("1.7 Playernumber Balancer: DOMINATION|DOM-Stop balancing, when tickets till end", this.intminScoreDOM.GetType(), this.intminScoreDOM));
lstReturn.Add(new CPluginVariable("2.1 Skill-Scrambler: RUSH|RUSH-Scramble teams on every new map?", typeof(enumBoolYesNo), this.ynbenableSkillRUSH));
if (this.ynbenableSkillRUSH == enumBoolYesNo.Yes)
{
lstReturn.Add(new CPluginVariable("2.1 Skill-Scrambler: RUSH|RUSH-Scramble by", "enum.ScrambleBy(TB-Value|Rank|Skill|SPM|SPMcombat|K/D)", this.ScrambleByRUSH));
lstReturn.Add(new CPluginVariable("2.1 Skill-Scrambler: RUSH|What to do with squads?", "enum.SquadMode(Keep all Squads|Keep squads with two or more clanmates|Keep no squads)", this.strScrambleMode));
if (this.strScrambleMode == "Keep squads with two or more clanmates")
{
lstReturn.Add(new CPluginVariable("2.1 Skill-Scrambler: RUSH|ClanTag-List: Keep squad, if at least one player uses one of these ClanTags", this.strAClantagWhitelistScrambler.GetType(), this.strAClantagWhitelistScrambler));
}
/*
if(this.ynbScrambleEveryRound == enumBoolYesNo.No){
lstReturn.Add(new CPluginVariable("4. Skill-Scrambler: Settings|Scramble on every new map no matter what score(Rush and Conquest)", typeof(enumBoolYesNo), this.ynbScrambleMap));
}
if(this.ynbScrambleMap == enumBoolYesNo.No){
lstReturn.Add(new CPluginVariable("4. Skill-Scrambler: Settings|Check balance on every new Round (else on new Map only) (Conquest)", typeof(enumBoolYesNo), this.ynbScrambleEveryRound));
lstReturn.Add(new CPluginVariable("4. Skill-Scrambler: Settings|Scramble if won with over x Tickets (Coquest)", this.intwonTickets.GetType(), this.intwonTickets));
}
lstReturn.Add(new CPluginVariable("4. Skill-Scrambler: Settings|Scrambling Message at roundend (Coquest)", this.strScrambleMessage.GetType(), this.strScrambleMessage));
*/
}
lstReturn.Add(new CPluginVariable("2.2 Skill-Scrambler: CONQUEST|CQ-Enable Skillscrambler?", typeof(enumBoolYesNo), this.ynbenableSkillCONQUEST));
if (this.ynbenableSkillCONQUEST == enumBoolYesNo.Yes)
{
if (this.ynbScrambleEveryRoundCONQUEST == enumBoolYesNo.No)
{
lstReturn.Add(new CPluginVariable("2.2 Skill-Scrambler: CONQUEST|CQ-Scramble on every new map no matter what score?", typeof(enumBoolYesNo), this.ynbScrambleMapCONQUEST));
}
if (this.ynbScrambleMapCONQUEST == enumBoolYesNo.No)
{
lstReturn.Add(new CPluginVariable("2.2 Skill-Scrambler: CONQUEST|CQ-Check balance on every new Round (else on new Map only)", typeof(enumBoolYesNo), this.ynbScrambleEveryRoundCONQUEST));
lstReturn.Add(new CPluginVariable("2.2 Skill-Scrambler: CONQUEST|CQ-Scramble, if x % Tickets difference (% of maxTickets)", this.intwonTicketsCONQUEST.GetType(), this.intwonTicketsCONQUEST));
}
lstReturn.Add(new CPluginVariable("2.2 Skill-Scrambler: CONQUEST|CQ-Scramble by", "enum.ScrambleBy(TB-Value|Rank|Skill|SPM|SPMcombat|K/D)", this.ScrambleByCONQUEST));
lstReturn.Add(new CPluginVariable("2.2 Skill-Scrambler: CONQUEST|What to do with squads?", "enum.SquadMode(Keep all Squads|Keep squads with two or more clanmates|Keep no squads)", this.strScrambleMode));
if (this.strScrambleMode == "Keep squads with two or more clanmates")
{
lstReturn.Add(new CPluginVariable("2.2 Skill-Scrambler: CONQUEST|ClanTag-List: Keep squad, if at least one player uses one of these ClanTags", this.strAClantagWhitelistScrambler.GetType(), this.strAClantagWhitelistScrambler));
}
lstReturn.Add(new CPluginVariable("2.2 Skill-Scrambler: CONQUEST|CQ-Scrambling Message at roundend", this.strScrambleMessageCONQUEST.GetType(), this.strScrambleMessageCONQUEST));
lstReturn.Add(new CPluginVariable("2.2 Skill-Scrambler: CONQUEST|Yell scramble message at roundend?", typeof(enumBoolYesNo), this.ynbYellScrambleMessage));
}
lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|TDM-Enable Skillscrambler?", typeof(enumBoolYesNo), this.ynbenableSkillTDM));
if (this.ynbenableSkillTDM == enumBoolYesNo.Yes)
{
if(this.ynbScrambleEveryRoundTDM == enumBoolYesNo.No){
lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|TDM-Scramble on every new map no matter what score?", typeof(enumBoolYesNo), this.ynbScrambleMapTDM));
}
if(this.ynbScrambleMapTDM == enumBoolYesNo.No){
lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|TDM-Check balance on every new Round (else on new Map only)", typeof(enumBoolYesNo), this.ynbScrambleEveryRoundTDM));
lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|TDM-Scramble, if x % Tickets difference (% of maxTickets)", this.intwonTicketsTDM.GetType(), this.intwonTicketsTDM));
}
//lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|TDM-Show Scramble message at roundend when x Tickets are reached", this.intwonTicketsTDM.GetType(), this.intshowTicketsTDM));
lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|TDM-Scramble by", "enum.ScrambleBy(TB-Value|Rank|Skill|SPM|SPMcombat|K/D)", this.ScrambleByTDM));
lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|What to do with squads?", "enum.SquadMode(Keep all Squads|Keep squads with two or more clanmates|Keep no squads)", this.strScrambleMode));
if (this.strScrambleMode == "Keep squads with two or more clanmates")
{
lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|ClanTag-List: Keep squad, if at least one player uses one of these ClanTags", this.strAClantagWhitelistScrambler.GetType(), this.strAClantagWhitelistScrambler));
}
lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|TDM-Scrambling Message at roundend", this.strScrambleMessageTDM.GetType(), this.strScrambleMessageTDM));
lstReturn.Add(new CPluginVariable("2.3 Skill-Scrambler: TEAMDEATHMATCH|Yell scramble message at roundend?", typeof(enumBoolYesNo), this.ynbYellScrambleMessage));
}
lstReturn.Add(new CPluginVariable("2.4 Skill-Scrambler: GUN MASTER / CTF|GM/CTF-Scramble teams on every new map?", typeof(enumBoolYesNo), this.ynbenableSkillGM));
if (this.ynbenableSkillGM == enumBoolYesNo.Yes)
{
lstReturn.Add(new CPluginVariable("2.4 Skill-Scrambler: GUN MASTER / CTF|GM/CTF-Scramble by", "enum.ScrambleBy(TB-Value|Rank|Skill|SPM|SPMcombat|K/D)", this.ScrambleByGM));
lstReturn.Add(new CPluginVariable("2.4 Skill-Scrambler: GUN MASTER / CTF|What to do with squads?", "enum.SquadMode(Keep all Squads|Keep squads with two or more clanmates|Keep no squads)", this.strScrambleMode));
if (this.strScrambleMode == "Keep squads with two or more clanmates")
{
lstReturn.Add(new CPluginVariable("2.4 Skill-Scrambler: GUN MASTER / CTF|ClanTag-List: Keep squad, if at least one player uses one of these ClanTags", this.strAClantagWhitelistScrambler.GetType(), this.strAClantagWhitelistScrambler));