Merge branch 'NoEvo'

This commit is contained in:
ChocoTaco1 2021-01-21 13:44:30 -05:00
commit 49fb4dddbb
10 changed files with 3166 additions and 2961 deletions

View file

@ -45,7 +45,7 @@
//Small Maps //Small Maps
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
addRotationMap("SmallCrossing", "CTF",1,1,-1,16); //addRotationMap("SmallCrossing", "CTF",1,1,-1,16); //Using Small Crossing: DMP Version
addRotationMap("TWL2_CanyonCrusadeDeluxe", "CTF",1,1,-1,18); addRotationMap("TWL2_CanyonCrusadeDeluxe", "CTF",1,1,-1,18);
addRotationMap("RoundTheMountain", "CTF",1,1,-1,18); addRotationMap("RoundTheMountain", "CTF",1,1,-1,18);
addRotationMap("oasisintensity", "CTF",1,1,-1,12); addRotationMap("oasisintensity", "CTF",1,1,-1,12);
@ -65,48 +65,51 @@ addRotationMap("Bulwark", "CTF",1,1,-1,12);
//addRotationMap("FrostPipe", "CTF",1,0,-1,12); //addRotationMap("FrostPipe", "CTF",1,0,-1,12);
addRotationMap("Blink", "CTF",1,1,-1,10); addRotationMap("Blink", "CTF",1,1,-1,10);
addRotationMap("Discord", "CTF",1,1,6,16); addRotationMap("Discord", "CTF",1,1,6,16);
addRotationMap("StarFallCTF", "CTF",1,1,6,12); addRotationMap("TWL2_MidnightMayhemDeluxe", "CTF",1,0,8,12);
addRotationMap("TWL2_MidnightMayhemDeluxe", "CTF",1,1,8,12);
addRotationMap("Sentry", "CTF",1,1,6,12); addRotationMap("Sentry", "CTF",1,1,6,12);
addRotationMap("TWL2_Skylight", "CTF",1,1,6,12); addRotationMap("TWL2_Skylight", "CTF",1,0,6,12);
addRotationMap("Cinerarium", "CTF",1,1,-1,10); addRotationMap("Exhumed", "CTF",1,1,-1,10);
addRotationMap("Exhumed", "CTF",1,0,-1,10);
//addRotationMap("TWL2_FrozenHope", "CTF",1,0,8,20); //addRotationMap("TWL2_FrozenHope", "CTF",1,0,8,20);
addRotationMap("FrozenHope", "CTF",1,0,8,12); addRotationMap("FrozenHope", "CTF",1,1,8,12);
addRotationMap("ClusterUnFuct", "CTF",1,1,8,12);
addRotationMap("Raspian", "CTF",1,0,8,12);
addRotationMap("Zilch", "CTF",1,1,8,12);
addRotationMap("Cinerarium", "CTF",1,0,-1,12);
addRotationMap("StarFallCTF", "CTF",1,0,6,12);
//Medium Maps //Medium Maps
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
addRotationMap("HighOctane", "CTF",1,1,8,24); addRotationMap("HighOctane", "CTF",1,1,8,24);
addRotationMap("S5_Mordacity", "CTF",1,1,8,24); addRotationMap("S5_Mordacity", "CTF",1,1,12,24);
addRotationMap("S5_Damnation", "CTF",1,0,8,20); addRotationMap("S5_Damnation", "CTF",1,0,12,20);
addRotationMap("TWL2_JaggedClaw", "CTF",1,1,8,24); addRotationMap("TWL2_JaggedClaw", "CTF",1,1,12,24);
addRotationMap("S5_Massive", "CTF",1,1,10,26); addRotationMap("S5_Massive", "CTF",1,1,10,26);
addRotationMap("TWL_Stonehenge", "CTF",1,1,8,20); addRotationMap("TWL_Stonehenge", "CTF",1,1,8,20);
addRotationMap("TWL_Feign", "CTF",1,1,10,20); addRotationMap("TWL_Feign", "CTF",1,0,10,20);
addRotationMap("TheFray", "CTF",1,1,10,20); addRotationMap("TheFray", "CTF",1,0,10,20);
addRotationMap("DangerousCrossing_nef", "CTF",1,1,8,20); addRotationMap("DangerousCrossing_nef", "CTF",1,1,8,20);
addRotationMap("TWL2_Ocular", "CTF",1,1,12,-1); addRotationMap("TWL2_Ocular", "CTF",1,1,16,-1);
addRotationMap("Dire", "CTF",1,0,10,16); addRotationMap("Dire", "CTF",1,1,10,16);
addRotationMap("berlard", "CTF",1,1,12,24); addRotationMap("berlard", "CTF",1,0,12,24);
addRotationMap("S8_Opus", "CTF",1,0,8,24); addRotationMap("S8_Opus", "CTF",1,0,8,24);
addRotationMap("BeggarsRun", "CTF",1,0,8,24); addRotationMap("BeggarsRun", "CTF",1,0,8,24);
addRotationMap("Headstone", "CTF",1,0,8,20); addRotationMap("Headstone", "CTF",1,0,8,20);
addRotationMap("Signal", "CTF",1,0,8,26); addRotationMap("Signal", "CTF",1,0,8,26);
addRotationMap("S5_Woodymyrk", "CTF",1,1,8,26); addRotationMap("S5_Woodymyrk", "CTF",1,1,10,26);
addRotationMap("TenebrousCTF", "CTF",1,1,8,12); addRotationMap("TenebrousCTF", "CTF",1,0,8,12);
addRotationMap("Pariah", "CTF",1,1,8,16); addRotationMap("Pariah", "CTF",1,0,8,16);
addRotationMap("Prismatic", "CTF",1,0,12,26); addRotationMap("Prismatic", "CTF",1,1,12,26);
addRotationMap("TWL_WilderZone", "CTF",1,1,8,20); addRotationMap("TWL_WilderZone", "CTF",1,0,8,20);
//addRotationMap("Mirage", "CTF",1,0,8,20); //addRotationMap("Mirage", "CTF",1,0,8,20);
addRotationMap("S5_Mimicry", "CTF",1,0,8,24); addRotationMap("S5_Mimicry", "CTF",1,0,8,24);
//addRotationMap("TWL_Snowblind", "CTF",1,0,12,-1); //addRotationMap("TWL_Snowblind", "CTF",1,0,12,-1);
addRotationMap("ShortFall", "CTF",1,0,12,24); addRotationMap("ShortFall", "CTF",1,1,12,24);
//addRotationMap("IceRidge_nef", "CTF",1,0,8,20); //addRotationMap("IceRidge_nef", "CTF",1,0,8,20);
//addRotationMap("Disjointed", "CTF",1,0,8,20); //addRotationMap("Disjointed", "CTF",1,0,8,20);
addRotationMap("TWL2_MuddySwamp", "CTF",1,1,8,20); addRotationMap("TWL2_MuddySwamp", "CTF",1,0,8,20);
addRotationMap("HighAnxiety", "CTF",1,0,8,20); addRotationMap("HighAnxiety", "CTF",1,0,8,20);
addRotationMap("S5_Centaur", "CTF",1,1,8,20); addRotationMap("S5_Centaur", "CTF",1,0,8,20);
addRotationMap("S8_Cardiac", "CTF",1,1,12,-1); addRotationMap("S8_Cardiac", "CTF",1,1,12,-1);
addRotationMap("CirclesEdge", "CTF",1,1,10,24); addRotationMap("CirclesEdge", "CTF",1,1,10,24);
addRotationMap("S5_Icedance", "CTF",1,1,8,24); addRotationMap("S5_Icedance", "CTF",1,1,8,24);
@ -133,20 +136,20 @@ addRotationMap("Cinereous", "CTF",1,0,12,20);
//addRotationMap("Coppersky", "CTF",1,0,8,20); //addRotationMap("Coppersky", "CTF",1,0,8,20);
//addRotationMap("TWL2_Crevice", "CTF",1,0,10,20); //addRotationMap("TWL2_Crevice", "CTF",1,0,10,20);
//addRotationMap("TWL_SubZero", "CTF",1,0,10,20); //addRotationMap("TWL_SubZero", "CTF",1,0,10,20);
//addRotationMap("TWL_Titan", "CTF",1,0,10,20); addRotationMap("TWL_Titan", "CTF",1,0,12,20);
//addRotationMap("Confusco", "CTF",1,0,10,20); addRotationMap("Confusco", "CTF",1,0,10,20);
//addRotationMap("Fallout", "CTF",1,0,10,20); //addRotationMap("Fallout", "CTF",1,0,10,20);
//addRotationMap("TheClocktower", "CTF",1,0,10,20); //addRotationMap("TheClocktower", "CTF",1,0,10,20);
//addRotationMap("SoylentGreen", "CTF",1,0,10,20); //addRotationMap("SoylentGreen", "CTF",1,0,10,20);
//addRotationMap("Ramparts", "CTF",1,0,10,20); //addRotationMap("Ramparts", "CTF",1,0,10,20);
//addRotationMap("Blastside_nef", "CTF",1,0,10,24); //addRotationMap("Blastside_nef", "CTF",1,0,10,24);
//addRotationMap("Burstside", "CTF",1,0,10,20); addRotationMap("Burstside", "CTF",1,0,10,20);
//addRotationMap("Infernus", "CTF",1,0,18,26); //addRotationMap("Infernus", "CTF",1,0,18,26);
//addRotationMap("NatureMagic", "CTF",1,0,10,20); //addRotationMap("NatureMagic", "CTF",1,0,10,20);
//addRotationMap("TWL_Damnation", "CTF",1,0,10,20); //addRotationMap("TWL_Damnation", "CTF",1,0,10,20);
addRotationMap("TWL_DangerousCrossing", "CTF",1,1,10,20); addRotationMap("TWL_DangerousCrossing", "CTF",1,1,10,20);
//addRotationMap("TWL_DeadlyBirdsSong", "CTF",1,0,10,20); addRotationMap("TWL_DeadlyBirdsSong", "CTF",1,0,10,20);
addRotationMap("Vauban", "CTF",1,0,18,-1); //addRotationMap("Vauban", "CTF",1,0,18,-1);
//addRotationMap("TWL_Pandemonium", "CTF",1,0,10,24); //addRotationMap("TWL_Pandemonium", "CTF",1,0,10,24);
//Vehicle Maps //Vehicle Maps
@ -154,12 +157,13 @@ addRotationMap("Vauban", "CTF",1,0,18,-1);
addRotationMap("Logans_Run", "CTF",1,1,8,28); addRotationMap("Logans_Run", "CTF",1,1,8,28);
addRotationMap("Rollercoaster_nef", "CTF",1,1,8,28); addRotationMap("Rollercoaster_nef", "CTF",1,1,8,28);
addRotationMap("HostileLoch", "CTF",1,1,12,24); //addRotationMap("Rollercoaster_nef_FZ", "CTF",1,1,8,28);
addRotationMap("HostileLoch", "CTF",1,0,12,24);
addRotationMap("TWL_BeachBlitz", "CTF",1,1,12,24); addRotationMap("TWL_BeachBlitz", "CTF",1,1,12,24);
addRotationMap("TWL2_Magnum", "CTF",1,1,12,28); addRotationMap("TWL2_Magnum", "CTF",1,1,12,28);
addRotationMap("MoonDance", "CTF",1,1,12,28); addRotationMap("MoonDance", "CTF",1,0,12,28);
addRotationMap("Raindance_nef", "CTF",1,1,12,28); addRotationMap("Raindance_nef", "CTF",1,1,12,28);
addRotationMap("TWL_Magmatic", "CTF",1,0,18,28); addRotationMap("TWL_Magmatic", "CTF",1,0,14,28);
addRotationMap("TWL2_FrozenGlory", "CTF",1,1,12,24); addRotationMap("TWL2_FrozenGlory", "CTF",1,1,12,24);
addRotationMap("LandingParty", "CTF",1,1,12,28); addRotationMap("LandingParty", "CTF",1,1,12,28);
//addRotationMap("TitanV", "CTF",1,0,12,28); //addRotationMap("TitanV", "CTF",1,0,12,28);
@ -170,9 +174,9 @@ addRotationMap("TWL_Crossfire", "CTF",1,1,14,28);
//Vehicle Maps: Voteable, But Not in Rotation //Vehicle Maps: Voteable, But Not in Rotation
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
//addRotationMap("SubZeroV", "CTF",1,0,12,24); addRotationMap("SubZeroV", "CTF",1,0,12,24);
//addRotationMap("S8_Geothermal", "CTF",1,0,12,24); addRotationMap("S8_Geothermal", "CTF",1,0,12,24);
//addRotationMap("Lakefront", "CTF",1,0,12,24); addRotationMap("Lakefront", "CTF",1,0,12,24);
//addRotationMap("ShockRidge", "CTF",1,0,12,24); //addRotationMap("ShockRidge", "CTF",1,0,12,24);
addRotationMap("TWL2_BlueMoon", "CTF",1,1,18,28); addRotationMap("TWL2_BlueMoon", "CTF",1,1,18,28);
addRotationMap("TWL_Katabatic", "CTF",1,0,16,28); addRotationMap("TWL_Katabatic", "CTF",1,0,16,28);
@ -185,38 +189,90 @@ addRotationMap("TWL_Katabatic", "CTF",1,0,16,28);
//addRotationMap("FilteredDust", "CTF",1,0,12,24); //addRotationMap("FilteredDust", "CTF",1,0,12,24);
//addRotationMap("Choke", "CTF",1,0,12,24); //addRotationMap("Choke", "CTF",1,0,12,24);
//addRotationMap("TWL_Chokepoint", "CTF",1,0,12,24); //addRotationMap("TWL_Chokepoint", "CTF",1,0,12,24);
//addRotationMap("Nightdance", "CTF",1,0,10,24); addRotationMap("Nightdance", "CTF",1,0,10,24);
//addRotationMap("TWL_Abaddon", "CTF",1,0,16,24); //addRotationMap("TWL_Abaddon", "CTF",1,0,16,24);
//BIG Vehicle Maps //BIG Vehicle Maps
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
addRotationMap("Circleofstones", "CTF",1,1,12,-1); addRotationMap("Circleofstones", "CTF",1,1,16,-1);
addRotationMap("TWL2_Ruined", "CTF",1,1,18,-1); //addRotationMap("TWL2_Ruined", "CTF",1,1,18,-1);
addRotationMap("Ruined", "CTF",1,0,16,-1);
//addRotationMap("Agorazscium", "CTF",1,0,24,-1); //addRotationMap("Agorazscium", "CTF",1,0,24,-1);
//addRotationMap("FullCircle", "CTF",1,0,18,30); //addRotationMap("FullCircle", "CTF",1,0,18,30);
//addRotationMap("Surro", "CTF",1,0,18,24); //addRotationMap("Surro", "CTF",1,0,18,24);
//addRotationMap("TWL2_RoughLand", "CTF",1,0,20,-1); //addRotationMap("TWL2_RoughLand", "CTF",1,0,20,-1);
addRotationMap("HarvestDance", "CTF",1,1,20,-1); addRotationMap("HarvestDance", "CTF",1,1,16,-1);
//addRotationMap("WindyGap", "CTF",1,0,24,-1); //addRotationMap("WindyGap", "CTF",1,0,24,-1);
addRotationMap("Fenix", "CTF",1,1,28,-1); addRotationMap("Fenix", "CTF",1,1,24,-1);
addRotationMap("Hillside", "CTF",1,1,28,-1); addRotationMap("Hillside", "CTF",1,1,24,-1);
//addRotationMap("Sangre_de_Grado", "CTF",1,0,20,-1); //addRotationMap("Sangre_de_Grado", "CTF",1,0,20,-1);
//addRotationMap("Slapdash", "CTF",1,0,20,-1); //addRotationMap("Slapdash", "CTF",1,0,20,-1);
addRotationMap("BerylBasin", "CTF",1,1,16,-1); addRotationMap("BerylBasin", "CTF",1,0,16,-1);
//addRotationMap("TWL_Frozen", "CTF",1,0,20,-1); //addRotationMap("TWL_Frozen", "CTF",1,0,20,-1);
addRotationMap("TWL_Harvester", "CTF",1,1,24,-1); addRotationMap("TWL_Harvester", "CTF",1,1,24,-1);
//addRotationMap("Archipelago", "CTF",1,0,20,-1); //addRotationMap("Archipelago", "CTF",1,0,20,-1);
addRotationMap("TWL2_Bleed", "CTF",1,0,18,-1); addRotationMap("TWL2_Bleed", "CTF",1,0,18,-1);
addRotationMap("Pantheon", "CTF",1,1,20,-1); addRotationMap("Pantheon", "CTF",1,0,20,-1);
addRotationMap("DeathBirdsFly1", "CTF",1,1,24,-1); addRotationMap("DeathBirdsFly1", "CTF",1,1,24,-1);
//addRotationMap("Scarabrae_nef", "CTF",1,0,28,-1); addRotationMap("Scarabrae_nef", "CTF",1,0,28,-1);
addRotationMap("aabaa", "CTF",1,1,28,-1); addRotationMap("aabaa", "CTF",1,1,28,-1);
addRotationMap("TWL_Reversion", "CTF",1,1,28,-1); addRotationMap("TWL_Reversion", "CTF",1,1,28,-1);
//addRotationMap("Glade", "CTF",1,1,28,-1); //addRotationMap("Glade", "CTF",1,1,28,-1);
//addRotationMap("TWL_Horde", "CTF",1,0,28,-1); addRotationMap("TWL_Horde", "CTF",1,1,24,-1);
addRotationMap("CloakofNightV", "CTF",1,1,24,-1); addRotationMap("CloakofNightV", "CTF",1,1,24,-1);
//DMP Mappack
/////////////////////////////////////////////////////////////////////
addRotationMap("DMP_Agroleon", "CTF",1,0,16,28);
addRotationMap("DMP_Astro", "CTF",1,1,8,18);
addRotationMap("DMP_BastardForge", "CTF",1,1,6,24);
addRotationMap("DMP_BitterGorge", "CTF",1,0,18,24);
addRotationMap("DMP_Bunkered", "CTF",1,1,6,12);
addRotationMap("DMP_Cinerarium", "CTF",1,1,6,12);
addRotationMap("DMP_DermCity", "CTF",1,0,-1,-1);
addRotationMap("DMP_Embers", "CTF",1,0,6,12);
addRotationMap("DMP_EmeraldSpit", "CTF",1,1,10,20);
addRotationMap("DMP_FaceCrossing", "CTF",1,0,10,20);
addRotationMap("DMP_Hoth", "CTF",1,0,24,-1);
addRotationMap("DMP_IceGiant", "CTF",1,0,16,28);
addRotationMap("DMP_IsleDeBatalla", "CTF",1,0,10,20);
addRotationMap("DMP_LavaGods", "CTF",1,1,10,20);
addRotationMap("DMP_Magellan", "CTF",1,1,10,18);
addRotationMap("DMP_MoonDance", "CTF",1,1,12,28);
addRotationMap("DMP_Pantheon", "CTF",1,0,18,28);
addRotationMap("DMP_Paranoia", "CTF",1,1,6,10);
addRotationMap("DMP_Pariah", "CTF",1,1,8,16);
addRotationMap("DMP_PipeDream", "CTF",1,1,8,16);
addRotationMap("DMP_RavineV", "CTF",1,0,12,28);
addRotationMap("DMP_ScorchedEarth", "CTF",1,0,14,-1);
addRotationMap("DMP_SimpleFlagArena", "CTF",1,1,6,12);
addRotationMap("DMP_SpinCycle", "CTF",1,1,8,16);
addRotationMap("DMP_StarFall", "CTF",1,1,6,12);
addRotationMap("DMP_Tyre", "CTF",1,1,16,24);
addRotationMap("DMP_Wasteland", "CTF",1,1,10,20);
addRotationMap("SC_Normal", "CTF",1,1,-1,16);
// addRotationMap("SC_Badlands", "CTF",1,1,-1,16);
// addRotationMap("SC_Desert", "CTF",1,1,-1,16);
// addRotationMap("SC_Lush", "CTF",1,1,-1,16);
addRotationMap("SC_Ice", "CTF",1,1,-1,16);
// addRotationMap("SC_Night", "CTF",1,1,-1,16);
// addRotationMap("DX_Badlands", "CTF",1,1,10,20);
// addRotationMap("DX_Desert", "CTF",1,1,10,20);
addRotationMap("DX_Ice", "CTF",1,0,10,20);
// addRotationMap("HO_Badlands", "CTF",1,1,8,24);
// addRotationMap("HO_Desert", "CTF",1,1,8,24);
addRotationMap("HO_Ice", "CTF",1,1,8,24);
// addRotationMap("HO_Lush", "CTF",1,1,8,24);
addRotationMap("Attrition", "CTF",1,0,-1,-1);
// addRotationMap("Chasmaclysmic", "CTF",1,1,-1,-1);
// addRotationMap("DBS_Smoothed", "CTF",1,1,-1,-1);
// addRotationMap("PuliVeivari", "CTF",1,1,-1,-1);
addRotationMap("PlanetX", "CTF",1,0,-1,-1);
// addRotationMap("Ravine", "CTF",1,1,-1,-1);
addRotationMap("Stripmine", "CTF",1,0,-1,-1);
//Not In Rotation - Not Voteable //Not In Rotation - Not Voteable
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
@ -303,7 +359,7 @@ addRotationMap("DesertofDeathLak", "Lakrabbit",1,1,-1,-1);
addRotationMap("Raindance_nefLak", "Lakrabbit",1,1,-1,-1); addRotationMap("Raindance_nefLak", "Lakrabbit",1,1,-1,-1);
addRotationMap("SunDriedLak", "Lakrabbit",1,1,-1,-1); addRotationMap("SunDriedLak", "Lakrabbit",1,1,-1,-1);
addRotationMap("SkinnyDipLak", "Lakrabbit",1,1,-1,-1); addRotationMap("SkinnyDipLak", "Lakrabbit",1,1,-1,-1);
addRotationMap("SaddiesHill", "Lakrabbit",1,0,-1,-1); addRotationMap("SaddiesHill", "Lakrabbit",1,1,-1,-1);
addRotationMap("HavenLak", "Lakrabbit",1,0,-1,-1); addRotationMap("HavenLak", "Lakrabbit",1,0,-1,-1);
addRotationMap("LushLak", "Lakrabbit",1,1,8,-1); addRotationMap("LushLak", "Lakrabbit",1,1,8,-1);
addRotationMap("BoxLak", "Lakrabbit",1,1,-1,10); addRotationMap("BoxLak", "Lakrabbit",1,1,-1,10);
@ -315,6 +371,7 @@ addRotationMap("CankerLak", "Lakrabbit",1,1,-1,-1);
addRotationMap("DustRunLak", "Lakrabbit",1,1,-1,-1); addRotationMap("DustRunLak", "Lakrabbit",1,1,-1,-1);
addRotationMap("CrossfiredLak", "Lakrabbit",1,0,-1,-1); addRotationMap("CrossfiredLak", "Lakrabbit",1,0,-1,-1);
addRotationMap("CloakofLak", "Lakrabbit",1,1,-1,-1); addRotationMap("CloakofLak", "Lakrabbit",1,1,-1,-1);
addRotationMap("SpectreLak", "Lakrabbit",1,1,-1,-1);
//Voteable, But not in rotation //Voteable, But not in rotation
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
@ -327,7 +384,7 @@ addRotationMap("EquinoxLak", "Lakrabbit",1,0,-1,-1);
addRotationMap("PhasmaDustLak", "Lakrabbit",1,1,-1,12); addRotationMap("PhasmaDustLak", "Lakrabbit",1,1,-1,12);
addRotationMap("GodsRiftLak", "Lakrabbit",1,0,-1,-1); addRotationMap("GodsRiftLak", "Lakrabbit",1,0,-1,-1);
addRotationMap("SolsDescentLak", "Lakrabbit",1,0,-1,-1); addRotationMap("SolsDescentLak", "Lakrabbit",1,0,-1,-1);
addRotationMap("Crater71Lak", "Lakrabbit",1,1,6,-1); addRotationMap("Crater71Lak", "Lakrabbit",1,0,6,-1);
//Not Voteable, Not in rotation //Not Voteable, Not in rotation
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
@ -395,6 +452,7 @@ addRotationMap("PariahLT", "sctf",1,1,-1,16);
addRotationMap("S8_ZilchLT", "sctf",1,1,-1,-1); addRotationMap("S8_ZilchLT", "sctf",1,1,-1,-1);
addRotationMap("TWL_BeachBlitzLT", "sctf",1,1,-1,-1); addRotationMap("TWL_BeachBlitzLT", "sctf",1,1,-1,-1);
addRotationMap("FrozenHopeLT", "sctf",1,1,-1,-1); addRotationMap("FrozenHopeLT", "sctf",1,1,-1,-1);
addRotationMap("Confusco", "sctf",1,0,6,-1);
//addRotationMap("TWL2_JaggedClawLT", "sctf",1,1,-1,-1); //addRotationMap("TWL2_JaggedClawLT", "sctf",1,1,-1,-1);
//Voteable, But not in rotation //Voteable, But not in rotation
@ -407,6 +465,21 @@ addRotationMap("S5_WoodymyrkLT", "sctf",1,1,-1,-1);
addRotationMap("S8_Opus", "sctf",1,0,-1,-1); addRotationMap("S8_Opus", "sctf",1,0,-1,-1);
addRotationMap("TWL_DangerousCrossing", "sctf",1,0,-1,-1); addRotationMap("TWL_DangerousCrossing", "sctf",1,0,-1,-1);
//DMP Mappack
/////////////////////////////////////////////////////////////////////
// addRotationMap("Attrition", "sctf",1,0,-1,-1);
addRotationMap("Rush", "sctf",1,1,-1,-1);
addRotationMap("HillKingLT", "sctf",1,1,-1,-1);
addRotationMap("DMP_BastardForge", "sctf",1,1,-1,-1);
addRotationMap("VanDamnedLT", "sctf",1,1,-1,-1);
addRotationMap("DMP_Paranoia", "sctf",1,0,-1,-1);
addRotationMap("DMP_Spincycle", "sctf",1,1,-1,-1);
addRotationMap("Ravine", "sctf",1,1,-1,-1);
// addRotationMap("DX_Badlands", "sctf",1,0,-1,-1);
// addRotationMap("DX_Desert", "sctf",1,0,-1,-1);
// addRotationMap("DX_Ice", "sctf",1,0,-1,-1);
//addRotationMap("Moonwalk", "sctf",1,0,-1,-1);
//Not Voteable, Not in rotation //Not Voteable, Not in rotation
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////

View file

@ -15,7 +15,7 @@ $Host::AnimateWithTransitions = 1;
$Host::AntiPackEnable = 1; $Host::AntiPackEnable = 1;
$Host::AntiPackPlayerCount = 6; $Host::AntiPackPlayerCount = 6;
$Host::AveragePings = 1; $Host::AveragePings = 1;
$Host::BanTime = 30; $Host::BanTime = 43200;
$Host::BotCount = 14; $Host::BotCount = 14;
$Host::BotsEnabled = "0"; $Host::BotsEnabled = "0";
$Host::ClassicAdminLog = 1; $Host::ClassicAdminLog = 1;
@ -100,7 +100,7 @@ $Host::holoName5 = "BloodEagle";
$Host::holoName6 = "Harbinger"; $Host::holoName6 = "Harbinger";
$Host::Info = "This is a Tribes 2 Classic server. More information in Discord. <a:playt2.com/discord>playt2.com/discord</a>"; $Host::Info = "This is a Tribes 2 Classic server. More information in Discord. <a:playt2.com/discord>playt2.com/discord</a>";
$Host::ItemRespawnTime = 30; $Host::ItemRespawnTime = 30;
$Host::KickBanTime = 1; $Host::KickBanTime = 20;
$Host::KickObserverStartOnJoin = 1; $Host::KickObserverStartOnJoin = 1;
$Host::KickObserverTimeout = 1200; $Host::KickObserverTimeout = 1200;
$Host::LakRabbitDuelMode = 0; $Host::LakRabbitDuelMode = 0;

View file

@ -212,7 +212,7 @@ function Flag::objectiveInit(%data, %flag)
// ------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------
} }
// AI consoel spam // AI console spam
function AIThrowObject(%object) function AIThrowObject(%object)
{ {
return; return;
@ -313,6 +313,9 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
if(%targetObject.invincible || %targetObject.getState() $= "Dead") if(%targetObject.invincible || %targetObject.getState() $= "Dead")
return; return;
if(%damageType == $DamageType::SatchelCharge && $InvBanList[LakRabbit, "SatchelCharge"] $= 1)
return;
//rabbit can't DJ in duel mode //rabbit can't DJ in duel mode
// if(Game.duelMode && %targetObject.holdingFlag && %targetObject == %sourceObject // if(Game.duelMode && %targetObject.holdingFlag && %targetObject == %sourceObject
// && %damageType == $DamageType::Disc // && %damageType == $DamageType::Disc
@ -342,10 +345,13 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
&& %sourceObject.getDataBlock().getClassName() $= "PlayerData" && %sourceObject.getDataBlock().getClassName() $= "PlayerData"
&& %targetObject.client == %sourceObject.client) && %targetObject.client == %sourceObject.client)
{ {
if(%damageType == $DamageType::Disc && %sourceObject.freeDJ) if(%sourceObject.holdingFlag $= "") //Not holding a flag (NonRabbit)
{ {
%amount = 0; if(%damageType == $DamageType::Disc && (%sourceObject.freeDJ || $Host::LakRabbitUnlimitedDJ))
%sourceObject.freeDJ--; {
%amount = 0;
%sourceObject.freeDJ--;
}
} }
} }
@ -626,7 +632,7 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
} }
%weapon = "Plasma"; %weapon = "Plasma";
case $DamageType::Laser: case $DamageType::Laser:
if($InvBanList[LakRabbit, "SniperRifle"]) //banned if($InvBanList[LakRabbit, "SniperRifle"] $= 1) //banned
return; return;
if(%energy > 0.5 || %players > 7) if(%energy > 0.5 || %players > 7)
@ -666,8 +672,11 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
case $DamageType::Missile: case $DamageType::Missile:
// doesn't matter if it's MA // doesn't matter if it's MA
%ma = 0; %ma = 0;
if((getSimTime() - $LakRabbit::MissileHeistTime > 10000) || !$LakRabbit::MissileHeistTime) if($InvBanList[LakRabbit, "MissileLauncher"] $= 1)
return; {
if((getSimTime() - $LakRabbit::MissileHeistTime > 10000) || !$LakRabbit::MissileHeistTime)
return;
}
%weapon = "Missile"; %weapon = "Missile";
} }
} }
@ -724,7 +733,7 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
} }
Game.recalcScore(%sourceObject.client); Game.recalcScore(%sourceObject.client);
//Code for DarkTigers discordBot //Code for DarkTigers discordBot
if(discord.lastState $= "Connected") if(discord.lastState $= "Connected")
discordBotProcess("lakMApoints", %sourceObject, %points, %hitType, %weapon, %distance, %vel); discordBotProcess("lakMApoints", %sourceObject, %points, %hitType, %weapon, %distance, %vel);
@ -786,14 +795,14 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
case $DamageType::Disc: case $DamageType::Disc:
if((getSimTime() - %targetClient.mdcTime1) < 256) if((getSimTime() - %targetClient.mdcTime1) < 256)
%targetClient.mineDisc = true; %targetClient.mineDisc = true;
%targetClient.mdcTime2 = getSimTime(); %targetClient.mdcTime2 = getSimTime();
case $DamageType::Mine: case $DamageType::Mine:
if((getSimTime() - %targetClient.mdcTime2) < 256) if((getSimTime() - %targetClient.mdcTime2) < 256)
%targetClient.mineDisc = true; %targetClient.mineDisc = true;
%targetClient.mdcTime1 = getSimTime(); %targetClient.mdcTime1 = getSimTime();
} }
// -- End Mine+Disc insert. // -- End Mine+Disc insert.
@ -814,7 +823,8 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
// should this guy be blown apart? // should this guy be blown apart?
if( %damageType == $DamageType::Explosion || if( %damageType == $DamageType::Explosion ||
%damageType == $DamageType::Mortar || %damageType == $DamageType::Mortar ||
%damageType == $DamageType::Missile ) %damageType == $DamageType::Missile ||
%damageType == $DamageType::SatchelCharge )
{ {
if( %previousDamage >= 0.35 ) // only if <= 35 percent damage remaining if( %previousDamage >= 0.35 ) // only if <= 35 percent damage remaining
{ {
@ -972,7 +982,7 @@ $InvBanList[LakRabbit, "Plasma"] = 0;
$InvBanList[LakRabbit, "Blaster"] = 0; $InvBanList[LakRabbit, "Blaster"] = 0;
$InvBanList[LakRabbit, "EnergyPack"] = 0; $InvBanList[LakRabbit, "EnergyPack"] = 0;
$InvBanList[LakRabbit, "Mine"] = 0; $InvBanList[LakRabbit, "Mine"] = 0;
$InvBanList[LakRabbit, "TargetingLaser"] = 0; $InvBanList[LakRabbit, "TargetingLaser"] = 1;
// borlak functions // borlak functions
@ -1525,26 +1535,22 @@ function LakRabbitGame::playerSpawned(%game, %player)
else else
{ {
%player.clearInventory(); %player.clearInventory();
%player.setInventory(Disc,1); %player.setInventory(Disc,1);
%player.setInventory(Blaster,1); %player.setInventory(Blaster,1);
%player.setInventory(Plasma,1); %player.setInventory(Plasma,1);
%player.setInventory(DiscAmmo,30); %player.setInventory(DiscAmmo,30);
%player.setInventory(PlasmaAmmo,40); %player.setInventory(PlasmaAmmo,40);
%player.setInventory(Mine,6); %player.setInventory(Mine,6);
%player.setInventory(RepairKit,1); %player.setInventory(RepairKit,1);
%player.setInventory(EnergyPack,1); %player.setInventory(EnergyPack,1);
%player.use("Disc"); %player.use("Disc");
} }
%player.schedule(250,"selectWeaponSlot", 0); %player.schedule(250,"selectWeaponSlot", 0);
%player.setEnergyLevel(%player.getDatablock().maxEnergy); %player.setEnergyLevel(%player.getDatablock().maxEnergy);
if($Host::LakRabbitUnlimitedDJ == 1) %player.freeDJ = 1; // free diskjump
%player.freeDJ = 999; // free diskjump
else
%player.freeDJ = 1; // free diskjump
} }

View file

@ -85,6 +85,34 @@ function voteLog(%client, %typeName, %arg1, %arg2, %arg3, %arg4)
} }
} }
// votePercentLog(%client, %typeName, %key, %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, %game.totalVotesNone)
// Info: Logs voting percent events
function votePercentLog(%display, %typeName, %key, %voteYea, %voteNay, %voteTotal, %voteNone) //%voteNone = Did Not Vote (DNV) (Abstain)
{
if($Host::ClassicVoteLog)
{
// Dif calc for "VoteKickPlayer"
if(%typeName $= "VoteKickPlayer")
{
%percent = mFloor((%voteYea/ClientGroup.getCount()) * 100);
%voteNone = "N/A";
%display = %typeName SPC "[" @ %display.nameBase @ "]";
}
else
{
%percent = mFloor((%voteYea/(ClientGroup.getCount() - %voteNone)) * 100);
%display = %typeName SPC "[" @ %display @ "]";
}
$VoteLog = "[" @ %key @ "]" SPC %display SPC "Yea[" @ %voteYea @ "] Nay[" @ %voteNay @ "] Abstain[" @ %voteNone @ "] Total[" @ %voteTotal @ "] Vote%[" @ %percent @ "]";
// this is the info that will be logged
%logpath = $Host::ClassicVoteLogPath;
export("$VoteLog", %logpath, true);
logEcho($VoteLog);
}
}
// From Goon // From Goon
// Slightly more elegant solution rather than spamming console // Slightly more elegant solution rather than spamming console
function ClassicChatLog(%client, %id, %team, %msg) function ClassicChatLog(%client, %id, %team, %msg)

View file

@ -18,12 +18,12 @@ function serverCmdEndThrowCount(%client, %data)
// --------------------------------------------------------------- // ---------------------------------------------------------------
// z0dd - ZOD, 8/6/02. New throw str features // z0dd - ZOD, 8/6/02. New throw str features
%throwStrength = (getSimTime() - %client.player.throwStart) / 150; %throwStrength = (getSimTime() - %client.player.throwStart) / 150;
if(%throwStrength > $maxThrowStr) if(%throwStrength > $maxThrowStr)
%throwStrength = $maxThrowStr; %throwStrength = $maxThrowStr;
else if(%throwStrength < 0.5) else if(%throwStrength < 0.5)
%throwStrength = 0.5; %throwStrength = 0.5;
// --------------------------------------------------------------- // ---------------------------------------------------------------
%throwScale = %throwStrength / 2; %throwScale = %throwStrength / 2;
%client.player.throwStrength = %throwScale; %client.player.throwStrength = %throwScale;
@ -40,13 +40,13 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
game.vehicleDestroyed(%obj, %destroyer); game.vehicleDestroyed(%obj, %destroyer);
//error("vehicleDestroyed( "@ %obj @", "@ %destroyer @")"); //error("vehicleDestroyed( "@ %obj @", "@ %destroyer @")");
} }
radiusVehicleExplosion(%data, %obj); radiusVehicleExplosion(%data, %obj);
if(%obj.turretObject) if(%obj.turretObject)
if(%obj.turretObject.getControllingClient()) if(%obj.turretObject.getControllingClient())
%obj.turretObject.getDataBlock().playerDismount(%obj.turretObject); %obj.turretObject.getDataBlock().playerDismount(%obj.turretObject);
for(%i = 0; %i < %obj.getDatablock().numMountPoints; %i++) for(%i = 0; %i < %obj.getDatablock().numMountPoints; %i++)
{ {
if (%obj.getMountNodeObject(%i)) { if (%obj.getMountNodeObject(%i)) {
@ -58,10 +58,10 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
%flingVel = %xVel @ " " @ %yVel @ " " @ %zVel; %flingVel = %xVel @ " " @ %yVel @ " " @ %zVel;
%flingee.applyImpulse(%flingee.getTransform(), %flingVel); %flingee.applyImpulse(%flingee.getTransform(), %flingVel);
echo("got player..." @ %flingee.getClassName()); echo("got player..." @ %flingee.getClassName());
%flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Crash); %flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Crash);
} }
} }
// From AntiLou.vl2 // From AntiLou.vl2
// Info: MPB just destroyed. Change the variable // Info: MPB just destroyed. Change the variable
if(%data.getName() $= "MobileBaseVehicle") // If the vehicle is the MPB, change %obj.station.isDestroyed to 1 if(%data.getName() $= "MobileBaseVehicle") // If the vehicle is the MPB, change %obj.station.isDestroyed to 1
@ -75,7 +75,7 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
// %obj.setFrozenState(true); // %obj.setFrozenState(true);
%obj.schedule(500, "delete"); //was 2000 %obj.schedule(500, "delete"); //was 2000
//%data.schedule(500, 'onAvoidCollisions', %obj); //%data.schedule(500, 'onAvoidCollisions', %obj);
//Transfer the vehicle far away //Transfer the vehicle far away
%obj.schedule(1, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500 %obj.schedule(1, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500
} }
@ -84,13 +84,13 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
// %obj.setFrozenState(true); // %obj.setFrozenState(true);
%obj.schedule(2000, "delete"); //was 2000 %obj.schedule(2000, "delete"); //was 2000
//%data.schedule(500, 'onAvoidCollisions', %obj); //%data.schedule(500, 'onAvoidCollisions', %obj);
//Transfer the vehicle far away //Transfer the vehicle far away
%obj.schedule(100, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500 %obj.schedule(100, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500
} }
else else
{ {
%obj.setFrozenState(true); %obj.setFrozenState(true);
%obj.schedule(500, "delete"); //was 500 %obj.schedule(500, "delete"); //was 500
} }
// ----------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------
@ -98,13 +98,13 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
// stationTrigger::onEnterTrigger(%data, %obj, %colObj) // stationTrigger::onEnterTrigger(%data, %obj, %colObj)
// Info: If the MPB is destroyed, don't allow players to use the inv // Info: If the MPB is destroyed, don't allow players to use the inv
function stationTrigger::onEnterTrigger(%data, %obj, %colObj) function stationTrigger::onEnterTrigger(%data, %obj, %colObj)
{ {
//make sure it's a player object, and that that object is still alive //make sure it's a player object, and that that object is still alive
if(%colObj.getDataBlock().className !$= "Armor" || %colObj.getState() $= "Dead") if(%colObj.getDataBlock().className !$= "Armor" || %colObj.getState() $= "Dead")
return; return;
// z0dd - ZOD, 7/13/02 Part of hack to keep people from mounting // z0dd - ZOD, 7/13/02 Part of hack to keep people from mounting
// vehicles in disallowed armors. // vehicles in disallowed armors.
if(%obj.station.getDataBlock().getName() !$= "StationVehicle") if(%obj.station.getDataBlock().getName() !$= "StationVehicle")
%colObj.client.inInv = true; %colObj.client.inInv = true;
@ -153,11 +153,11 @@ function stationTrigger::onEnterTrigger(%data, %obj, %colObj)
//OG Blaster Buff //OG Blaster Buff
function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC) function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC)
{ {
//Takes 10 blaster shots to kill a heavy, 13 normal. //Takes 10 blaster shots to kill a heavy, 13 normal.
if(%targetObject.client.armor $= "Heavy" && %damageType $= $DamageType::Blaster) if(%targetObject.client.armor $= "Heavy" && %damageType $= $DamageType::Blaster)
%amount *= 1.3; %amount *= 1.3;
Parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC); Parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC);
} }
@ -165,7 +165,7 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
function DefaultGame::missionLoadDone(%game) function DefaultGame::missionLoadDone(%game)
{ {
parent::missionLoadDone(%game); parent::missionLoadDone(%game);
for(%i = 0; %i < MissionGroup.getCount(); %i++) for(%i = 0; %i < MissionGroup.getCount(); %i++)
{ {
%obj = MissionGroup.getObject(%i); %obj = MissionGroup.getObject(%i);
@ -191,7 +191,7 @@ function GameBaseData::onAdd(%data, %obj)
{ {
if(%obj.name !$= "") if(%obj.name !$= "")
%nameTag = %obj.nameTag = addTaggedString(%obj.name); %nameTag = %obj.nameTag = addTaggedString(%obj.name);
else else
%nameTag = %obj.nameTag = addTaggedString("Base"); // fail safe so it shows up on cc %nameTag = %obj.nameTag = addTaggedString("Base"); // fail safe so it shows up on cc
} }
%obj.target = createTarget(%obj, %nameTag, "", "", %data.targetTypeTag, 0, 0); %obj.target = createTarget(%obj, %nameTag, "", "", %data.targetTypeTag, 0, 0);
@ -203,39 +203,55 @@ function GameBaseData::onAdd(%data, %obj)
// Throw Spam fix // Throw Spam fix
function serverCmdThrow(%client, %data) function serverCmdThrow(%client, %data)
{ {
if(%client.tossLock) if(%client.tossLock)
return; {
if(getSimTime() - %client.tossLockTime < 30000)
if(getSimTime() - %client.tossTime < 128) return;
{ else
%client.tossCounter++; %client.tossLock = 0;
if(%client.tossCounter > 30) }
{
echo(%client.nameBase SPC "was Banned for exceeding" SPC %client.tossCounter SPC "Toss Limit.");
messageAll('msgAll',"\c3" @ %client.namebase SPC "is attempting to lag the server!");
messageClient(%client, 'onClientBanned', "");
messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client );
if(isObject(%client.player))
%client.player.scriptKill(0);
if (isObject(%client))
{
%client.setDisconnectReason("Item Spew scripts are not allowed on this server." );
%client.schedule(700, "delete");
}
BanList::add(%client.guid, %client.getAddress(), $Host::BanTime);
%client.tossLock = 1;
return;
}
}
else
%client.tossCounter = 0;
parent::serverCmdThrow(%client, %data); if(getSimTime() - %client.tossTime < 128)
%client.tossTime = getSimTime(); {
%client.tossCounter++;
if(%client.tossCounter > 30)
{
if(%client.tossLockWarning)
{
echo(%client.nameBase SPC "was Banned for exceeding" SPC %client.tossCounter SPC "Toss Limit.");
messageAll('msgAll',"\c3" @ %client.namebase SPC "is attempting to lag the server!");
messageClient(%client, 'onClientBanned', "");
messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client );
if(isObject(%client.player))
%client.player.scriptKill(0);
if (isObject(%client))
{
%client.setDisconnectReason("Item Spew scripts are not allowed on this server." );
%client.schedule(700, "delete");
}
BanList::add(%client.guid, %client.getAddress(), $Host::BanTime);
}
else
{
echo(%client.nameBase SPC "throwing items has been temporarily suspended for exceeding" SPC %client.tossCounter SPC "throw limit.");
centerprint(%client, "You are recieving this warning for throw spamming items.\nContinuing to use throw spew scripts will result in a ban.", 10, 2);
messageClient(%client, '', "Throwing items has been temporarily suspended.");
%client.tossLockTime = getSimTime();
%client.tossLockWarning = 1;
}
%client.tossLock = 1;
return;
}
}
else
%client.tossCounter = 0;
parent::serverCmdThrow(%client, %data);
%client.tossTime = getSimTime();
} }
}; };
// Prevent package from being activated if it is already // Prevent package from being activated if it is already
if (!isActivePackage(TacoOverrides)) if (!isActivePackage(TacoOverrides))
activatePackage(TacoOverrides); activatePackage(TacoOverrides);

View file

@ -34,18 +34,18 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
{ {
%isAdmin = (%client.isAdmin || %client.isSuperAdmin); %isAdmin = (%client.isAdmin || %client.isSuperAdmin);
%multipleTeams = %game.numTeams > 1; %multipleTeams = %game.numTeams > 1;
// ******************************************** // ********************************************
// Admin Vote For ... Submenu // Admin Vote For ... Submenu
// ******************************************** // ********************************************
if (!$Host::TournamentMode) if (!$Host::TournamentMode)
{ {
if (%client.ForceVote > 0) if (%client.ForceVote > 0)
%client.ForceVote = %client.ForceVote - 1; %client.ForceVote = %client.ForceVote - 1;
if (%client.ForceVote > 0) if (%client.ForceVote > 0)
{ {
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'change server to Tournament.', 'Vote Tournament Mode'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'change server to Tournament.', 'Vote Tournament Mode');
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission');
// if(%multipleTeams) // if(%multipleTeams)
// { // {
@ -60,12 +60,12 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
return; // Display no further vote options return; // Display no further vote options
} }
} }
//Mission Info Header - Mission Name, Type, Caps to Win //Mission Info Header - Mission Name, Type, Caps to Win
if(%client.canVote) if(%client.canVote)
{ {
if($CurrentMissionType $= "CTF" || $CurrentMissionType $= "SCtF") if($CurrentMissionType $= "CTF" || $CurrentMissionType $= "SCtF")
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win", messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win",
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win"); $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win");
else else
{ {
@ -75,7 +75,7 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap); $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap);
} }
} }
// TEAM OPTIONS // TEAM OPTIONS
if(!$Host::TournamentMode) if(!$Host::TournamentMode)
{ {
@ -113,7 +113,7 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'Change server to Tournament.', 'Vote Tournament Mode'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'Change server to Tournament.', 'Vote Tournament Mode');
if($Host::AllowPlayerVoteTimeLimit) if($Host::AllowPlayerVoteTimeLimit)
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit');
// if(%multipleTeams) // if(%multipleTeams)
// { // {
// if($teamDamage) // if($teamDamage)
@ -121,8 +121,8 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
// else // else
// messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage'); // messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage');
// } // }
if($Host::AllowPlayerVoteSkipMission) if($Host::AllowPlayerVoteSkipMission)
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' ); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' );
} }
else else
@ -169,7 +169,7 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
if($Host::Password !$= "") if($Host::Password !$= "")
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Disable PUG Password', 'Disable PUG Password'); messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Disable PUG Password', 'Disable PUG Password');
else else
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Enable PUG Password', 'Enable PUG Password'); messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Enable PUG Password', 'Enable PUG Password');
} }
// if(%multipleTeams) // if(%multipleTeams)
// { // {
@ -337,7 +337,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
messageClient(%client, "", "\c2You have exhausted your voting rights for this mission."); messageClient(%client, "", "\c2You have exhausted your voting rights for this mission.");
return; return;
} }
if($CurrentMissionType $= "Siege") // Can't change time in this one if($CurrentMissionType $= "Siege") // Can't change time in this one
{ {
messageClient(%client, "", "\c2Cannot change the time limit in this gametype."); messageClient(%client, "", "\c2Cannot change the time limit in this gametype.");
@ -356,21 +356,21 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
messageClient(%client, "", "\c2Switching to this time wouldn't affect the time limit at all."); messageClient(%client, "", "\c2Switching to this time wouldn't affect the time limit at all.");
return; return;
} }
//If proposed time is lower than server set or higher than unlimited //If proposed time is lower than server set or higher than unlimited
if(%arg1 < $Host::TimeLimit || %arg1 > 999) if(%arg1 < $Host::TimeLimit || %arg1 > 999)
{ {
messageClient(%client, "", "\c2Invalid time selection."); messageClient(%client, "", "\c2Invalid time selection.");
return; return;
} }
//If proposed time is something other than what is selectable //If proposed time is something other than what is selectable
if(%arg1 !$= "90" && %arg1 !$= "120" && %arg1 !$= "150" && %arg1 !$= "180" && %arg1 !$= "240" && %arg1 !$= "360" && %arg1 !$= "480" && %arg1 !$= "999") if(%arg1 !$= "90" && %arg1 !$= "120" && %arg1 !$= "150" && %arg1 !$= "180" && %arg1 !$= "240" && %arg1 !$= "360" && %arg1 !$= "480" && %arg1 !$= "999")
{ {
messageClient(%client, "", "\c2Only selectable times allowed."); messageClient(%client, "", "\c2Only selectable times allowed.");
return; return;
} }
if((!%isAdmin && $Host::AllowPlayerVoteTimeLimit) || (%isAdmin && %client.ForceVote)) if((!%isAdmin && $Host::AllowPlayerVoteTimeLimit) || (%isAdmin && %client.ForceVote))
{ {
if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1; if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1;
@ -388,7 +388,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
%msg = %client.nameBase @ " initiated a vote to start the match."; %msg = %client.nameBase @ " initiated a vote to start the match.";
} }
case "CancelMatchStart": case "CancelMatchStart":
if(%isAdmin) // only admins can cancel match start if(%isAdmin) // only admins can cancel match start
{ {
@ -441,7 +441,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
adminStartNewVote( %client, %typename, %arg1, %arg2, %arg3, %arg4); adminStartNewVote( %client, %typename, %arg1, %arg2, %arg3, %arg4);
adminLog(%client, " passed the vote in progress."); adminLog(%client, " passed the vote in progress.");
} }
case "stopRunningVote": case "stopRunningVote":
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote)) if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote))
{ {
@ -470,21 +470,21 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.pubPro == 0 ? "enable" : "disable") @ " pro mode."; %msg = %client.nameBase @ " initiated a vote to " @ (Game.pubPro == 0 ? "enable" : "disable") @ " pro mode.";
case "DMSLOnlyMode": case "DMSLOnlyMode":
if(!$CurrentMissionType $= "DM") if(!$CurrentMissionType $= "DM")
return; return;
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.DMSLOnlyMode == 0 ? "enable" : "disable") @ " shocklance only mode."; %msg = %client.nameBase @ " initiated a vote to " @ (Game.DMSLOnlyMode == 0 ? "enable" : "disable") @ " shocklance only mode.";
case "SCtFProMode": case "SCtFProMode":
if(!$CurrentMissionType $= "sctf") if(!$CurrentMissionType $= "sctf")
return; return;
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.SCtFProMode == 0 ? "enable" : "disable") @ " pro mode."; %msg = %client.nameBase @ " initiated a vote to " @ (Game.SCtFProMode == 0 ? "enable" : "disable") @ " pro mode.";
case "showServerRules": case "showServerRules":
if (($Host::ServerRules[1] !$= "") && (!%client.CantView)) if (($Host::ServerRules[1] !$= "") && (!%client.CantView))
{ {
@ -519,23 +519,23 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
if($Host::EnableNetTourneyClient) if($Host::EnableNetTourneyClient)
{ {
$Host::EnableNetTourneyClient = 0; $Host::EnableNetTourneyClient = 0;
if(isActivePackage(checkver)) if(isActivePackage(checkver))
deactivatePackage(checkver); deactivatePackage(checkver);
messageClient( %client, '', "Tournament Net Client checking has been disabled.~wfx/powered/vehicle_screen_on.wav" ); messageClient( %client, '', "Tournament Net Client checking has been disabled.~wfx/powered/vehicle_screen_on.wav" );
adminLog(%client, " has disabled Net Tourney Client checking."); adminLog(%client, " has disabled Net Tourney Client checking.");
} }
else else
{ {
$Host::EnableNetTourneyClient = 1; $Host::EnableNetTourneyClient = 1;
if(!isActivePackage(checkver)) if(!isActivePackage(checkver))
activatePackage(checkver); activatePackage(checkver);
//Boot Offenders into Obs //Boot Offenders into Obs
CheckVerObserver(%client); CheckVerObserver(%client);
messageClient( %client, '', "Tournament Net Client checking has been enabled.~wfx/powered/vehicle_screen_on.wav" ); messageClient( %client, '', "Tournament Net Client checking has been enabled.~wfx/powered/vehicle_screen_on.wav" );
ResetGetCountsStatus(); ResetGetCountsStatus();
adminLog(%client, " has enabled Net Tourney Client checking."); adminLog(%client, " has enabled Net Tourney Client checking.");
@ -584,7 +584,7 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
//Specifically for votehud compatibility //Specifically for votehud compatibility
switch$(%typeName) switch$(%typeName)
{ {
case "VoteKickPlayer": case "VoteKickPlayer":
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "kick player", %arg1.name); messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "kick player", %arg1.name);
default: default:
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, %arg1); messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, %arg1);
@ -601,7 +601,7 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
} }
} }
else else
{ {
%count = ClientGroup.getCount(); %count = ClientGroup.getCount();
for(%i = 0; %i < %count; %i++) for(%i = 0; %i < %count; %i++)
{ {
@ -618,7 +618,7 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
case "VoteChangeTimeLimit": case "VoteChangeTimeLimit":
if(%arg1 $= "999") %time = "Unlimited"; else %time = %arg1; if(%arg1 $= "999") %time = "Unlimited"; else %time = %arg1;
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "change the time limit to", %time); messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "change the time limit to", %time);
case "VoteKickPlayer": case "VoteKickPlayer":
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "kick player", %arg1.name); messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "kick player", %arg1.name);
case "VoteTournamentMode": case "VoteTournamentMode":
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "Tournament Mode", %arg1); messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "Tournament Mode", %arg1);
@ -644,7 +644,7 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
clearVotes(); clearVotes();
Game.voteType = %typeName; Game.voteType = %typeName;
Game.scheduleVote = schedule(($Host::VoteTime * 1000), 0, "calcVotes", %typeName, %arg1, %arg2, %arg3, %arg4); Game.scheduleVote = schedule(($Host::VoteTime * 1000), 0, "calcVotes", %typeName, %arg1, %arg2, %arg3, %arg4);
// Eolk - Voting control variables // Eolk - Voting control variables
Game.votingArgs[typeName] = %typeName; Game.votingArgs[typeName] = %typeName;
Game.votingArgs[arg1] = %arg1; Game.votingArgs[arg1] = %arg1;
@ -659,11 +659,11 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
%client.canVote = false; %client.canVote = false;
%client.rescheduleVote = schedule(($Host::VoteCooldown * 1000) + ($Host::VoteTime * 1000) , 0, "resetVotePrivs", %client); %client.rescheduleVote = schedule(($Host::VoteCooldown * 1000) + ($Host::VoteTime * 1000) , 0, "resetVotePrivs", %client);
// Log Vote // Log Vote
voteLog(%client, %typeName, %arg1, %arg2, %arg3, %arg4); voteLog(%client, %typeName, %arg1, %arg2, %arg3, %arg4);
echo(%msg); echo(%msg);
if($Host::EnableVoteSoundReminders > 0) if($Host::EnableVoteSoundReminders > 0)
{ {
%time = mFloor($Host::VoteTime / ($Host::EnableVoteSoundReminders + 1)) * 1000; %time = mFloor($Host::VoteTime / ($Host::EnableVoteSoundReminders + 1)) * 1000;
@ -676,7 +676,7 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
function DefaultGame::gameOver(%game) function DefaultGame::gameOver(%game)
{ {
Parent::gameOver(%game); Parent::gameOver(%game);
//Reset ClassicMaxMapChangeVotes //Reset ClassicMaxMapChangeVotes
deleteVariables("$CMHasVoted*"); // Eolk - let people who have voted vote again deleteVariables("$CMHasVoted*"); // Eolk - let people who have voted vote again
} }
@ -704,33 +704,42 @@ function DefaultGame::cancelMatchStart(%game, %admin)
function DefaultGame::voteKickPlayer(%game, %admin, %client) function DefaultGame::voteKickPlayer(%game, %admin, %client)
{ {
%cause = ""; %cause = "";
%typeName = "VoteKickPlayer";
if(isObject(%admin))
if(isObject(%admin))
{ {
kick(%client, %admin, %client.guid ); kick(%client, %admin, %client.guid );
%cause = "(admin)"; %cause = "(admin)";
} }
else else
{ {
%team = %client.team; %team = %client.team;
%totalVotes = %game.votesFor[%game.kickTeam] + %game.votesAgainst[%game.kickTeam]; %totalVotes = %game.votesFor[%game.kickTeam] + %game.votesAgainst[%game.kickTeam];
if(%totalVotes > 0 && (%game.votesFor[%game.kickTeam] / %totalVotes) > ($Host::VotePasspercent / 100)) if(%totalVotes > 0 && (%game.votesFor[%game.kickTeam] / %totalVotes) > ($Host::VotePasspercent / 100))
{ {
kick(%client, %admin, %game.kickGuid); kick(%client, %admin, %game.kickGuid);
%cause = "(vote)"; %cause = "(vote)";
%key = "Passed";
} }
else else
{ {
for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ )
{ {
%cl = ClientGroup.getObject( %idx ); %cl = ClientGroup.getObject( %idx );
if (%cl.team == %game.kickTeam && !%cl.isAIControlled()) if (%cl.team == %game.kickTeam && !%cl.isAIControlled())
messageClient( %cl, 'MsgVoteFailed', '\c2Kick player vote did not pass.' ); messageClient( %cl, 'MsgVoteFailed', '\c2Kick player vote did not pass.' );
} }
%key = "Failed";
} }
} }
//Log Vote %
votePercentLog(%client, %typeName, %key, %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Total: %3 [%4%5]', %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, mfloor((%game.votesFor[%game.kickTeam] / %totalVotes) * 100), "%", %key);
%game.kickTeam = ""; %game.kickTeam = "";
%game.kickGuid = ""; %game.kickGuid = "";
%game.kickClientName = ""; %game.kickClientName = "";
@ -742,6 +751,8 @@ function DefaultGame::voteKickPlayer(%game, %admin, %client)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typeDisplayName, %missionId, %missionTypeId) function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typeDisplayName, %missionId, %missionTypeId)
{ {
%typeName = "VoteChangeMission";
%mission = $HostMissionFile[%missionId]; %mission = $HostMissionFile[%missionId];
if ( %mission $= "" ) if ( %mission $= "" )
{ {
@ -759,28 +770,45 @@ function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typ
// Eolk - Part of $admincl fix. // Eolk - Part of $admincl fix.
if(isObject(%admin)) if(isObject(%admin))
{ {
messageAll('MsgAdminChangeMission', '\c2The Admin %3 has changed the mission to %1 (%2).', %missionDisplayName, %typeDisplayName, %admin.name ); messageAll('MsgAdminChangeMission', '\c2The Admin %3 has changed the mission to %1 (%2).', %missionDisplayName, %typeDisplayName, %admin.name );
%game.gameOver(); %game.gameOver();
loadMission( %mission, %missionType, false ); loadMission( %mission, %missionType, false );
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD // Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100)) if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2The mission was changed to %1 (%2) by vote.', %missionDisplayName, %typeDisplayName ); messageAll('MsgVotePassed', '\c2The mission was changed to %1 (%2) by vote.', %missionDisplayName, %typeDisplayName );
//Log Vote % - Must be before Game Over
%key = "Passed";
votePercentLog(%missionDisplayName, %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
%game.gameOver(); %game.gameOver();
loadMission( %mission, %missionType, false ); loadMission( %mission, %missionType, false );
} }
else else
messageAll('MsgVoteFailed', '\c2Change mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); {
messageAll('MsgVoteFailed', '\c2Change mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
//Log Vote %
%key = "Failed";
votePercentLog(%missionDisplayName, %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
}
} }
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
function DefaultGame::voteTournamentMode( %game, %admin, %missionDisplayName, %typeDisplayName, %missionId, %missionTypeId ) function DefaultGame::voteTournamentMode( %game, %admin, %missionDisplayName, %typeDisplayName, %missionId, %missionTypeId )
{ {
%typeName = "VoteTournamentMode";
%mission = $HostMissionFile[%missionId]; %mission = $HostMissionFile[%missionId];
if ( %mission $= "" ) if ( %mission $= "" )
{ {
@ -796,22 +824,37 @@ function DefaultGame::voteTournamentMode( %game, %admin, %missionDisplayName, %t
} }
%cause = ""; %cause = "";
if (isObject(%admin)) if (isObject(%admin))
{ {
messageAll( 'MsgAdminForce', '\c2The Admin %2 has switched the server to Tournament mode (%1).', %missionDisplayName, %admin.name ); messageAll( 'MsgAdminForce', '\c2The Admin %2 has switched the server to Tournament mode (%1).', %missionDisplayName, %admin.name );
setModeTournament( %mission, %missionType ); setModeTournament( %mission, %missionType );
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD // Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100)) if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2Server switched to Tournament mode by vote (%1): %2 percent.', %missionDisplayName, mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVotePassed', '\c2Server switched to Tournament mode by vote (%1): %2 percent.', %missionDisplayName, mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
//Log Vote % - Must be before Game Over
%key = "Passed";
votePercentLog(%missionDisplayName, %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
setModeTournament( %mission, %missionType ); setModeTournament( %mission, %missionType );
} }
else else
messageAll('MsgVoteFailed', '\c2Tournament mode vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); {
//Log Vote %
%key = "Failed";
votePercentLog(%missionDisplayName, %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
messageAll('MsgVoteFailed', '\c2Tournament mode vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
}
} }
if(%cause !$= "") if(%cause !$= "")
@ -821,11 +864,13 @@ function DefaultGame::voteTournamentMode( %game, %admin, %missionDisplayName, %t
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit ) function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit )
{ {
%typeName = "VoteChangeTimeLimit";
if( %newLimit == 999 ) if( %newLimit == 999 )
%display = "unlimited"; %display = "unlimited";
else else
%display = %newLimit; %display = %newLimit;
%cause = ""; %cause = "";
if ( %admin ) if ( %admin )
{ {
@ -836,18 +881,31 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit )
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD // Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100)) if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2The mission time limit was set to %1 minutes by vote.', %display); messageAll('MsgVotePassed', '\c2The mission time limit was set to %1 minutes by vote.', %display);
$Host::TimeLimit = %newLimit; $Host::TimeLimit = %newLimit;
// VoteOvertime // VoteOvertime
ResetVOTimeChanged(%game); ResetVOTimeChanged(%game);
// Reset the voted time limit when changing mission // Reset the voted time limit when changing mission
$TimeLimitChanged = 1; $TimeLimitChanged = 1;
//Log Vote %
%key = "Passed";
votePercentLog(%newLimit, %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
} }
else else
{ {
messageAll('MsgVoteFailed', '\c2The vote to change the mission time limit did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVoteFailed', '\c2The vote to change the mission time limit did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
//Log Vote %
%key = "Failed";
votePercentLog(%newLimit, %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
// VoteOvertime // VoteOvertime
ResetVOall(%game); ResetVOall(%game);
} }
@ -872,29 +930,31 @@ function DefaultGame::voteFFAMode( %game, %admin, %client )
{ {
%cause = ""; %cause = "";
%name = getTaggedString(%client.name); %name = getTaggedString(%client.name);
if(isObject(%admin)) if(isObject(%admin))
{ {
messageAll('MsgAdminForce', '\c2The Admin %1 has switched the server to Free For All mode.', %admin.name); messageAll('MsgAdminForce', '\c2The Admin %1 has switched the server to Free For All mode.', %admin.name);
setModeFFA($CurrentMission, $CurrentMissionType); setModeFFA($CurrentMission, $CurrentMissionType);
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD // Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100)) if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2Server switched to Free For All mode by vote.', %client); messageAll('MsgVotePassed', '\c2Server switched to Free For All mode by vote.', %client);
setModeFFA($CurrentMission, $CurrentMissionType); setModeFFA($CurrentMission, $CurrentMissionType);
} }
else else
messageAll('MsgVoteFailed', '\c2Free For All mode vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVoteFailed', '\c2Free For All mode vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
} }
} }
function DefaultGame::voteSkipMission(%game, %admin, %arg1, %arg2, %arg3, %arg4) function DefaultGame::voteSkipMission(%game, %admin, %arg1, %arg2, %arg3, %arg4)
{ {
if(isObject(%admin)) %typeName = "VoteSkipMission";
if(isObject(%admin))
{ {
messageAll('MsgAdminForce', '\c2The Admin %1 has skipped to the next mission.',%admin.name ); messageAll('MsgAdminForce', '\c2The Admin %1 has skipped to the next mission.',%admin.name );
%game.gameOver(); %game.gameOver();
@ -907,14 +967,29 @@ function DefaultGame::voteSkipMission(%game, %admin, %arg1, %arg2, %arg3, %arg4)
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD // Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100)) if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2The mission was skipped to next by vote.'); messageAll('MsgVotePassed', '\c2The mission was skipped to next by vote.');
//Log Vote % - Must be before Game Over
%key = "Passed";
votePercentLog("N/A", %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
echo("mission skipped (vote)"); echo("mission skipped (vote)");
%game.gameOver(); %game.gameOver();
//loadMission( findNextCycleMission(), $CurrentMissionType, false ); //loadMission( findNextCycleMission(), $CurrentMissionType, false );
cycleMissions(); cycleMissions();
} }
else else
{
messageAll('MsgVoteFailed', '\c2Skip mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVoteFailed', '\c2Skip mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
//Log Vote %
%key = "Failed";
votePercentLog("N/A", %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
}
} }
} }
@ -945,16 +1020,16 @@ function DefaultGame::voteMatchStart( %game, %admin)
return; return;
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD // Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100)) if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2The match has been started by vote: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVotePassed', '\c2The match has been started by vote: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
startTourneyCountdown(); startTourneyCountdown();
} }
else else
messageAll('MsgVoteFailed', '\c2Start Match vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVoteFailed', '\c2Start Match vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
} }
} }
} }
@ -964,46 +1039,46 @@ function DefaultGame::voteTeamDamage(%game, %admin)
{ {
%setto = ""; %setto = "";
%cause = ""; %cause = "";
if(isObject(%admin)) if(isObject(%admin))
{ {
if($teamDamage) if($teamDamage)
{ {
messageAll('MsgAdminForce', '\c2The Admin %1 has disabled team damage.', %admin.name); messageAll('MsgAdminForce', '\c2The Admin %1 has disabled team damage.', %admin.name);
$Host::TeamDamageOn = $TeamDamage = 0; $Host::TeamDamageOn = $TeamDamage = 0;
%setto = "disabled"; %setto = "disabled";
} }
else else
{ {
messageAll('MsgAdminForce', '\c2The Admin %1 has enabled team damage.', %admin.name); messageAll('MsgAdminForce', '\c2The Admin %1 has enabled team damage.', %admin.name);
$Host::TeamDamageOn = $TeamDamage = 1; $Host::TeamDamageOn = $TeamDamage = 1;
%setto = "enabled"; %setto = "enabled";
} }
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD // Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100)) if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
if($teamDamage) if($teamDamage)
{ {
messageAll('MsgVotePassed', '\c2Team damage was disabled by vote.'); messageAll('MsgVotePassed', '\c2Team damage was disabled by vote.');
$Host::TeamDamageOn = $TeamDamage = 0; $Host::TeamDamageOn = $TeamDamage = 0;
%setto = "disabled"; %setto = "disabled";
} }
else else
{ {
messageAll('MsgVotePassed', '\c2Team damage was enabled by vote.'); messageAll('MsgVotePassed', '\c2Team damage was enabled by vote.');
$Host::TeamDamageOn = $TeamDamage = 1; $Host::TeamDamageOn = $TeamDamage = 1;
%setto = "enabled"; %setto = "enabled";
} }
} }
else else
{ {
if($teamDamage) if($teamDamage)
messageAll('MsgVoteFailed', '\c2Disable team damage vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVoteFailed', '\c2Disable team damage vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
else else
messageAll('MsgVoteFailed', '\c2Enable team damage vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVoteFailed', '\c2Enable team damage vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
} }
} }
} }
@ -1060,7 +1135,7 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
{ {
if ( $Host::allowAdminPlayerVotes && !%isTargetBot ) // z0dd - ZOD, 9/29/02. Removed T2 demo code from here if ( $Host::allowAdminPlayerVotes && !%isTargetBot ) // z0dd - ZOD, 9/29/02. Removed T2 demo code from here
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "AdminPlayer", "", 'Vote to Make Admin', 2 ); messageClient( %client, 'MsgPlayerPopupItem', "", %key, "AdminPlayer", "", 'Vote to Make Admin', 2 );
if ( !%isTargetSelf ) if ( !%isTargetSelf )
{ {
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "KickPlayer", "", 'Vote to Kick', 3 ); messageClient( %client, 'MsgPlayerPopupItem', "", %key, "KickPlayer", "", 'Vote to Kick', 3 );
@ -1116,21 +1191,21 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "StripAdmin", "", 'Strip admin', 14 ); messageClient( %client, 'MsgPlayerPopupItem', "", %key, "StripAdmin", "", 'Strip admin', 14 );
if ( %game.numTeams > 1 ) if ( %game.numTeams > 1 )
{ {
if ( %isTargetObserver ) if ( %isTargetObserver )
{ {
%action = %isTargetSelf ? "Join " : "Change to "; %action = %isTargetSelf ? "Join " : "Change to ";
%str1 = %action @ getTaggedString( %game.getTeamName(1) ); %str1 = %action @ getTaggedString( %game.getTeamName(1) );
%str2 = %action @ getTaggedString( %game.getTeamName(2) ); %str2 = %action @ getTaggedString( %game.getTeamName(2) );
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str1, 6 ); messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str1, 6 );
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str2, 7 ); messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str2, 7 );
} }
else if( %isSuperAdmin || ($Host::AllowAdminSwitchTeams && %isAdmin) ) else if( %isSuperAdmin || ($Host::AllowAdminSwitchTeams && %isAdmin) )
{ {
%changeTo = %targetClient.team == 1 ? 2 : 1; %changeTo = %targetClient.team == 1 ? 2 : 1;
%str = "Switch to " @ getTaggedString( %game.getTeamName(%changeTo) ); %str = "Switch to " @ getTaggedString( %game.getTeamName(%changeTo) );
%caseId = 5 + %changeTo; %caseId = 5 + %changeTo;
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str, %caseId ); messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str, %caseId );
@ -1170,7 +1245,7 @@ function DefaultGame::stopRunningVote(%game, %admin, %arg1, %arg2, %arg3, %arg4)
function adminStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4) function adminStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4)
{ {
if ( Game.scheduleVote !$= "" && Game.voteType $= %typeName ) if ( Game.scheduleVote !$= "" && Game.voteType $= %typeName )
{ {
messageAll('closeVoteHud', ""); messageAll('closeVoteHud', "");
cancel(Game.scheduleVote); cancel(Game.scheduleVote);
@ -1282,31 +1357,31 @@ function calcVotes(%typeName, %arg1, %arg2, %arg3, %arg4)
return; return;
} }
} }
for(%idx = 0; %idx < ClientGroup.getCount(); %idx++) for(%idx = 0; %idx < ClientGroup.getCount(); %idx++)
{ {
%cl = ClientGroup.getObject(%idx); %cl = ClientGroup.getObject(%idx);
messageClient(%cl, 'closeVoteHud', ""); messageClient(%cl, 'closeVoteHud', "");
if(%cl.vote !$= "") if(%cl.vote !$= "")
{ {
if(%cl.vote) if(%cl.vote)
{ {
Game.votesFor[%cl.team]++; Game.votesFor[%cl.team]++;
Game.totalVotesFor++; Game.totalVotesFor++;
} }
else else
{ {
Game.votesAgainst[%cl.team]++; Game.votesAgainst[%cl.team]++;
Game.totalVotesAgainst++; Game.totalVotesAgainst++;
} }
} }
else else
{ {
Game.votesNone[%cl.team]++; Game.votesNone[%cl.team]++;
Game.totalVotesNone++; Game.totalVotesNone++;
} }
} }
Game.evalVote(%typeName, false, %arg1, %arg2, %arg3, %arg4); Game.evalVote(%typeName, false, %arg1, %arg2, %arg3, %arg4);
Game.scheduleVote = ""; Game.scheduleVote = "";
@ -1333,4 +1408,4 @@ function resetViewSchedule(%client)
// Prevent package from being activated if it is already // Prevent package from being activated if it is already
if (!isActivePackage(ExtraVoteMenu)) if (!isActivePackage(ExtraVoteMenu))
activatePackage(ExtraVoteMenu); activatePackage(ExtraVoteMenu);

View file

@ -1,9 +1,14 @@
//$dtBanList::IP192_168_0_133 = "336\t2020\t365";
//336 day of the year banned Dec1
//2020 year banned
//365 How long to ban (365 days = 1 year)
//$Host::dtBanlist = "prefs/dtBanlist.cs"; //$Host::dtBanlist = "prefs/dtBanlist.cs";
//$Host::KickBanTime = 20; is 20 Minutes
//$Host::BanTime = 43200; is One Month
//$Host::BanTime = 129600; is Three Months
//$Host::BanTime = 259200; is Six Months
//$Host::BanTime = 518400; is 1 year
//$Host::BanTime = 1000000; is Until you unban them (Forever)
//$Host::BanTime = BAN; is Until you unban them (Forever)
//$dtBanList::GUID3555379 = "DAY OF THE YEAR BANNED \t YEAR BANNED \t HOUR BANNED \t MINUTE BANNED \t TIME TO BE BANNED";
//$dtBanList::GUID3555379 = "4\t2021\t18\t31\t518400";
package dtBan package dtBan
{ {
@ -16,76 +21,98 @@ function ClassicLoadBanlist()
$ClassicWhitelists = 0; $ClassicWhitelists = 0;
exec($Host::ClassicWhitelist); exec($Host::ClassicWhitelist);
} }
function BanList::add(%guid, %ipAddress, %days)
{
if (%guid > 0)
$dtBanList::GUID[%guid] = dtBanDay() TAB getBanYear() TAB %days;
if (getSubStr(%ipAddress, 0, 3) $= "IP:")
{
// add IP ban
%bareIP = getSubStr(%ipAddress, 3, strLen(%ipAddress));
%bareIP = getSubStr(%bareIP, 0, strstr(%bareIP, ":"));
%bareIP = strReplace(%bareIP, ".", "_"); // variable access bug workaround
$dtBanList::IP[%bareIP] = dtBanDay() TAB getBanYear() TAB %days; function BanList::add(%guid, %ipAddress, %time){
//error("ban" SPC %bareIP SPC $dtBanList::IP[%bareIP]); if(%time > 999999){
} %time = "BAN";
}
if (%guid > 0){
$dtBanList::GUID[%guid] = dtBanMark() TAB %time;
}
if (getSubStr(%ipAddress, 0, 3) $= "IP:"){
// add IP ban
%bareIP = getSubStr(%ipAddress, 3, strLen(%ipAddress));
%bareIP = getSubStr(%bareIP, 0, strstr(%bareIP, ":"));
%bareIP = strReplace(%bareIP, ".", "_"); // variable access bug workaround
// write out the updated bans to the file $dtBanList::IP[%bareIP] = dtBanMark() TAB %time;
export("$dtBanList*", $Host::dtBanlist); //error("ban" SPC %bareIP SPC $dtBanList::IP[%bareIP]);
}
// write out the updated bans to the file
export("$dtBanList*", $Host::dtBanlist);
} }
function banList_checkIP(%client)
{
%ip = %client.getAddress();
%ip = getSubStr(%ip, 3, strLen(%ip));
%ip = getSubStr(%ip, 0, strstr(%ip, ":"));
%ip = strReplace(%ip, ".", "_");
%time = $dtBanList::IP[%ip]; function banList_checkIP(%client){
if (%time !$= "" && %time !$= "UNBAN") %ip = %client.getAddress();
{ %ip = getSubStr(%ip, 3, strLen(%ip));
%delta = getBanCount(getField(%time,0), getField(%time,1)); %ip = getSubStr(%ip, 0, strstr(%ip, ":"));
if (%delta < getField(%time,2)) %ip = strReplace(%ip, ".", "_");
return 1;
else %time = $dtBanList::IP[%ip];
$dtBanList::IP[%ip] = "UNBAN"; if(%time $= "BAN")
} return 1;
return 0; if (%time !$= "" && %time != 0){
%delta = getBanCount(getField(%time,0), getField(%time,1),getField(%time,2),getField(%time,3));
if (%delta < getField(%time,4))
return 1;
else{
$dtBanList::IP[%ip] = "";
schedule(1000,0,"export","$dtBanList*", $Host::dtBanlist);
//export("$dtBanList*", "prefs/dtBanlist.cs");
}
}
return 0;
} }
function banList_checkGUID(%guid) function banList_checkGUID(%guid){
{ %time = $dtBanList::GUID[%guid];
%time = $dtBanList::GUID[%guid]; if(%time $= "BAN")
if (%time !$= "" && %time !$= "UNBAN") return 1;
{ if (%time !$= "" && %time != 0){
%delta = getBanCount(getField(%time,0), getField(%time,1)); %delta = getBanCount(getField(%time,0), getField(%time,1),getField(%time,2),getField(%time,3));
if (%delta < getField(%time,2)) if (%delta < getField(%time,4))
return 1; return 1;
else else{
$dtBanList::GUID[%guid] = "UNBAN"; $dtBanList::GUID[%guid] = "";
} schedule(500,0,"export","$dtBanList*", $Host::dtBanlist);
return 0; //export("$dtBanList*", "prefs/dtBanlist.cs");
}
}
return 0;
} }
}; };
if (!isActivePackage(dtBan)) if (!isActivePackage(dtBan))
activatePackage(dtBan); activatePackage(dtBan);
function getBanCount(%d, %year)
{ function getBanCount(%d, %year, %h, %n){
%dif = getBanYear() - %year; %dif = formattimestring("yy") - %year;
%days += 365 * (%dif-1); %days += 365 * (%dif-1);
%days += 365 - %d; %days += 365 - %d;
%days += dtBanDay(); %days += dtBanDay();
return %days; %ht = %nt = 0;
if(formattimestring("H") > %h){
%ht = formattimestring("H") - %h;
}
else if(formattimestring("H") < %h){
%ht = 24 - %h;
%ht = formattimestring("H")+ %ht;
}
if(formattimestring("n") > %n){
%nt = formattimestring("n") - %n;
}
else if(formattimestring("n") < %n){
%nt = 60 - %n;
%nt = formattimestring("n") + %nt;
}
return mfloor((%days * 1440) + (%ht*60) + %nt);
//return mfloor((%days * 1440) + (%ht*60) + %nt) TAB (%days * 1440) TAB (%ht*60) TAB %nt;
} }
function dtBanDay() function dtBanDay(){
{
%date = formattimestring("mm dd yy"); %date = formattimestring("mm dd yy");
%m = getWord(%date,0);%d = getWord(%date,1);%y = getWord(%date,2); %m = getWord(%date,0);%d = getWord(%date,1);%y = getWord(%date,2);
%count = 0; %count = 0;
@ -94,17 +121,35 @@ function dtBanDay()
%days[4] = "30"; %days[5] = "31"; %days[6] = "30"; %days[4] = "30"; %days[5] = "31"; %days[6] = "30";
%days[7] = "31"; %days[8] = "31"; %days[9] = "30"; %days[7] = "31"; %days[8] = "31"; %days[9] = "30";
%days[10] = "31"; %days[11] = "30"; %days[12] = "31"; %days[10] = "31"; %days[11] = "30"; %days[12] = "31";
for(%i = 1; %i <= %m-1; %i++){
for(%i = 1; %i <= %m-1; %i++)
{
%count += %days[%i]; %count += %days[%i];
} }
return %count + %d; return %count + %d;
}
function getBanYear()
{
return formattimestring("yy");
} }
function dtBanMark(){
%date = formattimestring("mm dd yy");
%m = getWord(%date,0);%d = getWord(%date,1);%y = getWord(%date,2);
%count = 0;
if(%y % 4 < 1){%days[2] = "29";}else{%days[2] = "28";} // leap year
%days[1] = "31";%days[3] = "31";
%days[4] = "30"; %days[5] = "31"; %days[6] = "30";
%days[7] = "31"; %days[8] = "31"; %days[9] = "30";
%days[10] = "31"; %days[11] = "30"; %days[12] = "31";
for(%i = 1; %i <= %m-1; %i++){
%count += %days[%i];
}
return %count + %d TAB formattimestring("yy") TAB formattimestring("H") TAB formattimestring("n");
}
function unban(%guid,%ip){
if($dtBanList::GUID[%guid] !$= ""){
$dtBanList::GUID[%guid] = "";
error("GUID" SPC %guid SPC "UNBANNED");
}
if($dtBanList::IP[%ip] !$= ""){
$dtBanList::IP[%ip] = "";
error("IP" SPC %ip SPC "UNBANNED");
}
export("$dtBanList*", $Host::dtBanlist);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -27,7 +27,7 @@ $Host::holoName[6] = "Harbinger";
// ----------------------------------------- // -----------------------------------------
// z0dd - ZOD, 9/29/02. Removed T2 demo code // z0dd - ZOD, 9/29/02. Removed T2 demo code
$Host::GameName = "Tribes 2 Test"; $Host::GameName = "Tribes 2 Test";
$Host::Info = " "; $Host::Info = "This is a Tribes 2 Classic server. More information in Discord. <a:playt2.com/discord>playt2.com/discord</a>";
$Host::Map = "VaubanLak"; $Host::Map = "VaubanLak";
$Host::MaxPlayers = 30; $Host::MaxPlayers = 30;
$Host::MissionType = "LakRabbit"; $Host::MissionType = "LakRabbit";
@ -81,8 +81,8 @@ $Host::ClassicLoadVRamChanges = 0; // Vehicles take damage wh
// ------------------------------------------------ // ------------------------------------------------
$Host::AdminList = ""; // all players that will be automatically an admin upon joining server $Host::AdminList = ""; // all players that will be automatically an admin upon joining server
$Host::SuperAdminList = ""; // all players that will be automatically a super admin upon joining server $Host::SuperAdminList = ""; // all players that will be automatically a super admin upon joining server
$Host::BindAddress = ""; // set to an ip address if the server wants to specify which NIC/IP to use $Host::BindAddress = ""; // set to an ip address if the server wants to specify which NIC/IP to use
$Host::Port = 28000; $Host::Port = 28000;
$Host::Password = ""; $Host::Password = "";
$Host::PureServer = 0; $Host::PureServer = 0;
@ -95,8 +95,8 @@ $Host::MaxBotDifficulty = 0.75;
$Host::NoSmurfs = 1; $Host::NoSmurfs = 1;
$Host::VoteTime = 30; // amount of time before votes are calculated $Host::VoteTime = 30; // amount of time before votes are calculated
$Host::VotePassPercent = 60; // percent needed to pass a vote $Host::VotePassPercent = 60; // percent needed to pass a vote
$Host::KickBanTime = 1; // specified in days $Host::KickBanTime = 20; // specified in minutes
$Host::BanTime = 30; // specified in days $Host::BanTime = 43200; // specified in minutes (43200 is one month)
$Host::PlayerRespawnTimeout = 60; // time before a dead player is forced into observer mode $Host::PlayerRespawnTimeout = 60; // time before a dead player is forced into observer mode
$Host::warmupTime = 20; $Host::warmupTime = 20;
$Host::TournamentMode = 0; $Host::TournamentMode = 0;