diff --git a/Classic/prefs/MapRotation.cs b/Classic/prefs/MapRotation.cs deleted file mode 100644 index 7e32180..0000000 --- a/Classic/prefs/MapRotation.cs +++ /dev/null @@ -1,619 +0,0 @@ -// __ __ _____ _ _ _ -// | \/ | | __ \ | | | | (_) -// | \ / | __ _ _ __ | |__) |___ | |_ __ _| |_ _ ___ _ __ -// | |\/| |/ _` | '_ \ | _ // _ \| __/ _` | __| |/ _ \| '_ \ -// | | | | (_| | |_) | | | \ \ (_) | || (_| | |_| | (_) | | | | -// |_| |_|\__,_| .__/ |_| \_\___/ \__\__,_|\__|_|\___/|_| |_| -// | | -// |_| -// -// Use of this file -// To add a new map follow this rules: -// 1. Find the file name, ending in .mis (ie BeggarsRun.mis) -// 2. Add a line with this syntact: addRotationMap(filename, gametype, %voteable, %cycle, %min. %max); -// -//addRotationMap("MAP_NAME","MAP_MODE",VOTEABLE,IN-ROTATION,MINIMUM_PLAYERS,MAXIMUM_PLAYERS); -// -// Example: addRotationMap("BeggarsRun","CTF",1,1,-1,64); -// Beggar's Run will be in the mapRotation. It's in the cycle and can be voted. The map has no minimum player count requirement, and a 64 player max. -// -// Example: addRotationMap("BeggarsRun","CTF",1,0,10,20); -// Beggar's Run will be in the mapRotation. It's not in the cycle, but can be voted. The map has a minimum player count requirement of 10, and 20 players is the maximum to be picked. -// -// Example: addRotationMap("BeggarsRun","CTF",0,0,18,-1); -// Beggar's Run won't be in the mapRotation. It's not in the cycle and can't be voted. The map has a minimum player count requirement of 18, and has no maximum for players. -// -// -//addRotationMap("Casern_Cavite","Bounty",1,1,0,64); -//addRotationMap("Sirocco","CnH",1,1,0,64); -//addRotationMap("aabaaGH","CTF",1,0,0,64); -//addRotationMap("AcidRain","DnD",1,1,0,64); -//addRotationMap("AgentsOfFortune","Hunters",1,1,0,64); -//addRotationMap("SunDriedLak1","LakRabbit",1,1,0,64); -//addRotationMap("Arrakis","Rabbit",1,1,0,64); -//addRotationMap("VulcansHammer","Siege",1,1,0,64); -//addRotationMap("AgentsOfFortune","TeamHunters",1,1,0,64); -// - - -// _____ _______ ______ -// / ____|__ __| ____| -// | | | | | |__ -// | | | | | __| -// | |____ | | | | -// \_____| |_| |_| -///////////////////////////////////////////////////////////////////// - -//Small Maps -///////////////////////////////////////////////////////////////////// - -//addRotationMap("SmallCrossing", "CTF",1,1,-1,16); //Using DMP Version -addRotationMap("TWL2_CanyonCrusadeDeluxe", "CTF",1,1,-1,24); -addRotationMap("RoundTheMountain", "CTF",1,1,-1,18); -addRotationMap("oasisintensity", "CTF",1,1,-1,10); -addRotationMap("Minotaur", "CTF",1,0,-1,18); -addRotationMap("SmallMelee", "CTF",1,0,-1,12); -addRotationMap("Machineeggs", "CTF",1,1,-1,10); -addRotationMap("Mac_FlagArena", "CTF",1,0,-1,14); -addRotationMap("SmallTimeCTF", "CTF",1,0,-1,14); -addRotationMap("TWL2_Hildebrand", "CTF",1,1,-1,18); -addRotationMap("ArenaDome", "CTF",1,0,-1,12); -addRotationMap("Firestorm", "CTF",1,0,-1,12); -addRotationMap("Bulwark", "CTF",1,1,-1,12); -addRotationMap("Blink", "CTF",1,0,-1,10); -addRotationMap("Discord", "CTF",1,1,6,16); -addRotationMap("TWL2_MidnightMayhemDeluxe", "CTF",1,0,8,12); -addRotationMap("Sentry", "CTF",1,1,-1,14); -addRotationMap("TWL2_Skylight", "CTF",1,1,-1,10); -addRotationMap("Exhumed", "CTF",1,0,-1,12); -addRotationMap("FrozenHope", "CTF",1,1,8,12); -addRotationMap("ClusterUnFuct", "CTF",1,0,8,12); -//addRotationMap("Raspian", "CTF",1,0,8,12); -addRotationMap("Zilch", "CTF",1,1,6,12); -addRotationMap("SuperHappyBouncyFunTime", "CTF",1,0,-1,12); -addRotationMap("SuperiorWaterworks", "CTF",1,0,-1,12); -//addRotationMap("TWL2_FrozenHope", "CTF",1,0,8,20); -//addRotationMap("Island", "CTF",1,1,-1,12); -//addRotationMap("TitForTat", "CTF",1,1,-1,12); -//addRotationMap("Cinerarium", "CTF",1,0,-1,12); //Using DMP Version -//addRotationMap("StarFallCTF", "CTF",1,0,6,12); //Using DMP Version -//addRotationMap("TWL_OsIris", "CTF",1,0,8,18); -//addRotationMap("FrostPipe", "CTF",1,0,-1,12); - -//Medium Maps -///////////////////////////////////////////////////////////////////// - -addRotationMap("HighOctane", "CTF",1,0,10,24); -addRotationMap("S5_Mordacity", "CTF",1,1,10,24); -addRotationMap("S5_Damnation", "CTF",1,1,12,20); -addRotationMap("TWL2_JaggedClaw", "CTF",1,1,14,28); -addRotationMap("S5_Massive", "CTF",1,1,12,32); -addRotationMap("TWL_Stonehenge", "CTF",1,1,8,20); -addRotationMap("TWL_Feign", "CTF",1,1,10,28); -addRotationMap("TheFray", "CTF",1,0,10,20); -//addRotationMap("DangerousCrossing_nef", "CTF",1,1,8,20); -addRotationMap("TWL_DangerousCrossing", "CTF",1,0,10,28); -addRotationMap("TWL2_Ocular", "CTF",1,1,20,-1); -addRotationMap("Dire", "CTF",1,0,10,16); -addRotationMap("berlard", "CTF",1,1,12,24); -addRotationMap("S8_Opus", "CTF",1,1,12,24); -addRotationMap("TWL_BeggarsRun", "CTF",1,0,18,24); -addRotationMap("Headstone", "CTF",1,1,8,24); -addRotationMap("Signal", "CTF",1,0,8,24); -addRotationMap("S5_Woodymyrk", "CTF",1,1,10,32); -addRotationMap("TenebrousCTF", "CTF",1,0,8,12); -addRotationMap("Prismatic", "CTF",1,0,16,32); -addRotationMap("TWL_WilderZone", "CTF",1,1,12,32); -addRotationMap("S5_Mimicry", "CTF",1,0,12,32); -addRotationMap("TWL_Snowblind", "CTF",1,1,20,-1); -addRotationMap("ShortFall", "CTF",1,0,18,28); -addRotationMap("IceRidge_nef", "CTF",1,0,12,32); -//addRotationMap("Disjointed", "CTF",1,0,8,20); -addRotationMap("TWL2_MuddySwamp", "CTF",1,0,10,24); -addRotationMap("HighAnxiety", "CTF",1,1,-1,12); -addRotationMap("S5_Centaur", "CTF",1,1,-1,12); -addRotationMap("S8_Cardiac", "CTF",1,1,18,-1); -addRotationMap("CirclesEdge", "CTF",1,0,10,24); -addRotationMap("S5_Icedance", "CTF",1,1,10,28); -addRotationMap("Surreal", "CTF",1,0,24,-1); -addRotationMap("TWL2_Drifts", "CTF",1,0,14,24); -//addRotationMap("TWL2_Drorck", "CTF",1,0,12,24); -addRotationMap("S5_HawkingHeat", "CTF",1,0,16,28); -addRotationMap("TWL2_Celerity", "CTF",1,1,12,32); -addRotationMap("Draco", "CTF",1,0,8,24); -//addRotationMap("Pariah", "CTF",1,0,8,24); //Using DMP Version -//addRotationMap("Mirage", "CTF",1,0,8,20); -addRotationMap("Norty", "CTF",1,1,18,32); - -//Voteable but Not in Rotation -///////////////////////////////////////////////////////////////////// - -addRotationMap("TWL2_IceDagger", "CTF",1,1,10,20); -addRotationMap("TWL_Titan", "CTF",1,0,16,32); -addRotationMap("Burstside", "CTF",1,0,10,20); -addRotationMap("Infernus", "CTF",1,0,18,26); -addRotationMap("Confusco", "CTF",1,0,10,20); -//addRotationMap("Snowcone", "CTF",1,0,10,20); -addRotationMap("S5_Drache", "CTF",1,0,16,28); -//addRotationMap("JadeValley", "CTF",1,0,10,20); -addRotationMap("S5_Sherman", "CTF",1,1,24,-1); -addRotationMap("S5_Silenus", "CTF",1,0,8,20); -addRotationMap("S5_Reynard", "CTF",1,0,10,20); -//addRotationMap("Coppersky", "CTF",1,0,8,20); -//addRotationMap("TWL2_Crevice", "CTF",1,0,10,20); -addRotationMap("TWL_SubZero", "CTF",1,0,16,32); -addRotationMap("Fallout", "CTF",1,1,16,24); -//addRotationMap("TheClocktower", "CTF",1,0,10,20); -//addRotationMap("SoylentGreen", "CTF",1,0,10,20); -//addRotationMap("Ramparts", "CTF",1,0,10,20); -//addRotationMap("Blastside_nef", "CTF",1,0,10,24); -//addRotationMap("NatureMagic", "CTF",1,0,10,20); -//addRotationMap("TWL_Damnation", "CTF",1,0,10,20); -addRotationMap("TWL_DeadlyBirdsSong", "CTF",1,0,24,32); -addRotationMap("Vauban", "CTF",1,0,18,-1); -addRotationMap("TWL_Pandemonium", "CTF",1,0,16,24); -addRotationMap("TWL_WhiteDwarf", "CTF",1,0,18,24); -//addRotationMap("Cinereous", "CTF",1,0,12,20); - -//Vehicle Maps -///////////////////////////////////////////////////////////////////// - -addRotationMap("Logans_Run", "CTF",1,1,14,28); -addRotationMap("Rollercoaster_nef", "CTF",1,1,8,-1); -addRotationMap("HostileLoch", "CTF",1,1,8,12); -addRotationMap("TWL_BeachBlitz", "CTF",1,1,18,28); -addRotationMap("TWL2_Magnum", "CTF",1,1,12,-1); -//addRotationMap("MoonDance", "CTF",1,0,12,28); //Using DMP Version -addRotationMap("Raindance_nef", "CTF",1,1,12,28); -addRotationMap("TWL_Magmatic", "CTF",1,0,14,28); -addRotationMap("TWL2_FrozenGlory", "CTF",1,1,12,24); -addRotationMap("LandingParty", "CTF",1,0,16,20); -addRotationMap("TWL_Crossfire", "CTF",1,1,18,28); -//addRotationMap("TitanV", "CTF",1,0,12,28); -//addRotationMap("Rollercoaster_nef_FZ", "CTF",1,1,8,28); -//addRotationMap("The_Calm", "CTF",1,0,12,24); -addRotationMap("TWL2_Dissention", "CTF",1,0,16,32); - -//Vehicle Maps: Voteable, But Not in Rotation -///////////////////////////////////////////////////////////////////// - -addRotationMap("SubZeroV", "CTF",1,0,12,24); -addRotationMap("S8_Geothermal", "CTF",1,0,12,24); -addRotationMap("Lakefront", "CTF",1,0,16,24); -addRotationMap("ShockRidge", "CTF",1,0,12,24); -addRotationMap("TWL2_BlueMoon", "CTF",1,1,18,32); -addRotationMap("TWL_Katabatic", "CTF",1,0,16,32); -addRotationMap("SandOcean", "CTF",1,0,12,28); -addRotationMap("ks_braistv", "CTF",1,0,12,24); -addRotationMap("Nightdance", "CTF",1,0,16,24); -addRotationMap("TWL_Abaddon", "CTF",1,0,16,24); -//addRotationMap("StarIce", "CTF",1,0,12,24); -//addRotationMap("FilteredDust", "CTF",1,0,12,24); -//addRotationMap("Choke", "CTF",1,0,12,24); -addRotationMap("TWL_Chokepoint", "CTF",1,0,12,24); -//addRotationMap("TWL_Starfallen", "CTF",1,0,12,24); -//addRotationMap("ConstructionYard", "CTF",1,0,12,24); -//addRotationMap("AcidRain", "CTF",1,0,12,24); -addRotationMap("Agorazscium", "CTF",1,0,12,24); - -//BIG Vehicle Maps -///////////////////////////////////////////////////////////////////// - -addRotationMap("Circleofstones", "CTF",1,1,16,-1); -addRotationMap("Ruined", "CTF",1,0,24,-1); -//addRotationMap("FullCircle", "CTF",1,0,18,30); -//addRotationMap("Surro", "CTF",1,0,18,24); -addRotationMap("TWL2_RoughLand", "CTF",1,0,16,-1); -addRotationMap("HarvestDance", "CTF",1,1,24,-1); -//addRotationMap("WindyGap", "CTF",1,0,24,-1); -addRotationMap("Fenix", "CTF",1,1,26,-1); -addRotationMap("Hillside", "CTF",1,0,28,-1); -addRotationMap("TWL_Slapdash", "CTF",1,0,24,-1); -addRotationMap("BerylBasin", "CTF",1,1,20,-1); -//addRotationMap("TWL_Frozen", "CTF",1,0,20,-1); -addRotationMap("TWL_Harvester", "CTF",1,1,24,-1); -addRotationMap("TWL2_Bleed", "CTF",1,0,24,-1); -addRotationMap("DeathBirdsFly1", "CTF",1,1,24,-1); -//addRotationMap("Scarabrae_nef", "CTF",1,0,28,-1); -addRotationMap("aabaa", "CTF",1,1,28,-1); -addRotationMap("TWL_Reversion", "CTF",1,1,28,-1); -addRotationMap("Horde", "CTF",1,0,24,-1); -addRotationMap("CloakofNightV", "CTF",1,0,24,-1); -//addRotationMap("TWL2_Ruined", "CTF",1,1,18,-1); -//addRotationMap("Glade", "CTF",1,1,28,-1); -//addRotationMap("Pantheon", "CTF",1,0,20,-1); -//addRotationMap("Archipelago", "CTF",1,0,20,-1); -//addRotationMap("Sangre_de_Grado", "CTF",1,0,20,-1); - -//DMP Mappack -///////////////////////////////////////////////////////////////////// -addRotationMap("DMP_Agroleon", "CTF",1,1,18,28); -addRotationMap("DMP_Astro", "CTF",1,0,16,26); -addRotationMap("DMP_BastardForge", "CTF",1,1,8,28); -addRotationMap("DMP_BitterGorge", "CTF",1,0,24,-1); -addRotationMap("DMP_Bunkered", "CTF",1,0,6,14); -addRotationMap("DMP_Cinerarium", "CTF",1,1,-1,20); -addRotationMap("DMP_DermCity", "CTF",1,0,-1,-1); -addRotationMap("DMP_Embers", "CTF",1,0,-1,14); -addRotationMap("DMP_EmeraldSpit", "CTF",1,0,10,20); -addRotationMap("DMP_FaceCrossing", "CTF",1,0,10,20); -addRotationMap("DMP_Hoth", "CTF",1,1,26,-1); -addRotationMap("DMP_IceGiant", "CTF",1,0,20,32); -addRotationMap("DMP_IsleDeBatalla", "CTF",1,0,10,20); -addRotationMap("DMP_LavaGods", "CTF",1,0,10,20); -addRotationMap("DMP_Magellan", "CTF",1,1,10,28); -addRotationMap("DMP_MoonDance", "CTF",1,1,12,32); -addRotationMap("DMP_Pantheon", "CTF",1,0,16,24); -addRotationMap("DMP_Paranoia", "CTF",1,0,6,10); -addRotationMap("DMP_Pariah", "CTF",1,1,8,24); -addRotationMap("DMP_PipeDream", "CTF",1,0,8,16); -addRotationMap("DMP_RavineV", "CTF",1,0,12,28); -addRotationMap("DMP_ScorchedEarth", "CTF",1,0,24,-1); -addRotationMap("DMP_SimpleFlagArena", "CTF",1,0,-1,12); -addRotationMap("DMP_SpinCycle", "CTF",1,1,-1,16); -addRotationMap("DMP_StarFall", "CTF",1,0,-1,16); -addRotationMap("DMP_Tyre", "CTF",1,1,16,-1); -addRotationMap("DMP_Wasteland", "CTF",1,0,10,20); - -addRotationMap("SC_Normal", "CTF",1,0,-1,16); -//addRotationMap("SC_Badlands", "CTF",1,0,-1,16); -//addRotationMap("SC_Desert", "CTF",1,0,-1,16); -//addRotationMap("SC_Lush", "CTF",1,0,-1,16); -addRotationMap("SC_Ice", "CTF",1,1,-1,16); -addRotationMap("SC_Night", "CTF",1,0,-1,16); -//addRotationMap("DX_Badlands", "CTF",1,0,10,20); -//addRotationMap("DX_Desert", "CTF",1,0,10,20); -addRotationMap("DX_Ice", "CTF",1,1,10,28); -//addRotationMap("HO_Badlands", "CTF",1,1,8,24); -//addRotationMap("HO_Desert", "CTF",1,0,8,24); -addRotationMap("HO_Ice", "CTF",1,1,8,28); -addRotationMap("HO_Lush", "CTF",1,0,8,24); -addRotationMap("Attrition", "CTF",1,0,-1,10); -//addRotationMap("Chasmaclysmic", "CTF",1,1,-1,-1); -//addRotationMap("DBS_Smoothed", "CTF",1,0,-1,-1); -addRotationMap("PuliVeivari", "CTF",1,0,-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 -///////////////////////////////////////////////////////////////////// - -//addRotationMap("Sandstorm", "CTF",1,0,-1,-1); -//addRotationMap("Starfallen", "CTF",1,0,-1,-1); -//addRotationMap("Stonehenge_nef", "CTF",1,0,-1,-1); -addRotationMap("Extractor", "CTF",1,0,16,-1); -//addRotationMap("AstersDescent", "CTF",1,0,-1,-1); -//addRotationMap("Azoth", "CTF",1,0,-1,-1); -//addRotationMap("BattleGrove", "CTF",1,0,-1,-1); -//addRotationMap("Durango", "CTF",1,0,-1,-1); -//addRotationMap("DustLust", "CTF",1,0,-1,-1); -//addRotationMap("IceGulch", "CTF",1,0,-1,-1); -//addRotationMap("MountainMist", "CTF",1,0,-1,-1); -//addRotationMap("Peak", "CTF",1,0,-1,-1); -//addRotationMap("Pendulum", "CTF",1,0,-1,-1); -//addRotationMap("S5_Misadventure", "CTF",1,0,-1,-1); -//addRotationMap("S8_CentralDogma", "CTF",1,0,-1,-1); -//addRotationMap("S8_Mountking", "CTF",1,0,-1,-1); -//addRotationMap("S8_Zilch", "CTF",1,0,-1,-1); -//addRotationMap("TWL2_CloakOfNight", "CTF",1,0,-1,-1); -//addRotationMap("TWL_BaNsHee", "CTF",1,0,-1,-1); -//addRotationMap("TWL_Boss", "CTF",1,0,-1,-1); -//addRotationMap("TWL_NoShelter", "CTF",1,0,-1,-1); -//addRotationMap("TWL_Clusterfuct", "CTF",1,0,-1,-1); -addRotationMap("TWL_Curtilage", "CTF",1,0,-1,-1); -//addRotationMap("TWL_Deserted", "CTF",1,0,-1,-1); -//addRotationMap("TWL_Frostclaw", "CTF",1,0,-1,-1); -//addRotationMap("TWL_Neve", "CTF",1,0,-1,-1); -//addRotationMap("TWL_Ramparts", "CTF",1,0,-1,-1); -//addRotationMap("TWL_Sandstorm", "CTF",1,0,-1,-1); -//addRotationMap("TWL_WoodyMyrk", "CTF",1,0,-1,-1); -//addRotationMap("OctoberRust", "CTF",1,0,-1,-1); -//addRotationMap("DevilsElbow", "CTF",1,0,-1,-1); -//addRotationMap("CloudCity", "CTF",1,0,-1,-1); -//addRotationMap("Damnation", "CTF",1,0,-1,-1); -//addRotationMap("DeathBirdsFly", "CTF",1,0,-1,-1); -//addRotationMap("Desiccator", "CTF",1,0,-1,-1); -//addRotationMap("DustToDust", "CTF",1,0,-1,-1); -//addRotationMap("Katabatic", "CTF",1,0,-1,-1); -//addRotationMap("Quagmire", "CTF",1,0,-1,-1); -//addRotationMap("Recalescence", "CTF",1,0,-1,-1); -//addRotationMap("Reversion", "CTF",1,0,-1,-1); -//addRotationMap("RiverDance", "CTF",1,0,-1,-1); -//addRotationMap("Sanctuary", "CTF",1,0,-1,-1); -//addRotationMap("ThinIce", "CTF",1,0,-1,-1); -//addRotationMap("Tombstone", "CTF",1,0,-1,-1); -//addRotationMap("Broadside_nef", "CTF",1,0,-1,-1); -//addRotationMap("Camelland", "CTF",1,0,-1,-1); -//addRotationMap("HighTrepidation", "CTF",1,0,-1,-1); -//addRotationMap("SmallDesertofDeath", "CTF",1,0,-1,-1); -//addRotationMap("BasinFury", "CTF",1,0,-1,-1); -//addRotationMap("Cadaver", "CTF",1,0,-1,-1); -//addRotationMap("EivoItoxico", "CTF",1,0,-1,-1); -//addRotationMap("Einfach", "CTF",1,0,-1,-1); -//addRotationMap("PicnicTable", "CTF",1,0,-1,-1); -//addRotationMap("Hostility", "CTF",1,0,-1,-1); -//addRotationMap("HighWire", "CTF",1,0,-1,-1); -//addRotationMap("CloudBurst", "CTF",1,0,-1,-1); -//addRotationMap("CloseCombat", "CTF",1,0,-1,-1); -//addRotationMap("DesertofDeath_nef", "CTF",1,0,-1,-1); -//addRotationMap("Gorgon", "CTF",1,0,-1,-1); -//addRotationMap("Magmatic", "CTF",1,0,-1,-1); -//addRotationMap("Sub-zero", "CTF",1,0,-1,-1); - - -// Custom -///////////////////////////////////////////////////////////////////// - -addRotationMap("CoconutFury", "CTF",1,0,-1,-1); -addRotationMap("CinderCone", "CTF",1,0,-1,-1); -addRotationMap("Sector1", "CTF",1,0,-1,-1); -//addRotationMap("Slamnation", "CTF",0,0,-1,-1); -//addRotationMap("MountaintopMayhem", "CTF",0,0,-1,-1); - -addRotationMap("ChasmClash", "CTF",1,0,-1,14); -//addRotationMap("FrostBite", "CTF",1,0,-1,-1); -//addRotationMap("Lapiths", "CTF",1,0,-1,-1); -addRotationMap("GreenLawn", "CTF",1,1,12,32); -addRotationMap("OuterWilds", "CTF",1,1,-1,12); -addRotationMap("Jettisoned", "CTF",1,0,-1,10); -addRotationMap("Moonwalk", "CTF",1,1,12,-1); -addRotationMap("Drafts", "CTF",1,1,-1,12); -//addRotationMap("IslaHermano", "CTF",1,0,-1,-1); -addRotationMap("DermCrossingDeluxe", "CTF",1,0,-1,-1); -addRotationMap("DaftGulch", "CTF",1,1,16,24); -addRotationMap("Triad", "CTF",1,0,12,20); -addRotationMap("Vaubania", "CTF",1,0,-1,12); -addRotationMap("VanDamnedCTF", "CTF",1,1,-1,14); -addRotationMap("HillKingCTF", "CTF",1,1,-1,18); -addRotationMap("Bonespur", "CTF",1,1,-1,14); -addRotationMap("Bridgepoint", "CTF",1,0,-1,18); -addRotationMap("Narcolepsy", "CTF",1,1,-1,20); -addRotationMap("WhiteDwarfDeluxe", "CTF",1,0,-1,14); -addRotationMap("SmallSpit", "CTF",1,1,-1,20); -addRotationMap("MisadventureV2", "CTF",1,1,12,28); -addRotationMap("El_Fin", "CTF",1,1,-1,14); - -// _ _ _ _ _ _ -// | | | | | | | | (_) | -// | | __ _| | ___ __ __ _| |__ | |__ _| |_ -// | | / _` | |/ / '__/ _` | '_ \| '_ \| | __| -// | |___| (_| | <| | | (_| | |_) | |_) | | |_ -// |______\__,_|_|\_\_| \__,_|_.__/|_.__/|_|\__| -///////////////////////////////////////////////////////////////////// - -//In Rotation -///////////////////////////////////////////////////////////////////// - -addRotationMap("VaubanLak", "Lakrabbit",1,0,8,-1); -addRotationMap("MiniSunDried", "Lakrabbit",1,1,-1,12); -addRotationMap("Sundance", "Lakrabbit",1,1,-1,-1); -addRotationMap("TWL_BeachBlitzLak", "Lakrabbit",1,0,-1,-1); -addRotationMap("DesertofDeathLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("Raindance_nefLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("SunDriedLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("SkinnyDipLak", "Lakrabbit",1,0,-1,-1); -addRotationMap("SaddiesHill", "Lakrabbit",1,0,-1,-1); -addRotationMap("HavenLak", "Lakrabbit",1,0,-1,-1); -addRotationMap("LushLak", "Lakrabbit",1,1,8,-1); -addRotationMap("BoxLak", "Lakrabbit",1,1,-1,10); -addRotationMap("TitaniaLak", "Lakrabbit",1,0,8,-1); -addRotationMap("TibbawLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("InfernusLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("S8_GeothermalLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("CankerLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("DustRunLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("CrossfiredLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("CloakofLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("SpectreLak", "Lakrabbit",1,1,-1,-1); - -//Voteable, But not in rotation -///////////////////////////////////////////////////////////////////// - -addRotationMap("TreasureIslandLak", "Lakrabbit",1,1,-1,-1); -addRotationMap("Sulfide", "Lakrabbit",1,0,-1,-1); -addRotationMap("FrozenFuryLak", "Lakrabbit",1,0,-1,-1); -addRotationMap("Arrakis", "Lakrabbit",1,0,-1,-1); -addRotationMap("EquinoxLak", "Lakrabbit",1,0,-1,-1); -addRotationMap("PhasmaDustLak", "Lakrabbit",1,0,-1,12); -addRotationMap("GodsRiftLak", "Lakrabbit",1,0,-1,-1); -addRotationMap("SolsDescentLak", "Lakrabbit",1,0,-1,-1); -addRotationMap("Crater71Lak", "Lakrabbit",1,0,6,-1); - -//Not Voteable, Not in rotation -///////////////////////////////////////////////////////////////////// - -//addRotationMap("EscaladeLak", "Lakrabbit",1,0,-1,-1); -//addRotationMap("MagmaticLak", "Lakrabbit",1,0,-1,-1); -//addRotationMap("HillsOfSorrow", "Lakrabbit",1,0,-1,-1); -//addRotationMap("TWL2_MuddySwampLak", "Lakrabbit",1,0,-1,-1); -//addRotationMap("SandStormLak", "Lakrabbit",1,0,-1,-1); -//addRotationMap("BeggarsRunLak", "Lakrabbit",1,0,-1,-1); -//addRotationMap("DamnnationLak", "Lakrabbit",1,0,-1,-1); - - -// _ _____ _______ ______ -// | | / ____|__ __| ____| -// | | | | | | | |__ -// | | | | | | | __| -// | |___| |____ | | | | -// |______\_____| |_| |_| -///////////////////////////////////////////////////////////////////// - -//In Rotation -///////////////////////////////////////////////////////////////////// -addRotationMap("DangerousCrossingLT", "LCTF",1,0,-1,-1); -addRotationMap("SmallCrossingLT", "LCTF",1,0,-1,12); -addRotationMap("DireLT", "LCTF",1,0,-1,-1); -addRotationMap("RoundTheMountainLT", "LCTF",1,1,-1,-1); -addRotationMap("CirclesEdgeLT", "LCTF",1,1,-1,-1); -addRotationMap("TenebrousCTF", "LCTF",1,0,-1,-1); -addRotationMap("TheFray", "LCTF",1,0,-1,-1); -addRotationMap("SignalLT", "LCTF",1,0,-1,-1); -addRotationMap("S5_DamnationLT", "LCTF",1,0,8,-1); -addRotationMap("S5_Icedance", "LCTF",1,1,-1,-1); -addRotationMap("S5_Mordacity", "LCTF",1,1,10,-1); -addRotationMap("S5_SilenusLT", "LCTF",1,0,-1,-1); -addRotationMap("TWL2_CanyonCrusadeDeluxeLT", "LCTF",1,1,-1,-1); -addRotationMap("TWL2_HildebrandLT", "LCTF",1,1,-1,-1); -addRotationMap("TWL2_SkylightLT", "LCTF",1,1,-1,-1); -addRotationMap("TWL_FeignLT", "LCTF",1,0,-1,-1); -addRotationMap("TWL_RollercoasterLT", "LCTF",1,0,-1,-1); -addRotationMap("TWL_StonehengeLT", "LCTF",1,1,-1,-1); -addRotationMap("TWL_WilderZoneLT", "LCTF",1,0,-1,-1); -addRotationMap("oasisintensity", "LCTF",1,1,-1,10); -addRotationMap("berlard", "LCTF",1,1,-1,-1); -addRotationMap("RaindanceLT", "LCTF",1,0,-1,-1); -addRotationMap("SmallTimeLT", "LCTF",1,0,-1,-1); -addRotationMap("ArenaDome", "LCTF",1,1,-1,10); -addRotationMap("Bulwark", "LCTF",1,1,-1,-1); -addRotationMap("Discord", "LCTF",1,1,-1,-1); -addRotationMap("S5_MassiveLT", "LCTF",1,0,-1,-1); -addRotationMap("Blink", "LCTF",1,0,-1,-1); -addRotationMap("HillSideLT", "LCTF",1,1,-1,10); -addRotationMap("IcePick", "LCTF",1,1,-1,16); -addRotationMap("OsIrisLT", "LCTF",1,0,-1,-1); -addRotationMap("GrassyKnoll", "LCTF",1,1,-1,-1); -addRotationMap("TWL2_MuddySwamp", "LCTF",1,0,8,-1); -addRotationMap("SandyRunLT", "LCTF",1,0,-1,12); -addRotationMap("Sentry", "LCTF",1,1,-1,-1); -addRotationMap("Cinerarium", "LCTF",1,1,-1,-1); -addRotationMap("Exhumed", "LCTF",1,1,-1,-1); -addRotationMap("S8_ZilchLT", "LCTF",1,1,-1,-1); -addRotationMap("TWL_BeachBlitzLT", "LCTF",1,0,-1,-1); -addRotationMap("FrozenHopeLT", "LCTF",1,1,-1,-1); -//addRotationMap("Confusco", "LCTF",1,0,6,-1); -addRotationMap("TWL2_JaggedClawLT", "LCTF",1,1,-1,-1); - -//Voteable, But not in rotation -///////////////////////////////////////////////////////////////////// - -addRotationMap("BeggarsRunLT", "LCTF",1,0,-1,-1); -addRotationMap("S5_WoodymyrkLT", "LCTF",1,0,-1,-1); -addRotationMap("S8_Opus", "LCTF",1,0,-1,-1); -addRotationMap("TWL_DangerousCrossing", "LCTF",1,0,-1,-1); - -//DMP Mappack -///////////////////////////////////////////////////////////////////// -addRotationMap("AttritionLT", "LCTF",1,1,-1,-1); -addRotationMap("RushLT", "LCTF",1,1,-1,-1); -addRotationMap("HillKingLT", "LCTF",1,1,-1,-1); -addRotationMap("DMP_BastardForgeLT", "LCTF",1,1,-1,-1); -addRotationMap("VanDamnedLT", "LCTF",1,1,-1,-1); -addRotationMap("DMP_Paranoia", "LCTF",1,0,-1,-1); -addRotationMap("DMP_Spincycle", "LCTF",1,1,-1,-1); -addRotationMap("Ravine", "LCTF",1,1,-1,-1); -// addRotationMap("DX_Badlands", "LCTF",1,0,-1,-1); -// addRotationMap("DX_Desert", "LCTF",1,0,-1,-1); -addRotationMap("DX_Ice", "LCTF",1,1,-1,-1); -addRotationMap("PipeDreamLT", "LCTF",1,0,-1,-1); -addRotationMap("DMP_LavaGods", "LCTF",1,0,10,20); -addRotationMap("DMP_StarFallLT", "LCTF",1,1,-1,-1); -addRotationMap("DMP_BunkeredLT", "LCTF",1,1,-1,12); -addRotationMap("DMP_PariahLT", "LCTF",1,1,-1,-1); - -//Not Voteable, Not in rotation -///////////////////////////////////////////////////////////////////// - -//addRotationMap("SurrealLT", "LCTF",1,0,-1,-1); -addRotationMap("DuelersDelight", "LCTF",1,0,-1,12); -addRotationMap("SmallSpit", "LCTF",1,1,-1,14); -addRotationMap("BonespurLT", "LCTF",1,1,-1,14); -addRotationMap("Bridgepoint", "LCTF",1,1,-1,14); -addRotationMap("NarcolepsyLT", "LCTF",1,1,-1,14); -addRotationMap("WhiteDwarfDeluxeLT", "LCTF",1,0,-1,14); -addRotationMap("ClusterUnFuct", "LCTF",1,1,8,-1); -addRotationMap("OuterWilds", "LCTF",1,1,-1,12); -addRotationMap("Drafts", "LCTF",1,1,-1,12); -addRotationMap("DermCrossingDeluxeLT", "LCTF",1,1,-1,-1); -addRotationMap("SuperiorWaterworks", "LCTF",1,0,-1,12); -addRotationMap("FrozenForgeLT", "LCTF",1,1,-1,20); -addRotationMap("TWL2_CelerityLT", "LCTF",1,1,-1,20); -addRotationMap("El_Fin", "LCTF",1,1,-1,14); - - -// _____ _ _ _ _ -// | __ \ | | | | | | | | -// | | | | ___ __ _| |_| |__ _ __ ___ __ _| |_ ___| |__ -// | | | |/ _ \/ _` | __| '_ \| '_ ` _ \ / _` | __/ __| '_ \ -// | |__| | __/ (_| | |_| | | | | | | | | (_| | || (__| | | | -// |_____/ \___|\__,_|\__|_| |_|_| |_| |_|\__,_|\__\___|_| |_| -///////////////////////////////////////////////////////////////////// - -addRotationMap("RaspDM", "DM",1,1,8,-1); -addRotationMap("EntombedDM", "DM",1,1,-1,-1); -addRotationMap("IceDomeDM", "DM",1,1,-1,-1); -addRotationMap("HoofToeDM", "DM",1,1,6,-1); -addRotationMap("ArenaDomeDM", "DM",1,1,-1,-1); -addRotationMap("VulcansWrathDM", "DM",1,1,-1,-1); -addRotationMap("RampartsDM", "DM",1,1,-1,-1); -addRotationMap("ShrineDM", "DM",1,1,-1,12); -addRotationMap("LiveBaitDM", "DM",1,1,-1,-1); -addRotationMap("FourSquareDM", "DM",1,1,-1,10); -addRotationMap("BrigDM", "DM",1,1,-1,8); -addRotationMap("PitsDM", "DM",1,1,-1,10); -addRotationMap("RingofFireDM", "DM",1,1,-1,10); -addRotationMap("GorgonDM", "DM",1,1,-1,10); - - -// _____ _ -// | __ \ | | -// | | | |_ _ ___| | -// | | | | | | |/ _ \ | -// | |__| | |_| | __/ | -// |_____/ \__,_|\___|_| -///////////////////////////////////////////////////////////////////// - -//addRotationMap("AgentsOfFortune", "Duel",1,1,-1,-1); -//addRotationMap("Casern_Cavite", "Duel",1,1,-1,-1); -//addRotationMap("Equinox", "Duel",1,1,-1,-1); -//addRotationMap("Escalade", "Duel",1,1,-1,-1); -//addRotationMap("Fracas", "Duel",1,1,-1,-1); -//addRotationMap("Invictus", "Duel",1,1,-1,-1); -//addRotationMap("MyrkWood", "Duel",1,1,-1,-1); -//addRotationMap("Oasis", "Duel",1,1,-1,-1); -//addRotationMap("Pyroclasm", "Duel",1,1,-1,-1); -//addRotationMap("Rasp", "Duel",1,1,-1,-1); -//addRotationMap("SunDried", "Duel",1,1,-1,-1); -//addRotationMap("Talus", "Duel",1,1,-1,-1); -//addRotationMap("Underhill", "Duel",1,1,-1,-1); -//addRotationMap("Whiteout", "Duel",1,1,-1,-1); -//addRotationMap("Tombstone", "Duel",1,1,-1,-1); -//addRotationMap("VaubanLak", "Duel",1,1,-1,-1); -//addRotationMap("DesertofDeathLak", "Duel",1,1,-1,-1); - - - -// _____ _ -// / ____(_) -// | (___ _ ___ __ _ ___ -// \___ \| |/ _ \/ _` |/ _ \ -// ____) | | __/ (_| | __/ -// |_____/|_|\___|\__, |\___| -// __/ | -// |___/ -///////////////////////////////////////////////////////////////////// - -//addRotationMap("Alcatraz", "Siege",1,1,-1,-1); -//addRotationMap("BridgeTooFar", "Siege",1,1,-1,-1); -//addRotationMap("Caldera", "Siege",1,1,-1,-1); -//addRotationMap("Gauntlet", "Siege",1,1,-1,-1); -//addRotationMap("IceBound", "Siege",1,1,-1,-1); -//addRotationMap("Isleofman", "Siege",1,1,-1,-1); -//addRotationMap("Masada", "Siege",1,1,-1,-1); -//addRotationMap("Respite", "Siege",1,1,-1,-1); -//addRotationMap("Trident", "Siege",1,1,-1,-1); -//addRotationMap("UltimaThule", "Siege",1,1,-1,-1); - - - -// _ _ _ -// | | | | | | -// | |__| |_ _ _ __ | |_ ___ _ __ ___ -// | __ | | | | '_ \| __/ _ \ '__/ __| -// | | | | |_| | | | | || __/ | \__ \ -// |_| |_|\__,_|_| |_|\__\___|_| |___/ -///////////////////////////////////////////////////////////////////// - -//addRotationMap("MiniSunDried","Hunters",1,1,-1,-1); -//addRotationMap("DustToDust","Hunters",1,1,-1,-1); diff --git a/Classic/prefs/mapRotation.cs b/Classic/prefs/mapRotation.cs new file mode 100644 index 0000000..7906e8b --- /dev/null +++ b/Classic/prefs/mapRotation.cs @@ -0,0 +1,465 @@ +//To use this file add a new map with the following rules: +//1. Find the file name, ending in .mis (ie BeggarsRun.mis) +//2. Add a line with this syntact: addRotationMap(filename, gametype, %voteable, %cycle, %min. %max); +//Example: addRotationMap("MAP_NAME","MAP_MODE",VOTEABLE,IN-ROTATION,MINIMUM_PLAYERS,MAXIMUM_PLAYERS); +//------------------------------------------------------------------------------- +addRotationMap("SC_Normal","CTF",true,false,-1,16); +//addRotationMap("SC_Badlands","CTF",true,false,-1,16); +//addRotationMap("SC_Desert","CTF",true,false,-1,16); +//addRotationMap("SC_Lush","CTF",true,false,-1,16); +addRotationMap("SC_Ice","CTF",true,true,-1,16); +addRotationMap("SC_Night","CTF",true,false,-1,16); +addRotationMap("TWL_DangerousCrossing","CTF",true,false,-1,20); +//addRotationMap("DX_Badlands","CTF",true,false,-1,20); +//addRotationMap("DX_Desert","CTF",true,false,-1,20); +addRotationMap("DX_Ice","CTF",true,true,-1,20); +addRotationMap("HighOctane","CTF",true,false,10,24); +//addRotationMap("HO_Badlands","CTF",true,true,10,24); +//addRotationMap("HO_Desert","CTF",true,false,10,24); +addRotationMap("HO_Ice","CTF",true,true,10,24); +addRotationMap("HO_Lush","CTF",true,false,10,24); +addRotationMap("TWL2_CanyonCrusadeDeluxe","CTF",true,true,-1,-1); +addRotationMap("TWL2_Skylight","CTF",true,false,-1,12); +addRotationMap("TWL2_Hildebrand","CTF",true,true,-1,18); +addRotationMap("RoundTheMountain","CTF",true,true,-1,14); +addRotationMap("oasisintensity","CTF",true,true,-1,12); +addRotationMap("Machineeggs","CTF",true,true,-1,10); +addRotationMap("Mac_FlagArena","CTF",true,false,-1,10); +addRotationMap("SmallTimeCTF","CTF",true,true,-1,12); +addRotationMap("ArenaDome","CTF",true,true,-1,10); +addRotationMap("Bulwark","CTF",true,true,-1,12); +addRotationMap("Discord","CTF",true,true,-1,16); +addRotationMap("Sentry","CTF",true,true,-1,12); +addRotationMap("FrozenHope","CTF",true,true,8,12); +addRotationMap("ClusterUnFuct","CTF",true,true,8,12); +addRotationMap("Zilch","CTF",true,true,6,12); +addRotationMap("SuperHappyBouncyFunTime","CTF",true,false,-1,12); +addRotationMap("SuperiorWaterworks","CTF",true,true,-1,10); +//addRotationMap("TWL2_FrozenHope","CTF",true,false,-1,12); +//addRotationMap("Island","CTF",true,true,-1,12); +//addRotationMap("TitForTat","CTF",true,true,-1,12); +//addRotationMap("TWL_OsIris","CTF",true,false,8,18); +//addRotationMap("FrostPipe","CTF",true,false,-1,12); +//addRotationMap("Raspian","CTF",true,false,8,12); +//addRotationMap("Exhumed","CTF",true,false,-1,12); +//addRotationMap("Blink","CTF",true,false,-1,10); +//addRotationMap("Firestorm","CTF",true,false,-1,12); +//addRotationMap("SmallMelee","CTF",true,false,-1,12); +//addRotationMap("Attrition","CTF",true,true,-1,10); +//addRotationMap("Coppersky","CTF",true,false,8,20); +//addRotationMap("S5_Silenus","CTF",true,false,8,20); +//------------------------------------------------------------------------------- +addRotationMap("TWL_Stonehenge","CTF",true,false,8,-1); +addRotationMap("TWL_Feign","CTF",true,true,8,32); +addRotationMap("TWL_Snowblind","CTF",true,false,14,-1); +addRotationMap("TWL_BeggarsRun","CTF",true,true,14,-1); +addRotationMap("TWL_WilderZone","CTF",true,false,12,-1); +addRotationMap("TWL_Titan","CTF",true,false,14,-1); +addRotationMap("TWL_SubZero","CTF",true,true,14,-1); +addRotationMap("TWL_DeadlyBirdsSong","CTF",true,false,14,-1); +addRotationMap("TWL_Pandemonium","CTF",true,false,14,-1); +addRotationMap("TWL2_MidnightMayhemDeluxe","CTF",true,true,12,-1); +addRotationMap("TWL2_JaggedClaw","CTF",true,true,12,-1); +addRotationMap("TWL2_Ocular","CTF",true,true,14,-1); +addRotationMap("TWL2_Drifts","CTF",true,false,14,-1); +addRotationMap("TWL2_Celerity","CTF",true,true,12,-1); +addRotationMap("Minotaur","CTF",true,false,12,-1); +addRotationMap("S5_Centaur","CTF",true,false,-1,12); +addRotationMap("S5_Mordacity","CTF",true,true,10,32); +addRotationMap("S5_Damnation","CTF",true,false,12,-1); +addRotationMap("S5_Massive","CTF",true,true,12,-1); +addRotationMap("S5_Mimicry","CTF",true,true,12,-1); +addRotationMap("S5_Icedance","CTF",true,true,10,-1); +addRotationMap("S5_Woodymyrk","CTF",true,true,10,-1); +addRotationMap("S8_Cardiac","CTF",true,true,14,-1); +addRotationMap("TheFray","CTF",true,false,10,32); +addRotationMap("berlard","CTF",true,true,12,32); +addRotationMap("Headstone","CTF",true,true,12,32); +addRotationMap("Signal","CTF",true,false,12,32); +addRotationMap("TenebrousCTF","CTF",true,false,10,24); +addRotationMap("Prismatic","CTF",true,false,12,32); +addRotationMap("IceRidge_nef","CTF",true,true,12,-1); +addRotationMap("CirclesEdge","CTF",true,false,12,-1); +addRotationMap("Surreal","CTF",true,false,20,-1); +addRotationMap("Norty","CTF",true,true,14,-1); +addRotationMap("Confusco","CTF",true,false,14,32); +addRotationMap("Vauban","CTF",true,false,14,-1); +//addRotationMap("TWL2_MuddySwamp","CTF",true,false,12,32); +//addRotationMap("TWL2_Drorck","CTF",true,false,12,32); +//addRotationMap("TWL2_Crevice","CTF",true,false,12,32); +//addRotationMap("TWL2_IceDagger","CTF",true,false,12,32); +//addRotationMap("S5_HawkingHeat","CTF",true,false,12,32); +//addRotationMap("S5_Drache","CTF",true,true,12,32); +//addRotationMap("S5_Sherman","CTF",true,false,20,-1); +//addRotationMap("S5_Reynard","CTF",true,false,14,32); +//addRotationMap("S8_Opus","CTF",true,false,10,32); +//addRotationMap("ShortFall","CTF",true,false,12,32); +//addRotationMap("Disjointed","CTF",true,false,12,32); +//addRotationMap("HighAnxiety","CTF",true,false,-1,12); +//addRotationMap("Dire","CTF",true,false,10,32); +//addRotationMap("Draco","CTF",true,false,12,32); +//addRotationMap("Mirage","CTF",true,false,12,32); +//addRotationMap("TWL_WhiteDwarf","CTF",true,false,14,-1); +//addRotationMap("Cinereous","CTF",true,false,14,-1); +//addRotationMap("Fallout","CTF",true,false,14,32); +//addRotationMap("TheClocktower","CTF",true,false,10,20); +//addRotationMap("SoylentGreen","CTF",true,false,10,20); +//addRotationMap("Ramparts","CTF",true,false,14,-1); +//addRotationMap("Blastside_nef","CTF",true,false,14,-1); +//addRotationMap("NatureMagic","CTF",true,false,14,-1); +//addRotationMap("TWL_Damnation","CTF",true,false,12,32); +//addRotationMap("Snowcone","CTF",true,false,12,32); +//addRotationMap("JadeValley","CTF",true,false,12,32); +//addRotationMap("Burstside","CTF",true,false,12,32); +//addRotationMap("Infernus","CTF",true,false,14,-1); +//------------------------------------------------------------------------------- +addRotationMap("TWL_Katabatic","CTF",true,false,14,-1); +addRotationMap("TWL_Crossfire","CTF",true,true,14,-1); +addRotationMap("TWL_BeachBlitz","CTF",true,true,12,-1); +addRotationMap("TWL_Magmatic","CTF",true,false,14,-1); +addRotationMap("TWL_Harvester","CTF",true,true,20,-1); +addRotationMap("TWL2_BlueMoon","CTF",true,true,14,-1); +addRotationMap("TWL2_Bleed","CTF",true,false,20,-1); +addRotationMap("TWL2_Dissention","CTF",true,false,14,-1); +addRotationMap("TWL2_Magnum","CTF",true,true,12,-1); +addRotationMap("TWL2_FrozenGlory","CTF",true,true,12,-1); +addRotationMap("Logans_Run","CTF",true,false,12,32); +addRotationMap("Rollercoaster_nef","CTF",true,true,10,-1); +addRotationMap("HostileLoch","CTF",true,false,14,32); +addRotationMap("Raindance_nef","CTF",true,true,12,-1); +addRotationMap("LandingParty","CTF",true,false,12,20); +addRotationMap("ShockRidge","CTF",true,false,12,-1); +addRotationMap("Nightdance","CTF",true,false,14,32); +addRotationMap("TWL_Abaddon","CTF",true,false,20,-1); +addRotationMap("Agorazscium","CTF",true,false,12,32); +addRotationMap("Circleofstones","CTF",true,true,14,-1); +addRotationMap("Ruined","CTF",true,false,14,-1); +addRotationMap("Fenix","CTF",true,false,20,-1); +addRotationMap("Hillside","CTF",true,false,24,-1); +addRotationMap("TWL_Slapdash","CTF",true,false,24,-1); +addRotationMap("BerylBasin","CTF",true,false,14,-1); +addRotationMap("DeathBirdsFly1","CTF",true,false,24,-1); +addRotationMap("aabaa","CTF",true,false,28,-1); +addRotationMap("CloakofNightV","CTF",true,false,24,-1); +addRotationMap("Sangre_de_Grado","CTF",true,false,20,-1); +addRotationMap("FullCircle","CTF",true,false,14,-1); +//addRotationMap("Lakefront","CTF",true,false,14,-1); +//addRotationMap("S8_Geothermal","CTF",true,false,12,32); +//addRotationMap("TWL_Frozen","CTF",true,false,20,-1); +//addRotationMap("TWL_Chokepoint","CTF",true,false,12,24); +//addRotationMap("TWL_Starfallen","CTF",true,false,12,24); +//addRotationMap("TWL_Reversion","CTF",true,false,28,-1); +//addRotationMap("TWL2_RoughLand","CTF",true,false,16,-1); +//addRotationMap("TWL2_Ruined","CTF",true,true,18,-1); +//addRotationMap("SandOcean","CTF",true,false,16,24); +//addRotationMap("ks_braistv","CTF",true,true,12,24); +//addRotationMap("Horde","CTF",true,false,24,-1); +//addRotationMap("Glade","CTF",true,true,28,-1); +//addRotationMap("Pantheon","CTF",true,false,20,-1); +//addRotationMap("Archipelago","CTF",true,false,20,-1); +//addRotationMap("TitanV","CTF",true,false,12,28); +//addRotationMap("The_Calm","CTF",true,false,12,24); +//addRotationMap("Surro","CTF",true,false,18,24); +//addRotationMap("HarvestDance","CTF",true,false,24,-1); +//addRotationMap("WindyGap","CTF",true,false,24,-1); +addRotationMap("Scarabrae_nef","CTF",true,false,28,-1); +//addRotationMap("StarIce","CTF",true,false,12,24); +//addRotationMap("FilteredDust","CTF",true,false,12,24); +//addRotationMap("Choke","CTF",true,false,12,24); +//addRotationMap("ConstructionYard","CTF",true,false,12,24); +//addRotationMap("AcidRain","CTF",true,false,12,24); +//addRotationMap("SubZeroV","CTF",true,true,12,24); +//------------------------------------------------------------------------------- +//addRotationMap("DMP_Agroleon","CTF",true,true,18,28); +//addRotationMap("DMP_Astro","CTF",true,false,16,26); +addRotationMap("DMP_BastardForge","CTF",true,true,12,32); +addRotationMap("DMP_BitterGorge","CTF",true,false,24,-1); +//addRotationMap("DMP_Bunkered","CTF",true,true,6,14); +addRotationMap("DMP_Cinerarium","CTF",true,true,-1,14); +//addRotationMap("DMP_DermCity","CTF",true,false,-1,-1); +//addRotationMap("DMP_Embers","CTF",true,false,-1,14); +//addRotationMap("DMP_EmeraldSpit","CTF",true,false,10,20); +//addRotationMap("DMP_FaceCrossing","CTF",true,false,10,20); +addRotationMap("DMP_Hoth","CTF",true,false,24,-1); +//addRotationMap("DMP_IceGiant","CTF",true,false,20,32); +//addRotationMap("DMP_IsleDeBatalla","CTF",true,false,10,20); +//addRotationMap("DMP_LavaGods","CTF",true,false,10,20); +addRotationMap("DMP_Magellan","CTF",true,false,12,32); +addRotationMap("DMP_MoonDance","CTF",true,true,12,-1); +//addRotationMap("DMP_Pantheon","CTF",true,false,16,24); +addRotationMap("DMP_Paranoia","CTF",true,false,-1,16); +addRotationMap("DMP_Pariah","CTF",true,true,8,32); +addRotationMap("DMP_PipeDream","CTF",true,false,8,24); +addRotationMap("DMP_RavineV","CTF",true,false,12,32); +//addRotationMap("DMP_ScorchedEarth","CTF",true,false,24,-1); +addRotationMap("DMP_SimpleFlagArena","CTF",true,true,-1,14); +addRotationMap("DMP_SpinCycle","CTF",true,true,-1,12); +addRotationMap("DMP_StarFall","CTF",true,true,-1,14); +addRotationMap("DMP_Tyre","CTF",true,true,14,-1); +//addRotationMap("DMP_Wasteland","CTF",true,false,12,32); +//addRotationMap("Chasmaclysmic","CTF",true,true,-1,-1); +//addRotationMap("DBS_Smoothed","CTF",true,false,-1,-1); +//addRotationMap("PuliVeivari","CTF",true,false,-1,-1); +//addRotationMap("PlanetX","CTF",true,false,-1,-1); +//addRotationMap("Ravine","CTF",true,true,-1,-1); +//addRotationMap("Stripmine","CTF",true,false,-1,-1); +//------------------------------------------------------------------------------- +//addRotationMap("S5_Misadventure","CTF",true,false,-1,-1); +//addRotationMap("S8_CentralDogma","CTF",true,false,-1,-1); +//addRotationMap("S8_Mountking","CTF",true,false,-1,-1); +//addRotationMap("S8_Zilch","CTF",true,false,-1,-1); +//addRotationMap("TWL2_CloakOfNight","CTF",true,false,-1,-1); +//addRotationMap("TWL_BaNsHee","CTF",true,false,-1,-1); +//addRotationMap("TWL_Boss","CTF",true,false,-1,-1); +//addRotationMap("TWL_NoShelter","CTF",true,false,-1,-1); +//addRotationMap("TWL_Clusterfuct","CTF",true,false,-1,-1); +//addRotationMap("TWL_Curtilage","CTF",true,false,-1,-1); +//addRotationMap("TWL_Deserted","CTF",true,false,-1,-1); +//addRotationMap("TWL_Frostclaw","CTF",true,false,-1,-1); +//addRotationMap("TWL_Neve","CTF",true,false,-1,-1); +//addRotationMap("TWL_Ramparts","CTF",true,false,-1,-1); +//addRotationMap("TWL_Sandstorm","CTF",true,false,-1,-1); +//addRotationMap("TWL_WoodyMyrk","CTF",true,false,-1,-1); +//addRotationMap("Sandstorm","CTF",true,false,-1,-1); +//addRotationMap("Starfallen","CTF",true,false,-1,-1); +//addRotationMap("Stonehenge_nef","CTF",true,false,-1,-1); +//addRotationMap("Extractor","CTF",true,false,16,-1); +//addRotationMap("AstersDescent","CTF",true,false,-1,-1); +//addRotationMap("Azoth","CTF",true,false,-1,-1); +//addRotationMap("BattleGrove","CTF",true,false,-1,-1); +//addRotationMap("Durango","CTF",true,false,-1,-1); +//addRotationMap("DustLust","CTF",true,false,-1,-1); +//addRotationMap("IceGulch","CTF",true,false,-1,-1); +//addRotationMap("MountainMist","CTF",true,false,-1,-1); +//addRotationMap("Peak","CTF",true,false,-1,-1); +//addRotationMap("Pendulum","CTF",true,false,-1,-1); +//addRotationMap("OctoberRust","CTF",true,false,-1,-1); +//addRotationMap("DevilsElbow","CTF",true,false,-1,-1); +//addRotationMap("CloudCity","CTF",true,false,-1,-1); +//addRotationMap("Damnation","CTF",true,false,-1,-1); +//addRotationMap("DeathBirdsFly","CTF",true,false,-1,-1); +//addRotationMap("Desiccator","CTF",true,false,-1,-1); +//addRotationMap("DustToDust","CTF",true,false,-1,-1); +//addRotationMap("Katabatic","CTF",true,false,-1,-1); +//addRotationMap("Quagmire","CTF",true,false,-1,-1); +//addRotationMap("Recalescence","CTF",true,false,-1,-1); +//addRotationMap("Reversion","CTF",true,false,-1,-1); +//addRotationMap("RiverDance","CTF",true,false,-1,-1); +//addRotationMap("Sanctuary","CTF",true,false,-1,-1); +//addRotationMap("ThinIce","CTF",true,false,-1,-1); +//addRotationMap("Tombstone","CTF",true,false,-1,-1); +//addRotationMap("Broadside_nef","CTF",true,false,-1,-1); +//addRotationMap("Camelland","CTF",true,false,-1,-1); +//addRotationMap("HighTrepidation","CTF",true,false,-1,-1); +//addRotationMap("SmallDesertofDeath","CTF",true,false,-1,-1); +//addRotationMap("BasinFury","CTF",true,false,-1,-1); +//addRotationMap("Cadaver","CTF",true,false,-1,-1); +//addRotationMap("EivoItoxico","CTF",true,false,-1,-1); +//addRotationMap("Einfach","CTF",true,false,-1,-1); +//addRotationMap("PicnicTable","CTF",true,false,-1,-1); +//addRotationMap("Hostility","CTF",true,false,-1,-1); +//addRotationMap("HighWire","CTF",true,false,-1,-1); +//addRotationMap("CloudBurst","CTF",true,false,-1,-1); +//addRotationMap("CloseCombat","CTF",true,false,-1,-1); +//addRotationMap("DesertofDeath_nef","CTF",true,false,-1,-1); +//addRotationMap("Gorgon","CTF",true,false,-1,-1); +//addRotationMap("Magmatic","CTF",true,false,-1,-1); +//------------------------------------------------------------------------------- +addRotationMap("SmallSpit","CTF",true,true,-1,12); +addRotationMap("MisadventureV2","CTF",true,false,12,32); +addRotationMap("El_Fin","CTF",true,true,-1,14); +addRotationMap("HogansRun24","CTF",true,false,14,-1); +addRotationMap("VanDamnedCTF","CTF",true,true,-1,12); +addRotationMap("HillKingCTF","CTF",true,true,-1,12); +addRotationMap("DaftGulch","CTF",true,false,12,32); +addRotationMap("Triad","CTF",true,false,12,32); +addRotationMap("Moonwalk","CTF",true,true,12,-1); +addRotationMap("GreenLawn","CTF",true,true,12,-1); +addRotationMap("OuterWilds","CTF",true,true,-1,14); +addRotationMap("CoconutFury","CTF",true,false,-1,32); +addRotationMap("TWL2_FrozenGlory_Thawed","CTF",true,false,12,-1); +addRotationMap("Sector1","CTF",true,false,-1,-1); +//addRotationMap("CinderCone","CTF",true,false,-1,-1); +//addRotationMap("Slamnation","CTF",false,false,-1,-1); +//addRotationMap("MountaintopMayhem","CTF",false,false,-1,-1); +//addRotationMap("ChasmClash","CTF",true,false,-1,14); +//addRotationMap("FrostBite","CTF",true,false,-1,-1); +//addRotationMap("Lapiths","CTF",true,false,-1,-1); +//addRotationMap("Jettisoned","CTF",true,false,-1,-1); +//addRotationMap("Drafts","CTF",true,true,-1,12); +//addRotationMap("IslaHermano","CTF",true,false,-1,-1); +//addRotationMap("DermCrossingDeluxe","CTF",true,false,-1,-1); +//addRotationMap("Vaubania","CTF",true,true,-1,12); +//addRotationMap("Bonespur","CTF",true,true,-1,14); +//addRotationMap("Bridgepoint","CTF",true,false,-1,18); +//addRotationMap("Narcolepsy","CTF",true,false,-1,20); +//addRotationMap("WhiteDwarfDeluxe","CTF",true,true,-1,14); +//addRotationMap("SignalDX","CTF",true,false,8,24); +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +addRotationMap("VaubanLak","Lakrabbit",true,false,8,-1); +addRotationMap("MiniSunDried","Lakrabbit",true,true,-1,12); +addRotationMap("Sundance","Lakrabbit",true,true,-1,-1); +addRotationMap("TWL_BeachBlitzLak","Lakrabbit",true,true,-1,-1); +addRotationMap("DesertofDeathLak","Lakrabbit",true,true,-1,-1); +addRotationMap("Raindance_nefLak","Lakrabbit",true,true,-1,-1); +addRotationMap("SunDriedLak","Lakrabbit",true,true,-1,-1); +addRotationMap("SkinnyDipLak","Lakrabbit",true,false,-1,-1); +addRotationMap("SaddiesHill","Lakrabbit",true,false,-1,-1); +addRotationMap("HavenLak","Lakrabbit",true,false,-1,-1); +addRotationMap("LushLak","Lakrabbit",true,false,8,-1); +addRotationMap("BoxLak","Lakrabbit",true,true,-1,10); +addRotationMap("TitaniaLak","Lakrabbit",true,false,8,-1); +addRotationMap("TibbawLak","Lakrabbit",true,true,-1,-1); +addRotationMap("InfernusLak","Lakrabbit",true,true,-1,-1); +addRotationMap("S8_GeothermalLak","Lakrabbit",true,false,-1,-1); +addRotationMap("CankerLak","Lakrabbit",true,true,-1,-1); +addRotationMap("DustRunLak","Lakrabbit",true,true,-1,-1); +addRotationMap("CrossfiredLak","Lakrabbit",true,true,-1,-1); +addRotationMap("CloakofLak","Lakrabbit",true,false,-1,-1); +addRotationMap("SpectreLak","Lakrabbit",true,false,-1,-1); +addRotationMap("TreasureIslandLak","Lakrabbit",true,true,-1,-1); +addRotationMap("Sulfide","Lakrabbit",true,false,-1,-1); +addRotationMap("FrozenFuryLak","Lakrabbit",true,false,-1,-1); +addRotationMap("Arrakis","Lakrabbit",true,false,-1,-1); +addRotationMap("EquinoxLak","Lakrabbit",true,false,-1,-1); +addRotationMap("PhasmaDustLak","Lakrabbit",true,true,-1,12); +addRotationMap("GodsRiftLak","Lakrabbit",true,false,-1,-1); +addRotationMap("SolsDescentLak","Lakrabbit",true,true,-1,-1); +addRotationMap("Crater71Lak","Lakrabbit",true,false,6,-1); +//------------------------------------------------------------------------------- +//addRotationMap("EscaladeLak","Lakrabbit",true,false,-1,-1); +//addRotationMap("MagmaticLak","Lakrabbit",true,false,-1,-1); +//addRotationMap("HillsOfSorrow","Lakrabbit",true,false,-1,-1); +//addRotationMap("TWL2_MuddySwampLak","Lakrabbit",true,false,-1,-1); +//addRotationMap("SandStormLak","Lakrabbit",true,false,-1,-1); +//addRotationMap("BeggarsRunLak","Lakrabbit",true,false,-1,-1); +//addRotationMap("DamnnationLak","Lakrabbit",true,false,-1,-1); +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +addRotationMap("DangerousCrossingLT","LCTF",true,false,-1,-1); +addRotationMap("DX_Ice","LCTF",true,true,-1,-1); +//addRotationMap("DX_Badlands","LCTF",true,false,-1,-1); +//addRotationMap("DX_Desert","LCTF",true,false,-1,-1); +addRotationMap("SmallCrossingLT","LCTF",true,false,-1,-1); +addRotationMap("DireLT","LCTF",true,false,-1,-1); +addRotationMap("RoundTheMountainLT","LCTF",true,true,-1,-1); +addRotationMap("TWL_FeignLT","LCTF",true,false,-1,-1); +addRotationMap("TWL_RollercoasterLT","LCTF",true,false,10,-1); +addRotationMap("TWL_StonehengeLT","LCTF",true,true,-1,-1); +addRotationMap("TWL_WilderZoneLT","LCTF",true,false,-1,-1); +addRotationMap("TWL_BeachBlitzLT","LCTF",true,true,-1,-1); +addRotationMap("TWL2_CanyonCrusadeDeluxeLT","LCTF",true,true,-1,-1); +addRotationMap("TWL2_HildebrandLT","LCTF",true,true,-1,-1); +addRotationMap("TWL2_SkylightLT","LCTF",true,false,-1,-1); +addRotationMap("TWL2_JaggedClawLT","LCTF",true,false,-1,-1); +addRotationMap("S5_MassiveLT","LCTF",true,false,-1,-1); +addRotationMap("S5_DamnationLT","LCTF",true,false,8,-1); +addRotationMap("S5_Icedance","LCTF",true,true,10,-1); +addRotationMap("S5_Mordacity","LCTF",true,true,10,-1); +addRotationMap("S8_ZilchLT","LCTF",true,true,-1,-1); +addRotationMap("CirclesEdgeLT","LCTF",true,true,10,-1); +addRotationMap("TenebrousCTF","LCTF",true,false,-1,-1); +addRotationMap("oasisintensity","LCTF",true,true,-1,10); +addRotationMap("berlard","LCTF",true,true,-1,-1); +addRotationMap("RaindanceLT","LCTF",true,false,-1,-1); +addRotationMap("SmallTimeLT","LCTF",true,false,-1,-1); +addRotationMap("ArenaDome","LCTF",true,true,-1,10); +addRotationMap("Bulwark","LCTF",true,true,-1,-1); +addRotationMap("Discord","LCTF",true,true,-1,-1); +addRotationMap("HillSideLT","LCTF",true,true,-1,-1); +addRotationMap("IcePick","LCTF",true,true,-1,16); +addRotationMap("OsIrisLT","LCTF",true,true,-1,-1); +addRotationMap("GrassyKnollLT","LCTF",true,true,-1,-1); +addRotationMap("SandyRunLT","LCTF",true,false,-1,12); +addRotationMap("Sentry","LCTF",true,true,-1,-1); +addRotationMap("Exhumed","LCTF",true,false,-1,-1); +addRotationMap("FrozenHopeLT","LCTF",true,true,-1,-1); +//addRotationMap("TheFray","LCTF",true,false,-1,-1); +//addRotationMap("SignalLT","LCTF",true,false,-1,-1); +//------------------------------------------------------------------------------- +addRotationMap("HillKingLT","LCTF",true,true,-1,-1); +addRotationMap("DMP_BastardForgeLT","LCTF",true,true,10,-1); +addRotationMap("DMP_Paranoia","LCTF",true,false,-1,-1); +addRotationMap("DMP_SpincycleLT","LCTF",true,true,-1,-1); +addRotationMap("DMP_Cinerarium","LCTF",true,true,-1,-1); +addRotationMap("DMP_StarFallLT","LCTF",true,true,-1,-1); +addRotationMap("DMP_BunkeredLT","LCTF",true,true,-1,-1); +addRotationMap("DMP_PariahLT","LCTF",true,true,-1,-1); +addRotationMap("DMP_SimpleFlagArena","LCTF",true,true,-1,-1); +addRotationMap("VanDamnedLT","LCTF",true,true,-1,-1); +addRotationMap("Ravine","LCTF",true,true,10,-1); +addRotationMap("PipeDreamLT","LCTF",true,true,-1,-1); +//addRotationMap("DMP_LavaGods","LCTF",true,false,10,20); +//addRotationMap("AttritionLT","LCTF",true,true,-1,-1); +//addRotationMap("RushLT","LCTF",true,false,-1,-1); +//------------------------------------------------------------------------------- +addRotationMap("SmallSpit","LCTF",true,true,10,-1); +addRotationMap("ClusterUnFuct","LCTF",true,true,10,-1); +addRotationMap("OuterWildsLT","LCTF",true,true,-1,-1); +addRotationMap("SuperiorWaterworks","LCTF",true,true,-1,-1); +addRotationMap("FrozenForgeLT","LCTF",true,true,-1,-1); +addRotationMap("El_FinLT","LCTF",true,true,-1,-1); +addRotationMap("CapriLT","LCTF",true,true,-1,-1); +addRotationMap("RunenmachtLT","LCTF",true,true,-1,-1); +addRotationMap("Machineeggs","LCTF",true,true,-1,-1); +addRotationMap("Mac_FlagArena","LCTF",true,false,-1,-1); +addRotationMap("SuperHappyBouncyFuntime","LCTF",true,false,-1,-1); +addRotationMap("NarcolepsyLT","LCTF",true,false,10,-1); +//addRotationMap("BonespurLT","LCTF",true,true,-1,14); +//addRotationMap("DuelersDelight","LCTF",true,false,-1,12); +//addRotationMap("TWL2_CelerityLT","LCTF",true,true,-1,20); +//addRotationMap("Drafts","LCTF",true,true,-1,12); +//addRotationMap("DermCrossingDeluxeLT","LCTF",true,true,-1,-1); +//addRotationMap("Bridgepoint","LCTF",true,true,-1,14); +//addRotationMap("WhiteDwarfDeluxeLT","LCTF",true,false,-1,14); +//addRotationMap("SurrealLT","LCTF",true,false,-1,-1); +//addRotationMap("Confusco","LCTF",true,false,6,-1); +//addRotationMap("TWL2_MuddySwamp","LCTF",true,false,8,-1); +//addRotationMap("Blink","LCTF",true,false,-1,-1); +//addRotationMap("S8_Opus","LCTF",true,false,-1,-1); +//addRotationMap("BeggarsRunLT","LCTF",true,false,-1,-1); +//addRotationMap("S5_WoodymyrkLT","LCTF",true,false,-1,-1); +//addRotationMap("S5_SilenusLT","LCTF",true,false,-1,-1); +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +addRotationMap("RaspDM","DM",true,true,8,-1); +addRotationMap("EntombedDM","DM",true,true,-1,-1); +addRotationMap("IceDomeDM","DM",true,true,-1,-1); +addRotationMap("HoofToeDM","DM",true,true,6,-1); +addRotationMap("ArenaDomeDM","DM",true,true,-1,-1); +addRotationMap("VulcansWrathDM","DM",true,true,-1,-1); +addRotationMap("RampartsDM","DM",true,true,-1,-1); +addRotationMap("ShrineDM","DM",true,true,-1,12); +addRotationMap("LiveBaitDM","DM",true,true,-1,-1); +addRotationMap("FourSquareDM","DM",true,true,-1,10); +addRotationMap("BrigDM","DM",true,true,-1,8); +addRotationMap("PitsDM","DM",true,true,-1,10); +addRotationMap("RingofFireDM","DM",true,true,-1,10); +addRotationMap("GorgonDM","DM",true,true,-1,10); +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//addRotationMap("Alcatraz","Siege",true,true,-1,-1); +//addRotationMap("Caldera","Siege",true,true,-1,-1); +//addRotationMap("Gauntlet","Siege",true,true,-1,-1); +//addRotationMap("IceBound","Siege",true,true,-1,-1); +//addRotationMap("Masada","Siege",true,true,-1,-1); +//addRotationMap("Respite","Siege",true,true,-1,-1); +//addRotationMap("UltimaThule","Siege",true,true,-1,-1); +//addRotationMap("BridgeTooFar","Siege",true,true,-1,-1); +//addRotationMap("IsleOfMan","Siege",true,true,-1,-1); +//addRotationMap("Trident","Siege",true,true,-1,-1); +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//------------------------------------------------------------------------------- +//addRotationMap("MiniSunDried","Hunters",true,true,-1,-1); +//addRotationMap("DustToDust","Hunters",true,true,-1,-1); diff --git a/Classic/prefs/serverPrefs.cs b/Classic/prefs/serverPrefs.cs index 445e9c0..a20e0a7 100644 --- a/Classic/prefs/serverPrefs.cs +++ b/Classic/prefs/serverPrefs.cs @@ -5,7 +5,6 @@ $Host::AllowAdminKick = 1; $Host::AllowAdminPassVote = 1; $Host::allowAdminPlayerVotes = "0"; $Host::AllowAdminStopVote = 1; -$Host::AllowAdminStopVotes = 1; $Host::AllowAdminVotes = 1; $Host::AllowMapScript = "True"; $Host::AllowPlayerVoteChangeMission = 1; @@ -56,7 +55,7 @@ $Host::ClassicLoadVRamChanges = 0; $Host::ClassicLogEchoEnabled = 0; $Host::ClassicMaxVotes = 3; $Host::ClassicMaxTelepads = 3; -$Host::ClassicMOTD = "Discord PUB\nServer Hosted/Provided by Branzone/Ravin\nGet Mappacks at https://playt2.com/"; +$Host::ClassicMOTD = "Tribes 2 Test\nServer brought to you via Commuity Effort\nCelebrating 25 Years of Tribes2!"; $Host::ClassicMOTDLines = 3; $Host::ClassicMOTDTime = 6; $Host::ClassicNoNullVoiceSpam = 0; @@ -115,6 +114,7 @@ $Host::LakRabbitShowFlagIcon = 1; $Host::LakRabbitShowFlagTask = 0; $Host::LakRabbitUnlimitedDJ = 1; $Host::LCTFProMode = 0; +$Host::LCTFOneMine = 0; $Host::LoadingScreenUseDebrief = 1; $Host::LoadScreenColor1 = "05edad"; $Host::LoadScreenColor2 = "29DEE7"; @@ -122,16 +122,16 @@ $Host::LoadScreenColor3 = "33CCCC"; $Host::LoadScreenLine1 = "Join Discord:"; $Host::LoadScreenLine1_Msg = "playt2.com/discord"; $Host::LoadScreenLine2 = "Game Modes:"; -$Host::LoadScreenLine2_Msg = "LakRabbit, Capture the Flag, DeathMatch, (Light Only) Capture the Flag"; +$Host::LoadScreenLine2_Msg = "Lak, CTF, DeathMatch, LCTF"; $Host::LoadScreenLine3 = "Get Mappacks:"; $Host::LoadScreenLine3_Msg = "playt2.com/mappacks"; $Host::LoadScreenLine4 = "Server Location:"; -$Host::LoadScreenLine4_Msg = "Iowa"; +$Host::LoadScreenLine4_Msg = "Somewhere"; $Host::LoadScreenLine5 = "Server Hosted:"; -$Host::LoadScreenLine5_Msg = "Google Compute Engine"; +$Host::LoadScreenLine5_Msg = "Internet"; $Host::LoadScreenLine6 = "Server Github:"; $Host::LoadScreenLine6_Msg = "https://github.com/ChocoTaco1/TacoServer"; -$Host::LoadScreenMOTD1 = "Celebrating 20 Years of Tribes2!"; +$Host::LoadScreenMOTD1 = "Celebrating 25 Years of Tribes2!"; $Host::LoadScreenMOTD2 = "Come play Arena on Wednesday Nights!"; $Host::LoadScreenMOTD3 = "Lak crowd early evenings after work during the week."; $Host::LoadScreenMOTD4 = "Big CTF games Fridays, Saturdays, and Sundays!"; @@ -159,10 +159,10 @@ $Host::PUGautoPassword = 0; $Host::PUGPassword = "pickup"; $Host::PUGpasswordAlwaysOn = 0; $Host::PureServer = 0; -$Host::ServerRules1 = "\c2if\c4(\c3%client.attitude \c4$= \c5\"fun\" \c4&& \c3%client.Llama_Grabs \c4< \c51\c4) {"; -$Host::ServerRules2 = " \c1keepTeamsBalanced\c4(\c2%client\c4); \c1dontSwitch2WinningTeam(\c2%client\c4); }"; -$Host::ServerRules3 = "\c2else if\c4(\c3%client.attitude \c4$= \c5\"too_serious\"\c4) {"; -$Host::ServerRules4 = " \c1try2HaveFun\c4(\c2%client, %attitude\c4); \c1thisIsPubServer\c4(\c2%client, %attitude\c4); }"; +$Host::ServerRules1 = "1. Don\'t Llama Grab. (Grab flag slowly)"; +$Host::ServerRules2 = "2. Don\'t sit on teams and AFK. Move to observer."; +$Host::ServerRules3 = "3. Don\'t Excessively teamkill or teamkill on purpose."; +$Host::ServerRules4 = "4. Don\'t spam chat with inappropriate topics. Play the game."; $Host::ShowEndingPlayerScores = 1; $Host::ShowIngamePlayerScores = 1; $Host::Siege::Halftime = 20000; @@ -190,7 +190,7 @@ $Host::TN::echo = 1; $Host::TournamentMode = 0; $Host::useCustomSkins = 1; $Host::VoteCooldown = 120; -$Host::VoteDelayTime = 120; +$Host::VoteDelayTime = 60; $Host::VotePassPercent = 60; $Host::VoteSpread = 20; $Host::VoteTime = "45"; diff --git a/Classic/scripts/CTFGame.cs b/Classic/scripts/CTFGame.cs index 5bd2c35..3d5ebe0 100755 --- a/Classic/scripts/CTFGame.cs +++ b/Classic/scripts/CTFGame.cs @@ -9,6 +9,8 @@ //exec the AI scripts exec("scripts/aiCTF.cs"); +//Time for auto overtime sudden-death mode +$CTF::Overtime = 5; //5 Minutes, 0 to disable //-- tracking --- function CTFGame::initGameVars(%game) @@ -376,8 +378,8 @@ function CTFGame::playerTouchFlag(%game, %player, %flag) if ((%flag.carrier $= "") && (%player.getState() !$= "Dead")) { // z0dd - ZOD, 5/07/04. Cancel the lava return. - if(isEventPending(%obj.lavaEnterThread)) - cancel(%obj.lavaEnterThread); + if(isEventPending(%flag.lavaEnterThread)) + cancel(%flag.lavaEnterThread); //flag isn't held and has been touched by a live player if (%client.team == %flag.team) @@ -528,7 +530,7 @@ function CTFGame::playerLostFlagTarget(%game, %player) function CTFGame::updateFlagTransform(%game, %flag) { %flag.setTransform(%flag.getTransform()); - %game.updateFlagThread[%flag] = %game.schedule(256, "updateFlagTransform", %flag); + %game.updateFlagThread[%flag] = %game.schedule(100, "updateFlagTransform", %flag); } //---------------------------------------------------------------------------------------- @@ -950,6 +952,9 @@ function CTFGame::gameOver(%game) } for(%j = 1; %j <= %game.numTeams; %j++) $TeamScore[%j] = 0; + + %game.voteOT = 0; + %game.overtime = 0; } function CTFGame::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc) @@ -1245,14 +1250,96 @@ function CTFGame::resetDontScoreTimer(%game, %team) $dontScoreTimer[%team] = false; } +function CTFGame::checkTimeLimit(%game, %forced) +{ + // Don't add extra checks: + if ( %forced ) + cancel( %game.timeCheck ); + + // if there is no time limit, check back in a minute to see if it's been set + if(($Host::TimeLimit $= "") || $Host::TimeLimit == 0) + { + %game.timeCheck = %game.schedule(20000, "checkTimeLimit"); + return; + } + + %curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime(); + + if (%curTimeLeftMS <= 0) + { + %teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP); + %teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP); + if(%game.scheduleVote !$= "" && !%game.voteOT && !$Host::TournamentMode) + { + messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav'); + %game.voteOT = 1; + } + else if(%teamOneCaps == %teamTwoCaps && $CTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6)) + { + if(!%game.overtime) + { + %game.overtime = 1; + if($CTF::Overtime > 1){ %s = "s"; } + messageAll('MsgOvertime', '\c2Sudden-Death Overtime Initiated: %1 Minute%2 Remaining~wfx/powered/turret_heavy_activate.wav', $CTF::Overtime, %s); + echo("Sudden-Death Overtime Initiated"); + UpdateClientTimes($CTF::Overtime * 60 * 1000); + EndCountdown($CTF::Overtime * 60 * 1000); + %game.timeCheck = %game.schedule($CTF::Overtime * 60 * 1000, "timeLimitReached"); + + //Cancel vote if any + if(%game.scheduleVote !$= "") + { + messageAll('closeVoteHud', ""); + cancel(Game.scheduleVote); + Game.scheduleVote = ""; + Game.kickClient = ""; + clearVotes(); + + //Stop vote chimes + for(%i = 0; %i < $Host::EnableVoteSoundReminders; %i++) + { + if(isEventPending(Game.voteReminder[%i])) + cancel(Game.voteReminder[%i]); + Game.voteReminder[%i] = ""; + } + messageAll('MsgOvertime', "\c2Vote has been cancelled due to Sudden-Death Overtime."); + } + } + } + else + { + %game.timeLimitReached(); + } + } + else + { + if(%curTimeLeftMS >= 20000) + %game.timeCheck = %game.schedule(20000, "checkTimeLimit"); + else + %game.timeCheck = %game.schedule(%curTimeLeftMS + 1, "checkTimeLimit"); + + //now synchronize everyone's clock + messageAll('MsgSystemClock', "", $Host::TimeLimit, %curTimeLeftMS); + } +} + function CTFGame::checkScoreLimit(%game, %team) { %scoreLimit = MissionGroup.CTF_scoreLimit * %game.SCORE_PER_TEAM_FLAG_CAP; // default of 5 if scoreLimit not defined if(%scoreLimit $= "") %scoreLimit = 5 * %game.SCORE_PER_TEAM_FLAG_CAP; - if($TeamScore[%team] >= %scoreLimit) - %game.scoreLimitReached(); + if(%game.overtime){ + %teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP); + %teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP); + if(%teamOneCaps != %teamTwoCaps){ + %game.scoreLimitReached(); + } + } + else{ + if($TeamScore[%team] >= %scoreLimit) + %game.scoreLimitReached(); + } } function CTFGame::awardScoreFlagReturn(%game, %cl, %perc) @@ -1952,7 +2039,7 @@ function CTFGame::awardScoreKill(%game, %killerID) function checkVehicleCamping( %team ) { %position = $flagPos[%team]; - %radius = 15; + %radius = 5; InitContainerRadiusSearch(%position, %radius, $TypeMasks::VehicleObjectType ); while ((%vehicle = containerSearchNext()) != 0) diff --git a/Classic/scripts/GameGui.cs b/Classic/scripts/GameGui.cs index bb7daf0..a14e765 100644 --- a/Classic/scripts/GameGui.cs +++ b/Classic/scripts/GameGui.cs @@ -4,7 +4,7 @@ // //------------------------------------------------------------------------------ -// z0dd - ZOD: Execute the mission and game type skip lists so that +// z0dd - ZOD: Execute the mission and game type skip lists so that // arrays are put into memory for function buildMissionList. exec("prefs/MissionSkip.cs", true); exec("prefs/GameTypeSkip.cs", true); @@ -57,12 +57,12 @@ function GameGui::onSleep( %this ) %ctrl = "GM_" @ %this.pane @ "Pane"; if ( isObject( %ctrl ) ) %ctrl.onDeactivate(); - + // if( isObject( $dummySeq ) ) -// { +// { // $dummySeq.delete(); // } - + Canvas.popDialog(LaunchToolbarDlg); } @@ -124,7 +124,7 @@ function GM_JoinPane::onActivate( %this ) GMJ_Browser.lastQuery = $PlayingOnline ? "Master" : "LanServers"; GMJ_Browser.runQuery(); } - + if ( isObject( BrowserMap ) ) { BrowserMap.pop(); @@ -151,7 +151,7 @@ function GM_JoinPane::onDeactivate( %this ) BrowserMap.pop(); BrowserMap.delete(); } - + GM_VersionText.setVisible( false ); $pref::ServerBrowser::InfoWindowOpen = GMJ_Browser.infoWindowOpen; @@ -324,15 +324,15 @@ function GMJ_Browser::runQuery( %this ) if ( %regionMask $= "" ) %regionMask = 4294967295; - queryMasterServer( - $JoinGamePort, - 0, // Flags - %rulesSet, // Rules Set - %missionType, // Mission Type - getField( %filter, 3 ), // Min Players + queryMasterServer( + $JoinGamePort, + 0, // Flags + %rulesSet, // Rules Set + %missionType, // Mission Type + getField( %filter, 3 ), // Min Players %maxPlayers, // Max Players - %maxBots, // Max Bots - %regionMask, // Region Mask + %maxBots, // Max Bots + %regionMask, // Region Mask getField( %filter, 6 ), // Max Ping getField( %filter, 8 ), // Min CPU Speed getField( %filter, 9 ) ); // Filter flags @@ -379,15 +379,15 @@ function GMJ_Browser::onDatabaseRow( %this, %row, %isLastRow, %key ) if ( %isLastRow ) { GMJ_StatusText.setValue( "Querying the master server..." ); - queryMasterServer( - $JoinGamePort, // Port - 0, // Flags - "Any", // Rules Set - "Any", // Mission Type - 0, // Min Players + queryMasterServer( + $JoinGamePort, // Port + 0, // Flags + "Any", // Rules Set + "Any", // Mission Type + 0, // Min Players 255, // Max Players - 32, // Max Bots - 0xFFFFFFFF, // Region Mask + 32, // Max Bots + 0xFFFFFFFF, // Region Mask 0, // Max Ping 0, // Min CPU Speed 0, // Filter flags @@ -479,7 +479,7 @@ function GMJ_Browser::insertIPAddress( %this ) alxPlay( InputDeniedSound, 0, 0, 0 ); return; } - + IPEntry.setText( "IP:" ); Canvas.pushDialog( EnterIPDlg ); } @@ -493,8 +493,8 @@ function EnterIPDlg::onDone( %this ) %address = "IP:" @ %address; if ( strpos( %address, ":", 3 ) == -1 ) %address = %address @ ":28000"; - - echo( "Starting ping to server " @ %address @ "..." ); + + echo( "Starting ping to server " @ %address @ "..." ); pushServerAddress( %address ); GMJ_Browser.selectRowByAddress( %address, true ); } @@ -652,8 +652,8 @@ function SI_ContentWindow::fill( %this, %content ) %string = %string NL "\n" @ ServerInfoDlg.headerStyle @ "PLAYERSTEAMSCORE"; for ( %i = 0; %i < %playerCount; %i++ ) { - %playerEntry = getRecord( %content, %record ); - %string = %string NL "" SPC getField( %playerEntry, 0 ) @ "" + %playerEntry = getRecord( %content, %record ); + %string = %string NL "" SPC getField( %playerEntry, 0 ) @ "" SPC getField( %playerEntry, 1 ) @ "" SPC getField( %playerEntry, 2 ) @ ""; %record++; } @@ -666,7 +666,7 @@ function SI_ContentWindow::fill( %this, %content ) %string = "" @ ServerInfoDlg.headerStyle @ "PLAYERSSCORE"; for ( %i = 0; %i < %playerCount; %i++ ) { - %playerEntry = getRecord( %content, %record ); + %playerEntry = getRecord( %content, %record ); %string = %string NL "" SPC getField( %playerEntry, 0 ) @ "" SPC getField( %playerEntry, 2 ); %record++; } @@ -684,7 +684,7 @@ function ServerInfoDlg::onSleep( %this ) $pref::ServerBrowser::InfoWindowPos = SI_Window.getPosition(); $pref::ServerBrowser::InfoWindowExtent = SI_Window.getExtent(); $pref::ServerBrowser::InfoWindowBarPos = getWord( SI_InfoScroll.getExtent(), 1 ); - + GMJ_InfoBtn.setActive( true ); } @@ -733,7 +733,7 @@ function GM_HostPane::onActivate( %this ) GameGui.pane = "Host"; $HostGameType = $PlayingOnline ? "Online" : "LAN"; - + buildMissionTypePopup( GMH_MissionType ); // --------------------------------------------------- // z0dd - ZOD, 9/29/02. Removed T2 demo code from here @@ -794,7 +794,7 @@ function buildMissionTypePopup( %popup ) %popup.clear(); for( %type = 0; %type < $HostTypeCount; %type++ ) %popup.add( $HostTypeDisplayName[%type], %type ); - %popup.sort( true ); + %popup.sort( true ); } //------------------------------------------------------------------------------ @@ -878,6 +878,12 @@ function buildMissionList() for( %word = 0; ( %misType = getWord( %typeList, %word ) ) !$= ""; %word++ ) { + //--------------------------------------------------------------------------------- + // z0dd - ZOD - Founder(founder@mechina.com): Append Tribe Practice to CTF missions + if(%misType $= "CTF") + %typeList = rtrim(%typeList) @ " PracticeCTF SCtF Hybrid LCTF"; + //--------------------------------------------------------------------------------- + // Eolk - remove gametype skip code // ------------------------------------------------------------------- // z0dd - ZOD, 01/02/03. Don't include TR2 gametype if it's turned off @@ -972,7 +978,7 @@ function addRotationMap(%missionFile, %gameType, %freeForAll, %cycle, %minPlayer $HostMissionFile[%mis] = %missionFile; $HostMissionName[%mis] = %missionFile; $BotEnabled[%mis] = isFile("terrains/" @ %missionFile @".nav"); - + // Load custom display name %f = new FileObject(); @@ -1281,7 +1287,7 @@ function getNextMission(%missionName, %gameType) deleteVariables("$MapPlayed*"); if($Host::botsEnabled && $BotMissionCount[%type] >= $MapPlayedCount) deleteVariables("$MapPlayed*"); - + %length = 0; %index = -1; // Build array of missions @@ -1311,7 +1317,7 @@ function getNextMission(%missionName, %gameType) // Randomize if set by pref or if the mission played was not on the cycle // TODO: Actually make it go on to the next mission in the list instead of randomize when a mission not in the cycle is played? // error("LENGTH: "@%length); - if ($Host::ClassicRandomMissions || !%list[%index])// { + if ($Host::ClassicRandomMissions || !%list[%index])// { %index = getRandom(1, %length);// error("INDEX: "@%index); } // Otherwise, on to the next mission else @@ -1400,8 +1406,8 @@ function StartHostedGame() if ( $Host::Dedicated ) { - MessageBoxYesNo( "WARNING", - "You are about to launch a dedicated server and quit Tribes 2. Do you want to continue?", + MessageBoxYesNo( "WARNING", + "You are about to launch a dedicated server and quit Tribes 2. Do you want to continue?", "tryToLaunchDedicatedServer(" @ $Host::PureServer @ ");" ); return; } @@ -1454,7 +1460,7 @@ function GMH_BotsEnabledTgl::onAction( %this ) %id = GMH_MissionList.getRowId( %i ); GMH_MissionList.setRowActive( %id, $BotEnabled[%id] ); } - + GMH_EnableBotsGroup.setVisible(true); %misId = GMH_MissionList.getSelectedId(); GMH_StartGameBtn.setActive( $BotEnabled[%misId] ); @@ -1501,7 +1507,7 @@ function GMH_BotsEnabledTgl::onAction( %this ) %id = GMH_MissionList.getRowId( %i ); GMH_MissionList.setRowActive( %id, $BotEnabled[%id] ); } - + GMH_EnableBotsGroup.setVisible(true); %misId = GMH_MissionList.getSelectedId(); GMH_StartGameBtn.setActive( $BotEnabled[%misId] ); @@ -1534,7 +1540,7 @@ function validateMaxPlayers() // --------------------------------------------------- // z0dd - ZOD, 9/29/02. Removed T2 demo code from here - + //and make sure the bot sliders reflect the changes.. setBotCountSlider(); // --------------------------------------------------- @@ -1576,7 +1582,7 @@ function AdvancedHostDlg::onWake( %this ) if ( $Host::HiVisibility ) AH_HiVisibilityRdo.setValue( true ); else - AH_HiFPSRdo.setValue( true ); + AH_HiFPSRdo.setValue( true ); AH_DedicatedTgl.setValue( $Host::Dedicated ); AH_DedicatedTgl.onAction(); AH_TeamDamageTgl.setValue( $Host::TeamDamageOn ); @@ -1601,7 +1607,7 @@ function AdvancedHostDlg::accept( %this ) $Host::Dedicated = AH_DedicatedTgl.getValue(); if ( $Host::Dedicated ) $Host::PureServer = AH_PureServerTgl.getValue(); - $Host::TeamDamageOn = AH_TeamDamageTgl.getValue(); + $Host::TeamDamageOn = AH_TeamDamageTgl.getValue(); $Host::TournamentMode = AH_TournamentTgl.getValue(); $Host::allowAdminPlayerVotes = AH_AdminVoteTgl.getValue(); $Host::NoSmurfs = !AH_AllowSmurfTgl.getValue(); @@ -1696,7 +1702,7 @@ function GM_WarriorPane::onActivate( %this ) { %name = stripTrailingSpaces( strToPlayerName( getField( $pref::Player[%count], 0 ) ) ); GMW_WarriorPopup.add( %name, %count ); - } + } } // Fill the static menus: @@ -1777,10 +1783,10 @@ function GMW_PlayerModel::update( %this ) %armor = "medium"; else %armor = "light"; - + switch ( GMW_RaceGenderPopup.getSelected() ) { - case 1: + case 1: if ( %armor $= "heavy" ) %shape = %armor @ "_male"; else @@ -1788,20 +1794,20 @@ function GMW_PlayerModel::update( %this ) case 2: %shape = "bioderm_" @ %armor; default: %shape = %armor @ "_male"; } - + %skin = getField( $pref::Player[$pref::Player::Current], 2 ); - + // if( isObject( $dummySeq ) ) -// { +// { // $dummySeq.delete(); // } -// +// // $dummySeq = new TSShapeConstructor() // { // baseShape = %shape @ ".dts"; // sequence0 = %shape @ "_forward.dsq dummyRun"; // }; - + %this.setModel( %shape, %skin ); } @@ -1831,7 +1837,7 @@ function GMW_WarriorPopup::onSelect( %this, %id, %text ) %baseSkin = isDynamixSkin( %skin ); GMW_SkinPrefPopup.setSelected( !%baseSkin ); GMW_SkinPopup.fillList( %selId ); - + %selId = -1; for ( %i = 0; %i < GMW_SkinPopup.size(); %i++ ) { @@ -1868,7 +1874,7 @@ function GMW_RaceGenderPopup::fillList( %this ) { if ( %this.size() ) return; - + %this.add( "Human Male", 0 ); %this.add( "Human Female", 1 ); %this.add( "Bioderm", 2 ); @@ -1905,7 +1911,7 @@ function GMW_SkinPrefPopup::fillList( %this ) { if ( %this.size() ) return; - + %this.add( "Dynamix Skins", 0 ); %this.add( "Custom Skins", 1 ); } @@ -1914,15 +1920,15 @@ function GMW_SkinPrefPopup::fillList( %this ) function GMW_SkinPrefPopup::onSelect( %this, %id, %text ) { %curSkin = GMW_SkinPopup.getText(); - GMW_SkinPopup.fillList( GMW_RaceGenderPopup.getSelected() ); + GMW_SkinPopup.fillList( GMW_RaceGenderPopup.getSelected() ); %selId = GMW_SkinPopup.findText( %curSkin ); if ( %selId == -1 ) %selId = 0; - + if ( GMW_SkinPopup.size() ) - { + { GMW_SkinPopup.setSelected( %selId ); - GMW_SkinPopup.onSelect( %selId, GMW_SkinPopup.getTextById( %selId ) ); + GMW_SkinPopup.onSelect( %selId, GMW_SkinPopup.getTextById( %selId ) ); } } @@ -1958,7 +1964,7 @@ function isDynamixSkin( %skin ) if ( %skin $= $Skin[%i, code] ) return( true ); } - + return( false ); } @@ -1993,7 +1999,7 @@ function GMW_SkinPopup::fillList( %this, %raceGender ) %baseSkin = false; for ( %i = 0; %i < $SkinCount; %i++ ) { - if ( %skin $= $Skin[%i, code] ) + if ( %skin $= $Skin[%i, code] ) { %baseSkin = true; %skin = $Skin[%i, name]; @@ -2010,7 +2016,7 @@ function GMW_SkinPopup::fillList( %this, %raceGender ) } } } - + %this.sort( true ); } @@ -2066,7 +2072,7 @@ function GMW_VoicePopup::fillList( %this, %raceGender ) { %this.clear(); - switch ( %raceGender ) + switch ( %raceGender ) { case 0: // Human Male for ( %i = 0; %i < $MaleVoiceCount; %i++ ) diff --git a/Classic/scripts/LCTFGame.cs b/Classic/scripts/LCTFGame.cs index f3c2bc8..b0dcd2b 100644 --- a/Classic/scripts/LCTFGame.cs +++ b/Classic/scripts/LCTFGame.cs @@ -23,6 +23,15 @@ exec("scripts/aiLCTF.cs"); //exec the prefs //exec("prefs/LCTFPrefs.cs"); +//Time for auto overtime sudden-death mode +$LCTF::Overtime = 5; //5 Minutes, 0 to disable +//Damage scales for Chaingun and Grenade Launcher +//1 = 100%, 0.85 = 85%, 0 = OFF, etc +$LCTF::CGDamageScale = "0"; +$LCTF::GLDamageScale = "0"; +//Ban Mines +$LCTF::BanMines = 0; + function setArmorDefaults(%armor) { switch$ ( %armor ) @@ -57,7 +66,7 @@ function setArmorDefaults(%armor) $InvBanList[LCTF, "Mortar"] = 1; $InvBanList[LCTF, "SniperRifle"] = 1; // Misc - $InvBanList[LCTF, "Mine"] = 0; + $InvBanList[LCTF, "Mine"] = $LCTF::BanMines; $InvBanList[LCTF, "ConcussionGrenade"] = 0; $InvBanList[LCTF, "CameraGrenade"] = 1; $InvBanList[LCTF, "FlareGrenade"] = 1; @@ -132,7 +141,7 @@ function LCTFGame::initGameVars(%game) %game.SCORE_PER_REPAIR_DEP_TUR = 3; %game.SCORE_PER_REPAIR_DEP_INV = 2; - %game.FLAG_RETURN_DELAY = 45 * 1000; + %game.FLAG_RETURN_DELAY = 25 * 1000; %game.TIME_CONSIDERED_FLAGCARRIER_THREAT = 3 * 1000; %game.RADIUS_GEN_DEFENSE = 20; @@ -368,7 +377,22 @@ package LCTFGame //Take out anything vehicle related function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC) { - //error("Armor::damageObject( "@%data@", "@%targetObject@", "@%sourceObject@", "@%position@", "@%amount@", "@%damageType@", "@%momVec@" )"); + //CG and GL Damage Scales + if($LCTF::CGDamageScale){ + if(Game.class $= "LCTFGame" && %damageType $= $DamageType::Bullet){ + %amount *= $LCTF::CGDamageScale; + } + } + if($LCTF::GLDamageScale){ + if(isObject($LCTFLastExploded)){ + %name = $LCTFLastExploded.getName();// find what what exploded last + if(Game.class $= "LCTFGame" && %name $= "BasicGrenade"){// BasicGrenade is the nade launcher + %amount *= $LCTF::GLDamageScale; + } + } + } + + //error("Armor::damageObject( "@%data@", "@%targetObject@", "@%sourceObject@", "@%position@", "@%amount@", "@%damageType@", "@%momVec@" )"); if(%targetObject.invincible || %targetObject.getState() $= "Dead") return; @@ -474,6 +498,12 @@ package LCTFGame playPain( %targetObject ); } } + + //Needed for Grenade Launcher type detection + function ProjectileData::onExplode(%data, %proj, %pos, %mod){ + $LCTFLastExploded = %data;// record what exploded + parent::onExplode(%data, %proj, %pos, %mod); + } }; ///////////////////////////////////////////////////////////////////////////////////////// @@ -500,6 +530,14 @@ function LCTFGame::missionLoadDone(%game) //%game.campThread_2 = schedule( 1000, 0, "checkVehicleCamping", 2 ); deleteNonLCTFObjects(); + + if($Host::LCTFOneMine){ + //Prevent package from being activated if it is already + if (!isActivePackage(LCTFOneMine)) + activatePackage(LCTFOneMine); + } + else if (isActivePackage(LCTFOneMine)) + deactivatePackage(LCTFOneMine); } function LCTFGame::clientMissionDropReady(%game, %client) @@ -648,6 +686,12 @@ function LCTFGame::gameOver(%game) } for(%j = 1; %j <= %game.numTeams; %j++) $TeamScore[%j] = 0; + + if (isActivePackage(LCTFOneMine)) + deactivatePackage(LCTFOneMine); + + %game.voteOT = 0; + %game.overtime = 0; } @@ -661,8 +705,8 @@ function LCTFGame::playerTouchFlag(%game, %player, %flag) if ((%flag.carrier $= "") && (%player.getState() !$= "Dead")) { // z0dd - ZOD, 5/07/04. Cancel the lava return. - if(isEventPending(%obj.lavaEnterThread)) - cancel(%obj.lavaEnterThread); + if(isEventPending(%flag.lavaEnterThread)) + cancel(%flag.lavaEnterThread); //flag isn't held and has been touched by a live player if (%client.team == %flag.team) @@ -672,6 +716,12 @@ function LCTFGame::playerTouchFlag(%game, %player, %flag) } // toggle visibility of the flag setTargetRenderMask(%flag.waypoint.getTarget(), %flag.isHome ? 0 : 1); + + if( %player > 0 ) + { + %player.setInvincibleMode(0 ,0.00); + %player.setInvincible( false ); // fire your weapon and your invincibility goes away. + } } function LCTFGame::playerTouchOwnFlag(%game, %player, %flag) @@ -1500,14 +1550,96 @@ function LCTFGame::resetDontScoreTimer(%game, %team) $dontScoreTimer[%team] = false; } +function LCTFGame::checkTimeLimit(%game, %forced) +{ + // Don't add extra checks: + if ( %forced ) + cancel( %game.timeCheck ); + + // if there is no time limit, check back in a minute to see if it's been set + if(($Host::TimeLimit $= "") || $Host::TimeLimit == 0) + { + %game.timeCheck = %game.schedule(20000, "checkTimeLimit"); + return; + } + + %curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime(); + + if (%curTimeLeftMS <= 0) + { + %teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP); + %teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP); + if(%game.scheduleVote !$= "" && !%game.voteOT && !$Host::TournamentMode) + { + messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav'); + %game.voteOT = 1; + } + else if(%teamOneCaps == %teamTwoCaps && $LCTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6)) + { + if(!%game.overtime) + { + %game.overtime = 1; + if($LCTF::Overtime > 1){ %s = "s"; } + messageAll('MsgOvertime', '\c2Sudden-Death Overtime Initiated: %1 Minute%2 Remaining~wfx/powered/turret_heavy_activate.wav', $LCTF::Overtime, %s); + echo("Sudden-Death Overtime Initiated"); + UpdateClientTimes($LCTF::Overtime * 60 * 1000); + EndCountdown($LCTF::Overtime * 60 * 1000); + %game.timeCheck = %game.schedule($LCTF::Overtime * 60 * 1000, "timeLimitReached"); + + //Cancel vote if any + if(%game.scheduleVote !$= "") + { + messageAll('closeVoteHud', ""); + cancel(Game.scheduleVote); + Game.scheduleVote = ""; + Game.kickClient = ""; + clearVotes(); + + //Stop vote chimes + for(%i = 0; %i < $Host::EnableVoteSoundReminders; %i++) + { + if(isEventPending(Game.voteReminder[%i])) + cancel(Game.voteReminder[%i]); + Game.voteReminder[%i] = ""; + } + messageAll('MsgOvertime', "\c2Vote has been cancelled due to Sudden-Death Overtime."); + } + } + } + else + { + %game.timeLimitReached(); + } + } + else + { + if(%curTimeLeftMS >= 20000) + %game.timeCheck = %game.schedule(20000, "checkTimeLimit"); + else + %game.timeCheck = %game.schedule(%curTimeLeftMS + 1, "checkTimeLimit"); + + //now synchronize everyone's clock + messageAll('MsgSystemClock', "", $Host::TimeLimit, %curTimeLeftMS); + } +} + function LCTFGame::checkScoreLimit(%game, %team) { %scoreLimit = MissionGroup.CTF_scoreLimit * %game.SCORE_PER_TEAM_FLAG_CAP; // default of 5 if scoreLimit not defined if(%scoreLimit $= "") %scoreLimit = 5 * %game.SCORE_PER_TEAM_FLAG_CAP; - if($TeamScore[%team] >= %scoreLimit) - %game.scoreLimitReached(); + if(%game.overtime){ + %teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP); + %teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP); + if(%teamOneCaps != %teamTwoCaps){ + %game.scoreLimitReached(); + } + } + else{ + if($TeamScore[%team] >= %scoreLimit) + %game.scoreLimitReached(); + } } function LCTFGame::awardScoreFlagReturn(%game, %cl, %perc) @@ -2282,6 +2414,21 @@ function LCTFGame::sendGameVoteMenu(%game, %client, %key) else messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFProMode', 'Disable Pro Mode (Disc, SL, GL Only)', 'Disable Pro Mode (Disc, SL, GL Only)' ); } + + if(!%isAdmin || (%isAdmin && %client.ForceVote)) + { + if(!$Host::LCTFOneMine) + messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Enable One Mine Inventory', 'Vote to enable One Mine Inventory' ); + else + messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Disable One Mine Inventory', 'Vote to disable One Mine Inventory' ); + } + else + { + if(!$Host::LCTFOneMine) + messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Enable One Mine Inventory', 'Enable One Mine Inventory' ); + else + messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Disable One Mine Inventory', 'Disable One Mine Inventory' ); + } } } @@ -2320,6 +2467,8 @@ function LCTFGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4 //%game.VoteArmorClass(%admin, %arg1, %arg2, %arg3, %arg4); case "LCTFProMode": %game.LCTFProMode(%admin, %arg1, %arg2, %arg3, %arg4); + case "LCTFOneMine": + %game.LCTFOneMine(%admin, %arg1, %arg2, %arg3, %arg4); } parent::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4); @@ -2470,6 +2619,83 @@ function LCTFGame::LCTFProMode(%game, %admin, %arg1, %arg2, %arg3, %arg4) } } } + +//--------------------------------LCTFOneMine-------------------------------- +// +$VoteMessage["LCTFOneMine"] = "turn"; + +//Set Mine Max +package LCTFOneMine +{ + +//Set Mine Max +function Player::maxInventory(%this, %data){ + if(isObject(%data)){ + if(%data.getName() $= "Mine" && Game.class $= "LCTFGame"){ + return 1; + } + } + return ShapeBase::maxInventory(%this, %data); +} + +}; + +function LCTFGame::LCTFOneMine(%game, %admin, %arg1, %arg2, %arg3, %arg4) +{ + if(%admin) + { + killeveryone(); + + if($Host::LCTFOneMine) + { + messageAll('MsgAdminForce', '\c2The Admin has disabled One Mine Inventory.'); + + if (isActivePackage(LCTFOneMine)) + deactivatePackage(LCTFOneMine); + + $Host::LCTFOneMine = false; + } + else + { + messageAll('MsgAdminForce', '\c2The Admin has enabled One Mine Inventory.'); + + if (!isActivePackage(LCTFOneMine)) + activatePackage(LCTFOneMine); + + $Host::LCTFOneMine = true; + } + } + else + { + %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; + if(%totalVotes > 0 && (%game.totalVotesFor / ClientGroup.getCount()) > ($Host::VotePasspercent / 100)) + { + killeveryone(); + + if($Host::LCTFOneMine) + { + messageAll('MsgVotePassed', '\c2One Mine Inventory Disabled.'); + + if (isActivePackage(LCTFOneMine)) + deactivatePackage(LCTFOneMine); + + $Host::LCTFOneMine = false; + } + else + { + messageAll('MsgVotePassed', '\c2One Mine Inventory Enabled.'); + + if (!isActivePackage(LCTFOneMine)) + activatePackage(LCTFOneMine); + + $Host::LCTFOneMine = true; + } + } + else + messageAll('MsgVoteFailed', '\c2Mode change did not pass: %1 percent.', mFloor(%game.totalVotesFor/ClientGroup.getCount() * 100)); + } +} + // For voting to work properly - evo admin.ovl // // case "LCTFProMode": diff --git a/Classic/scripts/LakRabbitGame.cs b/Classic/scripts/LakRabbitGame.cs index 897f929..f5cdf80 100644 --- a/Classic/scripts/LakRabbitGame.cs +++ b/Classic/scripts/LakRabbitGame.cs @@ -166,6 +166,23 @@ // 1 - Players get 999 or unlimited DiscJumps // +datablock ItemData(LakFakeFlag2) : flag +{ + lightColor = "0.1 0.1 0.9 1.0"; + className = LakFakeFlag; + lightTime = "100"; + lightRadius = "5"; +}; + +datablock ItemData(LakFakeFlag4) : LakFakeFlag2 +{ + lightColor = "0.9 0.9 0.1 1.0"; +}; + +datablock ItemData(LakFakeFlag8) : LakFakeFlag2 +{ + lightColor = "0.1 0.9 0.1 1.0"; +}; package LakRabbitGame { @@ -417,7 +434,12 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am // no splash damage vote if(Game.noSplashDamage && %percentDam < 98 && $lastObjExplode && !$lastObjExplode.isHandNade && %damageType != $DamageType::Mine) - %amount = 0.0; + { + if(!%targetObject.holdingFlag) + %amount = 0.0; + else if(((getSimTime() - %targetObject.client.rabbitSplash) < 15000)) //Turn on splash for rabbit after not making a shot for an alotted time + %amount = 0.0; + } switch$(%damageType) { @@ -435,54 +457,106 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am %sound = %defaultSound; } - // special knockback if you hit too close, max 15% chance (point blank).. 5% at 30meters, 1% chance for any MA + if(%targetObject.holdingFlag) + { + %tgPos = %targetObject.getPosition(); + %terrHeight = getTerrainHeight(getWords(%tgPos,0,1)); + %playerHeight = mAbs(getWord(%tgPos,2) - %terrHeight); + } - // Slap based on a Disc headshot - //%chance = mFloor(25 - %distance/3); - //if(%ma && getRandom(1,50) <= %chance && %targetObject.client.headshot) + if(%targetObject.holdingFlag && %playerHeight >= 100) + { + // tr2 style flag drop.. it does kill the rabbit + %chance = mFloor(20 - %distance/%playerHeight); + if(%chance <= 0) %chance = 1; - //Normal Slap - %chance = mFloor(15 - %distance/3); - if(%chance <= 0) %chance = 1; + if(%ma && getRandom(1,100) <= %chance) + { + Game.playerDroppedFlag(%targetObject); - if(%ma && getRandom(1,100) <= %chance) + %position = %targetObject.getPosition(); + %count = 40; + %ttl = 60000; + %player = %targetObject; + if( %position $= "" ) { - if(%targetObject.holdingFlag) - { - Game.playerDroppedFlag(%targetObject); - //Added so cloak is turned off when slapped. - %targetObject.setCloaked(false); - %targetObject.freeDJ = 1; - } - if(%sourceObject.holdingFlag && Game.duelMode) - { - duelBonus(%sourceObject.client); - $LakDamaged[%targetObject.client] = 0; - } - - // lower damage and make invincible to ground damage to make it a little more fun - %amount = 0.01; - %targetObject.setKnockback(true); - %targetObject.schedule(15000, "setKnockback", false); - - %p = %targetObject.getWorldBoxCenter(); - %muzzleVec = %sourceObject.getMuzzleVector(0); - %impulseVec = VectorScale(%muzzleVec, 25000); - %targetObject.applyImpulse(%p, %impulseVec); - %sound = '~wfx/misc/slapshot.wav'; - - %slapmsg = getRandom(1,3); - switch$(%slapmsg) - { - case 1: - messageAll('msgSlapmessage','\c0%1 wonders what the five fingers said to the face.', %targetObject.client.name ); - case 2: - messageAll('msgSlapmessage','\c0%1 gets slapped the heck out!', %targetObject.client.name ); - case 3: - messageAll('msgSlapmessage','\c0%1 is taking a short tour around the map.', %targetObject.client.name ); - } + error("No position passed!"); + return 0; } + if( %count <= 0 ) + { + error("Number of flags to spew must be greater than 0!"); + return 0; + } + + %flagArr[0] = LakFakeFlag8; + %flagArr[1] = LakFakeFlag2; + %flagArr[2] = LakFakeFlag4; + + while( %count > 0 ) + { + %index = mFloor(getRandom() * 3); + // throwDummyFlag(location, Datablock); + LakRabbitGame::throwDummyFlag(%position, %flagArr[%index], %player, %ttl); + %count--; + } + + %targetObject.blowup(); + %targetObject.scriptKill($DamageType::Explosion); + %sound = '~wfx/misc/MA1.wav'; + } + } + else + { + // special knockback if you hit too close, max 15% chance (point blank).. 5% at 30meters, 1% chance for any MA + + // Slap based on a Disc headshot + //%chance = mFloor(25 - %distance/3); + //if(%ma && getRandom(1,50) <= %chance && %targetObject.client.headshot) + + //Normal Slap + %chance = mFloor(15 - %distance/3); + if(%chance <= 0) %chance = 1; + + if(%ma && getRandom(1,100) <= %chance) + { + if(%targetObject.holdingFlag) + { + Game.playerDroppedFlag(%targetObject); + //Added so cloak is turned off when slapped. + %targetObject.setCloaked(false); + %targetObject.freeDJ = 1; + } + if(%sourceObject.holdingFlag && Game.duelMode) + { + duelBonus(%sourceObject.client); + $LakDamaged[%targetObject.client] = 0; + } + + // lower damage and make invincible to ground damage to make it a little more fun + %amount = 0.01; + %targetObject.setKnockback(true); + %targetObject.schedule(15000, "setKnockback", false); + + %p = %targetObject.getWorldBoxCenter(); + %muzzleVec = %sourceObject.getMuzzleVector(0); + %impulseVec = VectorScale(%muzzleVec, 25000); + %targetObject.applyImpulse(%p, %impulseVec); + %sound = '~wfx/misc/slapshot.wav'; + + %slapmsg = getRandom(1,3); + switch$(%slapmsg) + { + case 1: + messageAll('msgSlapmessage','\c0%1 wonders what the five fingers said to the face.', %targetObject.client.name ); + case 2: + messageAll('msgSlapmessage','\c0%1 gets slapped the heck out!', %targetObject.client.name ); + case 3: + messageAll('msgSlapmessage','\c0%1 is taking a short tour around the map.', %targetObject.client.name ); + } + } + } %weapon = "Disc"; case $DamageType::Grenade: if($lastObjExplode.isHandNade) //Hand grenades @@ -746,10 +820,15 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am } // borlak -- make a sound when you hit someone - if(%sound $= "" && %sourceObject.client.team != %targetObject.client.team) - messageClient(%sourceObject.client,'MsgHitSound','~wfx/misc/diagnostic_beep.wav'); - else if(%sound !$= "") + // if(%sound $= "" && %sourceObject.client.team != %targetObject.client.team) + // messageClient(%sourceObject.client,'MsgHitSound','~wfx/misc/diagnostic_beep.wav'); + // else if(%sound !$= ""){ + if(%sound !$= ""){ messageAll('msgSpecialHitSound', %sound); + if(%sourceObject.holdingFlag){ + %sourceObject.client.rabbitSplash = getSimTime(); + } + } // borlak -- rabbit should be able to kill heavies/mediums fast(er) in duel mode if(%targetObject.client.armor $= "Heavy" || %targetObject.client.armor $= "Medium") @@ -1731,7 +1810,7 @@ function LakRabbitGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, function LakRabbitGame::updateFlagTransform(%game, %flag) { %flag.setTransform(%flag.getTransform()); - %game.updateFlagThread[%flag] = %game.schedule(256, "updateFlagTransform", %flag); + %game.updateFlagThread[%flag] = %game.schedule(100, "updateFlagTransform", %flag); } function LakRabbitGame::playerDroppedFlag(%game, %player) @@ -1905,6 +1984,7 @@ function LakRabbitGame::playerTouchFlag(%game, %player, %flag) cancel(%game.updateFlagThread[%flag]); // z0dd - ZOD, 8/4/02. Cancel this flag's thread to KineticPoet's flag updater %player.freeDJ = 0; %flag.bounced = 0; + %player.client.rabbitSplash = getSimTime(); %player.client.startTime = getSimTime(); %player.holdingFlag = %flag; @@ -2017,6 +2097,45 @@ function LakRabbitGame::resetFlag(%game, %flag) cancel(%game.updateFlagThread[%flag]); // z0dd - ZOD, 8/4/02. Cancel this flag's thread to KineticPoet's flag updater } +function LakRabbitGame::checkTimeLimit(%game, %forced) +{ + // Don't add extra checks: + if ( %forced ) + cancel( %game.timeCheck ); + + // if there is no time limit, check back in a minute to see if it's been set + if(($Host::TimeLimit $= "") || $Host::TimeLimit == 0) + { + %game.timeCheck = %game.schedule(20000, "checkTimeLimit"); + return; + } + + %curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime(); + + if (%curTimeLeftMS <= 0) + { + if(%game.scheduleVote !$= "" && !%game.voteOT && !$Host::TournamentMode) + { + messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav'); + %game.voteOT = 1; + } + else + { + %game.timeLimitReached(); + } + } + else + { + if(%curTimeLeftMS >= 20000) + %game.timeCheck = %game.schedule(20000, "checkTimeLimit"); + else + %game.timeCheck = %game.schedule(%curTimeLeftMS + 1, "checkTimeLimit"); + + //now synchronize everyone's clock + messageAll('MsgSystemClock', "", $Host::TimeLimit, %curTimeLeftMS); + } +} + // ----- These functions are native to Rabbit function LakRabbitGame::timeLimitReached(%game) @@ -2092,6 +2211,9 @@ function LakRabbitGame::gameOver(%game) // borlak -- delete variables deleteVariables("$LakFired*"); deleteVariables("$LakDamaged*"); + + %game.voteOT = 0; + %game.overtime = 0; } function LakRabbitGame::resetScore(%game, %client) @@ -2188,8 +2310,16 @@ function plzBounceOffGrid(%obj, %bounceForce, %count) %vec = VectorNormalize(%vec); %vec = VectorScale(%vec, 25); } - else if (%oldSpeed < 60) //Max speed a boost gets applied to a bounce: Added so runners cant abuse - %vec = VectorScale(%vec, 1.15); + else if (%oldSpeed < 75) //Max speed a boost gets applied to a bounce: Added so runners cant abuse //was 60 + %vec = VectorScale(%vec, 0.95); //was 1.15 + else if (%oldSpeed < 100) //Slow down runners + %vec = VectorScale(%vec, 0.85); + else if (%oldSpeed < 125) //Slow down runners + %vec = VectorScale(%vec, 0.75); + else if (%oldSpeed < 150) //Slow down runners + %vec = VectorScale(%vec, 0.65); + else if (%oldSpeed > 175) //Slow down runners + %vec = VectorScale(%vec, 0.55); // apply the impulse to the object //%obj.applyImpulse(%obj.getWorldBoxCenter(), %vec); @@ -2609,96 +2739,41 @@ function LakRabbitGame::applyConcussion(%game, %player) %game.dropFlag( %player ); } -//--------------------------------Footnotes--------------------------------------- -// -// -//To make vote options work in evo admin mod, demonstration only below -// -//function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %playerVote) -//{ -// parent::serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %playerVote); -// -// // sonic9k 11/6/2003 - Added support for LakRabbit DuelMode option -// // -// case "VoteDuelMode": -// if( %isAdmin && !%client.ForceVote ) -// { -// adminStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4); -// adminLog(%client, " has toggled " @ %arg1 @ " (" @ %arg2 @ ")"); -// } -// else -// { -// if(Game.scheduleVote !$= "") -// { -// messageClient(%client, 'voteAlreadyRunning', '\c2A vote is already in progress.'); -// return; -// } -// %actionMsg = ($Host::LakRabbitDuelMode ? "disable Duel mode" : "enable Duel mode"); -// for(%idx = 0; %idx < ClientGroup.getCount(); %idx++) -// { -// %cl = ClientGroup.getObject(%idx); -// if(!%cl.isAIControlled()) -// { -// messageClient(%cl, 'VoteStarted', '\c2%1 initiated a vote to %2.', %client.name, %actionMsg); -// %clientsVoting++; -// } -// } -// playerStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4, %clientsVoting); -// } -// // -// // sonic9k 11/6/2003 - Added support for LakRabbit SplashDamage option -// // -// case "VoteSplashDamage": -// if( %isAdmin && !%client.ForceVote ) -// { -// adminStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4); -// adminLog(%client, " has toggled " @ %arg1 @ " (" @ %arg2 @ ")"); -// } -// else -// { -// if(Game.scheduleVote !$= "") -// { -// messageClient(%client, 'voteAlreadyRunning', '\c2A vote is already in progress.'); -// return; -// } -// %actionMsg = ($Host::LakRabbitNoSplashDamage ? "enable SplashDamage" : "disable SplashDamage"); -// for(%idx = 0; %idx < ClientGroup.getCount(); %idx++) -// { -// %cl = ClientGroup.getObject(%idx); -// if(!%cl.isAIControlled()) -// { -// messageClient(%cl, 'VoteStarted', '\c2%1 initiated a vote to %2.', %client.name, %actionMsg); -// %clientsVoting++; -// } -// } -// playerStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4, %clientsVoting); -// } -// // -// // chocotaco 8/7/2018 - Added support for LakRabbit Pro option -// // -// case "VotePro": -// if( %isAdmin && !%client.ForceVote ) -// { -// adminStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4); -// adminLog(%client, " has toggled " @ %arg1 @ " (" @ %arg2 @ ")"); -// } -// else -// { -// if(Game.scheduleVote !$= "") -// { -// messageClient(%client, 'voteAlreadyRunning', '\c2A vote is already in progress.'); -// return; -// } -// %actionMsg = ($Host::LakRabbitPubPro ? "disable Pro mode" : "enable Pro mode"); -// for(%idx = 0; %idx < ClientGroup.getCount(); %idx++) -// { -// %cl = ClientGroup.getObject(%idx); -// if(!%cl.isAIControlled()) -// { -// messageClient(%cl, 'VoteStarted', '\c2%1 initiated a vote to %2.', %client.name, %actionMsg); -// %clientsVoting++; -// } -// } -// playerStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4, %clientsVoting); -// } -//} +function LakRabbitGame::throwDummyFlag(%position, %datablock, %player, %ttl) +{ + %client = %player.client; + + // create a flag and throw it + %droppedflag = new Item() { + position = %position; + rotation = "0 0 1 " @ (getRandom() * 360); + scale = "1 1 1"; + dataBlock = %datablock; + collideable = "0"; + static = "0"; + rotate = "1"; + team = "0"; + isFake = 1; + }; + MissionCleanup.add(%droppedflag); + + %vec = (-1.0 + getRandom() * 2.0) SPC (-1.0 + getRandom() * 2.0) SPC getRandom(); + %vec = VectorScale(%vec, getrandom(250,1000) + (getRandom() * 300)); + + // Add player's velocity + if (%player !$= "") + { + %droppedflag.setCollisionTimeout(%player); + %vec = vectorAdd(%vec, %player.getVelocity()); + } + + %droppedflag.applyImpulse(%pos, %vec); + + %droppedFlag.die = schedule(getrandom(1500,5500), 0, "removeLakFakeFlag", %droppedflag); +} + +function removeLakFakeFlag(%flag) +{ + %flag.startFade(600, 0, true); + %flag.schedule(601, "delete"); +} diff --git a/Classic/scripts/SCtFGame.cs b/Classic/scripts/SCtFGame.cs index 0428d5f..00e6b85 100644 --- a/Classic/scripts/SCtFGame.cs +++ b/Classic/scripts/SCtFGame.cs @@ -262,35 +262,6 @@ package SCtFGame if(isEventPending(%obj.lavaEnterThread)) cancel(%obj.lavaEnterThread); } - - function ProjectileData::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal) - { - if(!isObject(%targetObject) && !isObject(%projectile.sourceObject)) - return; - if(!(%targetObject.getType() & ($TypeMasks::StaticTSObjectType | $TypeMasks::InteriorObjectType | - $TypeMasks::TerrainObjectType | $TypeMasks::WaterObjectType))) - { - if(%projectile.sourceObject.team !$= %targetObject.team) - { - if(%targetObject.getDataBlock().getClassName() $= "PlayerData" && %data.getName() $= "DiscProjectile") - { - %mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType; - %start = %targetObject.getWorldBoxCenter(); - %distance = mFloor(VectorDist(%start, %projectile.initialPosition)); - %end = getWord(%start, 0) SPC getWord(%start, 1) SPC getWord(%start, 2) - 15; - %grounded = ContainerRayCast(%start, %end, %mask, 0); - if(!%grounded) - { - %projectile.sourceObject.client.scoreMidAir++; - messageClient(%projectile.sourceObject.client, 'MsgMidAir', '\c0You received a %1 point bonus for a successful mid air shot.', Game.SCORE_PER_MIDAIR, %data.radiusDamageType, %distance); - messageTeamExcept(%projectile.sourceObject.client, 'MsgMidAir', '\c5%1 hit a mid air shot.', %projectile.sourceObject.client.name, %data.radiusDamageType, %distance); - Game.recalcScore(%projectile.sourceObject.client); - } - } - } - Parent::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal); - } - } }; ///////////////////////////////////////////////////////////////////////////////////////// @@ -456,8 +427,8 @@ function SCtFGame::playerTouchFlag(%game, %player, %flag) if ((%flag.carrier $= "") && (%player.getState() !$= "Dead")) { // z0dd - ZOD, 5/07/04. Cancel the lava return. - if(isEventPending(%obj.lavaEnterThread)) - cancel(%obj.lavaEnterThread); + if(isEventPending(%flag.lavaEnterThread)) + cancel(%flag.lavaEnterThread); //flag isn't held and has been touched by a live player if (%client.team == %flag.team) @@ -606,7 +577,7 @@ function SCtFGame::playerLostFlagTarget(%game, %player) function SCtFGame::updateFlagTransform(%game, %flag) { %flag.setTransform(%flag.getTransform()); - %game.updateFlagThread[%flag] = %game.schedule(256, "updateFlagTransform", %flag); + %game.updateFlagThread[%flag] = %game.schedule(100, "updateFlagTransform", %flag); } function SCtFGame::playerDroppedFlag(%game, %player) diff --git a/Classic/scripts/autoexec/MemPatches.cs b/Classic/scripts/autoexec/MemPatches.cs index f638eb4..bfd3888 100644 --- a/Classic/scripts/autoexec/MemPatches.cs +++ b/Classic/scripts/autoexec/MemPatches.cs @@ -4,57 +4,58 @@ //From Krash memPatch("756076","6169"); -// Thanks Turkeh -// TraversalRoot Console spam fix -function suppressTraversalRootPatch() -{ - if($tvpatched) - return; +//// Thanks Turkeh +//// TraversalRoot Console spam fix +//function suppressTraversalRootPatch() +//{ + //if($tvpatched) + //return; - warn("Patching traversal root error..."); - memPatch("56AD8A", "90909090909090909090909090909090909090909090"); - memPatch("56D114", "90909090909090909090909090909090909090909090"); - $tvpatched = 1; -} + //warn("Patching traversal root error..."); + //memPatch("56AD8A", "90909090909090909090909090909090909090909090"); + //memPatch("56D114", "90909090909090909090909090909090909090909090"); + //$tvpatched = 1; +//} -if (!$CmdArmor::Patched) -{ - $CmdArmor::Patched = true; - //memPatch("6FC746", "66B8000090906683FE017408ACAA84C075FA89D05F5EC3"); - memPatch("6FC746", "83FE017408ACAA84C075FA89D05F5EC3"); - //Removed register size override (cmp si, 1 -> cmp esi, 1) and got rid of - //weird NASM garbage code at the beginning. Had a mov ax, 0 which did nothing - //and wasn't necessary anyways because of xor eax, eax in the original. It also - //generated several NOPs after that for no reason. -} +//if (!$CmdArmor::Patched) +//{ + //$CmdArmor::Patched = true; + ////memPatch("6FC746", "66B8000090906683FE017408ACAA84C075FA89D05F5EC3"); + //memPatch("6FC746", "83FE017408ACAA84C075FA89D05F5EC3"); + ////Removed register size override (cmp si, 1 -> cmp esi, 1) and got rid of + ////weird NASM garbage code at the beginning. Had a mov ax, 0 which did nothing + ////and wasn't necessary anyways because of xor eax, eax in the original. It also + ////generated several NOPs after that for no reason. +//} -function serverCmd(%client) -{ - // Stick your own administrative action code here - messageAll('msgAll',"\c3" @ %client.namebase SPC "is attempting to crash the server!"); +//function serverCmd(%client) +//{ + //// Stick your own administrative action code here + //messageAll('msgAll',"\c3" @ %client.namebase SPC "is attempting to crash the server!"); - messageClient(%client, 'onClientBanned', ""); - messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client ); + //messageClient(%client, 'onClientBanned', ""); + //messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client ); - // kill and delete this client - if( isObject(%client.player) ) - %client.player.scriptKill(0); + //// kill and delete this client + //if( isObject(%client.player) ) + //%client.player.scriptKill(0); - if ( isObject( %client ) ) - { - %client.setDisconnectReason("You have been banned for attempting to crash the server."); - %client.schedule(700, "delete"); - } + //if ( isObject( %client ) ) + //{ + //%client.setDisconnectReason("You have been banned for attempting to crash the server."); + //%client.schedule(700, "delete"); + //} - BanList::add(%client.guid, %client.getAddress(), $Host::BanTime); -} + //BanList::add(%client.guid, %client.getAddress(), $Host::BanTime); +//} -//Disable UE box on crash +//Disable UE box on crash (Tribesnext Preview Unpatched Only) //Used if a clean crash is desired //memPatch("7dc7fc","90"); +//Loops Crash patch (Prevent the Uncaught Exception dialog from appearing) +//memPatch("006ff376", "909090909090"); //Show Linux Icon in server list //memPatch("5C9628","80CB05"); - -//Bahke MPB stability fix -//memPatch("614120","9090"); \ No newline at end of file +//Show no Linux Icon +//memPatch("5C9628","80CB01"); diff --git a/Classic/scripts/autoexec/MidairDetection.cs b/Classic/scripts/autoexec/MidairDetection.cs deleted file mode 100755 index eb4a7b1..0000000 --- a/Classic/scripts/autoexec/MidairDetection.cs +++ /dev/null @@ -1,151 +0,0 @@ -// MidAir Detection Replacement -// For CTF, LCTF, DM -// Script By: DarkTiger -// v1.0 -// -$MADR::Minimum = 10; - -//Replacing Classic Midair Hit Detection -// -//function ProjectileData::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal) -//{ -// if(!isObject(%targetObject) && !isObject(%projectile.sourceObject)) -// return; -// if(!(%targetObject.getType() & ($TypeMasks::StaticTSObjectType | $TypeMasks::InteriorObjectType | -// $TypeMasks::TerrainObjectType | $TypeMasks::WaterObjectType))) -// { -// if(%projectile.sourceObject.team !$= %targetObject.team) -// { -// if(%targetObject.getDataBlock().getClassName() $= "PlayerData" && %data.getName() $= "DiscProjectile") -// { -// %mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType; -// %start = %targetObject.getWorldBoxCenter(); -// %distance = mFloor(VectorDist(%start, %projectile.initialPosition)); -// %end = getWord(%start, 0) SPC getWord(%start, 1) SPC getWord(%start, 2) - 15; -// %grounded = ContainerRayCast(%start, %end, %mask, 0); -// if(!%grounded) -// { -// %projectile.sourceObject.client.scoreMidAir++; -// messageClient(%projectile.sourceObject.client, 'MsgMidAir', '\c0You received a %1 point bonus for a successful mid air shot.~wfx/misc/bounty_bonus.wav', Game.SCORE_PER_MIDAIR, %data.radiusDamageType, %distance); -// messageTeamExcept(%projectile.sourceObject.client, 'MsgMidAir', '\c5%1 hit a mid air shot.', %projectile.sourceObject.client.name, %data.radiusDamageType, %distance); -// Game.recalcScore(%projectile.sourceObject.client); -// } -// } -// } -// Parent::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal); -// } -//} - -package midAirMsg -{ - -function detonateGrenade(%obj) // from lakRabbitGame.cs for grenade tracking -{ - %obj.maNade = 1; - $maObjExplode = %obj; - parent::detonateGrenade(%obj); -} - -function ProjectileData::onExplode(%data, %proj, %pos, %mod) -{ - %cl = %proj.sourceObject.client; - - if(isObject(%cl)) - %cl.expData = %data TAB %proj.initialPosition TAB %pos; - - parent::onExplode(%data, %proj, %pos, %mod); -} - -function DefaultGame::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc) -{ - if(%game.class $= "CTFGame" || %game.class $= "DMGame" || %game.class $= "SCtFGame") // did it this way so dont have to copy paste 3 fucntions - { - if(isObject(%clVictim.player) && isObject(%clAttacker.player)) - { - if(%clVictim != %clAttacker && %clVictim.team != %clAttacker.team) - { - %dist = vectorDist(%clAttacker.player.getPosition(), %clVictim.player.getPosition()); - switch$(%damageType) - { - //case $DamageType::Blaster: - //if(maRayTestDis(%clVictim.player) >= $MADR::Minimum) - //maMessage(%clAttacker,"Blaster",%dist); - case $DamageType::Plasma: - if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker)) - maMessage(%clAttacker,"Plasma Rifle",%dist); - case $DamageType::Disc: - if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker)) - maMessage(%clAttacker,"Spinfusor",%dist); - case $DamageType::Grenade: - if($dtObjExplode.dtNade) - {//for hand genades method out of lakRabbit - //if(maRayTestDis(%clVictim.player) >= $MADR::Minimum) - //maMessage(%clAttacker,"Hand Grenade",%dist); - } - else //Grenade Launcher - { - if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker)) - maMessage(%clAttacker,"Grenade Launcher",%dist); - } - //case $DamageType::Laser: - //if(maRayTestDis(%clVictim.player) >= $MADR::Minimum) - //maMessage(%clAttacker,"Laser Rifle",%dist); - case $DamageType::Mortar: - if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker)) - maMessage(%clAttacker,"Fusion Mortar",%dist); - //case $DamageType::ShockLance: - //if(maRayTestDis(%clVictim.player) >= $MADR::Minimum) - //maMessage(%clAttacker,"ShockLance",%dist); - //case $DamageType::Mine: - //if(maRayTestDis(%clVictim.player) >= $MADR::Minimum) - //maMessage(%clAttacker,"Mine",%dist); - } - } - } - } - - parent::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc); -} - -}; - -// Prevent package from being activated if it is already -if(!isActivePackage(midAirMsg)) - activatePackage(midAirMsg); - -function maDirect(%client)// tests for direct hit with aoe weapons -{ - %field = %client.expData; - %data = getField(%field,0); %sPos = getField(%field,1); %ePos = getField(%field,2); - - if(%data.hasDamageRadius) - { - %mask = $TypeMasks::PlayerObjectType; - %vec = vectorNormalize(vectorSub(%ePos,%sPos)); - %ray = containerRayCast(%ePos, VectorAdd(%ePos, VectorScale(VectorNormalize(%vec), 5)), %mask, -1); - if(%ray) - return 1; - } - return 0; -} - -function maRayTestDis(%targetObject)// tests for height of target -{ - %mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::VehicleObjectType; - %rayStart = %targetObject.getWorldBoxCenter(); - %rayEnd = VectorAdd(%rayStart,"0 0" SPC -5000); - %ray = ContainerRayCast(%rayStart, %rayEnd, %mask, %targetObject); - - if(%ray) - return vectorDist(%rayStart,getWords(%ray,1,3)) - 1.15; - - return 0; -} - -function maMessage(%client,%porjName,%distance)// Send message -{ - %client.scoreMidAir++; - messageClient(%client, 'MsgMidAir', '\c0You received a %1 point bonus for a successful mid air shot. [%2m, %3]~wfx/misc/bounty_bonus.wav', Game.SCORE_PER_MIDAIR, mFloor(%distance), %porjName); - messageTeamExcept(%client, 'MsgMidAir', '\c5%1 hit a mid air shot. [%2m, %3]', %client.name, mFloor(%distance), %porjName); - Game.recalcScore(%client); -} diff --git a/Classic/scripts/autoexec/MissionTypeOptions.cs b/Classic/scripts/autoexec/MissionTypeOptions.cs index fcf176d..c76b69a 100644 --- a/Classic/scripts/autoexec/MissionTypeOptions.cs +++ b/Classic/scripts/autoexec/MissionTypeOptions.cs @@ -44,7 +44,12 @@ function loadMissionStage2() //Tournament Mode specifics if($Host::TournamentMode) - $Host::TimeLimit = 30; //TimeLimit Always 30 minutes in Tourney Mode + { + if($CurrentMissionType $= "LCTF") //TimeLimit Always 20 minutes in LCTF Tourney Mode + $Host::TimeLimit = 20; + else + $Host::TimeLimit = 30; //TimeLimit Always 30 minutes in Tourney Mode + } else { //Disable if active diff --git a/Classic/scripts/autoexec/ObserveFlag.cs b/Classic/scripts/autoexec/ObserveFlag.cs index 9d53409..9f9d353 100644 --- a/Classic/scripts/autoexec/ObserveFlag.cs +++ b/Classic/scripts/autoexec/ObserveFlag.cs @@ -142,7 +142,7 @@ if (!isActivePackage(PizzaThings)) function serverCmdObserveFirstFlag(%client) { - if(Game.class !$= CTFGame && Game.class !$= SCtFGame) + if(Game.class !$= CTFGame && Game.class !$= SCtFGame && Game.class !$= LCTFGame ) return; // client must be an observer @@ -160,7 +160,7 @@ function serverCmdObserveFirstFlag(%client) function serverCmdObserveSecondFlag(%client) { - if(Game.class !$= CTFGame && Game.class !$= SCtFGame) + if(Game.class !$= CTFGame && Game.class !$= SCtFGame && Game.class !$= LCTFGame ) return; // client must be an observer @@ -184,7 +184,7 @@ function observeFlag(%client, %target, %type, %flagTeam) if(!isObject(%client) || !isObject(%target) || !isObject(%client.camera)) return; - if(Game.class !$= CTFGame && Game.class !$= SCtFGame) + if(Game.class !$= CTFGame && Game.class !$= SCtFGame && Game.class !$= LCTFGame ) return; if(%client.team > 0) diff --git a/Classic/scripts/autoexec/TacoOverrides.cs b/Classic/scripts/autoexec/TacoOverrides.cs index 5b995b1..d5840ef 100644 --- a/Classic/scripts/autoexec/TacoOverrides.cs +++ b/Classic/scripts/autoexec/TacoOverrides.cs @@ -57,7 +57,7 @@ function VehicleData::onDestroyed(%data, %obj, %prevState) %zVel = (getRandom() * 100.0) + 50.0; %flingVel = %xVel @ " " @ %yVel @ " " @ %zVel; %flingee.applyImpulse(%flingee.getTransform(), %flingVel); - echo("got player..." @ %flingee.getClassName()); + //echo("got player..." @ %flingee.getClassName()); %flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Crash); } } @@ -70,29 +70,13 @@ function VehicleData::onDestroyed(%data, %obj, %prevState) %data.deleteAllMounted(%obj); // ----------------------------------------------------------------------------------------- // z0dd - ZOD - Czar, 6/24/02. Move this vehicle out of the way so nothing collides with it. - if(%data.getName() $="AssaultVehicle") - { - // %obj.setFrozenState(true); - %obj.schedule(500, "delete"); //was 2000 - //%data.schedule(500, 'onAvoidCollisions', %obj); + %obj.setFrozenState(true); + %obj.schedule(2000, "delete"); //was 500 + %data.schedule(500, 'onAvoidCollisions', %obj); - //Transfer the vehicle far away - %obj.schedule(1, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500 - } - else if(%data.getName() $="BomberFlyer" || %data.getName() $="MobileBaseVehicle") - { - // %obj.setFrozenState(true); - %obj.schedule(2000, "delete"); //was 2000 - //%data.schedule(500, 'onAvoidCollisions', %obj); + //Transfer the vehicle far away + %obj.schedule(128, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500 - //Transfer the vehicle far away - %obj.schedule(100, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500 - } - else - { - %obj.setFrozenState(true); - %obj.schedule(500, "delete"); //was 500 - } // ----------------------------------------------------------------------------------------- } @@ -323,17 +307,6 @@ function serverCmdScopeCommanderMap(%client, %scope) %client.player.ccActive = %scope; } -//Mortar Throw Reload Fix -// function ShapeBase::throwWeapon(%this) -// { -// if((%this.getMountedImage($WeaponSlot).getName() $= "MortarImage" || %this.getMountedImage($WeaponSlot).getName() $= "MissileLauncherImage" || %this.getMountedImage($WeaponSlot).getName() $= "ShockLanceImage") && -// (%this.getImageState($WeaponSlot) $= "Reload" || %this.getImageState($WeaponSlot) $= "Fire")){ -// return; -// } - -// parent::throwWeapon(%this); -// } - // Added object check function VehicleData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %theClient, %proj) @@ -433,4 +406,4 @@ if (!isActivePackage(TacoOverrides)) // %z = getWord(%impulseVec, 2) / %data.mass; // %vel = %x SPC %y SPC %z; // %this.setVelocity(vectorAdd(%this.getVelocity(), %vel)); -// } \ No newline at end of file +// } diff --git a/Classic/scripts/autoexec/TeamManagement.cs b/Classic/scripts/autoexec/TeamManagement.cs index 8785f05..5862199 100644 --- a/Classic/scripts/autoexec/TeamManagement.cs +++ b/Classic/scripts/autoexec/TeamManagement.cs @@ -42,7 +42,7 @@ function GetTeamCounts(%game) if($countdownStarted && $MatchStarted) { //Variables - $TotalTeamPlayerCount = $TeamRank[1, count] + $TeamRank[2, count]; + $TotalTeamPlayerCount = (Game.class $= "LakRabbitGame") ? $TeamRank[0, count] : ($TeamRank[1, count] + $TeamRank[2, count]); $AllPlayerCount = $HostGamePlayerCount; //Observers diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index 0cddec6..8c6f300 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -51,10 +51,12 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) { if(!$Host::TournamentMode) 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, 'VoteNextMission', 'set next mission to', 'Vote to Set the Next Mission'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' ); + if(!$MatchStarted && !$CountdownStarted && $Host::TournamentMode) + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteMatchStart', 'Start Match', 'Vote to Start the Match'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteNextMission', 'set next mission to', 'Vote to Set the Next Mission'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' ); if(%multipleTeams) { if($teamDamage) @@ -86,23 +88,26 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) //Mission Info Header - Mission Name, Type, Caps to Win if(%client.canVote && %game.scheduleVote $= "") { + if($voteNext) + %showNM = " - Next Map:" SPC $HostMissionName[$voteNextMap] SPC "(" @ $HostTypeName[$voteNextType] @ ")"; + switch$($CurrentMissionType) { - case CTF or SCtF or LCTF: - if($Host::TournamentMode) - %showTL = " - Time Limit:" SPC $Host::TimeLimit SPC "Minutes"; - if($voteNext) - %showNM = " - Next Map:" SPC $HostMissionName[$voteNextMap] SPC "(" @ $HostTypeName[$voteNextType] @ ")"; + case CTF or SCtF or LCTF: + %showTL = " - Time Limit:" SPC $Host::TimeLimit SPC "Minutes"; 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" @ %showTL @ %showNM); case LakRabbit: %cap = "2000 Points to Win"; messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap, - $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap); + $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap @ %showNM); case DM: %cap = "25 Points to Win"; messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap, - $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap); + $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap @ %showNM); + default: + messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap, + $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ ")" @ %showNM); } } @@ -481,19 +486,8 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % } else //is an admin { - if($Host::TournamentMode) //Admins still have the option to set the time to 30 minutes in Tourney Mode - { - if(%arg1 !$= "30") //30 minutes only - { - messageClient(%client, "", "\c2Invalid time selection."); - return; - } - } - else - { - messageClient(%client, "", "\c2Invalid time selection."); - return; - } + messageClient(%client, "", "\c2Invalid time selection."); + return; } } @@ -508,14 +502,12 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % { if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1; %msg = %client.nameBase @ " initiated a vote to change the time limit to " @ %time SPC "minutes."; - // VoteOvertime - StartVOTimeVote(%game); $CMHasVoted[%client.guid]++; } case "VoteMatchStart": - if(!%isAdmin) + if(!%isAdmin || (%isAdmin && %client.ForceVote)) { if($MatchStarted || $CountdownStarted) return; @@ -589,11 +581,12 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % case "stopRunningVote": if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote)) { - if($VOStatus $="InProgress") //Dont allow a stop vote after time has expired, then no new time is set - VoteOverTime - { - messageClient(%client, "", "\c2Can't stop time vote after time has expired."); - return; - } + // %curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime(); + // if(%curTimeLeftMS <= 0) //Dont allow a stop vote after time has expired, then no new time is set - VoteOverTime + // { + // messageClient(%client, "", "\c2Can't stop vote after time has expired."); + // return; + // } stopCurrentVote(%client); adminLog(%client, " stopped the vote in progress."); @@ -829,21 +822,21 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % // LakRabbit Stuff case "VoteDuelMode": - if(!$CurrentMissionType $= "LakRabbit") + if($CurrentMissionType !$= "LakRabbit") return; if(!%isAdmin || (%isAdmin && %client.ForceVote)) %msg = %client.nameBase @ " initiated a vote to " @ (Game.duelMode == 0 ? "enable" : "disable") @ " duel mode."; case "VoteSplashDamage": - if(!$CurrentMissionType $= "LakRabbit") + if($CurrentMissionType !$= "LakRabbit") return; if(!%isAdmin || (%isAdmin && %client.ForceVote)) %msg = %client.nameBase @ " initiated a vote to " @ (Game.noSplashDamage == 1 ? "enable" : "disable") @ " splash damage."; case "VotePro": - if(!$CurrentMissionType $= "LakRabbit") + if($CurrentMissionType !$= "LakRabbit") return; if(!%isAdmin || (%isAdmin && %client.ForceVote)) @@ -851,7 +844,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % //Deathmatch Stuff case "DMSLOnlyMode": - if(!$CurrentMissionType $= "DM") + if($CurrentMissionType !$= "DM") return; if(!%isAdmin || (%isAdmin && %client.ForceVote)) @@ -859,12 +852,22 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % //LCTF Stuff case "LCTFProMode": - if(!$CurrentMissionType $= "LCTF") + if($CurrentMissionType !$= "LCTF") return; if(!%isAdmin || (%isAdmin && %client.ForceVote)) %msg = %client.nameBase @ " initiated a vote to " @ (Game.LCTFProMode == 0 ? "enable" : "disable") @ " pro mode."; + case "LCTFOneMine": + if($CurrentMissionType !$= "LCTF") + return; + + if($InvBanList[LCTF, "Mine"]) + messageClient(%client, "", "\c2Mines are disabled at this time."); + + if(!%isAdmin || (%isAdmin && %client.ForceVote)) + %msg = %client.nameBase @ " initiated a vote to " @ (Game.LCTFOneMine == 1 ? "enable" : "disable") @ " one mine mode."; + case "showServerRules": if (($Host::ServerRules[1] !$= "") && (!%client.CantView)) { @@ -1208,7 +1211,8 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit ) { messageAll( 'MsgAdminForce', '\c2The Admin %2 changed the mission time limit to %1 minutes.', %display, %admin.name ); $Host::TimeLimit = %newLimit; - adminLog(%admin, " has changed the mission time limit to " @ %display @ " minutes."); + adminLog(%admin, " has changed the mission time limit to " @ %display @ " minutes."); + $TimeLimitChanged = 1; } else { @@ -1218,9 +1222,7 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit ) { messageAll('MsgVotePassed', '\c2The mission time limit was set to %1 minutes by vote.', %display); $Host::TimeLimit = %newLimit; - // VoteOvertime - ResetVOTimeChanged(%game); - // Reset the voted time limit when changing mission + // Reset the voted time limit when changing mission $TimeLimitChanged = 1; //Log Vote % @@ -1238,9 +1240,6 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit ) 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 - ResetVOall(%game); } } @@ -1923,4 +1922,4 @@ function DefaultGame::setNextMission(%game, %client, %map, %type, %mapIndex, %ty 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); } } -} +} \ No newline at end of file diff --git a/Classic/scripts/autoexec/VoteOverTime.cs b/Classic/scripts/autoexec/VoteOverTime.cs deleted file mode 100644 index 70eb648..0000000 --- a/Classic/scripts/autoexec/VoteOverTime.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Vote OverTime Script -// -// Dont allow the match to end if a time vote is pending -// Or if the timelimit has changed -// -// Changes were also made in how time votes are handled in scripts/autoexec/VoteMenu.cs -// DefaultGame::voteChangeMission, DefaultGame::voteChangeTimeLimit, serverCmdStartNewVote -// -// The VoteChangeTimeLimit functions in evo dictate VOStatus conditions - -$VOStatus = "Normal"; - -package VoteOverTime -{ - -function DefaultGame::checkTimeLimit(%game, %forced) -{ - // Don't add extra checks: - if ( %forced ) - cancel( %game.timeCheck ); - - // if there is no time limit, check back in a minute to see if it's been set - if(($Host::TimeLimit $= "") || $Host::TimeLimit == 0) - { - %game.timeCheck = %game.schedule(20000, "checkTimeLimit"); - return; - } - - %curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime(); - - if (%curTimeLeftMS <= 0) - { - //Vote Overtime - //Check if Time Vote is starting or active or if the timelimit has changed. - //If the timelimit has changed, don't end the game. - switch$($VOStatus) - { - case Starting: - if($missionRunning) - { - messageAll('', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav', %display); - $VOStatus = "InProgress"; - } - case InProgress: - //Do Nothing - case TimeChanged: - //Do Nothing - case Normal: - // time's up, put down your pencils - %game.timeLimitReached(); - } - } - else - { - if(%curTimeLeftMS >= 20000) - %game.timeCheck = %game.schedule(20000, "checkTimeLimit"); - else - %game.timeCheck = %game.schedule(%curTimeLeftMS + 1, "checkTimeLimit"); - - //now synchronize everyone's clock - messageAll('MsgSystemClock', "", $Host::TimeLimit, %curTimeLeftMS); - } -} - -function DefaultGame::gameOver(%game) -{ - Parent::gameOver(%game); - - //Reset everything to do with Vote Overtime - ResetVOall(%game); -} - -}; - -// Various Flags for the different situations -// Starting a TimeVote - Sets flags so the game wont end during this vote -function StartVOTimeVote(%game) -{ - if(!$Host::TournamentMode) - $VOStatus = "Starting"; -} - -// Tribes wont change the time after its reached zero and you cant change it again afterwards until a gameover/map change. -// But this serves its purpose for extending the game whether it works (technically) or not. -function ResetVOTimeChanged(%game) -{ - $VOStatus = "TimeChanged"; -} - -// Reset everything. So everything functions normally after a map change. -function ResetVOall(%game) -{ - $VOStatus = "Normal"; -} - - -// Prevent package from being activated if it is already -if (!isActivePackage(VoteOverTime)) - activatePackage(VoteOverTime); diff --git a/Classic/scripts/autoexec/flagTunnelingFix.cs b/Classic/scripts/autoexec/flagTunnelingFix.cs index 3a1d66b..3012bdb 100644 --- a/Classic/scripts/autoexec/flagTunnelingFix.cs +++ b/Classic/scripts/autoexec/flagTunnelingFix.cs @@ -1,6 +1,11 @@ //Fixes for collision tunneling and other issues, note only tested in classic //Script By:DarkTiger -//v3.4 switch over to using SAT/OBB for hitbox detection accuracy, also heavy optimizations becuase of this change +//v4.3 - logic rework remove any skips in the checks +//v3.8 - removed sweep optimization/ bug fix in old method +//v3.7 - removed bypass code +//v3.6 - lctf and SCtFGame +//v3.5 - tweaks +//v3.4 - switch over to using SAT/OBB for hitbox detection accuracy, also heavy optimizations becuase of this change //v3.3 - fixed ceiling deadstoping,fixed wall and ceiling tunneling $antiObjTunnel //V3.2 - script refactor, removed flag sim in favor of just an offset on toss @@ -27,21 +32,11 @@ $flagCheckRadius = 50; $playerSizeBox = "1.2 1.2 2.3"; $flagBoxSize = "0.796666 0.139717 2.46029"; +$boxCollision = 0; //0 = old AABB method uses fixed box size makes the player bit narrow //1 = new OBB method uses perfect box intersection -//2 = AABB method but uses boundbox can make the player larger then it is given there direction -//3 = AABB fixed sizes uses $playerSizeBox and $flagBoxSize to do the box checking -$boxCollision = 1;// off is the old AABB method aka the old method -$flagColBypass = 0;//bypass all other collision methods other then this one package flagFix{ - //because the fade is 2000ms we can compensate the delayed reset not to mess with client timers - function Flag::onCollision(%data,%obj,%col){ - if(!$flagColBypass){ - parent::onCollision(%data,%obj,%col); - } - } - function ShapeBase::throwObject(%this,%obj){ parent::throwObject(%this,%obj); %data = %obj.getDatablock(); @@ -87,6 +82,15 @@ package flagFix{ } } + function LCTFGame::startMatch(%game){ + parent::startMatch(%game); + if(!isEventPending(Game.flagLoop)){ + $TeamFlag[1].resetTime = 0; + $TeamFlag[2].resetTime = 0; + %game.atHomeFlagLoop(); + } + } + function SCtFGame::startMatch(%game){ parent::startMatch(%game); if(!isEventPending(Game.flagLoop)){ @@ -117,6 +121,17 @@ package flagFix{ parent::playerTouchFlag(%game, %player, %flag); } + function LCTFGame::playerTouchFlag(%game, %player, %flag){ + if(%flag.lastFlagCallms > 0 && $limitFlagCalls){ + %timeDif = getSimTime() - %flag.lastFlagCallms; + if(%timeDif < 32){ + return; + } + } + %flag.lastFlagCallms = getSimTime(); + parent::playerTouchFlag(%game, %player, %flag); + } + function SCtFGame::playerTouchFlag(%game, %player, %flag){ if(%flag.lastFlagCallms > 0 && $limitFlagCalls){ %timeDif = getSimTime() - %flag.lastFlagCallms; @@ -145,6 +160,12 @@ package flagFix{ parent::playerDroppedFlag(%game, %player); } + function LCTFGame::playerDroppedFlag(%game, %player){ + %flag = %player.holdingFlag; + %flag.lastDropTime = getSimTime(); + parent::playerDroppedFlag(%game, %player); + } + function SCtFGame::playerDroppedFlag(%game, %player){ %flag = %player.holdingFlag; %flag.lastDropTime = getSimTime(); @@ -170,75 +191,16 @@ package flagFix{ }; activatePackage(flagFix); -function FlagCollision(%data,%obj,%col){ - if($flagColBypass){ - if (%col.getDataBlock().className $= Armor) - { - if (%col.isMounted()) - return; - - // z0dd - ZOD, 6/13/02. Touch the flag and your invincibility and cloaking goes away. - if(%col.station $= "" && %col.isCloaked()) - { - if( %col.respawnCloakThread !$= "" ) - { - Cancel(%col.respawnCloakThread); - %col.setCloaked( false ); - %col.respawnCloakThread = ""; - } - } - if( %col.client > 0 ) - { - %col.setInvincibleMode(0, 0.00); - %col.setInvincible( false ); - } - - // a player hit the flag - Game.playerTouchFlag(%col, %obj); - } - } - else{ - %data.onCollision(%flag, %player); - } -} - -function vectorMul(%a,%b){ - %x = getWords(%a,0) * getWords(%b,0); - %y = getWords(%a,1) * getWords(%b,1); - %z = getWords(%a,2) * getWords(%b,2); - return %x SPC %y SPC %z; -} - function generateBoxData(){ + %halfSize = vectorScale($playerSizeBox, 0.5); + $plrBoxMin = getWords(VectorSub("0 0 0", %halfSize),0,1) SPC 0; + $plrBoxMax = getWords(%halfSize,0,1) SPC getWord($playerSizeBox,2); + $plrBox = $plrBoxMin SPC $plrBoxMax; - %playerSize = $playerSizeBox; //"1.2 1.2 2.3"; - %halfSize = vectorMul(%playerSize, "0.5 0.5 0"); - $plrBoxMin = %minA = VectorSub("0 0 0", %halfSize); - $plrBoxMax = %maxA = getWords(%halfSize,0,1) SPC getWord(%playerSize,2); - $plrBox = %minA SPC %maxA; - %vSubA = vectorSub(%maxA, %minA); - - %flagSize = $flagBoxSize; - %halfSize = vectorMul(%flagSize, "0.5 0.5 0"); - $flagBoxMin = %minB = VectorSub("0 0 -0.1", %halfSize); - $flagBoxMax = %maxB = getWords(%halfSize,0,1) SPC getWord(%flagSize,2); - $flagBox = %minB SPC %maxB; - %vSubB = vectorSub(%maxB, %minB); - - %box[0] = "0 0 0"; - %box[1] = "1 0 0"; - %box[2] = "0 1 0"; - %box[3] = "1 1 0"; - %box[4] = "0 0 1"; - %box[5] = "1 0 1"; - %box[6] = "0 1 1"; - %box[7] = "1 1 1"; - - for(%i = 0; %i < 8; %i++){ - $playerBoxData[%i] = vectorAdd(%minA, vectorMul(%vSubA, %box[%i])); - $flagBoxData[%i] = vectorAdd(%minB, vectorMul(%vSubB, %box[%i])); - } - + %halfSize = vectorScale($flagBoxSize, 0.5); + $flagBoxMin = getWords(VectorSub("0 0 0", %halfSize),0,1) SPC 0; + $flagBoxMax = getWords(%halfSize,0,1) SPC getWord($flagBoxSize,2); + $flagBox = $flagBoxMin SPC $flagBoxMax; }generateBoxData(); function vectorLerp(%point1, %point2, %t) { @@ -246,11 +208,8 @@ function vectorLerp(%point1, %point2, %t) { } function boxIntersectAABB(%plr, %flg, %lerpPos){ - if($boxCollision == 2){ - %a = %plr.getWorldBox(); - %b = %flg.getWorldBox(); - } - else if($boxCollision == 3){ + %testMode = 0; + if(%testMode == 1){ %fpos = %flg.getPosition(); %a = vectorAdd($plrBoxMin, %lerpPos) SPC vectorAdd($plrBoxMax, %lerpPos); @@ -267,7 +226,7 @@ function boxIntersectAABB(%plr, %flg, %lerpPos){ (getWord(%a, 2)<= getWord(%b, 5) && getWord(%a, 5) >= getWord(%b, 2)); } -function DefaultGame::flagColTest(%game, %flag, %rsTeam, %ext){ +function DefaultGame::flagColTest(%game, %flag, %rsTeam,%fc){ //////////////////////////////////////////////////////////////////////////////// //obj tunneling check %flagPos = %flag.getPosition(); @@ -290,38 +249,32 @@ function DefaultGame::flagColTest(%game, %flag, %rsTeam, %ext){ InitContainerRadiusSearch( %flagPos, $flagCheckRadius, $TypeMasks::PlayerObjectType); while((%player = containerSearchNext()) != 0){ %playerPos = %player.getPosition(); - if((%rsTeam && %flag.team != %player.team) || !%rsTeam || %player == %ext){ - %flagDist = vectorDist(%flagPos, %playerPos); - if(%player.lastSim > 0 && (%player.getState() !$= "Dead")){// only check at speed - //%fdot = vectorDot(vectorNormalize(%player.getVelocity()),vectorNormalize(VectorSub(%flagPos, %playerPos))); - // %tickDist = vectorLen(%player.getVelocity()) * ($flagSimTime/1000); - %sweepCount = mFloor(vectorDist(%playerPos, %player.oldPos) + 1.5); - if((getSimTime() - %player.lastSim) <= 128 && %flagDist-2 < %sweepCount){//make sure are last position is valid - //error(%player SPC %flagDist SPC %sweepCount); - for(%i = 0; %i < %sweepCount; %i++){// sweep behind us to see if we should have hit something - %lerpPos = vectorLerp(%playerPos, %player.oldPos, %i/(%sweepCount-1));//back sweep - if($boxCollision == 1){ - if(boxIntersect(%player, %flag, %lerpPos)){ - //error("flag hit"); - FlagCollision(%flag.getDataBlock(),%flag, %player); - break; - } - } - else{ - if(boxIntersectAABB(%player, %flag, %lerpPos)){ - //error("flag hit"); - FlagCollision(%flag.getDataBlock(),%flag, %player); - break; - } - } - } + //%toPlayer = vectorNormalize(vectorSub(%flagPos,%playerPos)); + //%moveDir = vectorNormalize(%player.getVelocity()); + //%d = vectorDot( %toPlayer, %moveDir ); + if(((%flag.team != %player.team) || !%rsTeam || %fc == %player) && %player.getState() !$= "Dead"){ + //%futurePos = vectorAdd(%playerPos, vectorScale(%player.getVelocity(), $flagSimTime / 1000)); + if(%player.lastSim[%flag] $= "" || (getSimTime() - %player.lastSim[%flag]) >= 128){ + %lastPos = vectorSub(%playerPos, vectorScale(%player.getVelocity(), $flagSimTime / 1000)); + %player.oldPos[%flag] = %lastPos;// old data so lets do it velocity based + } + %sweepCount = mFloor(vectorDist(%playerPos, %player.oldPos[%flag]) + 1);// min of 2 + for(%i = 0; %i < %sweepCount; %i++){// sweep behind us to see if we should have hit something + %lerpPos = vectorLerp(%playerPos, %player.oldPos[%flag], %i/(%sweepCount-1));//back sweep + if($boxCollision == 1 && boxIntersect(%player, %flag, %lerpPos)){ + %flag.getDataBlock().onCollision(%flag, %player); + break; + } + else if(!$boxCollision && boxIntersectAABB(%player, %flag, %lerpPos)){ + %flag.getDataBlock().onCollision(%flag, %player); + //error("hit" SPC %player.count++); + break; } } } - %player.oldPos = %playerPos; - %player.lastSim = getSimTime(); + %player.oldPos[%flag] = %playerPos; + %player.lastSim[%flag] = getSimTime(); } - //error("scan count" SPC %scanCount SPC %scanPlrCount); } function DefaultGame::atHomeFlagLoop(%game){ @@ -339,13 +292,16 @@ function DefaultGame::atHomeFlagLoop(%game){ %game.flagResetTime += $flagSimTime; } + //%game.flagColTest($TeamFlag[1]); + //%game.flagColTest($TeamFlag[2]); + if($TeamFlag[1].isHome && $TeamFlag[2].isHome){//11 %game.flagColTest($TeamFlag[1],1,0);// only look at the other team %game.flagColTest($TeamFlag[2],1,0);// only look at the other team } else if(!$TeamFlag[1].isHome && $TeamFlag[2].isHome){//01 if(isObject($TeamFlag[1].carrier)){// flag has been dropped - %game.flagColTest($TeamFlag[2],1, $TeamFlag[1].carrier); //scan for other team expect for are carrier + %game.flagColTest($TeamFlag[2],1,$TeamFlag[1].carrier); //scan for other team expect for are carrier } else{ %game.flagColTest($TeamFlag[1],0,0);// scan for everyone can touch it @@ -354,7 +310,7 @@ function DefaultGame::atHomeFlagLoop(%game){ } else if($TeamFlag[1].isHome && !$TeamFlag[2].isHome){//10 if(isObject($TeamFlag[2].carrier)){// flag has been dropped - %game.flagColTest($TeamFlag[1],1, $TeamFlag[2].carrier); //scan for other team expect for are carrier + %game.flagColTest($TeamFlag[1],1,$TeamFlag[2].carrier); //scan for other team expect for are carrier } else{ %game.flagColTest($TeamFlag[1],1,0);// team 1 flag is still at home so only scan for the other team @@ -363,10 +319,10 @@ function DefaultGame::atHomeFlagLoop(%game){ } else if(!$TeamFlag[1].isHome && !$TeamFlag[2].isHome){//00 if(!isObject($TeamFlag[1].carrier)){// flag has been dropped - %game.flagColTest($TeamFlag[1],0,0);// scan for everyone can touch it + %game.flagColTest($TeamFlag[1],0);// scan for everyone can touch it } if(!isObject($TeamFlag[2].carrier)){// flag has been dropped - %game.flagColTest($TeamFlag[2],0,0);// scan for everyone can touch it + %game.flagColTest($TeamFlag[2],0);// scan for everyone can touch it } } } @@ -450,22 +406,9 @@ function boxIntersect(%objA, %objB, %scanPos) { return true; // Overlap on all axes, boxes intersect } -function colFlagTest(){ - %conObj = LocalClientConnection.player; //LocalClientConnection.getControlObject(); - %flag1 = boxIntersect(%conObj,$TeamFlag[1]); - %flag2 = boxIntersect(%conObj,$TeamFlag[2]); - - %flag1AABB = boxIntersectAABB(%conObj, $TeamFlag[1], %conObj.getPosition()); - %flag2AABB = boxIntersectAABB(%conObj, $TeamFlag[2], %conObj.getPosition()); - - error("test" SPC "Flag 1" SPC %flag1 SPC "Flag 2" SPC %flag2); - error("test" SPC "Flag 1A" SPC %flag1AABB SPC "Flag 2A" SPC %flag2AABB); - bottomprint(%conObj.client, "FlagS" SPC %flag1 SPC "FlagI" SPC %flag2 SPC "FlagS AABB" SPC %flag1AABB SPC "FlagI AABB" SPC %flag2AABB, 5, 1); -} - function testFlagSpeed(%speed){ %player = LocalClientConnection.player; %fvec = %player.getForwardVector(); %vel = vectorScale(%fvec,%speed); %player.setVelocity(%vel); -} \ No newline at end of file +} diff --git a/Classic/scripts/autoexec/spawnDir.cs b/Classic/scripts/autoexec/spawnDir.cs new file mode 100644 index 0000000..2f3b0cd --- /dev/null +++ b/Classic/scripts/autoexec/spawnDir.cs @@ -0,0 +1,107 @@ +// points players in the diretion of the enemy flag home position when outdoors +// Script By: DarkTiger +// version 1.0 + +function CTFGame::pickTeamSpawn(%game, %team) { + return %game.pickTeamSpawnRot(%team); +} +function LCTFGame::pickTeamSpawn(%game, %team) { + return %game.pickTeamSpawnRot(%team); +} +function SCtFGame::pickTeamSpawn(%game, %team) { + return %game.pickTeamSpawnRot(%team); +} + +function DefaultGame::pickTeamSpawnRot(%game, %team){ +// early exit if no nav graph + if (!navGraphExists()) + { + echo("No navigation graph is present. Build one."); + return -1; + } + + for (%attempt = 0; %attempt < 20; %attempt++) + { + // finds a random spawn sphere + // selects inside/outside on this random sphere + // if the navgraph exists, then uses it to grab a random node as spawn + // location/rotation + %sphere = %game.selectSpawnSphere(%team); + if (%sphere == -1) + { + echo("No spawn spheres found for team " @ %team); + return -1; + } + + %zone = %game.selectSpawnZone(%sphere); + %useIndoor = %zone; + %useOutdoor = !%zone; + if (%zone) + %area = "indoor"; + else + %area = "outdoor"; + + %radius = %sphere.radius; + %sphereTrans = %sphere.getTransform(); + %sphereCtr = getWord(%sphereTrans, 0) @ " " @ getWord(%sphereTrans, 1) @ " " @ getWord(%sphereTrans, 2); //don't need full transform here, just x, y, z + //echo("Selected Sphere is " @ %sphereCtr @ " with a radius of " @ %radius @ " meters. Selecting from " @ %area @ " zone."); + + %avoidThese = $TypeMasks::VehicleObjectType | $TypeMasks::MoveableObjectType | + $TypeMasks::PlayerObjectType | $TypeMasks::TurretObjectType; + + for (%tries = 0; %tries < 10; %tries++) + { + %nodeIndex = navGraph.randNode(%sphereCtr, %radius, %useIndoor, %useOutdoor); + if (%nodeIndex >= 0) + { + %loc = navGraph.randNodeLoc(%nodeIndex); + %adjUp = VectorAdd(%loc, "0 0 1.0"); // don't go much below + + if (ContainerBoxEmpty( %avoidThese, %adjUp, 2.0)) + break; + } + } + + if (%nodeIndex >= 0) + { + %loc = navGraph.randNodeLoc(%nodeIndex); + if (%zone)//spawn indoors + { + %fpos = getWords($TeamFlag[%team == 1 ? 2 : 1].originalPosition,0,2); + %flos = containerRayCast(vectorAdd(%loc,"0 0 1"), vectorAdd(%fpos, "0 0 1"), $TypeMasks::InteriorObjectType | $TypeMasks::StaticTSObjectType | $TypeMasks::ForceFieldObjectType); + if(%flos){// do we have anything inbetween us and the flag if not face it + if(vectorDist(%loc, getWords(%flos,1,3)) < 25){ + //error("indoor" SPC %loc); + %trns = %loc @ " 0 0 1 0"; + %spawnLoc = whereToLook(%trns); + return %spawnLoc; + } + } + //error("outdoor" SPC %loc); + %rot = %game.selectSpawnDir(%loc, %team, %zone); + %spawnLoc = %loc @ %rot; + return %spawnLoc; + } + //error("outdoor" SPC %loc); + %rot = %game.selectSpawnDir(%loc, %team, %zone); + %spawnLoc = %loc @ %rot; + return %spawnLoc; + } + } +} + +//face flag when spawn +function DefaultGame::selectSpawnDir(%game, %loc, %team, %zone){ + %team = %team == 1 ? 2 : 1; + %fpos = getWords($TeamFlag[%team].originalPosition,0,2); + //this used only when spawn loc is not on an interior. This points spawning player to the ctr of spawnshpere + %fpos = setWord(%fpos, 2, 0); + %loc = setWord(%loc, 2, 0); + + if(VectorDist(%loc, %fpos) == 0) + return " 0 0 1 0 "; + + %vec = VectorNormalize(VectorSub(%fpos, %loc)); + %angle = mAcos(getWord(%vec, 1)); + return (%loc < %fpos) ? (" 0 0 1 " @ %angle) : (" 0 0 1 " @ -%angle);// this works some how +} diff --git a/Classic/scripts/autoexec/zDebriefLoadingScreen.cs b/Classic/scripts/autoexec/zDebriefLoadingScreen.cs index b43ec39..f3396fd 100755 --- a/Classic/scripts/autoexec/zDebriefLoadingScreen.cs +++ b/Classic/scripts/autoexec/zDebriefLoadingScreen.cs @@ -51,7 +51,7 @@ // First Screen loading time (Map Screen) // If this is set too low the second screen wont show at all -$dtLoadingScreen::FirstScreen = 5500; +$dtLoadingScreen::FirstScreen = 3000; // Second Screen Delay $dtLoadingScreen::Delay = 0; @@ -149,6 +149,10 @@ if (!isActivePackage(LoadScreenPackage) && $Host::LoadingScreenUseDebrief) // Just make our own function ALTsendModInfoToClient(%client) { + if(%client.isReady){ + return; + } + // Wont allow Debrief on consecutive map loads if(%client.loaded) { diff --git a/Classic/scripts/autoexec/z_dtStats.cs b/Classic/scripts/autoexec/z_dtStats.cs index 3799ddf..a7e97cd 100644 --- a/Classic/scripts/autoexec/z_dtStats.cs +++ b/Classic/scripts/autoexec/z_dtStats.cs @@ -1,3 +1,5 @@ + + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Stats system for classic and base // Script BY: DarkTiger @@ -14,9 +16,10 @@ // Note See bottom of file for full log ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //-----------Settings----------- -$dtStats::version = 10.3; +$dtStats::version = 10.60; //disable stats system $dtStats::Enable = $Host::dtStatsEnable $= "" ? ($Host::dtStatsEnable = 1) : $Host::dtStatsEnable; +if(!$dtStats::Enable){ return;}// so it disables with a restart //set max number of individual game to record //Note only tested to 100 games, hard cap at 300 $dtStats::MaxNumOfGames = 100; @@ -26,17 +29,23 @@ $dtStats::midAirHeight = 10; //only enable if evo system is not available $dtStats::midAirMessage = $Host::dtStatsMidAirMessage $= "" ? ($Host::dtStatsMidAirMessage = 1) : $Host::dtStatsMidAirMessage; - +$dtStats::midAirMessage = isFile("scripts/autoexec/MidairDetection.cs") == 0 ? $dtStats::midAirMessage : 0; //capture best cap times restart required if changed //only enable if evo system is not available $dtStats::ctfTimes = $Host::dtStatsCTFTimes $= "" ? ($Host::dtStatsCTFTimes = 1) : $Host::dtStatsCTFTimes; +$dtStats::ctfTimes = $Host::ClassicEvoStats $= "" ? $dtStats::ctfTimes : 0; + //number of players before it starts counting captimes $dtStats::ctfTimesPlayerLimit = $Host::dtStatsCTFTimesPlayerLimit $= "" ? ($Host::dtStatsCTFTimesPlayerLimit = 8) : $Host::dtStatsCTFTimesPlayerLimit; //converts the debrief into easer to read teams for ctf and lctf $dtStats::teamDebrief = $Host::dtStatsTeamDebrief $= "" ? ($Host::dtStatsTeamDebrief = 1) : $Host::dtStatsTeamDebrief; +$dtStats::teamDebrief = isFile("scripts/autoexec/EvoStats.cs") == 0 ? $dtStats::teamDebrief : 0; + //extends the debrief with extra stats done in the evo style $dtStats::evoStyleDebrief = $Host::dtStatsEvoStyleDebrief $= "" ? ($Host::dtStatsEvoStyleDebrief = 1) : $Host::dtStatsEvoStyleDebrief ; +$dtStats::evoStyleDebrief = isFile("scripts/autoexec/EvoStats.cs") == 0 ? $dtStats::evoStyleDebrief : 0; + // 30 sec min after not making an action reset $dtStats::returnToMenuTimer = (60*1000); @@ -48,12 +57,14 @@ $dtStats::saveTime = 64; //Note atm tournament stats is hard coded and setup only for CTF //outputs a ppm image in serverStats/statsImg this can be open/converted with most editors $dtStats::tmModeCompile = 1; - +$dtStats::tmMode =0; //minimum number avg data to consider for leaderboards -$dtStats::minAvg = 8; +$dtStats::minAvg = 4; //minimum number of games for leaderboards -$dtStats::minGame = 2; +$dtStats::minGame = 1; + +$dtStats::TBMinPlayers = 8; //sorting speed $dtStats::sortSpeed = 64; @@ -72,15 +83,15 @@ $dtStats::IPBanListFile = $Host::dtStatsIPBanListFile $= "" ? ($Host::dtStatsIPB $dtStats::WhtListFile = $Host::dtStatsWhtListFile $= "" ? ($Host::dtStatsWhtListFile = "prefs/whtList.cs") : $Host::dtStatsWhtListFile; - //File maintainers to deletes old files $dtStats::fm = 1; //Set 2 or more to enable, this also contorls how much history you want, best to keep this count low -$dtStats::day = 0;//-365 +$dtStats::day = 0;//not used $dtStats::week = 0;//~53 -$dtStats::month = 3; //-12 -$dtStats::quarter = 0;//-4 -$dtStats::year = 0;// number of years +$dtStats::month = 4; //-12 +$dtStats::quarter = 0;//not used +$dtStats::year = 0;//not +$dtStats::custom = 12;//not used // you gain extra days based on time played extra days = gameCount * expireFactor; // example being 100 games * factor of 0.596 = will gain you 60 extra days but if its over the 90 day max it will be deleted $dtStats::expireMax = 90; @@ -94,15 +105,11 @@ $dtStats::expireFactor["ArenaGame"] = 2; $dtStats::expireFactor["SiegeGame"] = 10; //debug stuff +$dtStats::dev = isFile("scripts/autoexec/dev.cs"); $Host::ShowIngamePlayerScores = 1; $dtStats::enableRefresh = 0;// keep off unless testing, auto updates the score hud when open -$dtStats::debugEchos = 0;// echos function calls -//$dtStats::returnToMenuTimer = (60*1000); -$pref::NoClearConsole = 1; -//setLogMode(1); -//$AIDisableChat = 1; -//dbgSetParameters(6060,"password"); - +$dtStats::debugEchos = $dtStats::dev;// echos function calls +$dtStats::returnToMenuTimer = ($dtStats::dev == 1) ? ((60*1000) * 30) : ((60*1000)* 2); //--------------------------------- // Torque Markup Language - TML @@ -110,7 +117,7 @@ $pref::NoClearConsole = 1; //--------------------------------- //Sets the current font to the indicated name and size. Example: //Set a tag to which we can scroll a GuiScrollContentCtrl (parent control of the guiMLTextCtrl) -//Sets text color. Example: will display red text. +//Sets text color. Example: will display red text. //Sets the color of a hyperlink. //Sets the color of a hyperlink that is being clicked. //Add a shadow to the text, displaced by (x, y). @@ -153,25 +160,29 @@ $dtStats::gameType[0] = "CTFGame"; $dtStats::gameType[1] = "LakRabbitGame"; $dtStats::gameType[2] = "DMGame"; $dtStats::gameType[3] = "LCTFGame"; -$dtStats::gameType[4] = "ArenaGame"; -$dtStats::gameType[5] = "SCtFGame"; +$dtStats::gameType[4] = "SCtFGame"; +$dtStats::gameType[5] = "ArenaGame"; //$dtStats::gameType[5] = "SiegeGame"; -$dtStats::gameTypeCount = 5; +$dtStats::gameTypeCount = 6; //short hand name $dtStats::gtNameShort["CTFGame"] = "CTF"; $dtStats::gtNameShort["LakRabbitGame"] = "LakRabbit"; $dtStats::gtNameShort["DMGame"] = "DM"; $dtStats::gtNameShort["LCTFGame"] = "LCTF"; -$dtStats::gtNameShort["ArenaGame"] = "Arena"; $dtStats::gtNameShort["SCtFGame"] = "LCTF"; +$dtStats::gtNameShort["ArenaGame"] = "Arena"; //$dtStats::gtNameShort["SiegeGame"] = "Siege"; + +$dtStats::gtNameType["CTF"] = "CTFGame"; +$dtStats::gtNameType["LCTF"] = "SCtFGame"; +$dtStats::gtNameType["Arena"] = "ArenaGame"; //Display name $dtStats::gtNameLong["CTFGame"] = "Capture the Flag"; $dtStats::gtNameLong["LakRabbitGame"] = "LakRabbit"; $dtStats::gtNameLong["DMGame"] = "Deathmatch"; $dtStats::gtNameLong["LCTFGame"] = "Light CTF"; -$dtStats::gtNameLong["ArenaGame"] = "Arena"; $dtStats::gtNameLong["SCtFGame"] = "Light CTF"; +$dtStats::gtNameLong["ArenaGame"] = "Arena"; //$dtStats::gtNameLong["SiegeGame"] = "Siege"; //varTypes @@ -337,7 +348,7 @@ $dtStats::FV[$dtStats::FC["CTFGame","TG"]++,"CTFGame","TG"] = "heavyTransportDes $dtStats::FV[$dtStats::FC["CTFGame","TG"]++,"CTFGame","TG"] = "stalemateReturn"; $dtStats::FV[$dtStats::FC["CTFGame","TG"]++,"CTFGame","TG"] = "flagTimeMin"; - +$dtStats::FV[$dtStats::FC["CTFGame","TG"]++,"CTFGame","TG"] = "flagGrabAtStand"; /////////////////////////////////////////////////////////////////////////////// // LCTF @@ -434,7 +445,7 @@ $dtStats::FV[$dtStats::FC["LCTFGame","TG"]++,"LCTFGame","TG"] = "timeFarEnemyFS" $dtStats::FV[$dtStats::FC["LCTFGame","TG"]++,"LCTFGame","TG"] = "timeNearFlag"; $dtStats::FV[$dtStats::FC["LCTFGame","TG"]++,"LCTFGame","TG"] = "timeNearEnemyFlag"; $dtStats::FV[$dtStats::FC["LCTFGame","TG"]++,"LCTFGame","TG"] = "flagTimeMin"; - +$dtStats::FV[$dtStats::FC["LCTFGame","TG"]++,"LCTFGame","TG"] = "flagGrabAtStand"; ////////////////////////////////////////////////////////////////////////////////// $dtStats::FVG[$dtStats::FCG["SCtFGame","TG"]++,"SCtFGame","TG"] = "score"; $dtStats::FVG[$dtStats::FCG["SCtFGame","Avg"]++,"SCtFGame","Avg"] = "score"; @@ -528,10 +539,11 @@ $dtStats::FV[$dtStats::FC["SCtFGame","TG"]++,"SCtFGame","TG"] = "timeFarEnemyFS" $dtStats::FV[$dtStats::FC["SCtFGame","TG"]++,"SCtFGame","TG"] = "timeNearFlag"; $dtStats::FV[$dtStats::FC["SCtFGame","TG"]++,"SCtFGame","TG"] = "timeNearEnemyFlag"; $dtStats::FV[$dtStats::FC["SCtFGame","TG"]++,"SCtFGame","TG"] = "flagTimeMin"; +$dtStats::FV[$dtStats::FC["SCtFGame","TG"]++,"SCtFGame","TG"] = "flagGrabAtStand"; /////////////////////////////////////////////////////////////////////////////// // LakRabbit /////////////////////////////////////////////////////////////////////////////// -//Game type values - out of LakRabbitGame.cs +//Game type values - out of LakRabbitGame.cs %client.dtStats.stat["score"] = %client.score; $dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "score"; $dtStats::FVG[$dtStats::FCG["LakRabbitGame","Avg"]++,"LakRabbitGame","Avg"] = "score"; $dtStats::FVG[$dtStats::FCG["LakRabbitGame","Max"]++,"LakRabbitGame","Max"] = "score"; @@ -543,18 +555,17 @@ $dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "mor $dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "mas"; $dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "MidairflagGrabs"; $dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "MidairflagGrabPoints"; +$dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "flagTimeMS"; +$dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "totalChainAccuracy"; +$dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "totalChainHits"; +$dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "totalSnipeHits"; +$dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "totalSnipes"; +$dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "totalSpeed"; +$dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "totalDistance"; +$dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "totalShockHits"; +$dtStats::FVG[$dtStats::FCG["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "totalShocks"; $dtStats::FV[$dtStats::FC["LakRabbitGame","TG"]++,"LakRabbitGame","TG"] = "flagTimeMin"; - -$dtStats::uGFV[$dtStats::uGFC["LakRabbitGame"]++,"LakRabbitGame"] = "flagTimeMS"; -$dtStats::uGFV[$dtStats::uGFC["LakRabbitGame"]++,"LakRabbitGame"] = "totalChainAccuracy"; -$dtStats::uGFV[$dtStats::uGFC["LakRabbitGame"]++,"LakRabbitGame"] = "totalChainHits"; -$dtStats::uGFV[$dtStats::uGFC["LakRabbitGame"]++,"LakRabbitGame"] = "totalSnipeHits"; -$dtStats::uGFV[$dtStats::uGFC["LakRabbitGame"]++,"LakRabbitGame"] = "totalSnipes"; -$dtStats::uGFV[$dtStats::uGFC["LakRabbitGame"]++,"LakRabbitGame"] = "totalSpeed"; -$dtStats::uGFV[$dtStats::uGFC["LakRabbitGame"]++,"LakRabbitGame"] = "totalDistance"; -$dtStats::uGFV[$dtStats::uGFC["LakRabbitGame"]++,"LakRabbitGame"] = "totalShockHits"; -$dtStats::uGFV[$dtStats::uGFC["LakRabbitGame"]++,"LakRabbitGame"] = "totalShocks"; /////////////////////////////////////////////////////////////////////////////// // DMGame /////////////////////////////////////////////////////////////////////////////// @@ -592,6 +603,14 @@ $dtStats::FV[$dtStats::FC["ArenaGame","TG"]++,"ArenaGame","TG"] = "timeOnTeamZer $dtStats::FV[$dtStats::FC["ArenaGame","TG"]++,"ArenaGame","TG"] = "timeOnTeamOne"; $dtStats::FV[$dtStats::FC["ArenaGame","TG"]++,"ArenaGame","TG"] = "timeOnTeamTwo"; $dtStats::FV[$dtStats::FC["ArenaGame","TG"]++,"ArenaGame","TG"] = "matchRunTime"; +$dtStats::FV[$dtStats::FC["ArenaGame","AVG"]++,"ArenaGame","AVG"] = "WLR"; +$dtStats::FV[$dtStats::FC["ArenaGame","AVG"]++,"ArenaGame","AVG"] = "discMARatio"; +$dtStats::FV[$dtStats::FC["ArenaGame","AVG"]++,"ArenaGame","AVG"] = "plasmaMARatio"; +$dtStats::FV[$dtStats::FC["ArenaGame","AVG"]++,"ArenaGame","AVG"] = "laserMARatio"; +$dtStats::FV[$dtStats::FC["ArenaGame","AVG"]++,"ArenaGame","AVG"] = "grenadeMARatio"; +$dtStats::FV[$dtStats::FC["ArenaGame","AVG"]++,"ArenaGame","AVG"] = "shockMARatio"; +$dtStats::FV[$dtStats::FC["ArenaGame","AVG"]++,"ArenaGame","AVG"] = "blasterMARatio"; + /////////////////////////////////////////////////////////////////////////////// // SiegeGame /////////////////////////////////////////////////////////////////////////////// @@ -655,9 +674,6 @@ $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "nexusCampingKills"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "inventoryKills"; - - - $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "cgDeaths"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "discDeaths"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "grenadeDeaths"; @@ -809,7 +825,7 @@ $dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "deadDist"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "missileTK"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "inventoryDeaths"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "repairEnemy"; - +$dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "revenge"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "shieldPackDmg"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "cloakerKills"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "cloakersKilled"; @@ -823,6 +839,7 @@ $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "flareKill"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "flareHit"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "discJump"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "killerDiscJump"; +$dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "discKillGround"; // nongame $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "leavemissionareaCount"; @@ -914,17 +931,7 @@ $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "mineCom"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "shockCom"; $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "satchelCom"; - //source kill velocity - note no mine -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "cgKillSV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "discKillSV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "grenadeKillSV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "laserKillSV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "mortarKillSV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "shockKillSV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "plasmaKillSV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "blasterKillSV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "hGrenadeKillSV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "missileKillSV"; + //source hit velocity - note no mine $dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "cgHitSV"; @@ -938,19 +945,8 @@ $dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "blasterHitSV"; $dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "hGrenadeHitSV"; $dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "missileHitSV"; - //victim velocity -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "cgKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "discKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "grenadeKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "laserKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "mortarKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "shockKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "plasmaKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "blasterKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "hGrenadeKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "mineKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "missileKillVV"; -$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "satchelKillVV"; +$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "mineHitVV"; +$dtStats::FV[$dtStats::FC["Max"]++,"Max"] = "satchelHitVV"; //midairs @@ -1030,7 +1026,6 @@ $dtStats::FV[$dtStats::FC["Avg"]++,"Avg"] = "grenadeDmgACC"; $dtStats::FV[$dtStats::FC["Avg"]++,"Avg"] = "mortarDmgACC"; - $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "null";//rng number for testing //////////////////////////////////////////////////////////////////////////////// //Unused vars that are not tracked but used for other things and need to be reset every round @@ -1040,6 +1035,391 @@ $dtStats::unused[$dtStats::unusedCount++] = "ksCounter"; //////////////////////////////////////////////////////////////////////////////// +$dtStats::TBGC["CTF"] = -1; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "score"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "defenseScore"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "offenseScore"; + +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "kills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "deaths"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "suicides"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "teamKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "friendlyFire"; + +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "flagCaps"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "flagGrabs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "flagGrabAtStand"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "carrierKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "flagReturns"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "escortAssists"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "flagDefends"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "concussFlag"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "depInvyUse"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "concussFlag"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "flagCatch"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "flagToss"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "interceptedFlag"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "stalemateReturn"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "flagTimeMin"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "timeNearTeamFS"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "timeFarTeamFS"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "timeNearEnemyFS"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "timeFarEnemyFS"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "timeNearFlag"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "timeNearEnemyFlag"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "capEfficiency"; + + +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "genRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "genSolRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "SensorRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "TurretRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "StationRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "VStationRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "solarRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "sentryRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "depSensorRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "depInvRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "depTurretRepairs"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "repairs"; + +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "tkDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "genDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "sensorDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "turretDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "iStationDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "vstationDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "solarDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "sentryDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "depSensorDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "depTurretDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "depStationDestroys"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "destruction"; + +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "genDefends"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "turretKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "mannedTurretKills"; + + + + +//$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "MotionSensorDep"; +//$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "PulseSensorDep"; +//$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "SensorsDep"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "InventoryDep"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "TurretOutdoorDep"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "TurretIndoorDep"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "TurretsDep"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "TotalDep"; + + +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "OffKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "DefKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "OffKillsL"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "OffKillsM"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "OffKillsH"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "DefKillsL"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "DefKillsM"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "DefKillsH"; + + +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "roadKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "gravCycleDes"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "assaultTankDes"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "MPBDes"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "turbogravDes"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "bomberDes"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "heavyTransportDes"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "wildRK"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "assaultRK"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "scoutFlyerRK"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "bomberFlyerRK"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "hapcFlyerRK"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "tankMortarDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "tankChaingunDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "bomberBombsDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "bellyTurretDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "shrikeBlasterDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "shrikeBlasterKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "bellyTurretKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "bomberBombsKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "tankChaingunKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "tankMortarKills"; + + +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "kdr"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "assist"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "cgKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "discKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "grenadeKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "hGrenadeKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "laserKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "mortarKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "missileKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "shockKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "plasmaKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "blasterKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "mineKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "explosionKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "satchelKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "inventoryKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "cgDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "laserDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "blasterDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "discDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "grenadeDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "hGrenadeDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "mortarDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "missileDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "plasmaDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "shockDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "mineDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "satchelDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "indoorDepTurretDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "outdoorDepTurretDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "totalWepDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "elfShotsFired"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "laserHeadShot"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "shockRearShot"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "minePlusDisc"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "minePlusDiscKill"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "totalMA"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "airTime"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "groundTime"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "timeTL"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "killStreak"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "avgSpeed"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "concussHit"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "concussTaken"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "idleTime"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "repairEnemy"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "revenge"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "shieldPackDmg"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "cloakerKills"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "cloakersKilled"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "jammer"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "flipflopCount"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "repairpackpickupCount"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "repairpackpickupEnemy"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "invyEatRepairPack"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "lagSpikes"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "packetLoss"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "txStop"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "pingAvg"; + +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorL"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorM"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorH"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorLK"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorMK"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorHK"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorLL"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorLM"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorLH"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorML"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorMM"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorMH"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorHL"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorHM"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "armorHH"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "discMA"; +$dtStats::TBG[$dtStats::TBGC["CTF"]++,"CTF"] = "laserKillDist"; +$dtStats::TBGC["CTF"]++; + +$dtStats::TBGC["LCTF"] = -1; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "score"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "defenseScore"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "offenseScore"; + +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "kills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "deaths"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "suicides"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "teamKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "friendlyFire"; + +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "flagCaps"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "flagGrabs"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "flagGrabAtStand"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "carrierKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "flagReturns"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "escortAssists"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "flagDefends"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "concussFlag"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "depInvyUse"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "concussFlag"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "flagCatch"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "flagToss"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "interceptedFlag"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "stalemateReturn"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "flagTimeMin"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "timeNearTeamFS"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "timeFarTeamFS"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "timeNearEnemyFS"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "timeFarEnemyFS"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "timeNearFlag"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "timeNearEnemyFlag"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "capEfficiency"; + +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "OffKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "DefKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "OffKillsL"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "OffKillsM"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "OffKillsH"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "DefKillsL"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "DefKillsM"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "DefKillsH"; + +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "kdr"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "assist"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "cgKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "discKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "grenadeKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "hGrenadeKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "laserKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "mortarKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "missileKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "shockKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "plasmaKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "blasterKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "mineKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "explosionKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "satchelKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "inventoryKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "cgDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "laserDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "blasterDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "discDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "grenadeDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "hGrenadeDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "mortarDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "missileDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "plasmaDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "shockDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "mineDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "satchelDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "indoorDepTurretDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "outdoorDepTurretDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "totalWepDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "elfShotsFired"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "laserHeadShot"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "shockRearShot"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "minePlusDisc"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "minePlusDiscKill"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "totalMA"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "airTime"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "groundTime"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "timeTL"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "killStreak"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "avgSpeed"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "concussHit"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "concussTaken"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "idleTime"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "repairEnemy"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "revenge"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "shieldPackDmg"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "cloakerKills"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "cloakersKilled"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "jammer"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "flipflopCount"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "repairpackpickupCount"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "repairpackpickupEnemy"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "invyEatRepairPack"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "lagSpikes"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "packetLoss"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "txStop"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "pingAvg"; + +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "armorL"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "discMA"; +$dtStats::TBG[$dtStats::TBGC["LCTF"]++,"LCTF"] = "laserKillDist"; +$dtStats::TBGC["LCTF"]++; + + +$dtStats::TBGC["Arena"] = -1; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "score"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "kills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "deaths"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "suicides"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "teamKills"; + +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "kdr"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "assist"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "cgKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "discKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "grenadeKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "hGrenadeKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "laserKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "mortarKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "missileKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "shockKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "plasmaKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "blasterKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "mineKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "explosionKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "satchelKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "inventoryKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "cgDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "laserDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "blasterDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "discDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "grenadeDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "hGrenadeDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "mortarDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "missileDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "plasmaDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "shockDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "mineDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "satchelDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "indoorDepTurretDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "outdoorDepTurretDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "totalWepDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "elfShotsFired"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "laserHeadShot"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "shockRearShot"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "minePlusDisc"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "minePlusDiscKill"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "totalMA"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "airTime"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "groundTime"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "timeTL"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "killStreak"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "avgSpeed"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "concussHit"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "concussTaken"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "idleTime"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "repairEnemy"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "revenge"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "shieldPackDmg"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "cloakerKills"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "cloakersKilled"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "jammer"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "flipflopCount"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "repairpackpickupCount"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "repairpackpickupEnemy"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "invyEatRepairPack"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "lagSpikes"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "packetLoss"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "txStop"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "pingAvg"; + +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorL"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorM"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorLK"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorMK"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorLL"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorLM"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorML"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorMM"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorHL"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "armorHM"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "discMA"; +$dtStats::TBG[$dtStats::TBGC["Arena"]++,"Arena"] = "laserKillDist"; + +$dtStats::TBGC["Arena"]++; + + + + @@ -1139,7 +1519,7 @@ $statsName["discKillsTG"] = "Spinfusor Kills" TAB "Total"; $statsName["discDeathsTG"] = "Spinfusor Deaths" TAB "Total"; $statsName["grenadeKillsTG"] = "Grenade L Kills" TAB "Total"; $statsName["grenadeDeathsTG"] = "Grenade L Deaths" TAB "Total"; -$statsName["hGrenadeKillsTG"] = "HGrenade Kills" TAB "Total"; +$statsName["hGrenadeKillsTG"] = "Hand Grenade Kills" TAB "Total"; $statsName["hGrenadeDeathsTG"] = "HGrenade Deaths" TAB "Total"; $statsName["laserKillsTG"] = "Laser Rifle Kills" TAB "Total"; $statsName["laserDeathsTG"] = "Laser Rifle Deaths" TAB "Total"; @@ -1394,7 +1774,7 @@ $statsName["scoreMax"] = "Highest Score" TAB "Kmh"; $statsName["grabSpeedMax"] = "Max Grab Speed" TAB "Kmh"; $statsName["flagCatchSpeedMax"] = "Flag Catch Speed" TAB "Khm"; $statsName["maFlagCatchSpeedMax"] = "MidAir Flag Speed" TAB "Kmh"; -$statsName["interceptSpeedMax"] = "Flag Intercept Speed" TAB "Kmh"; +$statsName["interceptSpeedMax"] = "Intercept Speed" TAB "Kmh"; $statsName["interceptFlagSpeedMax"] = "Flag Speed Grab" TAB "Kmh"; $statsName["maHitDistMax"] = "Midair Distance" TAB "Meter"; $statsName["maHitHeightMax"] = "Highest MidAir" TAB "Meter"; @@ -1403,30 +1783,6 @@ $statsName["maHitVVMax"] = "Rabbit Hunter" TAB "Kmh"; $statsName["killStreakMax"] = "Highest Kill Streak" TAB "Max"; $statsName["maxSpeedMax"] = "Highest Speed" TAB "Total Kmh"; $statsName["deadDistMax"] = "Dead Distance" TAB "Total Meters"; -$statsName["cgKillSVMax"] = "Chaingun Kill Speed Max" TAB "Kmh"; -$statsName["discKillSVMax"] = "Disc Kill Speed Max" TAB "Kmh"; -$statsName["grenadeKillSVMax"] = "Grenade Kill Speed Max" TAB "Kmh"; -$statsName["laserKillSVMax"] = "Laser Kill Speed Max" TAB "Kmh"; -$statsName["mortarKillSVMax"] = "Mortar Kill Speed Max" TAB "Kmh"; -$statsName["shockKillSVMax"] = "Shocklance Kill Speed Max" TAB "Kmh"; -$statsName["plasmaKillSVMax"] = "Plasma Kill Speed Max" TAB "Kmh"; -$statsName["blasterKillSVMax"] = "Blaster Kill Speed Max" TAB "Kmh"; -$statsName["hGrenadeKillSVMax"] = "Hand Grenade Kill Speed Max" TAB "Kmh"; -$statsName["missileKillSVMax"] = "Missile Kill Speed Max" TAB "Kmh"; - -$statsName["cgKillVVMax"] = "Chaingun Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["discKillVVMax"] = "Disc Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["grenadeKillVVMax"] = "Grenade Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["laserKillVVMax"] = "Laser Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["mortarKillVVMax"] = "Mortar Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["shockKillVVMax"] = "Shocklance Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["plasmaKillVVMax"] = "Plasma Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["blasterKillVVMax"] = "Blaster Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["hGrenadeKillVVMax"] = "Hand Grenade Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["mineKillVVMax"] = "Mine Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["missileKillVVMax"] = "Missile Kill Vertical Velocity Max" TAB "Kmh"; -$statsName["satchelKillVVMax"] = "Satchel Kill Vertical Velocity Max" TAB "Kmh"; - $statsName["cgMAHitDistMax"] = "Chaingun MA Dist Max" TAB "Meters"; $statsName["discMAHitDistMax"] = "Spinfusor MA Dist" TAB "Meters"; @@ -1503,14 +1859,19 @@ $statsName["MPBDesTG"] = "MPB Destroyed" TAB "Total"; $statsName["turbogravDesTG"] = "Shrikes Destroyed" TAB "Total"; $statsName["bomberDesTG"] = "Bombers Destroyed" TAB "Total"; $statsName["heavyTransportDesTG"] = "HAVOCs Destroyed" TAB "Total"; - +$statsName["discKillGroundTG"] = "Ground Disc Kills" TAB "Total"; +$statsName["WLRAvg"] = "Win Loss Ratio" TAB "Average"; +$statsName["roundsWonTG"] = "Rounds Won" TAB "Total"; +$statsName["hatTricksTG"] = "Hat Tricks" TAB "Total"; +$statsName["OffKillsTG"] = "Offensive Kills" TAB "Total"; +$statsName["DefKillsTG"] = "Defensive Kills" TAB "Total"; $panelCount = 0; $upperWepPanel[$panelCount, "CTFGame"] = "discMAHitDistMax"; $upperWepPanel[$panelCount++, "CTFGame"] = "plasmaMAHitDistMax";$upperWepPanel[$panelCount++, "CTFGame"] = "blasterMAHitDistMax"; $upperWepPanel[$panelCount++, "CTFGame"] = "grenadeMAHitDistMax";$upperWepPanel[$panelCount++, "CTFGame"] = "elfShotsFiredTG"; $upperWepPanel[$panelCount++, "CTFGame"] = "totalWepDmgTG"; $upperWepPanel[$panelCount++, "CTFGame"] = "maxSpeedMax"; $upperWepPanel[$panelCount++, "CTFGame"] = "shotsFiredTG"; $upperWepPanel[$panelCount++, "CTFGame"] = "concussHitTG"; $upperWepPanel[$panelCount++, "CTFGame"] = "comboCountTG"; $upperWepPanel[$panelCount++, "CTFGame"] = "doubleKillTG"; $upperWepPanel[$panelCount++, "CTFGame"] = "tripleKillTG"; -$panelCount++; +$upperWepPanelCount["CTFGame"] = $panelCount++; $panelCount = 0; $wepGrid[$panelCount, "CTFGame"] = "blasterKillsTG"; $wepGrid[$panelCount++, "CTFGame"] = "blasterMATG"; $wepGrid[$panelCount++, "CTFGame"] = "blasterHitDistMax"; @@ -1529,7 +1890,7 @@ $wepGrid[$panelCount++, "CTFGame"] = "mineKillsTG"; $wepGrid[$panelCount $wepGrid[$panelCount++, "CTFGame"] = "mineDmgTG"; $wepGrid[$panelCount++, "CTFGame"] = "hGrenadeKillsTG"; $wepGrid[$panelCount++, "CTFGame"] = "hGrenadeMATG"; $wepGrid[$panelCount++, "CTFGame"] = "hGrenadeHitDistMax"; $wepGrid[$panelCount++, "CTFGame"] = "hGrenadeDmgTG"; $wepGrid[$panelCount++, "CTFGame"] = "satchelKillsTG"; $wepGrid[$panelCount++, "CTFGame"] = "satchelMATG"; $wepGrid[$panelCount++, "CTFGame"] = "satchelHitDistMax";$wepGrid[$panelCount++, "CTFGame"] = "satchelDmgTG"; -$panelCount++; +$wepGridCount["CTFGame"] = $panelCount++; $panelCount = 0; $panelThree[$panelCount, "CTFGame"] = "ctrlKKillsTG"; $panelThree[$panelCount++, "CTFGame"] = "flareKillTG"; $panelThree[$panelCount++, "CTFGame"] = "deathKillsTG"; @@ -1548,7 +1909,7 @@ $panelThree[$panelCount++, "CTFGame"] = "genDefendsTG"; $panelThree[$pane $panelThree[$panelCount++, "CTFGame"] = "flagCatchTG"; $panelThree[$panelCount++, "CTFGame"] = "flagCatchSpeedMax"; $panelThree[$panelCount++, "CTFGame"] = "flagTossTG"; $panelThree[$panelCount++, "CTFGame"] = "maFlagCatchTG"; $panelThree[$panelCount++, "CTFGame"] = "maFlagCatchSpeedMax"; $panelThree[$panelCount++, "CTFGame"] = "flagTossCatchTG"; $panelThree[$panelCount++, "CTFGame"] = "interceptedFlagTG"; $panelThree[$panelCount++, "CTFGame"] = "maInterceptedFlagTG"; $panelThree[$panelCount++, "CTFGame"] = "interceptSpeedMax"; -$panelCount++; +$panelThreeCount["CTFGame"] = $panelCount++; $panelCount = 0; @@ -1560,7 +1921,7 @@ $smallPanel[$panelCount++, "CTFGame"] = "discMATG"; $smallPanel[$pane $smallPanel[$panelCount++, "CTFGame"] = "shockKillsTG"; $smallPanel[$panelCount++, "CTFGame"] = "shockRearShotTG"; $smallPanel[$panelCount++, "CTFGame"] = "cgKillsTG"; $smallPanel[$panelCount++, "CTFGame"] = "totalTimeTG"; $smallPanel[$panelCount++, "CTFGame"] = "flagDefendsTG"; $smallPanel[$panelCount++, "CTFGame"] = "laserKillsTG"; $smallPanel[$panelCount++, "CTFGame"] = "laserHeadShotTG"; $smallPanel[$panelCount++, "CTFGame"] = "minePlusDiscTG"; $smallPanel[$panelCount++, "CTFGame"] = "mortarKillsTG"; -$panelCount++; +$smallPanelCount["CTFGame"] = $panelCount++; $panelCount = 0; @@ -1572,7 +1933,7 @@ $upperWepPanel[$panelCount++,"LCTFGame"] = "mineShotsFiredTG"; $upperWepPane $upperWepPanel[$panelCount++,"LCTFGame"] = "hGrenadeDeathsTG"; $upperWepPanel[$panelCount++,"LCTFGame"] = "doubleChainKillTG"; $upperWepPanel[$panelCount++,"LCTFGame"] = "tripleChainKillTG"; $upperWepPanel[$panelCount++,"LCTFGame"] = "quadrupleChainKillTG"; $upperWepPanel[$panelCount++,"LCTFGame"] = "quintupleChainKillTG"; $upperWepPanel[$panelCount++,"LCTFGame"] = "sextupleChainKillTG"; $upperWepPanel[$panelCount++,"LCTFGame"] = "septupleChainKillTG"; $upperWepPanel[$panelCount++,"LCTFGame"] = "octupleChainKillTG"; $upperWepPanel[$panelCount++,"LCTFGame"] = "nonupleChainKillTG"; -$panelCount++; +$upperWepPanelCount["LCTFGame"] = $panelCount++; $panelCount = 0; $wepGrid[$panelCount, "LCTFGame"] = "blasterKillsTG"; $wepGrid[$panelCount++, "LCTFGame"] = "blasterMATG"; $wepGrid[$panelCount++, "LCTFGame"] = "blasterHitDistMax"; $wepGrid[$panelCount++, "LCTFGame"] = "blasterDmgTG"; @@ -1583,7 +1944,7 @@ $wepGrid[$panelCount++, "LCTFGame"] = "grenadeKillsTG"; $wepGrid[$panelCount++ $wepGrid[$panelCount++, "LCTFGame"] = "shockKillsTG"; $wepGrid[$panelCount++, "LCTFGame"] = "shockMATG"; $wepGrid[$panelCount++, "LCTFGame"] = "shockHitDistMax"; $wepGrid[$panelCount++, "LCTFGame"] = "shockDmgTG"; $wepGrid[$panelCount++, "LCTFGame"] = "mineKillsTG"; $wepGrid[$panelCount++, "LCTFGame"] = "mineMATG"; $wepGrid[$panelCount++, "LCTFGame"] = "mineHitDistMax"; $wepGrid[$panelCount++, "LCTFGame"] = "mineDmgTG"; $wepGrid[$panelCount++, "LCTFGame"] = "hGrenadeKillsTG"; $wepGrid[$panelCount++, "LCTFGame"] = "hGrenadeMATG"; $wepGrid[$panelCount++, "LCTFGame"] = "hGrenadeHitDistMax"; $wepGrid[$panelCount++, "LCTFGame"] = "hGrenadeDmgTG"; -$panelCount++; +$wepGridCount["LCTFGame"] = $panelCount++; $panelCount = 0; $panelThree[$panelCount,"LCTFGame"] = "winLostPctAvg"; $panelThree[$panelCount++,"LCTFGame"] = "scoreAvg"; $panelThree[$panelCount++,"LCTFGame"] = "scoreMax"; $panelThree[$panelCount++,"LCTFGame"] = "capEfficiencyAvg"; @@ -1598,7 +1959,7 @@ $panelThree[$panelCount++,"LCTFGame"] = "tripleKillTG"; $panelThree[$panel $panelThree[$panelCount++,"LCTFGame"] = "maHitDistMax"; $panelThree[$panelCount++,"LCTFGame"] = "groundDeathsTG"; $panelThree[$panelCount++,"LCTFGame"] = "deadDistMax"; $panelThree[$panelCount++,"LCTFGame"] = "minePlusDiscTG"; $panelThree[$panelCount++,"LCTFGame"] = "minePlusDiscKillTG"; $panelThree[$panelCount++,"LCTFGame"] = "maHitHeightMax"; $panelThree[$panelCount++,"LCTFGame"] = "discReflectHitTG"; $panelThree[$panelCount++,"LCTFGame"] = "discReflectKillTG"; $panelThree[$panelCount++,"LCTFGame"] = "killerDiscJumpTG"; $panelThree[$panelCount++,"LCTFGame"] = "firstKillTG"; $panelThree[$panelCount++,"LCTFGame"] = "lastKillTG"; $panelThree[$panelCount++,"LCTFGame"] = "deathKillsTG"; -$panelCount++; +$panelThreeCount["LCTFGame"] = $panelCount++; $panelCount = 0; $smallPanel[$panelCount,"LCTFGame"] = "offenseScoreTG"; $smallPanel[$panelCount++,"LCTFGame"] = "defenseScoreTG"; $smallPanel[$panelCount++,"LCTFGame"] = "flagCapsTG"; $smallPanel[$panelCount++,"LCTFGame"] = "flagGrabsTG"; @@ -1607,7 +1968,7 @@ $smallPanel[$panelCount++,"LCTFGame"] = "grabSpeedAvg"; $smallPanel[$panelCoun $smallPanel[$panelCount++,"LCTFGame"] = "maFlagCatchTG"; $smallPanel[$panelCount++,"LCTFGame"] = "flagTossCatchTG";$smallPanel[$panelCount++,"LCTFGame"] = "interceptedFlagTG"; $smallPanel[$panelCount++,"LCTFGame"] = "maInterceptedFlagTG"; $smallPanel[$panelCount++,"LCTFGame"] = "totalTimeTG"; $smallPanel[$panelCount++,"LCTFGame"] = "plasmaKillsTG"; $smallPanel[$panelCount++,"LCTFGame"] = "cgKillsTG"; $smallPanel[$panelCount++,"LCTFGame"] = "discKillsTG"; $smallPanel[$panelCount++,"LCTFGame"] = "grenadeKillsTG"; $smallPanel[$panelCount++,"LCTFGame"] = "shockKillsTG"; $smallPanel[$panelCount++,"LCTFGame"] = "mineKillsTG"; $smallPanel[$panelCount++,"LCTFGame"] = "hGrenadeKillsTG"; -$panelCount++; +$smallPanelCount["LCTFGame"] = $panelCount++; @@ -1620,7 +1981,7 @@ $upperWepPanel[$panelCount++,"SCtFGame"] = "mineShotsFiredTG"; $upperWepPane $upperWepPanel[$panelCount++,"SCtFGame"] = "hGrenadeDeathsTG"; $upperWepPanel[$panelCount++,"SCtFGame"] = "doubleChainKillTG"; $upperWepPanel[$panelCount++,"SCtFGame"] = "tripleChainKillTG"; $upperWepPanel[$panelCount++,"SCtFGame"] = "quadrupleChainKillTG"; $upperWepPanel[$panelCount++,"SCtFGame"] = "quintupleChainKillTG"; $upperWepPanel[$panelCount++,"SCtFGame"] = "sextupleChainKillTG"; $upperWepPanel[$panelCount++,"SCtFGame"] = "septupleChainKillTG"; $upperWepPanel[$panelCount++,"SCtFGame"] = "octupleChainKillTG"; $upperWepPanel[$panelCount++,"SCtFGame"] = "nonupleChainKillTG"; -$panelCount++; +$upperWepPanelCount["SCtFGame"] = $panelCount++; $panelCount = 0; $wepGrid[$panelCount, "SCtFGame"] = "blasterKillsTG"; $wepGrid[$panelCount++, "SCtFGame"] = "blasterMATG"; $wepGrid[$panelCount++, "SCtFGame"] = "blasterHitDistMax"; $wepGrid[$panelCount++, "SCtFGame"] = "blasterDmgTG"; @@ -1631,7 +1992,7 @@ $wepGrid[$panelCount++, "SCtFGame"] = "grenadeKillsTG"; $wepGrid[$panelCount++ $wepGrid[$panelCount++, "SCtFGame"] = "shockKillsTG"; $wepGrid[$panelCount++, "SCtFGame"] = "shockMATG"; $wepGrid[$panelCount++, "SCtFGame"] = "shockHitDistMax"; $wepGrid[$panelCount++, "SCtFGame"] = "shockDmgTG"; $wepGrid[$panelCount++, "SCtFGame"] = "mineKillsTG"; $wepGrid[$panelCount++, "SCtFGame"] = "mineMATG"; $wepGrid[$panelCount++, "SCtFGame"] = "mineHitDistMax"; $wepGrid[$panelCount++, "SCtFGame"] = "mineDmgTG"; $wepGrid[$panelCount++, "SCtFGame"] = "hGrenadeKillsTG"; $wepGrid[$panelCount++, "SCtFGame"] = "hGrenadeMATG"; $wepGrid[$panelCount++, "SCtFGame"] = "hGrenadeHitDistMax"; $wepGrid[$panelCount++, "SCtFGame"] = "hGrenadeDmgTG"; -$panelCount++; +$wepGridCount["SCtFGame"] = $panelCount++; $panelCount = 0; $panelThree[$panelCount,"SCtFGame"] = "winLostPctAvg"; $panelThree[$panelCount++,"SCtFGame"] = "scoreAvg"; $panelThree[$panelCount++,"SCtFGame"] = "scoreMax"; $panelThree[$panelCount++,"SCtFGame"] = "capEfficiencyAvg"; @@ -1646,7 +2007,7 @@ $panelThree[$panelCount++,"SCtFGame"] = "tripleKillTG"; $panelThree[$panel $panelThree[$panelCount++,"SCtFGame"] = "maHitDistMax"; $panelThree[$panelCount++,"SCtFGame"] = "groundDeathsTG"; $panelThree[$panelCount++,"SCtFGame"] = "deadDistMax"; $panelThree[$panelCount++,"SCtFGame"] = "minePlusDiscTG"; $panelThree[$panelCount++,"SCtFGame"] = "minePlusDiscKillTG"; $panelThree[$panelCount++,"SCtFGame"] = "maHitHeightMax"; $panelThree[$panelCount++,"SCtFGame"] = "discReflectHitTG"; $panelThree[$panelCount++,"SCtFGame"] = "discReflectKillTG"; $panelThree[$panelCount++,"SCtFGame"] = "killerDiscJumpTG"; $panelThree[$panelCount++,"SCtFGame"] = "firstKillTG"; $panelThree[$panelCount++,"SCtFGame"] = "lastKillTG"; $panelThree[$panelCount++,"SCtFGame"] = "deathKillsTG"; -$panelCount++; +$panelThreeCount["SCtFGame"] = $panelCount++; $panelCount = 0; $smallPanel[$panelCount,"SCtFGame"] = "offenseScoreTG"; $smallPanel[$panelCount++,"SCtFGame"] = "defenseScoreTG"; $smallPanel[$panelCount++,"SCtFGame"] = "flagCapsTG"; $smallPanel[$panelCount++,"SCtFGame"] = "flagGrabsTG"; @@ -1655,7 +2016,7 @@ $smallPanel[$panelCount++,"SCtFGame"] = "grabSpeedAvg"; $smallPanel[$panelCoun $smallPanel[$panelCount++,"SCtFGame"] = "maFlagCatchTG"; $smallPanel[$panelCount++,"SCtFGame"] = "flagTossCatchTG";$smallPanel[$panelCount++,"SCtFGame"] = "interceptedFlagTG"; $smallPanel[$panelCount++,"SCtFGame"] = "maInterceptedFlagTG"; $smallPanel[$panelCount++,"SCtFGame"] = "totalTimeTG"; $smallPanel[$panelCount++,"SCtFGame"] = "plasmaKillsTG"; $smallPanel[$panelCount++,"SCtFGame"] = "cgKillsTG"; $smallPanel[$panelCount++,"SCtFGame"] = "discKillsTG"; $smallPanel[$panelCount++,"SCtFGame"] = "grenadeKillsTG"; $smallPanel[$panelCount++,"SCtFGame"] = "shockKillsTG"; $smallPanel[$panelCount++,"SCtFGame"] = "mineKillsTG"; $smallPanel[$panelCount++,"SCtFGame"] = "hGrenadeKillsTG"; -$panelCount++; +$smallPanelCount["SCtFGame"] = $panelCount++; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $panelCount = 0; @@ -1671,18 +2032,18 @@ $upperWepPanel[$panelCount++,"LakRabbitGame"] = "doubleChainKillTG"; $upperW $upperWepPanel[$panelCount++,"LakRabbitGame"] = "quadrupleChainKillTG"; $upperWepPanel[$panelCount++,"LakRabbitGame"] = "quintupleChainKillTG"; $upperWepPanel[$panelCount++,"LakRabbitGame"] = "sextupleChainKillTG"; $upperWepPanel[$panelCount++,"LakRabbitGame"] = "septupleChainKillTG"; $upperWepPanel[$panelCount++,"LakRabbitGame"] = "octupleChainKillTG"; $upperWepPanel[$panelCount++,"LakRabbitGame"] = "nonupleChainKillTG"; -$panelCount++; +$upperWepPanelCount["LakRabbitGame"] = $panelCount++; $panelCount = 0; -$wepGrid[$panelCount,"LakRabbitGame"] = "blasterACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "blasterComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "blasterHitVVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "blasterDmgTG"; -$wepGrid[$panelCount++,"LakRabbitGame"] = "plasmaACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "plasmaComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "plasmaHitVVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "plasmaDmgTG"; -$wepGrid[$panelCount++,"LakRabbitGame"] = "discACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "discComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "discHitVVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "discDmgTG"; -$wepGrid[$panelCount++,"LakRabbitGame"] = "grenadeACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "grenadeComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "grenadeHitVVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "grenadeDmgTG"; -$wepGrid[$panelCount++,"LakRabbitGame"] = "mortarACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mortarComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mortarHitVVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mortarDmgTG"; -$wepGrid[$panelCount++,"LakRabbitGame"] = "shockACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "shockComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "shockHitVVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "shockDmgTG"; -$wepGrid[$panelCount++,"LakRabbitGame"] = "mineACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mineComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mineHitVVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mineDmgTG"; -$wepGrid[$panelCount++,"LakRabbitGame"] = "hGrenadeACCAvg";$wepGrid[$panelCount++,"LakRabbitGame"] = "hGrenadeComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "hGrenadeHitVVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "hGrenadeDmgTG"; -$panelCount++; +$wepGrid[$panelCount,"LakRabbitGame"] = "blasterACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "blasterComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "blasterHitSVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "blasterDmgTG"; +$wepGrid[$panelCount++,"LakRabbitGame"] = "plasmaACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "plasmaComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "plasmaHitSVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "plasmaDmgTG"; +$wepGrid[$panelCount++,"LakRabbitGame"] = "discACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "discComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "discHitSVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "discDmgTG"; +$wepGrid[$panelCount++,"LakRabbitGame"] = "grenadeACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "grenadeComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "grenadeHitSVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "grenadeDmgTG"; +$wepGrid[$panelCount++,"LakRabbitGame"] = "mortarACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mortarComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mortarHitSVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mortarDmgTG"; +$wepGrid[$panelCount++,"LakRabbitGame"] = "shockACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "shockComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "shockHitSVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "shockDmgTG"; +$wepGrid[$panelCount++,"LakRabbitGame"] = "mineACCAvg"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mineComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mineHitSVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "mineDmgTG"; +$wepGrid[$panelCount++,"LakRabbitGame"] = "hGrenadeACCAvg";$wepGrid[$panelCount++,"LakRabbitGame"] = "hGrenadeComTG"; $wepGrid[$panelCount++,"LakRabbitGame"] = "hGrenadeHitSVMax"; $wepGrid[$panelCount++,"LakRabbitGame"] = "hGrenadeDmgTG"; +$wepGridCount["LakRabbitGame"] = $panelCount++; $panelCount = 0; $panelThree[$panelCount,"LakRabbitGame"] = "scoreTG"; $panelThree[$panelCount++,"LakRabbitGame"] = "scoreAvg"; $panelThree[$panelCount++,"LakRabbitGame"] = "scoreMax"; @@ -1701,7 +2062,7 @@ $panelThree[$panelCount++,"LakRabbitGame"] = "maHitDistMax"; $panelThree[$pa $panelThree[$panelCount++,"LakRabbitGame"] = "minePlusDiscTG"; $panelThree[$panelCount++,"LakRabbitGame"] = "minePlusDiscKillTG"; $panelThree[$panelCount++,"LakRabbitGame"] = "maHitHeightMax"; $panelThree[$panelCount++,"LakRabbitGame"] = "discReflectHitTG"; $panelThree[$panelCount++,"LakRabbitGame"] = "discReflectKillTG"; $panelThree[$panelCount++,"LakRabbitGame"] = "killerDiscJumpTG"; $panelThree[$panelCount++,"LakRabbitGame"] = "firstKillTG"; $panelThree[$panelCount++,"LakRabbitGame"] = "lastKillTG"; $panelThree[$panelCount++,"LakRabbitGame"] = "deathKillsTG"; -$panelCount++; +$panelThreeCount["LakRabbitGame"] = $panelCount++; $panelCount = 0; $smallPanel[$panelCount,"LakRabbitGame"] = "flagGrabsTG"; $smallPanel[$panelCount++,"LakRabbitGame"] = "flagTimeMinTG"; $smallPanel[$panelCount++,"LakRabbitGame"] = "MidairflagGrabsTG";$smallPanel[$panelCount++,"LakRabbitGame"] = "totalTimeTG"; @@ -1710,16 +2071,81 @@ $smallPanel[$panelCount++,"LakRabbitGame"] = "blasterMATG"; $smallPanel[$panel $smallPanel[$panelCount++,"LakRabbitGame"] = "grenadeMATG"; $smallPanel[$panelCount++,"LakRabbitGame"] = "grenadeMAHitDistMax"; $smallPanel[$panelCount++,"LakRabbitGame"] = "shockACCAvg"; $smallPanel[$panelCount++,"LakRabbitGame"] = "plasmaACCAvg"; $smallPanel[$panelCount++,"LakRabbitGame"] = "discMATG"; $smallPanel[$panelCount++,"LakRabbitGame"] = "discMAHitDistMax"; $smallPanel[$panelCount++,"LakRabbitGame"] = "discACCAvg"; $smallPanel[$panelCount++,"LakRabbitGame"] = "shockKillsTG"; $smallPanel[$panelCount++,"LakRabbitGame"] = "shockMATG"; $smallPanel[$panelCount++,"LakRabbitGame"] = "shockRearShotTG"; $smallPanel[$panelCount++,"LakRabbitGame"] = "hGrenadeKillsTG"; $smallPanel[$panelCount++,"LakRabbitGame"] = "mineKillsTG"; -$panelCount++; +$smallPanelCount["LakRabbitGame"] = $panelCount++; /////////////////////////////////////////////////////////////////////////////////////////// +$panelCount = 0; +$upperWepPanel[$panelCount,"ArenaGame"] = "blasterShotsFiredTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "blasterDeathsTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "plasmaShotsFiredTG"; +$upperWepPanel[$panelCount++,"ArenaGame"] = "plasmaDeathsTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "discShotsFiredTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "discDeathsTG"; +$upperWepPanel[$panelCount++,"ArenaGame"] = "grenadeShotsFiredTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "grenadeDeathsTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "cgShotsFiredTG"; +$upperWepPanel[$panelCount++,"ArenaGame"] = "cgDeathsTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "shockShotsFiredTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "shockDeathsTG"; +$upperWepPanel[$panelCount++,"ArenaGame"] = "laserDeathsTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "laserShotsFiredTG"; $upperWepPanel[$panelCount++,"ArenaGame"] = "hGrenadeShotsFiredTG"; +$upperWepPanelCount["ArenaGame"] = $panelCount++; + +$panelCount = 0; +$wepGrid[$panelCount, "ArenaGame"] = "blasterKillsTG"; $wepGrid[$panelCount++, "ArenaGame"] = "blasterMATG"; $wepGrid[$panelCount++, "ArenaGame"] = "blasterHitDistMax"; $wepGrid[$panelCount++, "ArenaGame"] = "blasterDmgTG"; +$wepGrid[$panelCount++, "ArenaGame"] = "plasmaKillsTG"; $wepGrid[$panelCount++, "ArenaGame"] = "plasmaMATG"; $wepGrid[$panelCount++, "ArenaGame"] = "plasmaHitDistMax"; $wepGrid[$panelCount++, "ArenaGame"] = "plasmaDmgTG"; +$wepGrid[$panelCount++, "ArenaGame"] = "cgKillsTG"; $wepGrid[$panelCount++, "ArenaGame"] = "cgMATG"; $wepGrid[$panelCount++, "ArenaGame"] = "cgHitDistMax"; $wepGrid[$panelCount++, "ArenaGame"] = "cgDmgTG"; +$wepGrid[$panelCount++, "ArenaGame"] = "discKillsTG"; $wepGrid[$panelCount++, "ArenaGame"] = "discMATG"; $wepGrid[$panelCount++, "ArenaGame"] = "discHitDistMax"; $wepGrid[$panelCount++, "ArenaGame"] = "discDmgTG"; +$wepGrid[$panelCount++, "ArenaGame"] = "grenadeKillsTG"; $wepGrid[$panelCount++, "ArenaGame"] = "grenadeMATG"; $wepGrid[$panelCount++, "ArenaGame"] = "grenadeHitDistMax"; $wepGrid[$panelCount++, "ArenaGame"] = "grenadeDmgTG"; +$wepGrid[$panelCount++, "ArenaGame"] = "laserKillsTG"; $wepGrid[$panelCount++, "ArenaGame"] = "laserMATG"; $wepGrid[$panelCount++, "ArenaGame"] = "laserHitDistMax"; $wepGrid[$panelCount++, "ArenaGame"] = "laserDmgTG"; +$wepGrid[$panelCount++, "ArenaGame"] = "shockKillsTG"; $wepGrid[$panelCount++, "ArenaGame"] = "shockMATG"; $wepGrid[$panelCount++, "ArenaGame"] = "shockHitDistMax"; $wepGrid[$panelCount++, "ArenaGame"] = "shockDmgTG"; +$wepGrid[$panelCount++, "ArenaGame"] = "hGrenadeKillsTG"; $wepGrid[$panelCount++, "ArenaGame"] = "hGrenadeMATG"; $wepGrid[$panelCount++, "ArenaGame"] = "hGrenadeHitDistMax"; $wepGrid[$panelCount++, "ArenaGame"] = "hGrenadeDmgTG"; +$wepGridCount["ArenaGame"] = $panelCount++; +//discKillGround +$panelCount = 0; +$panelThree[$panelCount,"ArenaGame"] = "scoreTG"; $panelThree[$panelCount++,"ArenaGame"] = "scoreMax"; $panelThree[$panelCount++,"ArenaGame"] = "voicebindsallCountTG"; +$panelThree[$panelCount++,"ArenaGame"] = "killsTG"; $panelThree[$panelCount++,"ArenaGame"] = "totalWepDmgTG"; $panelThree[$panelCount++,"ArenaGame"] = "voteCountTG"; +$panelThree[$panelCount++,"ArenaGame"] = "hatTricksTG"; $panelThree[$panelCount++,"ArenaGame"] = "killStreakMax"; $panelThree[$panelCount++,"ArenaGame"] = "kdrAvg"; +$panelThree[$panelCount++,"ArenaGame"] = "ctrlKKillsTG"; $panelThree[$panelCount++,"ArenaGame"] = "blasterReflectKillTG";$panelThree[$panelCount++,"ArenaGame"] = "distMovTG"; +$panelThree[$panelCount++,"ArenaGame"] = "timeTLAvg"; $panelThree[$panelCount++,"ArenaGame"] = "maxSpeedMax"; $panelThree[$panelCount++,"ArenaGame"] = "discJumpTG"; +$panelThree[$panelCount++,"ArenaGame"] = "lagSpikesTG"; $panelThree[$panelCount++,"ArenaGame"] = "outOfBoundDeathsTG"; $panelThree[$panelCount++,"ArenaGame"] = "teamkillCountTG"; +$panelThree[$panelCount++,"ArenaGame"] = "EVKillsTG"; $panelThree[$panelCount++,"ArenaGame"] = "idleTimeTG"; $panelThree[$panelCount++,"ArenaGame"] = "firstKillTG"; +$panelThree[$panelCount++,"ArenaGame"] = "airTimeTG"; $panelThree[$panelCount++,"ArenaGame"] = "groundTimeTG"; $panelThree[$panelCount++,"ArenaGame"] = "lastKillTG"; +$panelThree[$panelCount++,"ArenaGame"] = "totalMATG"; $panelThree[$panelCount++,"ArenaGame"] = "groundKillsTG"; $panelThree[$panelCount++,"ArenaGame"] = "chatallCountTG"; +$panelThree[$panelCount++,"ArenaGame"] = "concussHitTG"; $panelThree[$panelCount++,"ArenaGame"] = "maHitDistMax"; $panelThree[$panelCount++,"ArenaGame"] = "maHitHeightMax"; +$panelThree[$panelCount++,"ArenaGame"] = "armorLKTG"; $panelThree[$panelCount++,"ArenaGame"] = "armorMKTG"; $panelThree[$panelCount++,"ArenaGame"] = "roundsWonTG"; +$panelThree[$panelCount++,"ArenaGame"] = "groundDeathsTG"; $panelThree[$panelCount++,"ArenaGame"] = "deadDistMax"; $panelThree[$panelCount++,"ArenaGame"] = "deathKillsTG"; +$panelThree[$panelCount++,"ArenaGame"] = "discReflectHitTG"; $panelThree[$panelCount++,"ArenaGame"] = "discReflectKillTG"; $panelThree[$panelCount++,"ArenaGame"] = "killerDiscJumpTG"; +$panelThreeCount["ArenaGame"] = $panelCount++; + +$panelCount = 0; +$smallPanel[$panelCount,"ArenaGame"] = "discKillGroundTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "discKillsTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "discMATG"; +$smallPanel[$panelCount++,"ArenaGame"] = "discMAHitDistMax"; +$smallPanel[$panelCount++,"ArenaGame"] = "laserKillsTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "laserHeadShotTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "laserHitDistMax"; +$smallPanel[$panelCount++,"ArenaGame"] = "totalTimeTG"; + +$smallPanel[$panelCount++,"ArenaGame"] = "hGrenadeKillsTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "shockKillsTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "shockMATG"; +$smallPanel[$panelCount++,"ArenaGame"] = "shockRearShotTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "grenadeKillsTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "grenadeMATG"; +$smallPanel[$panelCount++,"ArenaGame"] = "grenadeMAHitDistMax"; +$smallPanel[$panelCount++,"ArenaGame"] = "lArmorTimeTG"; + +$smallPanel[$panelCount++,"ArenaGame"] = "assistTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "plasmaKillsTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "plasmaMATG"; +$smallPanel[$panelCount++,"ArenaGame"] = "plasmaMAHitDistMax"; +$smallPanel[$panelCount++,"ArenaGame"] = "blasterKillsTG"; +$smallPanel[$panelCount++,"ArenaGame"] = "blasterMATG"; +$smallPanel[$panelCount++,"ArenaGame"] = "blasterMAHitDistMax"; +$smallPanel[$panelCount++,"ArenaGame"] = "mArmorTimeTG"; +$smallPanelCount["ArenaGame"] = $panelCount++; + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $panelCount = 0; $upperWepPanel[$panelCount, "DefaultGame"] = "discMAHitDistMax"; $upperWepPanel[$panelCount++, "DefaultGame"] = "plasmaMAHitDistMax";$upperWepPanel[$panelCount++, "DefaultGame"] = "blasterMAHitDistMax"; $upperWepPanel[$panelCount++, "DefaultGame"] = "grenadeMAHitDistMax";$upperWepPanel[$panelCount++, "DefaultGame"] = "elfShotsFiredTG"; $upperWepPanel[$panelCount++, "DefaultGame"] = "totalWepDmgTG"; $upperWepPanel[$panelCount++, "DefaultGame"] = "maxSpeedMax"; $upperWepPanel[$panelCount++, "DefaultGame"] = "shotsFiredTG"; $upperWepPanel[$panelCount++, "DefaultGame"] = "concussHitTG"; $upperWepPanel[$panelCount++, "DefaultGame"] = "comboCountTG"; $upperWepPanel[$panelCount++, "DefaultGame"] = "concussHitTG"; $upperWepPanel[$panelCount++, "DefaultGame"] = "tripleKillTG"; -$panelCount++; +$upperWepPanelCount["DefaultGame"] = $panelCount++; $panelCount = 0; $wepGrid[$panelCount, "DefaultGame"] = "blasterKillsTG"; $wepGrid[$panelCount++, "DefaultGame"] = "blasterMATG"; $wepGrid[$panelCount++, "DefaultGame"] = "blasterHitDistMax"; @@ -1738,7 +2164,7 @@ $wepGrid[$panelCount++, "DefaultGame"] = "mineKillsTG"; $wepGrid[$panelC $wepGrid[$panelCount++, "DefaultGame"] = "mineDmgTG"; $wepGrid[$panelCount++, "DefaultGame"] = "hGrenadeKillsTG"; $wepGrid[$panelCount++, "DefaultGame"] = "hGrenadeMATG"; $wepGrid[$panelCount++, "DefaultGame"] = "hGrenadeHitDistMax"; $wepGrid[$panelCount++, "DefaultGame"] = "hGrenadeDmgTG"; $wepGrid[$panelCount++, "DefaultGame"] = "satchelKillsTG"; $wepGrid[$panelCount++, "DefaultGame"] = "satchelMATG"; $wepGrid[$panelCount++, "DefaultGame"] = "satchelHitDistMax";$wepGrid[$panelCount++, "DefaultGame"] = "satchelDmgTG"; -$panelCount++; +$wepGridCount["DefaultGame"] = $panelCount++; $panelCount = 0; $panelThree[$panelCount,"DefaultGame"] = "scoreTG"; $panelThree[$panelCount++,"DefaultGame"] = "voicebindsallCountTG"; $panelThree[$panelCount++,"DefaultGame"] = "flipflopCountTG"; @@ -1757,7 +2183,7 @@ $panelThree[$panelCount++,"DefaultGame"] = "maHitDistMax"; $panelThree[$pane $panelThree[$panelCount++,"DefaultGame"] = "minePlusDiscTG"; $panelThree[$panelCount++,"DefaultGame"] = "minePlusDiscKillTG"; $panelThree[$panelCount++,"DefaultGame"] = "maHitHeightMax"; $panelThree[$panelCount++,"DefaultGame"] = "discReflectHitTG"; $panelThree[$panelCount++,"DefaultGame"] = "discReflectKillTG"; $panelThree[$panelCount++,"DefaultGame"] = "killerDiscJumpTG"; $panelThree[$panelCount++,"DefaultGame"] = "firstKillTG"; $panelThree[$panelCount++,"DefaultGame"] = "lastKillTG"; $panelThree[$panelCount++,"DefaultGame"] = "deathKillsTG"; -$panelCount++; +$panelThreeCount["DefaultGame"] = $panelCount++; $panelCount = 0; $smallPanel[$panelCount,"DefaultGame"] = "scoreAvg"; $smallPanel[$panelCount++,"DefaultGame"] = "scoreMax"; $smallPanel[$panelCount++,"DefaultGame"] = "distMovTG";$smallPanel[$panelCount++,"DefaultGame"] = "totalTimeTG"; @@ -1766,7 +2192,7 @@ $smallPanel[$panelCount++,"DefaultGame"] = "blasterMATG"; $smallPanel[$panelCo $smallPanel[$panelCount++,"DefaultGame"] = "grenadeMATG"; $smallPanel[$panelCount++,"DefaultGame"] = "grenadeMAHitDistMax"; $smallPanel[$panelCount++,"DefaultGame"] = "shockACCAvg"; $smallPanel[$panelCount++,"DefaultGame"] = "plasmaACCAvg"; $smallPanel[$panelCount++,"DefaultGame"] = "discMATG"; $smallPanel[$panelCount++,"DefaultGame"] = "discMAHitDistMax"; $smallPanel[$panelCount++,"DefaultGame"] = "discACCAvg"; $smallPanel[$panelCount++,"DefaultGame"] = "shockKillsTG"; $smallPanel[$panelCount++,"DefaultGame"] = "shockMATG"; $smallPanel[$panelCount++,"DefaultGame"] = "shockRearShotTG"; $smallPanel[$panelCount++,"DefaultGame"] = "hGrenadeKillsTG"; $smallPanel[$panelCount++,"DefaultGame"] = "mineKillsTG"; -$panelCount++; +$smallPanelCount["DefaultGame"] = $panelCount++; //misc stats will only display if it has a value for it @@ -1854,7 +2280,7 @@ function dtAICON(%client){ package dtStats{ function AIConnection::startMission(%client){// ai support parent::startMission(%client); - schedule(25000,0,"dtAICON",%client); + schedule(15000,0,"dtAICON",%client); } function GameConnection::onDrop(%client, %reason){ dtStatsClientLeaveGame(%client);//common @@ -1877,14 +2303,10 @@ package dtStats{ function CTFGame::gameOver( %game ){ dtStatsGameOver(%game); parent::gameOver(%game); - - if(isObject(dtGameStat)){ - dtGameStat.delete(); - } } function CTFGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLocation){ clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %damageLocation);//for stats collection - if(%clKiller.team != %clVictim.team && isObject(%clKiller.player)){ + if(%clKiller.team != %clVictim.team && isObject(%clKiller.player)){// note test for vehicles %dist = vectorDist($dtStats::FlagPos[%clKiller.team], %clKiller.player.getPosition()); if(%dist > ($dtStats::FlagTotalDist*0.5)){// kill made closer to the enemy flag %clKiller.dtStats.stat["OffKills"]++; @@ -1931,10 +2353,6 @@ package dtStats{ function LakRabbitGame::gameOver( %game ){ dtStatsGameOver(%game);//common parent::gameOver(%game); - - if(isObject(dtGameStat)){ - dtGameStat.delete(); - } } function LakRabbitGame::recalcScore(%game, %client){ if($missionRunning){ @@ -1961,10 +2379,6 @@ package dtStats{ function ArenaGame::gameOver( %game ){ dtStatsGameOver(%game); parent::gameOver(%game); - - if(isObject(dtGameStat)){ - dtGameStat.delete(); - } } function ArenaGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLocation){ clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %damageLocation);//for stats collection @@ -2023,8 +2437,9 @@ package dtStats{ } messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); - // Player scores: - messageClient( %client, 'MsgDebriefAddLine', "", '\nPLAYERTEAMSCOREKILLSAssistsTotal DmgRounds FiredDisc MA' ); + + messageClient( %client, 'MsgDebriefAddLine', "", '\nPLAYERTEAMSCOREKILLSKDRASSISTSDISC MA' ); + for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) %count[%team] = 0; @@ -2046,8 +2461,14 @@ package dtStats{ %cl = $TeamRank[%highTeam, %count[%highTeam]]; %score = %cl.score $= "" ? 0 : %cl.score; %kills = %cl.kills $= "" ? 0 : %cl.kills; - %line = '%1 %2%3%4%5%6%7%8'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, %cl.name, %game.getTeamName(%cl.team), %score, %kills, %cl.dtStats.stat["assist"], cropFloat(%cl.dtStats.stat["totalWepDmg"],1), %cl.dtStats.stat["shotsFired"], %cl.dtStats.stat["discMA"] ); + %deaths = %cl.deaths $= "" ? 0 : %cl.deaths; + if(%client == %cl){ + %line = '%1 %2%3%4%6%7%8'; + } + else{ + %line = '%1 %2%3%4%6%7%8'; + } + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(getTaggedString(%cl.name)), %game.getTeamName(%cl.team), %score, %kills , %deaths, cropFloat(%cl.dtStats.stat["kdr"],2), %cl.dtStats.stat["assist"], %cl.dtStats.stat["discMA"] ); %count[%highTeam]++; %notDone = false; @@ -2073,92 +2494,29 @@ package dtStats{ if (!%printedHeader) { %printedHeader = true; - messageClient(%client, 'MsgDebriefAddLine', "", '\nOBSERVERSSCOREKILLSAssistsOffKillsDefKillsDisc MA'); + %score = %cl.score $= "" ? 0 : %cl.score; + %kills = %cl.kills $= "" ? 0 : %cl.kills; + %deaths = %cl.deaths $= "" ? 0 : %cl.deaths; + + messageClient(%client, 'MsgDebriefAddLine', "", '\nOBSERVERSSCOREKILLSKDRASSISTSDISC MA'); + } //print out the client - %score = %cl.score $= "" ? 0 : %cl.score;// - %line = '%1 %2%3%4%5%6%7%8'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, %cl.name, "", %score, %kills, %cl.dtStats.stat["assist"], %cl.dtStats.stat["OffKills"], %cl.dtStats.stat["DefKills"], %cl.dtStats.stat["discMA"] ); + %score = %cl.score $= "" ? 0 : %cl.score;// + if(%client == %cl){ + %line = '%1 %2%3%4%6%7%8'; + } + else{ + %line = '%1 %2%3%4%6%7%8'; + } + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(getTaggedString(%cl.name)), "", %score, %kills , %deaths, cropFloat(%cl.dtStats.stat["kdr"],2), %cl.dtStats.stat["assist"], %cl.dtStats.stat["discMA"] ); + } } extendedDebrief(%game, %client); } - else if($dtStats::teamDebrief == 2){ - %topScore = ""; - %topCount = 0; - for ( %team = 1; %team <= %game.numTeams; %team++ ){ - if ( %topScore $= "" || $TeamScore[%team] > %topScore ){ - %topScore = $TeamScore[%team]; - %firstTeam = %team; - %topCount = 1; - } - else if ( $TeamScore[%team] == %topScore ){ - %secondTeam = %team; - %topCount++; - } - } - - // Mission result: - if ( %topCount == 1 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 wins!', %game.getTeamName(%firstTeam) ); - else if ( %topCount == 2 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 and Team %2 tie!', %game.getTeamName(%firstTeam), %game.getTeamName(%secondTeam) ); - else - messageClient( %client, 'MsgDebriefResult', "", 'The mission ended in a tie.' ); - - if ( $Arena::Pref::TrackHighScores && Game.class $= "ArenaGame" ){ - if ( %game.newHighScoreFlag ) - messageClient( %client, 'MsgDebriefResult', "", '%1 has set a NEW INDIVIDUAL RECORD for this mission with a score of %2!', $Arena::HighScores::Name[$currentMission], $Arena::HighScores::Score[$currentMission] ); - else if ( $Arena::HighScores::Name[$currentMission] !$= "" && $Arena::HighScores::Score[$currentMission] !$= "" ) - messageClient( %client, 'MsgDebriefResult', "", '%1 holds the individual record for this mission with a score of %2.', $Arena::HighScores::Name[$currentMission], $Arena::HighScores::Score[$currentMission] ); - else - messageClient( %client, 'MsgDebriefResult', "", 'There is no high score recorded for this mission.' ); - if ( %game.notEnoughHumansFlag ) - messageClient( %client, 'MsgDebriefResult', "", 'But there are not enough human players here to set a new high score.' ); - } - - messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); - messageClient( %client, 'MsgDebriefAddLine', "", '%1\t%3\t%2\t%4\n', $teamName[1], $teamName[2], $TeamScore[1], $TeamScore[2]); - messageClient( %client, 'MsgDebriefAddLine', "", 'Player\tScore\tKills\tAssist\tDmg\tPlayer\tScore\tKills\tAssist\tDmg'); - - %teamsize = ($TeamRank[1, count] > $TeamRank[2, count]) ? $TeamRank[1, count] : $TeamRank[2, count]; - for(%i=0; %i < %teamsize; %i++){ - %t1Obj = $TeamRank[1, %i]; - %t2Obj = $TeamRank[2, %i]; - if(isObject(%t1Obj) && isObject(%t2Obj)){ - %dtStats1 = %t1Obj.dtStats; - %dtStats2 = %t2Obj.dtStats; - %statsLine = getTaggedString(%t1Obj.name) @ "\t" @ %t1Obj.score @ "\t" @ %t1Obj.kills @ "\t" @ %dtStats1.stat["assist"] @ "\t" @ cropFloat(%dtStats1.stat["totalWepDmg"],1) @ "\t" @ %i+1 @ "." @ getTaggedString(%t2Obj.name) @ "\t" @ %t2Obj.score @ "\t" @ %t2Obj.kills @ "\t" @ %dtStats2.stat["assist"] @ "\t" @ cropFloat(%dtStats2.stat["totalWepDmg"],1); - messageClient( %client, 'MsgDebriefAddLine', "", "" @ %i+1 @ "." @ %statsLine); - } - else if(isObject(%t1Obj) && !isObject(%t2Obj)){ - %dtStats1 = %t1Obj.dtStats; - messageClient( %client, 'MsgDebriefAddLine', "", "" @ %i+1 @ "." @ getTaggedString(%t1Obj.name) @ "\t" @ %t1Obj.score @ "\t" @ %t1Obj.kills @ "\t" @ %dtStats1.stat["assist"] @ "\t" @ cropFloat(%dtStats1.stat["totalWepDmg"],1) @ "\t\t\t\t\t"); - } - else if(!isObject(%t1Obj) && isObject(%t2Obj)){ - %dtStats2 = %t2Obj.dtStats; - messageClient( %client, 'MsgDebriefAddLine', "", "\t\t\t\t\t" @ %i+1 @ "." @ getTaggedString(%t2Obj.name) @ "\t" @ %t2Obj.score @ "\t" @ %t2Obj.kills @ "\t" @ %dtStats2.stat["assist"] @ "\t" @ cropFloat(%dtStats2.stat["totalWepDmg"],1)); - } - } - %printedHeader = false; - for (%i = 0; %i < ClientGroup.getCount(); %i++) - { - %cl = ClientGroup.getObject(%i); - if (%cl.team <= 0) - { - //print the header only if we actually find an observer - if (!%printedHeader) - { - %printedHeader = true; - messageClient(%client, 'MsgDebriefAddLine', "", "\n\nOBSERVERS\tScore\tOff\tDef\tKills"); - } - messageClient( %client, 'MsgDebriefAddLine', "", " " @ getTaggedString(%cl.name) @ "\t" @ %cl.score @ "\t" @ %cl.offenseScore @ "\t" @ %cl.defenseScore @ "\t" @ %cl.kills); - } - } - extendedDebrief(%game, %client); - } else{ parent::sendDebriefing(%game, %client);// note not default game extendedDebrief(%game, %client); @@ -2176,10 +2534,6 @@ package dtStats{ function DMGame::gameOver( %game ){ dtStatsGameOver(%game); parent::gameOver(%game); - - if(isObject(dtGameStat)){ - dtGameStat.delete(); - } } function DMGame::recalcScore(%game, %client){ if(!$missionRunning){ @@ -2216,15 +2570,11 @@ package dtStats{ function LCTFGame::gameOver( %game ){ dtStatsGameOver(%game);//common parent::gameOver(%game); - - if(isObject(dtGameStat)){ - dtGameStat.delete(); - } } function LCTFGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLocation){ - clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %damageLocation);//for stats collection if(%clKiller.team != %clVictim.team){ - %dist = vectorDist($dtStats::FlagPos[%clKiller.team], %clKiller.player.getPosition()); + %pos = isObject(%clKiller.player) ? %clKiller.player.getPosition() : %clKiller.lp; + %dist = vectorDist($dtStats::FlagPos[%clKiller.team], %pos); if(%dist > ($dtStats::FlagTotalDist*0.5)){// kill made closer to the enemy flag %clKiller.dtStats.stat["OffKills"]++; } @@ -2232,6 +2582,7 @@ package dtStats{ %clKiller.dtStats.stat["DefKills"]++; } } + clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %damageLocation);//for stats collection parent::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLocation); } @@ -2264,14 +2615,10 @@ package dtStats{ function SCtFGame::gameOver( %game ){ dtStatsGameOver(%game);//common parent::gameOver(%game); - - if(isObject(dtGameStat)){ - dtGameStat.delete(); - } } function SCtFGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLocation){ clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %damageLocation);//for stats collection - if(%clKiller.team != %clVictim.team){ + if(%clKiller.team != %clVictim.team && isObject(%clKiller.player)){ %dist = vectorDist($dtStats::FlagPos[%clKiller.team], %clKiller.player.getPosition()); if(%dist > ($dtStats::FlagTotalDist*0.5)){// kill made closer to the enemy flag %clKiller.dtStats.stat["OffKills"]++; @@ -2298,9 +2645,11 @@ package dtStats{ /////////////////////////////////////////////////////////////////////////////// function DefaultGame::missionLoadDone(%game){ parent::missionLoadDone(%game); - + if(isObject(dtGameStat)){ + dtGameStat.delete(); + } $dtStats::MapStart = 1;//rebuild custom map list after first load - buildMissionList();//dont this way to prevent locking a person out of selecting a start map + buildMissionList();// this way to prevent locking a person out of selecting a start map dtSaveServerVars(); dtScanForRepair(); @@ -2312,7 +2661,11 @@ package dtStats{ $dtStats::gameID = formattimestring("yymmddHHnnss"); if($dtStats::debugEchos) error("GAME ID" SPC $dtStats::gameID SPC "//////////////////////////////"); + if($TB::TBEnable[$dtStats::gtNameShort[%game.class]] && !$Host::TournamentMode){// note this happens before clients start there load + ballenceTeams(%game,0); + } } + function DefaultGame::forceObserver( %game, %client, %reason ){ parent::forceObserver( %game, %client, %reason ); if(%reason $= "spawnTimeout"){ @@ -2331,6 +2684,10 @@ package dtStats{ } } function chatMessageAll( %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ){ + if ( getsubstr(detag(%a2),0,1) $= "#" ){ + error("dtchatcommandtest"); + return; + } parent::chatMessageAll( %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ); %sender.dtStats.stat["chatallCount"]++; } @@ -2478,8 +2835,9 @@ package dtStats{ %clAttacker.dmgdFlagTime = getSimTime(); } function CTFGame::testEscortAssist(%game, %victimID, %killerID){ - if((getSimTime() - %victimID.dmgdFlagTime) < 5000 && %killerID.player.holdingFlag $= "") + if((getSimTime() - %victimID.dmgdFlagTime) < 5000 && %killerID.player.holdingFlag $= ""){ return true; + } return false; } function LCTFGame::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc){ @@ -2490,8 +2848,9 @@ package dtStats{ %clAttacker.dmgdFlagTime = getSimTime(); } function LCTFGame::testEscortAssist(%game, %victimID, %killerID){ - if((getSimTime() - %victimID.dmgdFlagTime) < 5000 && %killerID.player.holdingFlag $= "") + if((getSimTime() - %victimID.dmgdFlagTime) < 5000 && %killerID.player.holdingFlag $= ""){ return true; + } return false; } function SCtFGame::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc){ @@ -2502,10 +2861,19 @@ package dtStats{ %clAttacker.dmgdFlagTime = getSimTime(); } function SCtFGame::testEscortAssist(%game, %victimID, %killerID){ - if((getSimTime() - %victimID.dmgdFlagTime) < 5000 && %killerID.player.holdingFlag $= "") + if((getSimTime() - %victimID.dmgdFlagTime) < 5000 && %killerID.player.holdingFlag $= ""){ return true; + } return false; } + function ProjectileData::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal){ + %cl = %projectile.sourceObject.client; + if(isObject(%cl)){ + %cl.lastExp = %data TAB %projectile.initialPosition TAB %position TAB %projectile.getWorldBox(); + %cl.lastExpTime = getSimTime(); + } + parent::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal); + } function ProjectileData::onExplode(%data, %proj, %pos, %mod){ %dataName = %data.getName(); %sourceClient = %proj.sourceObject.client; @@ -2525,9 +2893,9 @@ package dtStats{ //error("disc bounce" SPC %angleDeg SPC %wdist); } } - else + else{ %sourceClient.discReflect = 0; - + } if(vectorDist(%pos,%proj.sourceObject.getPosition()) < 4){ %sourceClient.lastDiscJump = getSimTime(); } @@ -2546,16 +2914,20 @@ package dtStats{ %sourceClient.stat["flareHit"] = getSimTime(); %sourceClient.flareSource = %proj.targetSource.client; } - else + else{ %sourceClient.stat["flareHit"] = 0; + } } if(isObject(%sourceClient)){ - if(%proj.dtShotSpeed > 0) + if(%proj.dtShotSpeed > 0){ %sourceClient.dtShotSpeed = %proj.dtShotSpeed; - else + } + else{ %sourceClient.dtShotSpeed = mFloor(vectorLen(%proj.sourceObject.getVelocity()) * 3.6); - %sourceClient.lastExp = %data TAB %proj.initialPosition TAB %pos; + } + %sourceClient.lastExp = %data TAB %proj.initialPosition TAB %pos TAB %proj.getWorldBox(); + %sourceClient.lastExpTime = getSimTime(); } parent::onExplode(%data, %proj, %pos, %mod); } @@ -2664,7 +3036,7 @@ package dtStats{ function CTFGame::awardScoreFlagCap(%game, %cl, %flag){ parent::awardScoreFlagCap(%game, %cl, %flag); - %cl.dtStats.stat["flagCaps"] = %cl.flagCaps; + %cl.dtStats.stat["flagCaps"]++; dtMinMax("flagCaps", "flag", 1, %cl.dtStats.stat["flagCaps"], %cl); } function CTFGame::awardScoreFlagTouch(%game, %cl, %flag){ @@ -2747,7 +3119,7 @@ package dtStats{ } function CTFGame::awardScoreFlagReturn(%game, %cl, %perc){ %val = parent::awardScoreFlagReturn(%game, %cl, %perc); - %cl.dtStats.stat["flagReturns"] = %cl.flagReturns; + %cl.dtStats.stat["flagReturns"]++; dtMinMax("flagReturns", "flag", 1, %cl.dtStats.stat["flagReturns"], %cl); %cl.dtStats.stat["returnPts"] = %cl.returnPts; return %val; @@ -2864,7 +3236,7 @@ package dtStats{ } function LCTFGame::awardScoreFlagCap(%game, %cl, %flag){ parent::awardScoreFlagCap(%game, %cl, %flag); - %cl.dtStats.stat["flagCaps"] = %cl.flagCaps; + %cl.dtStats.stat["flagCaps"]++; dtMinMax("flagCaps", "flag", 1, %cl.dtStats.stat["flagCaps"], %cl); } function LCTFGame::awardScoreFlagTouch(%game, %cl, %flag){ @@ -2919,7 +3291,7 @@ package dtStats{ } function SCtFGame::awardScoreFlagCap(%game, %cl, %flag){ parent::awardScoreFlagCap(%game, %cl, %flag); - %cl.dtStats.stat["flagCaps"] = %cl.flagCaps; + %cl.dtStats.stat["flagCaps"]++; dtMinMax("flagCaps", "flag", 1, %cl.dtStats.stat["flagCaps"], %cl); } function SCtFGame::awardScoreFlagTouch(%game, %cl, %flag){ @@ -2980,6 +3352,93 @@ package dtStats{ //} //} //} + // new debriefing stuff + function LakRabbitGame::sendDebriefing( %game, %client ){ + if(%client.isWatchOnly){ + parent::sendDebriefing(%game, %client); + return; + } + messageClient( %client, 'MsgClearDebrief', "" ); + if($dtStats::teamDebrief == 1){ + messageClient( %client, 'MsgDebriefAddLine', "", 'PLAYERSCOREKILLSMASSPEEDDISTTOT DISTSHOCKSL HITS' ); + // %cl.name, %score, %kills, %mas, %avgSpeed, %avgDistance, %alltotdistance, %shockPercent, %totshockhits + // Scores: + %totscore = 0; + %totkills = 0; + %totmas = 0; + %totspeed = 0; + %totdistance = 0; + //%totchainacc = 0; + //%totsnipepercent= 0; + %totshockpercent= 0; + %speeds = 0; + %dists = 0; + //%chains = 0; + //%snipes = 0; + %shocks = 0; + %alltotdistance = 0; + %totshockhits = 0; + + %count = $TeamRank[0, count]; + for(%i = 0; %i < %count; %i++){ + // Send the debrief line: + %cl = $TeamRank[0, %i]; + + if(%cl.score == 0) %score = 0; + else %score = %cl.score; + if(%cl.kills == 0) %kills = 0; + else %kills = %cl.kills; + if(%cl.mas == 0) %mas = 0; + else %mas = %cl.mas; + + //if(%cl.totalSnipes == 0) %cl.totalSnipes = 1; + if(%cl.totalShocks == 0) %cl.totalShocks = 1; + + if(%cl.totalSpeed == 0) %avgSpeed = 0; + else %avgSpeed = mFloor(%cl.totalSpeed/%cl.mas); + if(%cl.totalDistance == 0) %avgDistance = 0; + else %avgDistance = mFloor(%cl.totalDistance/%cl.mas); + //if(%cl.totalChainAccuracy == 0) %avgChainAcc = 0; + //else %avgChainAcc = mFloor(%cl.totalChainAccuracy/%cl.totalChainHits); + //if(%cl.totalSnipeHits == 0) %snipePercent = 0; + //else %snipePercent = mFloor(%cl.totalSnipeHits/%cl.totalSnipes*100); + if(%cl.totalShockHits == 0) %shockPercent = 0; + else %shockPercent = mFloor(%cl.totalShockHits/%cl.totalShocks*100); + if(%cl.totalDistance == 0) %othertotdistance = 0; + else %othertotdistance = mFloor(%cl.totalDistance); + if(%cl.totalShockHits == 0) %shockhits = 0; + else %shockhits = mFloor(%cl.totalShockHits); + + if(%client == %cl){ + messageClient( %client, 'MsgDebriefAddLine', "", ' %1%2%3%4%5%6%7%8%%%9', + StripMLControlChars(getTaggedString(%cl.name)), %score, %kills, %mas, %avgSpeed, %avgDistance, %othertotdistance, %shockPercent, %shockhits); + } + else{ + messageClient( %client, 'MsgDebriefAddLine', "", ' %1%2%3%4%5%6%7%8%%%9', + StripMLControlChars(getTaggedString(%cl.name)), %score, %kills, %mas, %avgSpeed, %avgDistance, %othertotdistance, %shockPercent, %shockhits); + } + + if(%score) %totscore += %score; + if(%kills) %totkills += %kills; + if(%mas) %totmas += %mas; + if(%avgSpeed){ %totspeed += %avgSpeed; %speeds++; } + if(%avgDistance){ %totdistance += %avgDistance; %dists++; } + //if(%avgChainAcc){ %totchainacc += %avgChainAcc; %chains++; } + //if(%snipePercent){ %totsnipepercent += %snipePercent; %snipes++; } + if(%shockPercent){ %totshockpercent += %shockPercent; %shocks++; } + if(%othertotdistance){ %alltotdistance += %othertotdistance; } + if(%shockhits){ %totshockhits += %shockhits; } + + } + messageClient( %client, 'MsgDebriefAddLine', "", '%1%2%3%4%5%6%7%8%%%9\n', + " Totals:", %totscore, %totkills, %totmas, mFloor(%totspeed/%speeds), mFloor(%totdistance/%dists), %alltotdistance, mFloor(%totshockpercent/%shocks), %totshockhits); + extendedDebrief(%game, %client); + } + else{ + parent::sendDebriefing(%game, %client); + extendedDebrief(%game, %client); + } + } }; //helps with game types that override functions and dont use parent // that way we get called first then the gametype can do whatever @@ -3025,164 +3484,16 @@ function CTFGame::awardScoreTeamkill(%game, %victimID, %killerID){ %killerID.dtStats.stat["teamKills"] = %killerID.teamKills; } + + function CTFGame::sendDebriefing(%game, %client){ if(%client.isWatchOnly){ parent::sendDebriefing(%game, %client); return; } messageClient( %client, 'MsgClearDebrief', "" ); - if($dtStats::teamDebrief == 2){ - %topScore = ""; - %topCount = 0; - for ( %team = 1; %team <= %game.numTeams; %team++ ){ - if ( %topScore $= "" || $TeamScore[%team] > %topScore ){ - %topScore = $TeamScore[%team]; - %firstTeam = %team; - %topCount = 1; - } - else if ( $TeamScore[%team] == %topScore ){ - %secondTeam = %team; - %topCount++; - } - } - - // Mission result: - if ( %topCount == 1 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 wins!', %game.getTeamName(%firstTeam) ); - else if ( %topCount == 2 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 and Team %2 tie!', %game.getTeamName(%firstTeam), %game.getTeamName(%secondTeam) ); - else - messageClient( %client, 'MsgDebriefResult', "", 'The mission ended in a tie.' ); - - messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); - messageClient( %client, 'MsgDebriefAddLine', "", '%1\t%3\t%2\t%4\n', $teamName[1], $teamName[2], $TeamScore[1], $TeamScore[2]); - messageClient( %client, 'MsgDebriefAddLine', "", 'Player\tScore\tOff\tDef\tKills\tPlayer\tScore\tOff\tDef\tKills'); - - %teamsize = ($TeamRank[1, count] > $TeamRank[2, count]) ? $TeamRank[1, count] : $TeamRank[2, count]; - for(%i=0; %i < %teamsize; %i++){ - %t1Obj = $TeamRank[1, %i]; - %t2Obj = $TeamRank[2, %i]; - if(isObject(%t1Obj) && isObject(%t2Obj)) - messageClient( %client, 'MsgDebriefAddLine', "", "" @ %i+1 @ "." @ getTaggedString(%t1Obj.name) @ "\t" @ %t1Obj.score @ "\t" @ %t1Obj.offenseScore @ "\t" @ %t1Obj.defenseScore @ "\t" @ %t1Obj.kills @ "\t" @ %i+1 @ "." @ getTaggedString(%t2Obj.name) @ "\t" @ %t2Obj.score @ "\t" @ %t2Obj.offenseScore @ "\t" @ %t2Obj.defenseScore @ "\t" @ %t2Obj.kills); - else if(isObject(%t1Obj) && !isObject(%t2Obj)) - messageClient( %client, 'MsgDebriefAddLine', "", "" @ %i+1 @ "." @ getTaggedString(%t1Obj.name) @ "\t" @ %t1Obj.score @ "\t" @ %t1Obj.offenseScore @ "\t" @ %t1Obj.defenseScore @ "\t" @ %t1Obj.kills @ "\t\t\t\t\t"); - else if(!isObject(%t1Obj) && isObject(%t2Obj)) - messageClient( %client, 'MsgDebriefAddLine', "", "\t\t\t\t\t" @ %i+1 @ "." @ getTaggedString(%t2Obj.name) @ "\t" @ %t2Obj.score @ "\t" @ %t2Obj.offenseScore @ "\t" @ %t2Obj.defenseScore @ "\t" @ %t2Obj.kills); - } - //now go through an list all the observers: - %printedHeader = false; - for (%i = 0; %i < ClientGroup.getCount(); %i++) - { - %cl = ClientGroup.getObject(%i); - if (%cl.team <= 0) - { - //print the header only if we actually find an observer - if (!%printedHeader) - { - %printedHeader = true; - messageClient(%client, 'MsgDebriefAddLine', "", "\n\nOBSERVERS\tScore\tOff\tDef\tKills"); - } - messageClient( %client, 'MsgDebriefAddLine', "", " " @ getTaggedString(%cl.name) @ "\t" @ %cl.score @ "\t" @ %cl.offenseScore @ "\t" @ %cl.defenseScore @ "\t" @ %cl.kills); - } - } - extendedDebrief(%game, %client); - } - else if($dtStats::teamDebrief == 1){ - %topScore = ""; - %topCount = 0; - for ( %team = 1; %team <= %game.numTeams; %team++ ) - { - if ( %topScore $= "" || $TeamScore[%team] > %topScore ) - { - %topScore = $TeamScore[%team]; - %firstTeam = %team; - %topCount = 1; - } - else if ( $TeamScore[%team] == %topScore ) - { - %secondTeam = %team; - %topCount++; - } - } - - // Mission result: - if ( %topCount == 1 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 wins!', %game.getTeamName(%firstTeam) ); - else if ( %topCount == 2 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 and Team %2 tie!', %game.getTeamName(%firstTeam), %game.getTeamName(%secondTeam) ); - else - messageClient( %client, 'MsgDebriefResult', "", 'The mission ended in a tie.' ); - - // Team scores: - messageClient( %client, 'MsgDebriefAddLine', "", 'TEAMSCORE' ); - for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) - { - if ( $TeamScore[%team] $= "" ) - %score = 0; - else - %score = $TeamScore[%team]; - messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2', %game.getTeamName(%team), %score ); - } - - // Player scores: - messageClient( %client, 'MsgDebriefAddLine', "", '\nPLAYERTEAMSCOREKILLSAssistsOffKillsDefKillsDisc MA' ); - for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) - %count[%team] = 0; - - %notDone = true; - while ( %notDone ) - { - // Get the highest remaining score: - %highScore = ""; - for ( %team = 1; %team <= %game.numTeams; %team++ ) - { - if ( %count[%team] < $TeamRank[%team, count] && ( %highScore $= "" || $TeamRank[%team, %count[%team]].score > %highScore ) ) - { - %highScore = $TeamRank[%team, %count[%team]].score; - %highTeam = %team; - } - } - - // Send the debrief line: - %cl = $TeamRank[%highTeam, %count[%highTeam]]; - %score = %cl.score $= "" ? 0 : %cl.score; - %kills = %cl.kills $= "" ? 0 : %cl.kills; - %line = '%1 %2%3%4%5%6%7%8'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, %cl.name, %game.getTeamName(%cl.team), %score, %kills, %cl.dtStats.stat["assist"], %cl.dtStats.stat["OffKills"], %cl.dtStats.stat["DefKills"], %cl.dtStats.stat["discMA"] ); - - %count[%highTeam]++; - %notDone = false; - for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) - { - if ( %count[%team] < $TeamRank[%team, count] ) - { - %notDone = true; - break; - } - } - } - - //now go through an list all the observers: - %count = ClientGroup.getCount(); - %printedHeader = false; - for (%i = 0; %i < %count; %i++) - { - %cl = ClientGroup.getObject(%i); - if (%cl.team <= 0) - { - //print the header only if we actually find an observer - if (!%printedHeader) - { - %printedHeader = true; - messageClient(%client, 'MsgDebriefAddLine', "", '\nOBSERVERSSCOREKILLSAssistsOffKillsDefKillsDisc MA'); - } - - //print out the client - %score = %cl.score $= "" ? 0 : %cl.score;// - %line = '%1 %2%3%4%5%6%7%8'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, %cl.name, "", %score, %kills, %cl.dtStats.stat["assist"], %cl.dtStats.stat["OffKills"], %cl.dtStats.stat["DefKills"], %cl.dtStats.stat["discMA"] ); - } - } + if($dtStats::teamDebrief == 1){ + %game.sendCTFDebrif(%client); extendedDebrief(%game, %client); } else{ @@ -3196,158 +3507,8 @@ function LCTFGame::sendDebriefing(%game, %client){ return; } messageClient( %client, 'MsgClearDebrief', "" ); - if($dtStats::teamDebrief == 2){ - %topScore = ""; - %topCount = 0; - for ( %team = 1; %team <= %game.numTeams; %team++ ){ - if ( %topScore $= "" || $TeamScore[%team] > %topScore ){ - %topScore = $TeamScore[%team]; - %firstTeam = %team; - %topCount = 1; - } - else if ( $TeamScore[%team] == %topScore ){ - %secondTeam = %team; - %topCount++; - } - } - - // Mission result: - if ( %topCount == 1 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 wins!', %game.getTeamName(%firstTeam) ); - else if ( %topCount == 2 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 and Team %2 tie!', %game.getTeamName(%firstTeam), %game.getTeamName(%secondTeam) ); - else - messageClient( %client, 'MsgDebriefResult', "", 'The mission ended in a tie.' ); - - messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); - messageClient( %client, 'MsgDebriefAddLine', "", '%1\t%3\t%2\t%4\n', $teamName[1], $teamName[2], $TeamScore[1], $TeamScore[2]); - messageClient( %client, 'MsgDebriefAddLine', "", 'Player\tScore\tOff\tDef\tKills\tPlayer\tScore\tOff\tDef\tKills'); - - %teamsize = ($TeamRank[1, count] > $TeamRank[2, count]) ? $TeamRank[1, count] : $TeamRank[2, count]; - for(%i=0; %i < %teamsize; %i++){ - %t1Obj = $TeamRank[1, %i]; - %t2Obj = $TeamRank[2, %i]; - if(isObject(%t1Obj) && isObject(%t2Obj)) - messageClient( %client, 'MsgDebriefAddLine', "", "" @ %i+1 @ "." @ getTaggedString(%t1Obj.name) @ "\t" @ %t1Obj.score @ "\t" @ %t1Obj.offenseScore @ "\t" @ %t1Obj.defenseScore @ "\t" @ %t1Obj.kills @ "\t" @ %i+1 @ "." @ getTaggedString(%t2Obj.name) @ "\t" @ %t2Obj.score @ "\t" @ %t2Obj.offenseScore @ "\t" @ %t2Obj.defenseScore @ "\t" @ %t2Obj.kills); - else if(isObject(%t1Obj) && !isObject(%t2Obj)) - messageClient( %client, 'MsgDebriefAddLine', "", "" @ %i+1 @ "." @ getTaggedString(%t1Obj.name) @ "\t" @ %t1Obj.score @ "\t" @ %t1Obj.offenseScore @ "\t" @ %t1Obj.defenseScore @ "\t" @ %t1Obj.kills @ "\t\t\t\t\t"); - else if(!isObject(%t1Obj) && isObject(%t2Obj)) - messageClient( %client, 'MsgDebriefAddLine', "", "\t\t\t\t\t" @ %i+1 @ "." @ getTaggedString(%t2Obj.name) @ "\t" @ %t2Obj.score @ "\t" @ %t2Obj.offenseScore @ "\t" @ %t2Obj.defenseScore @ "\t" @ %t2Obj.kills); - } - //now go through an list all the observers: - %printedHeader = false; - for (%i = 0; %i < ClientGroup.getCount(); %i++) - { - %cl = ClientGroup.getObject(%i); - if (%cl.team <= 0) - { - //print the header only if we actually find an observer - if (!%printedHeader) - { - %printedHeader = true; - messageClient(%client, 'MsgDebriefAddLine', "", "\n\nOBSERVERS\tScore\tOff\tDef\tKills"); - } - messageClient( %client, 'MsgDebriefAddLine', "", " " @ getTaggedString(%cl.name) @ "\t" @ %cl.score @ "\t" @ %cl.offenseScore @ "\t" @ %cl.defenseScore @ "\t" @ %cl.kills); - } - } - extendedDebrief(%game, %client); - } - else if($dtStats::teamDebrief == 1){ - %topScore = ""; - %topCount = 0; - for ( %team = 1; %team <= %game.numTeams; %team++ ) - { - if ( %topScore $= "" || $TeamScore[%team] > %topScore ) - { - %topScore = $TeamScore[%team]; - %firstTeam = %team; - %topCount = 1; - } - else if ( $TeamScore[%team] == %topScore ) - { - %secondTeam = %team; - %topCount++; - } - } - - // Mission result: - if ( %topCount == 1 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 wins!', %game.getTeamName(%firstTeam) ); - else if ( %topCount == 2 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 and Team %2 tie!', %game.getTeamName(%firstTeam), %game.getTeamName(%secondTeam) ); - else - messageClient( %client, 'MsgDebriefResult', "", 'The mission ended in a tie.' ); - - // Team scores: - messageClient( %client, 'MsgDebriefAddLine', "", 'TEAMSCORE' ); - for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) - { - if ( $TeamScore[%team] $= "" ) - %score = 0; - else - %score = $TeamScore[%team]; - messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2', %game.getTeamName(%team), %score ); - } - - // Player scores: - messageClient( %client, 'MsgDebriefAddLine', "", '\nPLAYERTEAMSCOREKILLSAssistsOffKillsDefKillsDisc MA' ); - for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) - %count[%team] = 0; - - %notDone = true; - while ( %notDone ) - { - // Get the highest remaining score: - %highScore = ""; - for ( %team = 1; %team <= %game.numTeams; %team++ ) - { - if ( %count[%team] < $TeamRank[%team, count] && ( %highScore $= "" || $TeamRank[%team, %count[%team]].score > %highScore ) ) - { - %highScore = $TeamRank[%team, %count[%team]].score; - %highTeam = %team; - } - } - - // Send the debrief line: - %cl = $TeamRank[%highTeam, %count[%highTeam]]; - %score = %cl.score $= "" ? 0 : %cl.score; - %kills = %cl.kills $= "" ? 0 : %cl.kills; - %line = '%1 %2%3%4%5%6%7%8'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, %cl.name, %game.getTeamName(%cl.team), %score, %kills, %cl.dtStats.stat["assist"], %cl.dtStats.stat["OffKills"], %cl.dtStats.stat["DefKills"], %cl.dtStats.stat["discMA"] ); - - %count[%highTeam]++; - %notDone = false; - for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) - { - if ( %count[%team] < $TeamRank[%team, count] ) - { - %notDone = true; - break; - } - } - } - - //now go through an list all the observers: - %count = ClientGroup.getCount(); - %printedHeader = false; - for (%i = 0; %i < %count; %i++) - { - %cl = ClientGroup.getObject(%i); - if (%cl.team <= 0) - { - //print the header only if we actually find an observer - if (!%printedHeader) - { - %printedHeader = true; - messageClient(%client, 'MsgDebriefAddLine', "", '\nOBSERVERSSCOREKILLSAssistsOffKillsDefKillsDisc MA'); - } - - //print out the client - %score = %cl.score $= "" ? 0 : %cl.score;// - %line = '%1 %2%3%4%5%6%7%8'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, %cl.name, "", %score, %kills, %cl.dtStats.stat["assist"], %cl.dtStats.stat["OffKills"], %cl.dtStats.stat["DefKills"], %cl.dtStats.stat["discMA"] ); - } - } + if($dtStats::teamDebrief == 1){ + %game.sendCTFDebrif(%client); extendedDebrief(%game, %client); } else{ @@ -3361,309 +3522,309 @@ function SCtFGame::sendDebriefing(%game, %client){ return; } messageClient( %client, 'MsgClearDebrief', "" ); - if($dtStats::teamDebrief == 2){ - %topScore = ""; - %topCount = 0; - for ( %team = 1; %team <= %game.numTeams; %team++ ){ - if ( %topScore $= "" || $TeamScore[%team] > %topScore ){ - %topScore = $TeamScore[%team]; - %firstTeam = %team; - %topCount = 1; - } - else if ( $TeamScore[%team] == %topScore ){ - %secondTeam = %team; - %topCount++; - } - } - - // Mission result: - if ( %topCount == 1 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 wins!', %game.getTeamName(%firstTeam) ); - else if ( %topCount == 2 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 and Team %2 tie!', %game.getTeamName(%firstTeam), %game.getTeamName(%secondTeam) ); - else - messageClient( %client, 'MsgDebriefResult', "", 'The mission ended in a tie.' ); - - messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); - messageClient( %client, 'MsgDebriefAddLine', "", '%1\t%3\t%2\t%4\n', $teamName[1], $teamName[2], $TeamScore[1], $TeamScore[2]); - messageClient( %client, 'MsgDebriefAddLine', "", 'Player\tScore\tOff\tDef\tKills\tPlayer\tScore\tOff\tDef\tKills'); - - %teamsize = ($TeamRank[1, count] > $TeamRank[2, count]) ? $TeamRank[1, count] : $TeamRank[2, count]; - for(%i=0; %i < %teamsize; %i++){ - %t1Obj = $TeamRank[1, %i]; - %t2Obj = $TeamRank[2, %i]; - if(isObject(%t1Obj) && isObject(%t2Obj)) - messageClient( %client, 'MsgDebriefAddLine', "", "" @ %i+1 @ "." @ getTaggedString(%t1Obj.name) @ "\t" @ %t1Obj.score @ "\t" @ %t1Obj.offenseScore @ "\t" @ %t1Obj.defenseScore @ "\t" @ %t1Obj.kills @ "\t" @ %i+1 @ "." @ getTaggedString(%t2Obj.name) @ "\t" @ %t2Obj.score @ "\t" @ %t2Obj.offenseScore @ "\t" @ %t2Obj.defenseScore @ "\t" @ %t2Obj.kills); - else if(isObject(%t1Obj) && !isObject(%t2Obj)) - messageClient( %client, 'MsgDebriefAddLine', "", "" @ %i+1 @ "." @ getTaggedString(%t1Obj.name) @ "\t" @ %t1Obj.score @ "\t" @ %t1Obj.offenseScore @ "\t" @ %t1Obj.defenseScore @ "\t" @ %t1Obj.kills @ "\t\t\t\t\t"); - else if(!isObject(%t1Obj) && isObject(%t2Obj)) - messageClient( %client, 'MsgDebriefAddLine', "", "\t\t\t\t\t" @ %i+1 @ "." @ getTaggedString(%t2Obj.name) @ "\t" @ %t2Obj.score @ "\t" @ %t2Obj.offenseScore @ "\t" @ %t2Obj.defenseScore @ "\t" @ %t2Obj.kills); - } - //now go through an list all the observers: - %printedHeader = false; - for (%i = 0; %i < ClientGroup.getCount(); %i++) - { - %cl = ClientGroup.getObject(%i); - if (%cl.team <= 0) - { - //print the header only if we actually find an observer - if (!%printedHeader) - { - %printedHeader = true; - messageClient(%client, 'MsgDebriefAddLine', "", "\n\nOBSERVERS\tScore\tOff\tDef\tKills"); - } - messageClient( %client, 'MsgDebriefAddLine', "", " " @ getTaggedString(%cl.name) @ "\t" @ %cl.score @ "\t" @ %cl.offenseScore @ "\t" @ %cl.defenseScore @ "\t" @ %cl.kills); - } - } - extendedDebrief(%game, %client); - } - else if($dtStats::teamDebrief == 1){ - %topScore = ""; - %topCount = 0; - for ( %team = 1; %team <= %game.numTeams; %team++ ) - { - if ( %topScore $= "" || $TeamScore[%team] > %topScore ) - { - %topScore = $TeamScore[%team]; - %firstTeam = %team; - %topCount = 1; - } - else if ( $TeamScore[%team] == %topScore ) - { - %secondTeam = %team; - %topCount++; - } - } - - // Mission result: - if ( %topCount == 1 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 wins!', %game.getTeamName(%firstTeam) ); - else if ( %topCount == 2 ) - messageClient( %client, 'MsgDebriefResult', "", 'Team %1 and Team %2 tie!', %game.getTeamName(%firstTeam), %game.getTeamName(%secondTeam) ); - else - messageClient( %client, 'MsgDebriefResult', "", 'The mission ended in a tie.' ); - - // Team scores: - messageClient( %client, 'MsgDebriefAddLine', "", 'TEAMSCORE' ); - for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) - { - if ( $TeamScore[%team] $= "" ) - %score = 0; - else - %score = $TeamScore[%team]; - messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2', %game.getTeamName(%team), %score ); - } - - // Player scores: - messageClient( %client, 'MsgDebriefAddLine', "", '\nPLAYERTEAMSCOREKILLSAssistsOffKillsDefKillsDisc MA' ); - for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) - %count[%team] = 0; - - %notDone = true; - while ( %notDone ) - { - // Get the highest remaining score: - %highScore = ""; - for ( %team = 1; %team <= %game.numTeams; %team++ ) - { - if ( %count[%team] < $TeamRank[%team, count] && ( %highScore $= "" || $TeamRank[%team, %count[%team]].score > %highScore ) ) - { - %highScore = $TeamRank[%team, %count[%team]].score; - %highTeam = %team; - } - } - - // Send the debrief line: - %cl = $TeamRank[%highTeam, %count[%highTeam]]; - %score = %cl.score $= "" ? 0 : %cl.score; - %kills = %cl.kills $= "" ? 0 : %cl.kills; - %line = '%1 %2%3%4%5%6%7%8'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, %cl.name, %game.getTeamName(%cl.team), %score, %kills, %cl.dtStats.stat["assist"], %cl.dtStats.stat["OffKills"], %cl.dtStats.stat["DefKills"], %cl.dtStats.stat["discMA"] ); - - %count[%highTeam]++; - %notDone = false; - for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) - { - if ( %count[%team] < $TeamRank[%team, count] ) - { - %notDone = true; - break; - } - } - } - - //now go through an list all the observers: - %count = ClientGroup.getCount(); - %printedHeader = false; - for (%i = 0; %i < %count; %i++) - { - %cl = ClientGroup.getObject(%i); - if (%cl.team <= 0) - { - //print the header only if we actually find an observer - if (!%printedHeader) - { - %printedHeader = true; - messageClient(%client, 'MsgDebriefAddLine', "", '\nOBSERVERSSCOREKILLSAssistsOffKillsDefKillsDisc MA'); - } - - //print out the client - %score = %cl.score $= "" ? 0 : %cl.score;// - %line = '%1 %2%3%4%5%6%7%8'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, %cl.name, "", %score, %kills, %cl.dtStats.stat["assist"], %cl.dtStats.stat["OffKills"], %cl.dtStats.stat["DefKills"], %cl.dtStats.stat["discMA"] ); - } - } + if($dtStats::teamDebrief == 1){ + %game.sendCTFDebrif(%client); extendedDebrief(%game, %client); } else{ parent::sendDebriefing(%game, %client); } } +function DefaultGame::sendCTFDebrif(%game,%client){ + %topScore = ""; + %topCount = 0; + for ( %team = 1; %team <= %game.numTeams; %team++ ) + { + if ( %topScore $= "" || $TeamScore[%team] > %topScore ) + { + %topScore = $TeamScore[%team]; + %firstTeam = %team; + %topCount = 1; + } + else if ( $TeamScore[%team] == %topScore ) + { + %secondTeam = %team; + %topCount++; + } + } + + // Mission result: + if ( %topCount == 1 ) + messageClient( %client, 'MsgDebriefResult', "", 'Team %1 wins!', %game.getTeamName(%firstTeam) ); + else if ( %topCount == 2 ) + messageClient( %client, 'MsgDebriefResult', "", 'Team %1 and Team %2 tie!', %game.getTeamName(%firstTeam), %game.getTeamName(%secondTeam) ); + else + messageClient( %client, 'MsgDebriefResult', "", 'The mission ended in a tie.' ); + + // Team scores: + messageClient( %client, 'MsgDebriefAddLine', "", 'TEAMSCORE' ); + for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) + { + if ( $TeamScore[%team] $= "" ) + %score = 0; + else + %score = $TeamScore[%team]; + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2', %game.getTeamName(%team), %score ); + } + + // Player scores: + messageClient( %client, 'MsgDebriefAddLine', "", '\nPLAYERTEAMSCOREKILLSAssistsOffKillsDefKillsDisc MA' ); + for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) + %count[%team] = 0; + + %notDone = true; + while ( %notDone ) + { + // Get the highest remaining score: + %highScore = ""; + for ( %team = 1; %team <= %game.numTeams; %team++ ) + { + if ( %count[%team] < $TeamRank[%team, count] && ( %highScore $= "" || $TeamRank[%team, %count[%team]].score > %highScore ) ) + { + %highScore = $TeamRank[%team, %count[%team]].score; + %highTeam = %team; + } + } + + // Send the debrief line: + %cl = $TeamRank[%highTeam, %count[%highTeam]]; + %score = %cl.score $= "" ? 0 : %cl.score; + %kills = %cl.kills $= "" ? 0 : %cl.kills; + %nameColor = %cl == %client ? "" : "";// + if(%cl == %client){ + %line = '%9%1 %2%3%4%5%6%7%8'; + + }else{ + %line = '%9%1 %2%3%4%5%6%7%8'; + } + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(getTaggedString(%cl.name)), %game.getTeamName(%cl.team), %score, %kills, %cl.dtStats.stat["assist"], %cl.dtStats.stat["OffKills"], %cl.dtStats.stat["DefKills"], %cl.dtStats.stat["discMA"],%nameColor); + + %count[%highTeam]++; + %notDone = false; + for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) + { + if ( %count[%team] < $TeamRank[%team, count] ) + { + %notDone = true; + break; + } + } + } + + //now go through an list all the observers: + %count = ClientGroup.getCount(); + %printedHeader = false; + for (%i = 0; %i < %count; %i++) + { + %cl = ClientGroup.getObject(%i); + if (%cl.team <= 0) + { + //print the header only if we actually find an observer + if (!%printedHeader) + { + %printedHeader = true; + messageClient(%client, 'MsgDebriefAddLine', "", '\nOBSERVERSSCOREKILLSAssistsOffKillsDefKillsDisc MA'); + } + + //print out the client + %score = %cl.score $= "" ? 0 : %cl.score;// + %kills = %cl.kills $= "" ? 0 : %cl.kills; + %nameColor = %cl == %client ? "" : ""; + if(%cl == %client){ + %line = '%9%1 %2%3%4%5%6%7%8'; + } + else{ + %line = '%9%1 %2%3%4%5%6%7%8'; + } + messageClient( %client, 'MsgDebriefAddLine', "", %line,StripMLControlChars(getTaggedString(%cl.name)), "", %score, %kills, %cl.dtStats.stat["assist"], %cl.dtStats.stat["OffKills"], %cl.dtStats.stat["DefKills"], %cl.dtStats.stat["discMA"],%nameColor ); + } + } +} function extendedDebrief(%game, %client){ if($dtStats::evoStyleDebrief && !%client.isWatchOnly){ if(dtGameStat.gc["flag"] > 0){ messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); - messageClient( %client, 'MsgDebriefAddLine', "", 'FLAG STATS\tPLAYER\t' ); + messageClient( %client, 'MsgDebriefAddLine', "", 'FLAG STATS\tPLAYER\t' ); if(dtGameStat.stat["heldTimeSec"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Fastest Cap\t%1\t%2 Sec', dtGameStat.name["heldTimeSec"], dtGameStat.stat["heldTimeSec"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Fastest Cap\t%3%1\t%2 Sec', StripMLControlChars(hasValueS(dtGameStat.name["heldTimeSec"],"NA")), dtGameStat.stat["heldTimeSec"],(%client == dtGameStat.client["heldTimeSec"]) ? "" : ""); if(dtGameStat.stat["grabSpeed"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Flaming Ass\t%1\t%2 Kmh', dtGameStat.name["grabSpeed"], dtGameStat.stat["grabSpeed"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Flaming Ass\t%3%1\t%2 Kmh', StripMLControlChars(hasValueS(dtGameStat.name["grabSpeed"],"NA")), dtGameStat.stat["grabSpeed"],(%client == dtGameStat.client["grabSpeed"]) ? "" : ""); if(dtGameStat.stat["flagCaps"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Cap Mastah\t%1\t%2', dtGameStat.name["flagCaps"], dtGameStat.stat["flagCaps"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Cap Mastah\t%3%1\t%2', StripMLControlChars(hasValueS(dtGameStat.name["flagCaps"],"NA")), dtGameStat.stat["flagCaps"],(%client == dtGameStat.client["flagCaps"]) ? "" : ""); if(dtGameStat.stat["flagGrabs"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Grabz0r\t%1\t%2', dtGameStat.name["flagGrabs"], dtGameStat.stat["flagGrabs"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Grabz0r\t%3%1\t%2', StripMLControlChars(hasValueS(dtGameStat.name["flagGrabs"],"NA")), dtGameStat.stat["flagGrabs"],(%client == dtGameStat.client["flagGrabs"]) ? "" : ""); if(dtGameStat.stat["carrierKills"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'FC killer\t%1\t%2', dtGameStat.name["carrierKills"], dtGameStat.stat["carrierKills"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'FC killer\t%3%1\t%2', StripMLControlChars(hasValueS(dtGameStat.name["carrierKills"],"NA")), dtGameStat.stat["carrierKills"],(%client == dtGameStat.client["carrierKills"]) ? "" : ""); if(dtGameStat.stat["flagDefends"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Flag Guardian\t%1\t%2', dtGameStat.name["flagDefends"], dtGameStat.stat["flagDefends"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Flag Guardian\t%3%1\t%2', StripMLControlChars(hasValueS(dtGameStat.name["flagDefends"],"NA")), dtGameStat.stat["flagDefends"],(%client == dtGameStat.client["flagDefends"]) ? "" : ""); if(dtGameStat.stat["escortAssists"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Flag Escort\t%1\t%2', dtGameStat.name["escortAssists"], dtGameStat.stat["escortAssists"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Flag Escort\t%3%1\t%2', StripMLControlChars(hasValueS(dtGameStat.name["escortAssists"],"NA")), dtGameStat.stat["escortAssists"],(%client == dtGameStat.client["escortAssists"]) ? "" : ""); if(dtGameStat.stat["stalemateReturn"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Stalemate Breaker\t%1\t%2', dtGameStat.name["stalemateReturn"], dtGameStat.stat["stalemateReturn"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Stalemate Breaker\t%3%1\t%2', StripMLControlChars(hasValueS(dtGameStat.name["stalemateReturn"],"NA")), dtGameStat.stat["stalemateReturn"],(%client == dtGameStat.client["stalemateReturn"]) ? "" : ""); if(dtGameStat.stat["flagReturns"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Flag Returns\t%1\t%2', dtGameStat.name["flagReturns"], dtGameStat.stat["flagReturns"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Flag Returns\t%3%1\t%2', StripMLControlChars(hasValueS(dtGameStat.name["flagReturns"],"NA")), dtGameStat.stat["flagReturns"],(%client == dtGameStat.client["flagReturns"]) ? "" : ""); } if(dtGameStat.gc["ma"] > 0){ messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); - messageClient( %client, 'MsgDebriefAddLine', "", '\tPLAYER\tMA\tPLAYER\tDISTANCE'); + messageClient( %client, 'MsgDebriefAddLine', "", '\tPLAYER\tMA\tPLAYER\tDISTANCE'); if(dtGameStat.stat["discMA"] > 0){ - %line = 'Disc\t%1\t%2\t%3\t%4m'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["discMA"], dtGameStat.stat["discMA"], dtGameStat.name["discMAHitDist"], mFormatFloat(dtGameStat.stat["discMAHitDist"], "%.2f")); + %line = 'Disc\t%5%1\t%2\t%6%3\t%4m'; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["discMA"],"NA")), dtGameStat.stat["discMA"], StripMLControlChars(hasValueS(dtGameStat.name["discMAHitDist"],"NA")), mFormatFloat(dtGameStat.stat["discMAHitDist"], "%.2f"),(%client == dtGameStat.client["discMA"]) ? "" : "", (%client == dtGameStat.client["discMAHitDist"]) ? "" : ""); } if(dtGameStat.stat["plasmaMA"] > 0){ - %line = 'Plasma\t%1\t%2\t%3\t%4m'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["plasmaMA"], dtGameStat.stat["plasmaMA"], dtGameStat.name["plasmaMAHitDist"], mFormatFloat(dtGameStat.stat["plasmaMAHitDist"], "%.2f")); + %line = 'Plasma\t%5%1\t%2\t%6%3\t%4m'; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["plasmaMA"],"NA")), dtGameStat.stat["plasmaMA"], StripMLControlChars(hasValueS(dtGameStat.name["plasmaMAHitDist"],"NA")), mFormatFloat(dtGameStat.stat["plasmaMAHitDist"], "%.2f"),(%client == dtGameStat.client["plasmaMA"]) ? "" : "", (%client == dtGameStat.client["plasmaMAHitDist"]) ? "" : ""); } if(dtGameStat.stat["blasterMA"] > 0){ - %line = 'Blaster\t%1\t%2\t%3\t%4m'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["blasterMA"], dtGameStat.stat["blasterMA"], dtGameStat.name["blasterMAHitDist"], mFormatFloat(dtGameStat.stat["blasterMAHitDist"], "%.2f")); + %line = 'Blaster\t%5%1\t%2\t%6%3\t%4m'; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["blasterMA"],"NA")), dtGameStat.stat["blasterMA"], StripMLControlChars(hasValueS(dtGameStat.name["blasterMAHitDist"],"NA")), mFormatFloat(dtGameStat.stat["blasterMAHitDist"], "%.2f"),(%client == dtGameStat.client["blasterMA"]) ? "" : "", (%client == dtGameStat.client["blasterMAHitDist"]) ? "" : ""); } if(dtGameStat.stat["grenadeMA"] > 0){ - %line = 'Grenade Launcher\t%1\t%2\t%3\t%4m'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["grenadeMA"], dtGameStat.stat["grenadeMA"], dtGameStat.name["grenadeMAHitDist"], mFormatFloat(dtGameStat.stat["grenadeMAHitDist"], "%.2f")); + %line = 'Grenade Launcher\t%5%1\t%2\t%6%3\t%4m'; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["grenadeMA"],"NA")), dtGameStat.stat["grenadeMA"], StripMLControlChars(hasValueS(dtGameStat.name["grenadeMAHitDist"],"NA")), mFormatFloat(dtGameStat.stat["grenadeMAHitDist"], "%.2f"),(%client == dtGameStat.client["grenadeMA"]) ? "" : "", (%client == dtGameStat.client["grenadeMAHitDist"]) ? "" : ""); } if(dtGameStat.stat["mortarMA"] > 0){ - %line = 'Mortar\t%1\t%2\t%3\t%4m'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["mortarMA"], dtGameStat.stat["mortarMA"], dtGameStat.name["mortarMAHitDist"], mFormatFloat(dtGameStat.stat["mortarMAHitDist"], "%.2f")); + %line = 'Mortar\t%5%1\t%2\t%6%3\t%4m'; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["mortarMA"],"NA")), dtGameStat.stat["mortarMA"], StripMLControlChars(hasValueS(dtGameStat.name["mortarMAHitDist"],"NA")), mFormatFloat(dtGameStat.stat["mortarMAHitDist"], "%.2f"),(%client == dtGameStat.client["mortarMA"]) ? "" : "", (%client == dtGameStat.client["mortarMAHitDist"]) ? "" : ""); } } if(dtGameStat.gc["misc"] > 0){ messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); messageClient( %client, 'MsgDebriefAddLine', "", 'MISC' ); if(dtGameStat.stat["laserHeadShot"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Headhunter \t%1\t%2',dtGameStat.name["laserHeadShot"],dtGameStat.stat["laserHeadShot"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Headhunter\t%3%1\t%2',StripMLControlChars(dtGameStat.name["laserHeadShot"]),dtGameStat.stat["laserHeadShot"],(%client == dtGameStat.client["flagReturns"]) ? "" : ""); if(dtGameStat.stat["laserHitDist"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Longest Snipeshot\t%1\t%2m',dtGameStat.name["laserHitDist"],mFormatFloat(dtGameStat.stat["laserHitDist"], "%.2f")); + messageClient( %client, 'MsgDebriefAddLine', "", 'Longest Snipe\t%3%1\t%2m',StripMLControlChars(dtGameStat.name["laserHitDist"]),mFormatFloat(dtGameStat.stat["laserHitDist"], "%.2f"),(%client == dtGameStat.client["laserHitDist"]) ? "" : ""); if(dtGameStat.stat["shockRearShot"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Taser Tailgater\t%1\t%2',dtGameStat.name["shockRearShot"],dtGameStat.stat["shockRearShot"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Taser Tailgater\t%3%1\t%2',StripMLControlChars(dtGameStat.name["shockRearShot"]),dtGameStat.stat["shockRearShot"],(%client == dtGameStat.client["shockRearShot"]) ? "" : ""); if(dtGameStat.stat["repairs"] > 0) - messageClient( %client, 'MsgDebriefAddLine', "", 'Fixer Upper\t%1\t%2',dtGameStat.name["repairs"],dtGameStat.stat["repairs"]); + messageClient( %client, 'MsgDebriefAddLine', "", 'Fixer Upper\t%3%1\t%2',StripMLControlChars(dtGameStat.name["repairs"]),dtGameStat.stat["repairs"],(%client == dtGameStat.client["repairs"]) ? "" : ""); } if(dtGameStat.gc["wep"] > 0){ messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); - messageClient( %client, 'MsgDebriefAddLine', "", '\tPLAYER\tDAMAGE\tPLAYER\tKILLS'); + messageClient( %client, 'MsgDebriefAddLine', "", '\tPLAYER\tDMG\tPLAYER\tKILLS'); - if(dtGameStat.stat["blasterDmg"] > 0){ - %line = 'Blaster Master\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["blasterDmg"], mFormatFloat(dtGameStat.stat["blasterDmg"], "%.2f"), dtGameStat.name["blasterKills"], dtGameStat.stat["blasterKills"]); + if(dtGameStat.stat["blasterKills"] > 0){ + %line = 'Blaster Master\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["blasterDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["blasterKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["blasterDmg"],"NA")), mFormatFloat(dtGameStat.stat["blasterDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["blasterKills"],"NA")), dtGameStat.stat["blasterKills"],%color1,%color2); } - if(dtGameStat.stat["plasmaDmg"] > 0){ - %line = 'Plasma Roaster\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["plasmaDmg"], mFormatFloat(dtGameStat.stat["plasmaDmg"], "%.2f"), dtGameStat.name["plasmaKills"], dtGameStat.stat["plasmaKills"]); + if(dtGameStat.stat["plasmaKills"] > 0){ + %line = 'Plasma Roaster\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["plasmaDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["plasmaKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["plasmaDmg"],"NA")), mFormatFloat(dtGameStat.stat["plasmaDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["plasmaKills"],"NA")), dtGameStat.stat["plasmaKills"],%color1,%color2); } - if(dtGameStat.stat["discDmg"] > 0){ - %line = 'Disc-O-maniac\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["discDmg"], mFormatFloat(dtGameStat.stat["discDmg"], "%.2f"), dtGameStat.name["discKills"], dtGameStat.stat["discKills"]); + if(dtGameStat.stat["discKills"] > 0){ + %line = 'Disc-O-maniac\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["discDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["discKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["discDmg"],"NA")), mFormatFloat(dtGameStat.stat["discDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["discKills"],"NA")), dtGameStat.stat["discKills"],%color1,%color2); } - if(dtGameStat.stat["cgDmg"] > 0){ - %line = 'Chainwh0re\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["cgDmg"], mFormatFloat(dtGameStat.stat["cgDmg"], "%.2f"), dtGameStat.name["cgKills"], dtGameStat.stat["cgKills"]); + if(dtGameStat.stat["cgKills"] > 0){ + %line = 'Chainwh0re\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["cgDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["cgKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["cgDmg"],"NA")), mFormatFloat(dtGameStat.stat["cgDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["cgKills"],"NA")), dtGameStat.stat["cgKills"],%color1,%color2); } - if(dtGameStat.stat["hGrenadeDmg"] > 0){ - %line = 'Grenade puppy\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["hGrenadeDmg"], mFormatFloat(dtGameStat.stat["hGrenadeDmg"], "%.2f"), dtGameStat.name["hGrenadeKills"], dtGameStat.stat["hGrenadeKills"]); + if(dtGameStat.stat["hGrenadeKills"] > 0){ + %line = 'Grenade puppy\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["hGrenadeDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["hGrenadeKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["hGrenadeDmg"],"NA")), mFormatFloat(dtGameStat.stat["hGrenadeDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["hGrenadeKills"],"NA")), dtGameStat.stat["hGrenadeKills"],%color1,%color2); } - if(dtGameStat.stat["laserDmg"] > 0){ - %line = 'Laser Turret\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["laserDmg"], mFormatFloat(dtGameStat.stat["laserDmg"], "%.2f"), dtGameStat.name["laserKills"], dtGameStat.stat["laserKills"]); + if(dtGameStat.stat["laserKills"] > 0){ + %line = 'Laser Turret\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["laserDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["laserKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["laserDmg"],"NA")), mFormatFloat(dtGameStat.stat["laserDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["laserKills"],"NA")), dtGameStat.stat["laserKills"],%color1,%color2); } - if(dtGameStat.stat["mortarDmg"] > 0){ - %line = 'Mortar Maniac\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["mortarDmg"], mFormatFloat(dtGameStat.stat["mortarDmg"], "%.2f"), dtGameStat.name["mortarKills"], dtGameStat.stat["mortarKills"]); + if(dtGameStat.stat["mortarKills"] > 0){ + %line = 'Mortar Maniac\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["mortarDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["mortarKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["mortarDmg"],"NA")), mFormatFloat(dtGameStat.stat["mortarDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["mortarKills"],"NA")), dtGameStat.stat["mortarKills"],%color1,%color2); } - if(dtGameStat.stat["missileDmg"] > 0){ - %line = 'Missile Lamer\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["missileDmg"], mFormatFloat(dtGameStat.stat["missileDmg"], "%.2f"), dtGameStat.name["missileKills"], dtGameStat.stat["missileKills"]); + if(dtGameStat.stat["missileKills"] > 0){ + %line = 'Missile Lamer\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["missileDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["missileKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["missileDmg"],"NA")), mFormatFloat(dtGameStat.stat["missileDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["missileKills"],"NA")), dtGameStat.stat["missileKills"],%color1,%color2); } - if(dtGameStat.stat["shockDmg"] > 0){ - %line = 'Shocklance Bee\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["shockDmg"], mFormatFloat(dtGameStat.stat["shockDmg"], "%.2f"), dtGameStat.name["shockKills"], dtGameStat.stat["shockKills"]); + if(dtGameStat.stat["shockKills"] > 0){ + %line = 'Shocklance Bee\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["shockDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["shockKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["shockDmg"],"NA")), mFormatFloat(dtGameStat.stat["shockDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["shockKills"],"NA")), dtGameStat.stat["shockKills"],%color1,%color2); } - if(dtGameStat.stat["mineDmg"] > 0){ - %line = 'Mine Mayhem\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["mineDmg"], mFormatFloat(dtGameStat.stat["mineDmg"], "%.2f"), dtGameStat.name["mineKills"], dtGameStat.stat["mineKills"]); + if(dtGameStat.stat["mineKills"] > 0){ + %line = 'Mine Mayhem\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["mineDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["mineKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["mineDmg"],"NA")), mFormatFloat(dtGameStat.stat["mineDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["mineKills"],"NA")), dtGameStat.stat["mineKills"],%color1,%color2); } - if(dtGameStat.stat["outdoorDepTurretDmg"] > 0){ - %line = 'Road Killer\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["outdoorDepTurretDmg"], mFormatFloat(dtGameStat.stat["outdoorDepTurretDmg"], "%.2f"), dtGameStat.name["outdoorDepTurretKills"], dtGameStat.stat["outdoorDepTurretKills"]); + if(dtGameStat.stat["outdoorDepTurretKills"] > 0){ + %line = 'Spike Farmer\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["outdoorDepTurretDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["outdoorDepTurretKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["outdoorDepTurretDmg"],"NA")), mFormatFloat(dtGameStat.stat["outdoorDepTurretDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["outdoorDepTurretKills"],"NA")), dtGameStat.stat["outdoorDepTurretKills"],%color1,%color2); } - if(dtGameStat.stat["indoorDepTurretDmg"] > 0){ - %line = 'Clamp Farmer\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["indoorDepTurretDmg"], mFormatFloat(dtGameStat.stat["indoorDepTurretDmg"], "%.2f"), dtGameStat.name["indoorDepTurretKills"], dtGameStat.stat["indoorDepTurretKills"]); + if(dtGameStat.stat["indoorDepTurretKills"] > 0){ + %line = 'Clamp Farmer\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["indoorDepTurretDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["indoorDepTurretKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["indoorDepTurretDmg"],"NA")), mFormatFloat(dtGameStat.stat["indoorDepTurretDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["indoorDepTurretKills"],"NA")), dtGameStat.stat["indoorDepTurretKills"],%color1,%color2); } - if(dtGameStat.stat["roadDmg"] > 0){ - %line = 'Spike Farmer\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["roadDmg"], mFormatFloat(dtGameStat.stat["roadDmg"], "%.2f"), dtGameStat.name["roadKills"], dtGameStat.stat["roadKills"]); + if(dtGameStat.stat["roadKills"] > 0){ + %line = 'Road Killer\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["roadDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["roadKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["roadDmg"],"NA")), mFormatFloat(dtGameStat.stat["roadDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["roadKills"],"NA")), dtGameStat.stat["roadKills"],%color1,%color2); } - if(dtGameStat.stat["shrikeBlasterDmg"] > 0){ - %line = 'Shrike Gunner\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["shrikeBlasterDmg"], mFormatFloat(dtGameStat.stat["shrikeBlasterDmg"], "%.2f"), dtGameStat.name["shrikeBlasterKills"], dtGameStat.stat["shrikeBlasterKills"]); + if(dtGameStat.stat["shrikeBlasterKills"] > 0){ + %line = 'Shrike Gunner\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["shrikeBlasterDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["shrikeBlasterKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["shrikeBlasterDmg"],"NA")), mFormatFloat(dtGameStat.stat["shrikeBlasterDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["shrikeBlasterKills"],"NA")), dtGameStat.stat["shrikeBlasterKills"],%color1,%color2); } - if(dtGameStat.stat["bellyTurretDmg"] > 0){ - %line = 'Tailgunner\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["bellyTurretDmg"], mFormatFloat(dtGameStat.stat["bellyTurretDmg"], "%.2f"), dtGameStat.name["bellyTurretKills"], dtGameStat.stat["bellyTurretKills"]); + if(dtGameStat.stat["bellyTurretKills"] > 0){ + %line = 'Tailgunner\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["bellyTurretDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["bellyTurretKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["bellyTurretDmg"],"NA")), mFormatFloat(dtGameStat.stat["bellyTurretDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["bellyTurretKills"],"NA")), dtGameStat.stat["bellyTurretKills"],%color1,%color2); } - if(dtGameStat.stat["bomberBombsDmg"] > 0){ - %line = 'Clamp Farmer\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["bomberBombsDmg"], mFormatFloat(dtGameStat.stat["bomberBombsDmg"], "%.2f"), dtGameStat.name["bomberBombsKills"], dtGameStat.stat["bomberBombsKills"]); + if(dtGameStat.stat["bomberBombsKills"] > 0){ + %line = 'Bomber Bombs\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["bomberBombsDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["bomberBombsKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["bomberBombsDmg"],"NA")), mFormatFloat(dtGameStat.stat["bomberBombsDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["bomberBombsKills"],"NA")), dtGameStat.stat["bomberBombsKills"],%color1,%color2); } - if(dtGameStat.stat["tankChaingunDmg"] > 0){ - %line = 'Tank Gunner (chain)\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["tankChaingunDmg"], mFormatFloat(dtGameStat.stat["tankChaingunDmg"], "%.2f"), dtGameStat.name["tankChaingunKills"], dtGameStat.stat["tankChaingunKills"]); + if(dtGameStat.stat["tankChaingunKills"] > 0){ + %line = 'Tank (chain)\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["tankChaingunDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["tankChaingunKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["tankChaingunDmg"],"NA")), mFormatFloat(dtGameStat.stat["tankChaingunDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["tankChaingunKills"],"NA")), dtGameStat.stat["tankChaingunKills"],%color1,%color2); } - if(dtGameStat.stat["tankMortarDmg"] > 0){ - %line = 'Tank Gunner (mortar)\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["tankMortarDmg"], mFormatFloat(dtGameStat.stat["tankMortarDmg"], "%.2f"), dtGameStat.name["tankMortarKills"], dtGameStat.stat["tankMortarKills"]); + if(dtGameStat.stat["tankMortarKills"] > 0){ + %line = 'Tank (mortar)\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["tankMortarDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["tankMortarKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["tankMortarDmg"],"NA")), mFormatFloat(dtGameStat.stat["tankMortarDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["tankMortarKills"],"NA")), dtGameStat.stat["tankMortarKills"],%color1,%color2); } - if(dtGameStat.stat["satchelDmg"] > 0){ - %line = 'Satchel Punk\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["satchelDmg"], mFormatFloat(dtGameStat.stat["satchelDmg"], "%.2f"), dtGameStat.name["satchelKills"], dtGameStat.stat["satchelKills"]); + if(dtGameStat.stat["satchelKills"] > 0){ + %line = 'Satchel Punk\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["satchelDmg"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["satchelKills"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["satchelDmg"],"NA")), mFormatFloat(dtGameStat.stat["satchelDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["satchelKills"],"NA")), dtGameStat.stat["satchelKills"],%color1,%color2); } - if(dtGameStat.stat["minePlusDisc"] > 0){ - %line = 'Combo King\t%1\t%2\t%3\t%4'; - messageClient( %client, 'MsgDebriefAddLine', "", %line, dtGameStat.name["minePlusDisc"], mFormatFloat(dtGameStat.stat["minePlusDisc"], "%.2f"), dtGameStat.name["minePlusDiscKill"], dtGameStat.stat["minePlusDiscKill"]); + if(dtGameStat.stat["minePlusDiscKill"] > 0){ + %line = 'Combo King\t%5%1\t%2\t%6%3\t%4'; + %color1 = (%client == dtGameStat.client["minePlusDisc"]) ? "" : ""; + %color2 = (%client == dtGameStat.client["minePlusDiscKill"]) ? "" : ""; + messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["minePlusDisc"],"NA")), mFormatFloat(dtGameStat.stat["minePlusDisc"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["minePlusDiscKill"],"NA")), dtGameStat.stat["minePlusDiscKill"],%color1,%color2); } } } @@ -3693,7 +3854,7 @@ package dtStatsGame{ %missionType = $HostTypeName[%arg4] @ "Game"; %map = cleanMapName(%mission); $dtServer::voteFor[%map,%missionType]++; - getMapID(%map,%missionType,0,0); + getMapID(%map,%missionType,0); } } } @@ -3891,6 +4052,7 @@ package dtStatsGame{ function CTFGame::playerTouchEnemyFlag(%game, %player, %flag){ if(%flag.isHome){ %game.dtTotalFlagTime[%flag] = getSimTime(); + %player.client.dtStats.stat["flagGrabAtStand"]++; } if(!%player.flagTossWait){ if(%flag.speed > 10 && %flag.pass && %player.client.dtStats != %flag.lastDTStat){ @@ -4022,6 +4184,7 @@ package dtStatsGame{ function LCTFGame::playerTouchEnemyFlag(%game, %player, %flag){ if(%flag.isHome){ %game.dtTotalFlagTime[%flag] = getSimTime(); + %player.client.dtStats.stat["flagGrabAtStand"]++; } if(!%player.flagTossWait){ if(%flag.speed > 10 && %flag.pass && %player.client.dtStats != %flag.lastDTStat){ @@ -4144,6 +4307,7 @@ package dtStatsGame{ function SCtFGame::playerTouchEnemyFlag(%game, %player, %flag){ if(%flag.isHome){ %game.dtTotalFlagTime[%flag] = getSimTime(); + %player.client.dtStats.stat["flagGrabAtStand"]++; } if(!%player.flagTossWait){ if(%flag.speed > 10 && %flag.pass && %player.client.dtStats != %flag.lastDTStat){ @@ -4365,7 +4529,7 @@ function ArenaHud( %game, %client, %tag ) if ( %cl == %client ) if ( %cl.isAlive ) - %clStyle = ""; + %clStyle = ""; else %clStyle = ""; else if ( %cl.isAlive ) @@ -4424,8 +4588,8 @@ function ArenaHud( %game, %client, %tag ) // Arena Footer messageClient( %client, 'SetLineHud', "", %tag, %index++, '\t[View Server Stats]', %game.class); - messageClient( %client, 'SetLineHud', "", %tag, %index++, "\tTribes 2 Arena - 1.0 Final - http://www.planettribes.com/t2arena/" ); -// messageClient( %client, 'SetLineHud', "", %tag, %index++, "\thttp://www.planettribes.com/t2arena/" ); + messageClient( %client, 'SetLineHud', "", %tag, %index++, "\tTribes 2 Arena - 1.0 Final - http://www.planettribes.com/t2arena/" ); +// messageClient( %client, 'SetLineHud', "", %tag, %index++, "\thttp://www.planettribes.com/t2arena/" ); messageClient( %client, 'SetLineHud', "", %tag, %index++, ""); // Clear the rest of HUD so we don't get old lines hanging around... @@ -4458,7 +4622,7 @@ function DMHud(%game, %client, %tag){// note in this game type the score hud can %clKills = mFloatLength( %cl.kills, 0 ); %clDeaths = mFloatLength( %cl.deaths + %cl.suicides, 0 ); %clBonus = mFloor((%cl.Bonus * %game.SCORE_PER_BONUS) + (%cl.MidAir * %game.SCORE_PER_MIDAIR) + (%cl.KillStreakBonus * %game.SCORE_PER_KILLSTREAKBONUS )); - %clStyle = %cl == %client ? "" : ""; + %clStyle = %cl == %client ? "" : ""; //%BonusValue = %client.Bonus * %game.SCORE_PER_BONUS; //%MidAirValue = %client.MidAir * %game.SCORE_PER_MIDAIR; @@ -4565,7 +4729,7 @@ function LakRabbitHud(%game, %client, %tag){ { %col1ClientTimeMS = %col1Client.flagTimeMS; if ( %col1Client == %client ) - %col1Style = ""; + %col1Style = ""; } if (%col1ClientTimeMS <= 0) @@ -4606,7 +4770,7 @@ function LakRabbitHud(%game, %client, %tag){ { %col2ClientTimeMS = %col2Client.flagTimeMS; if ( %col2Client == %client ) - %col2Style = ""; + %col2Style = ""; } if (%col2ClientTimeMS <= 0) @@ -4648,9 +4812,9 @@ function LakRabbitHud(%game, %client, %tag){ %col2Client.name, %col2ClientScore, %col2ClientTime, %col1Style, %col1Client, %col2Client ); } - else if (%col2Style $= "") + else if (%col2Style $= "") { - messageClient( %client, 'SetLineHud', "", %tag, %index, '%7\t%1%2%3%4%5%6', + messageClient( %client, 'SetLineHud', "", %tag, %index, '%7\t%1%2%3%4%5%6', %col1Client.name, %col1ClientScore, %col1ClientTime, %col2Client.name, %col2ClientScore, %col2ClientTime, %col1Style, %col1Client, %col2Client ); @@ -4774,7 +4938,7 @@ function CTFHud(%game, %client, %tag){// defaultGame/evo else %team1ClientScore = %team1Client.score $= "" ? 0 : %team1Client.score; - %col1Style = %team1Client == %client ? "" : ""; + %col1Style = %team1Client == %client ? "" : ""; if(!$Host::TournamentMode && !$Host::ShowIngamePlayerScores) %team1playersTotalScore = 0; @@ -4803,7 +4967,7 @@ function CTFHud(%game, %client, %tag){// defaultGame/evo else %team2ClientScore = %team2Client.score $= "" ? 0 : %team2Client.score; - %col2Style = %team2Client == %client ? "" : ""; + %col2Style = %team2Client == %client ? "" : ""; if(!$Host::TournamentMode && !$Host::ShowIngamePlayerScores) %team2playersTotalScore = 0; @@ -4830,7 +4994,7 @@ function CTFHud(%game, %client, %tag){// defaultGame/evo messageClient(%client, 'SetLineHud', "", %tag, %index, '\t%5%1%2\t%6%3%4', %team1Client.name, %team1ClientScore, %team2Client.name, %team2ClientScore, %col1Style, %col2Style); } else{ //else for observers, create an anchor around the player name so they can be observed - messageClient(%client, 'SetLineHud', "", %tag, %index, '\t%5%1%2\t%6%3%4', %team1Client.name, %team1ClientScore, %team2Client.name, %team2ClientScore, %col1Style, %col2Style); + messageClient(%client, 'SetLineHud', "", %tag, %index, '\t%5%1%2\t%6%3%4', %team1Client.name, %team1ClientScore, %team2Client.name, %team2ClientScore, %col1Style, %col2Style,%team1Client,%team2Client); } %index++; } @@ -4900,15 +5064,18 @@ function dtStatsMissionDropReady(%game, %client){ // called when client has fini %dtStats.clientLeft = 0; %dtStats.stat["clientQuit"] = 0; %dtStats.markForDelete = 0; - if(%dtStats.leftID == $dtStats::leftID) + if(%dtStats.leftID == $dtStats::leftID){ $dtServer::mapReconnects[cleanMapName($CurrentMission),%game.class]++; - if(isGameRun() && %dtStats.leftID == $dtStats::leftID && %dtStats.stat["score"] != 0)// make sure game is running and we are on the same map + } + if(isGameRun() && %dtStats.leftID == $dtStats::leftID && %dtStats.stat["score"] != 0){// make sure game is running and we are on the same map resGameStats(%client,%game.class); // restore stats; - else + } + else{ resetDtStats(%dtStats,%game.class,1); - - if(%client.stat["score"] != 0) + } + if(%client.stat["score"] != 0){ messageClient(%client, 'MsgClient', '\crWelcome back %1. Your score has been restored.~wfx/misc/rolechange.wav', %client.name); + } break; } } @@ -4922,10 +5089,12 @@ function dtStatsMissionDropReady(%game, %client){ // called when client has fini %dtStats.stat["clientQuit"] = 0; %dtStats.markForDelete = 0; %dtStats.name = %name; + $dtStats::tbLookUP[%client.guid] = %dtStats; } } - else + else{ %dtStats = %client.dtStats; + } %dtStats.joinPCT = (isGameRun() == 1) ? %game.getGamePct() : 0; updateTeamTime(%dtStats, -1); @@ -4937,6 +5106,7 @@ function dtStatsMissionDropReady(%game, %client){ // called when client has fini resetDtStats(%dtStats,%game.class,1); %dtStats.gameData[%game.class] = 0; } + %dtStats.mapTime = getSimTime(); } function dtStatsClientLeaveGame(%client){ @@ -4972,31 +5142,89 @@ function dtStatsGameOver( %game ){ $dtStats::LastMissionDN = $MissionDisplayName; $dtStats::LastMissionCM = $CurrentMission; $dtStats::LastGameType = %game.class; + $dtStats::LastGameID = $dtStats::gameID; - if(($Host::TournamentMode && %game.getGamePct() > 50) || $dtStats::tmMode){ - if(!getFieldCount($dtServerVars::pugIDS[%game.class])){ - $dtServerVars::pugIDS[%game.class] = $dtStats::gameID; - $dtServerVars::pugMap[%game.class] = $MissionDisplayName; - $dtServerVars::pugDate[%game.class] = formattimestring("M-d-yy"); - $dtServerVars::pugFS[%game.class] = $TeamScore[1] SPC $TeamScore[2]; - } - else{ - $dtServerVars::pugIDS[%game.class] = $dtServerVars::pugIDS[%game.class] TAB $dtStats::gameID; - $dtServerVars::pugMap[%game.class] = $dtServerVars::pugMap[%game.class] TAB $MissionDisplayName; - $dtServerVars::pugDate[%game.class] = $dtServerVars::pugDate[%game.class] TAB formattimestring("M-d-yy"); - $dtServerVars::pugFS[%game.class] = $dtServerVars::pugFS[%game.class] TAB $TeamScore[1] SPC $TeamScore[2]; - } - if($dtStats::tmMode && (%game.class $= "CTFGame" || %game.class $= "LCTFGame" || %game.class $= "SCtFGame")){ - if($dtStats::tmModeGC++ >= 6){// only works in ctf mode - $dtStats::tmMode = 0; - $dtStats::tmModeGC = 0; + $dtStats::tmMode = $Host::TournamentMode; + + if(%game.class $= "CTFGame" || %game.class $= "LCTFGame" || %game.class $= "SCtFGame" || %game.class $= "ArenaGame" ){ + if($dtStats::tmMode){ + if(!isObject(pugList)){ + new simGroup(pugList); + rootGroup.add(pugList); + } + %tmClass = "TM" @ %game.class; + if(!isObject(%tmClass)){ + new simGroup(%tmClass){ + game = %game.class; + }; + pugList.add(%tmClass); + } + %so = new scriptObject(){ + pugID = $dtStats::gameID; + mapName = $MissionDisplayName; + date = formattimestring("M-d-yy"); + teamOne = $TeamScore[1]; + teamTwo = $TeamScore[2]; + gameType = %game.class; + count = %tmClass.count; + mark = dtMarkDate(); + }; + %tmClass.add(%so); + if(%tmClass.getCount() > 50){ + %max = 0; + for(%i = 0; %i < %tmClass.getCount(); %i++){ + %obj = %tmClass.getObject(%i); + %delta = getTimeDelta(%obj.mark); + if(%max < %delta){ + %max = %delta; + %delObj = %obj; + } + } + if(isObject(%delObj)){ + %delObj.delete(); + } } } else{ - $dtStats::tmMode = 0; - $dtStats::tmModeGC = 0; + if(!isObject(pubList)){ + new simGroup(pubList); + rootGroup.add(pubList); + } + %gmClass = "GM" @ %game.class; + if(!isObject(%gmClass)){ + new simGroup(%gmClass){ + game = %game.class; + }; + pubList.add(%gmClass); + } + %so = new scriptObject(){ + pugID = $dtStats::gameID; + mapName = $MissionDisplayName; + date = formattimestring("M-d-yy"); + teamOne = $TeamScore[1]; + teamTwo = $TeamScore[2]; + gameType = %game.class; + count = %gmClass.count; + mark = dtMarkDate(); + }; + %gmClass.add(%so); + if(%gmClass.getCount() > 100){ + %max = 0; + for(%i = 0; %i < %gmClass.getCount(); %i++){ + %obj = %gmClass.getObject(%i); + %delta = getTimeDelta(%obj.mark); + if(%max < %delta){ + %max = %delta; + %delObj = %obj; + } + } + if(isObject(%delObj)){ + %delObj.delete(); + } + } } } + if(%game.getGamePct() > 90){ $dtServer::playCount[cleanMapName($CurrentMission),%game.class]++; $dtServer::lastPlay[cleanMapName($CurrentMission),%game.class] = getDayNum() TAB getYear() TAB formattimestring("mm/dd/yy hh:nn:a"); @@ -5030,10 +5258,14 @@ function dtStatsGameOver( %game ){ %dtStats.markForDelete = 1; if($dtStats::Enable){ %game.postGameStats(%dtStats); - if(!%dtStats.gameData[%game.class]){ + if(!%dtStats.gameData[%game.class,$dtStats::tmMode]){ %time += $dtStats::saveTime; schedule(%time,0,"loadGameStats",%dtStats,%game.class); } + else if($dtStats::reloadTotal){ + %time += $dtStats::saveTime; + schedule(%time,0,"loadGameTotalStats",%dtStats,%game.class); + } %time += $dtStats::saveTime; schedule(%time,0,"incGameStats",%dtStats,%game.class); %time += $dtStats::saveTime; @@ -5048,9 +5280,13 @@ function dtStatsGameOver( %game ){ if($dtStats::Enable){ %game.postGameStats(%dtStats); - if(!%dtStats.gameData[%game.class]){ + if(!%dtStats.gameData[%game.class, $dtStats::tmMode]){ %time += $dtStats::saveTime; schedule(%time,0,"loadGameStats",%dtStats,%game.class); + } + else if($dtStats::reloadTotal){ + %time += $dtStats::saveTime; + schedule(%time,0,"loadGameTotalStats",%dtStats,%game.class); } %time += $dtStats::saveTime; // this will chain them schedule(%time ,0,"incGameStats",%dtStats,%game.class); //resetDtStats after incGame @@ -5068,9 +5304,437 @@ function dtStatsGameOver( %game ){ } %time += $dtStats::saveTime; schedule(%time,0,"dtSaveDone"); + endGameTB(%game); + $dtStats::reloadTotal = 0; } } +// happens in gameover +function CTFGame::setupClientTeams(%game){ + if(!$TB::TBEnable[$dtStats::gtNameShort[%game.class]]){ + parent::setupClientTeams(%game); + } +} +function LCTFGame::setupClientTeams(%game){ + if(!$TB::TBEnable[$dtStats::gtNameShort[%game.class]]){ + parent::setupClientTeams(%game); + } +} +function SCtFGame::setupClientTeams(%game){ + if(!$TB::TBEnable[$dtStats::gtNameShort[%game.class]]){ + parent::setupClientTeams(%game); + } +} +function ArenaGame::setupClientTeams(%game){ + if(!$TB::TBEnable[$dtStats::gtNameShort[%game.class]]){ + parent::setupClientTeams(%game); + } +} + +function endGameTB(%game){ + if(!$TB::TBEnable[$dtStats::gtNameShort[%game.class]]){ + if($Host::TournamentMode){// load map data so we can update it as it does not load by default with TournamentMode + loadTBMap(%game); + } + if($TB::TBLog[$dtStats::gtNameShort[%game.class]]){ + logTB(%game);// log the outcome + } + for(%x = 0; %x < statsGroup.getCount(); %x++){ + %dtStats = statsGroup.getObject(%x); + calcTBScores(%dtStats,%game); + } + saveTBMap(%game);// save map stats + } +} + +function calcTBScores(%dtStats,%game){ + if(%game.class $= "CTFGame" || %game.class $= "LCTFGame" || %game.class $= "SCtFGame" || %game.class $= "ArenaGame"){ + if($dtStats::debugEchos){error("calcTBScores" SPC %dtStats SPC %game);} + + if(%dtStats.tScore $= ""){ + %dtStats.tScore = 0; + } + if(%dtStats.mTScore $= ""){ + %dtStats.mTScore = 0; + } + if(!getFieldCount(%dtStats.gScore)){ + %dtStats.gScore = "0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0"; + } + if(!getFieldCount(%dtStats.mGScore)){ + %dtStats.mGScore = "0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0"; + } + + if(isObject(%dtStats) && ((getSimTime() - $missionStartTime) > ((15 * 60) * 1000))){// make sre we dident short cycle + %tgame = $dtStats::gtNameShort[%game.class]; + %tScore = 0; + for(%i = 0; %i < $TB::statGroupCount[%tgame]; %i++){ + %gScore = 0; + if($TB::statCount[%tgame, %i] !$= ""){ + for(%x = 0; %x < $TB::statCount[%tgame, %i]; %x++){ + %var = $TB::statName[%x,%tgame, %i]; + %w = $TB::statWeight[%x,%tgame, %i]; + %gScore += %dtstats.stat[%var] * (%w/100); + %tScore += %dtstats.stat[%var] * (%w/100); + } + } + + if(%tScore > 0){ + %dtStats.tScore = expoMovAvg(%dtStats.tScore, %tScore); + %dtStats.mTScore = expoMovAvg(%dtStats.mTScore, %tScore); + } + + if(%gScore > 0){ + + %value = getField(%dtStats.gScore,%i); + %newValue = expoMovAvg(%value , %gScore); + %dtStats.gScore = setField(%dtStats.gScore, %i, %newValue); + + + %value = getField(%dtStats.mGScore,%i); + %newValue = expoMovAvg(%value , %gScore); + %dtStats.mGScore = setField(%dtStats.mGScore, %i, %newValue); + } + + } + } + } +} + + +function logTB(%game) { + %log = new fileObject(); + RootGroup.add(%log); + %log.openForWrite("serverStats/TB/Logs/" @ $dtStats::gameID @ ".txt"); + %numRoles = statCol.getCount(); + %log.writeLine($dtStats::LastMissionCM); + for (%t = 1; %t <= %game.numTeams; %t++) { // teams + %log.writeLine("Game Score" SPC $TeamScore[%t]); + %output = "Team" @ %t SPC "Rating" SPC $dtTeamScore[%t] @ %t; + + // Print role headers + for (%r = 0; %r < %numRoles; %r++) { + %output = %output @ "\tRole" @ %r; + } + echo(%output); + %log.writeLine(%output); + %maxClients = 0; + + // Find the max number of clients in any role to determine rows needed + for (%r = 0; %r < %numRoles; %r++) { + if ($TT::LOGC[%t, %r] > %maxClients) { + %maxClients = $TT::LOGC[%t, %r]; + } + } + // Print users under each role in rows + for (%c = 0; %c < %maxClients; %c++) { + %row = " "; // First column is blank for alignment + for (%r = 0; %r < %numRoles; %r++) { + if (%c < $TT::LOGC[%t, %r]) { + %dt = $TT::LOG[%t, %r, %c]; + %row = %row @ "\t" @ %dt.name @ "-" @ getField(%dt.mGScore,%r); + } else { + %row = %row @ "\t"; // Empty space for alignment + } + } + echo(%row); + %log.writeLine(%row); + } + + echo("\n"); // Extra line break for clarity + } + + %log.writeLine(""); + %log.writeLine(""); + %log.writeLine("Teams Summary:"); + for (%i = 0; %i < %game.numTeams; %i++) { + %log.writeLine("Team " @ %i + 1 @ " - " @ $dtTeamScore[%i + 1]); + // Print role headers + %output = "\t"; + for (%r = 0; %r < %numRoles; %r++) { + %output = %output @ "\tRole" @ %r; + } + %log.writeLine(%output); + for (%j = 0; %j < $dtTeamCount[%i+1]; %j++) { + %dtStats = $dtTeamList[%i+1,%j]; + %msg = "\t" SPC %dtStats.name; + for (%v = 0; %v < %numRoles; %v++) { + %msg = %msg SPC "\t" SPC getField(%dtStats.mGScore,%v); + %teamStats[%i+1,%v] += getField(%dtStats.mGScore,%v); + } + %log.writeLine(%msg); + } + %teamMsg ="\t"; + for (%v = 0; %v < $weightsTestCount; %v++) { + %teamMsg = %teamMsg SPC "\t" SPC %teamStats[%i+1,%v]; + } + %log.writeLine(%teamMsg); + } + %log.writeLine("Team Score Dif" SPC mabs($dtTeamScore[1] - $dtTeamScore[2])); + + %log.close(); + %log.delete(); +} + +function listTBInfo(%val){ + for(%x = 0; %x < statsGroup.getCount(); %x++){ + %dtStats = statsGroup.getObject(%x); + if(%val){ + calcTBScores(%dtStats,Game); + } + echo(%dtStats.sel SPC "Score" SPC %dtStats.name SPC %dtStats.tScore SPC %dtStats.gScore); + } + if(%val == 2){ + ballenceTeams(Game,0); + } +} +function listStat(){ + for(%x = 0; %x < statsGroup.getCount(); %x++){ + %dtStats = statsGroup.getObject(%x); + echo(%dtStats.name SPC %dtStats.stat["flagGrabs"] SPC %dtStats.client.flagGrabs); + } +} +function forceTeamBal(){ + for(%x = 0; %x < statsGroup.getCount(); %x++){ + %dtStats = statsGroup.getObject(%x); + calcTBScores(%dtStats,Game); + } + ballenceTeams(Game,1); +} +function ballenceTeams(%game,%forceTeam){ + if(%game.class $= "CTFGame" || %game.class $= "LCTFGame" || %game.class $= "SCtFGame" || %game.class $= "ArenaGame"){ + if($dtStats::debugEchos){error("ballenceTeams" SPC %game.class SPC %forceTeam);} + if(statsGroup.getCount() < 1){ + return; + } + loadTBMap(%game);// load up exisitng map stats + %tgame = $dtStats::gtNameShort[%game.class]; + if(isObject(statCol)){ + statCol.delete(); + } + new simGroup(statCol); + statCol.tzc = 0; + statCol.rbc = 0; + RootGroup.add(statCol); + + for (%i = 0; %i < ClientGroup.getCount(); %i++){ + %client = ClientGroup.getObject(%i); + if(!%client.team){ + statCol.teamZero[statCol.tzc] = %client; + statCol.tzc++; + } + } + + + for (%y = 0; %y < $TB::statGroupCount[%tgame]; %y++) { + %set = new simSet(); + %set.rbc = 0; + statCol.add(%set); + for(%x = 0; %x < statsGroup.getCount(); %x++){ + %dtStats = statsGroup.getObject(%x); + %dtStats.sel = 0; + if(isObject(%dtStats.client)){ + %map = getField(%dtStats.mGScore,%y); + %lg = getField(%dtStats.gScore,%y); + %rateing = (%map > (%lg*0.75)) ? %map :%lg;//0.75 makes it so it favors map stats unless theres a massive disparity + if(%dtStats.client.team != 0 && (%rateing > 0 || %y == 0)){ + %set.add(%dtStats); + } + } + } + + %len = %set.getCount(); + // sort are groups by there group scores + for (%i = 0; %i < %len - 1; %i++) { + for (%j = 0; %j < %len - %i - 1; %j++) { + %aObj = %set.getObject(%j); + %bObj = %set.getObject(%j + 1); + + %aMap = getField(%aObj.mGScore,%y); %aLG = getField(%aObj.gScore,%y); + %A = (%aMap > (%aLG * 0.75)) ? %aMap : %aLG;//derate the last game score so it favors the map score unless it not avalable or lacking + + %bMap = getField(%bObj.mGScore,%y); %bLG = getField(%bObj.gScore,%y); + %B = (%bMap > (%bLG * 0.75)) ? %bMap : %bLG; + if (%A < %B) { + %set.bringToFront(%bObj); + } + } + } + } + + deleteVariables("$TT::*"); + for (%i = 0; %i < %game.numTeams; %i++) { + $dtTeamScore[%i+1] = 0; + $dtTeamCount[%i+1] = 0; + for(%x = 0; %x < statsGroup.getCount(); %x++){ + $TT::LOGC[%i+1,%x] = 0; + } + } + + %i = 0; + %rtfc = 0; + %x = (statCol.getCount() > 1) ? 1 : 0; // Start at 1 if more than one role + %rt = 0; + %end = 0; + %lockedGroups = 0; + + while (!%end) { + %x = (%rt++ % %game.numTeams == 0) ? %x + 1 : %x; // Cycle every `numTeams` loops + if (%x >= statCol.getCount()) { + %x = 1; + %rt = 1; + if (%lockedGroups >= statCol.getCount() - 1) { // All groups are empty + %x = 0; + } + } + + + %role = statCol.getObject(%x); + if (!%role || %role.rbc) { // If group is locked, continue + if (%x == 0) { + %end = 1; + } + continue; + } + + %found = 0; + for (%w = 0; %w < %role.getCount(); %w++) { + %dtStats = %role.getObject(%w); + if (!%dtStats.sel) { + %dtStats.sel = 1; + %found = 1; + break; + } + } + + if (!%found) { + %role.rbc = 1; // Lock this group + %lockedGroups++; + continue; + } + + if (isObject(%dtStats.client)) { + %y = (%i % %game.numTeams) + 1; + %i++; + $dtTeamList[%y, $dtTeamCount[%y]] = %dtStats; + $dtTeamCount[%y]++; + $dtTeamScore[%y] += %dtStats.tScore; + $TT::LOG[%y, %x, $TT::LOGC[%y, %x]] = %dtStats; + $TT::LOGC[%y, %x]++; + + if(%forceTeam){ + Game.clientChangeTeam( %dtStats.client, %y, 0); + } + else{ + %dtStats.client.lastTeam = %y; + } + } + } + + + // team zero + for(%i = 0; %i < statCol.tzc; %i++){ + %client = statCol.teamZero[%i]; + %client.lastTeam = 0; + } + } +} + +function expoMovAvg(%ema, %value){ + %alpha = 0.2; + return %alpha * %value + (1 - %alpha) * %ema; +} + + +function saveTBVars(){ + if($dtStats::debugEchos){error("saveTBVars");} + if(!isEventPending($tbSystem)) + $tbSystem = schedule(10000, 0, "export", "$TB::*", "serverStats/tbVars.cs", false); +} + +function saveTBMap(%game){ + if($dtStats::debugEchos){error("saveTBMap" SPC %game);} + if($TB::TBEnable[$dtStats::gtNameShort[%game.class]]){//($HostGamePlayerCount - $HostGameBotCount) >= $dtStats::TBMinPlayers) + %fobj = new fileObject(); + RootGroup.add(%fobj); + %path = "serverStats/TB/map/" @ $dtStats::LastMissionCM @ "-" @ %game.class @ ".cs"; //note $dtStats::LastMissionCM is set in gameover + %fobj.openForWrite(%path); + %fobj.writeLine("res"); + %fobj.writeLine("res"); + %fobj.writeLine("res"); + %fobj.writeLine("res"); + %fobj.writeLine("res"); + %fobj.writeLine("res"); + %fobj.writeLine("res"); + %fobj.writeLine("res"); + + for(%x = 0; %x < statsGroup.getCount(); %x++){ + %dtStats = statsGroup.getObject(%x); + if(getFieldCount($tempMap::data[%dtStats.guid]) < 5){ // write new entires + %newData = %dtStats.guid TAB %dtStats.name TAB dtMarkDate() TAB %dtStats.mTScore TAB %dtStats.mGScore; + %line = strreplace(%newData ,"\t","%t"); + %fobj.writeLine(%line); + } + } + for(%i = 0; %i < $tempMap::count; %i++){ + %guid = $tempMap::guid[%i]; + %dtStats = $dtStats::tbLookUP[%guid]; + if(isObject(%dtStats)){ + %newData = %guid TAB %dtStats.name TAB dtMarkDate() TAB %dtStats.mTScore TAB %dtStats.mGScore; + %line = strreplace(%newData ,"\t","%t"); + %fobj.writeLine(%line); + } + else{ + %date = getField($tempMap::data[%guid],2); + if(getTimeDelta(%date) < (1440*180)){// skip over old old stuff + %line = strreplace($tempMap::data[%guid],"\t","%t"); + %fobj.writeLine(%line); + } + } + } + %fobj.close(); + %fobj.delete(); + } +} + +function loadTBMap(%game){ + if($dtStats::debugEchos){error("loadTBMap" SPC %game);} + if($TB::TBEnable[$dtStats::gtNameShort[%game.class]]){ + deleteVariables("$tempMap::*"); + %path = "serverStats/TB/map/" @ $CurrentMission @ "-" @ %game.class @ ".cs"; + if(isFile(%path)){ + %fobj = new fileObject(); + RootGroup.add(%fobj); + %fobj.openForRead(%path); + %unused = %fobj.readline(); //reserved + %unused = %fobj.readline(); + %unused = %fobj.readline(); + %unused = %fobj.readline(); + %unused = %fobj.readline(); + %unused = %fobj.readline(); + %unused = %fobj.readline(); + %unused = %fobj.readline(); + $tempMap::count = 0; + while( !%fobj.isEOF() ){ + %line = strreplace(%fobj.readline(),"%t","\t"); + %guid = getField(%line, 0); + %name = getField(%line, 1); + %date = getField(%line, 2); + %tScore = getField(%line, 3); + %gScore = getFields(%line, 4 ,4+16); + $tempMap::guid[$tempMap::count] = %guid; + $tempMap::count++; + $tempMap::data[%guid] = %line; + %dtStats = $dtStats::tbLookUP[%guid]; + if(isObject(%dtStats)){ + %dtStats.mGScore = %gScore; + %dtStats.mTScore = %tScore; + } + } + %fobj.close(); + %fobj.delete(); + } + } +} function dtSaveDone(){ $dtStats::statsSave = 0; @@ -5235,8 +5899,30 @@ function DefaultGame::postGameStats(%game,%dtStats){ //stats to add up at the en %winCount = %winCount ? %winCount : 0; %dtStats.stat["winLostPct"] = (%winCount / %lostCount); } - else if(%game.class $= "LakRabbitGame") + else if(%game.class $= "LakRabbitGame"){ %dtStats.stat["flagTimeMin"] = (%dtStats.flagTimeMS / 1000)/60; + } + else if(%game.class $= "ArenaGame"){ + %dtStats.stat["WLR"] = (%dtStats.stat["roundsLost"] > 0) ? %dtStats.stat["roundsWon"] / %dtStats.stat["roundsLost"] : %dtStats.stat["roundsWon"]; + if(%dtStats.stat["discShotsFired"]){ + %dtStats.stat["discMARatio"] = %dtStats.stat["discMA"] / %dtStats.stat["discShotsFired"]; + } + if(%dtStats.stat["plasmaShotsFired"]){ + %dtStats.stat["plasmaMARatio"] = %dtStats.stat["plasmaMA"] / %dtStats.stat["plasmaShotsFired"]; + } + if(%dtStats.stat["laserShotsFired"]){ + %dtStats.stat["laserMARatio"] = %dtStats.stat["laserMA"] / %dtStats.stat["laserShotsFired"]; + } + if(%dtStats.stat["grenadeShotsFired"]){ + %dtStats.stat["grenadeMARatio"] = %dtStats.stat["grenadeMA"] / %dtStats.stat["grenadeShotsFired"]; + } + if(%dtStats.stat["shockShotsFired"]){ + %dtStats.stat["shockMARatio"] = %dtStats.stat["shockMA"] / %dtStats.stat["shockShotsFired"]; + } + if(%dtStats.stat["blasterShotsFired"]){ + %dtStats.stat["blasterMARatio"] = %dtStats.stat["blasterMA"] / %dtStats.stat["blasterShotsFired"]; + } + } } function isGameRun(){// @@ -5353,6 +6039,21 @@ function SCtFGame::getGamePct(%game){ return %timePct; } +function ArenaGame::getGamePct(%game){ + %curTimeLeftMS = ((getSimTime() - $missionStartTime)/1000)/60; + %timePct = (%curTimeLeftMS / $Host::TimeLimit) * 100; + %timePct = (%timePct > 100) ? 100 : %timePct; + %scorePct = 0; + for ( %i = 1; %i <= %game.numTeams; %i++ ){ + %score = ($TeamScore[%i] / %game.roundLimit) * 100; + %scorePct = (%score > %scorePct) ? %score : %scorePct; + } + if(%scorePct > %timePct) + return %scorePct; + else + return %timePct; +} + function msToMinSec(%time) { %sec = mFloor(%time / 1000); @@ -5464,13 +6165,11 @@ function setGUIDName(%client){ return 1; } } -function getMapID(%map,%game,%type,%clean){ +function getMapID(%map,%game,%clean){ if(%clean) %map = cleanMapName(%map); if(%game !$= "" && %map !$= ""){ - if($mapID::IDGame[%map,%game] && %type) - return $mapID::IDGame[%map,%game]; - else if($mapID::ID[%map,%game]) + if($mapID::ID[%map,%game]) return $mapID::ID[%map,%game]; else{ $mapID::count++; @@ -5482,11 +6181,8 @@ function getMapID(%map,%game,%type,%clean){ $mapID::IDNameGame[$mapID::countGame[%game],%game] = %map; $mapID::IDName[$mapID::count] = %map; - export( "$mapID::*", "serverStats/mapIDList.cs", false ); - if(%type) - return $mapID::IDGame[%map,%game]; - else - return $mapID::ID[%map,%game]; + export( "$mapID::*", "serverStats/mapIDList.cs", false); + return $mapID::ID[%map,%game]; } } else @@ -5552,7 +6248,13 @@ function loadGameStats(%dtStats,%game){// called when client joins server.cs onC if($dtStats::debugEchos){error("loadGameStats GUID = " SPC %dtStats.guid);} if(%dtStats.guid !$= ""){ loadGameTotalStats(%dtStats,%game); - %filename = "serverStats/stats/" @ %game @ "/" @ %dtStats.guid @ "g.cs"; + if($dtStats::tmMode){ + %filename = "serverStats/statsTM/" @ %game @ "/" @ %dtStats.guid @ "g.cs"; + } + else{ + %filename = "serverStats/stats/" @ %game @ "/" @ %dtStats.guid @ "g.cs"; + } + if(isFile(%filename)){ %file = new FileObject(); RootGroup.add(%file); @@ -5560,27 +6262,31 @@ function loadGameStats(%dtStats,%game){// called when client joins server.cs onC while( !%file.isEOF() ){ %line = strreplace(%file.readline(),"%t","\t"); %var = getField(%line,0); - %dtStats.gameStats[%var,"g",%game] = getFields(%line,1,getFieldCount(%line)-1); + %dtStats.gameStats[%var,"g",%game,$dtStats::tmMode] = getFields(%line,1,getFieldCount(%line)-1); } - %dtStats.gameData[%game]= 1; + %dtStats.gameData[%game,$dtStats::tmMode]= 1; %file.close(); %file.delete(); } else - %dtStats.gameData[%game]= 1; + %dtStats.gameData[%game,$dtStats::tmMode]= 1; } } function loadGameTotalStats(%dtStats,%game){ if($dtStats::debugEchos){error("loadGameTotalStats GUID = " SPC %dtStats.guid);} - - %filename = "serverStats/stats/" @ %game @ "/" @ %dtStats.guid @ "t.cs"; - %d = $dtStats::curDay; %w = $dtStats::curWeek; %m = $dtStats::curMonth; %q = $dtStats::curQuarter; %y = $dtStats::curYear; + if($dtStats::tmMode){ + %filename = "serverStats/statsTM/" @ %game @ "/" @ %dtStats.guid @ "t.cs"; + } + else{ + %filename = "serverStats/stats/" @ %game @ "/" @ %dtStats.guid @ "t.cs"; + } + %d = $dtStats::curDay; %w = $dtStats::curWeek; %m = $dtStats::curMonth; %q = $dtStats::curQuarter; %y = $dtStats::curYear; %c = $dtStats::curCustom; if(isFile(%filename)){ %file = new FileObject(); RootGroup.add(%file); %file.OpenForRead(%filename); - %day = %week = %month = %quarter = %year = 0; + %day = %week = %month = %quarter = %year = %custom = 0; %dateLine = strreplace(%file.readline(),"%t","\t"); // first line should allways be the date line if(getField(%dateLine,0) $= "days"){ if(getField(%dateLine,2) != %d){%day = 1;} // see what has changed sence we last played @@ -5588,19 +6294,22 @@ function loadGameTotalStats(%dtStats,%game){ if(getField(%dateLine,6) != %m){%month = 1;} if(getField(%dateLine,8) != %q){%quarter = 1;} if(getField(%dateLine,10) != %y){%year = 1;} + if(getField(%dateLine,12) != %c){%custom = 1;} %d0 = getField(%dateLine,1);%d1 = getField(%dateLine,2); %w0 = getField(%dateLine,3);%w1 = getField(%dateLine,4); %m0 = getField(%dateLine,5);%m1 = getField(%dateLine,6); %q0 = getField(%dateLine,7);%q1 = getField(%dateLine,8); %y0 = getField(%dateLine,9);%y1 = getField(%dateLine,10); + %c0 = getField(%dateLine,11);%c1 = getField(%dateLine,12); if(%day){ %d0 = %d1; %d1 = %d;} //if there was a change flip new with old and reset new if(%week){%w0 = %w1;%w1 = %w;} if(%month){%m0 = %m1;%m1 = %m;} if(%quarter){%q0 = %q1;%q1 = %q;} if(%year){ %y0 = %y1; %y1 = %y;} - %dtStats.gameStats["dwmqy","t",%game] = %d0 TAB %d1 TAB %w0 TAB %w1 TAB %m0 TAB %m1 TAB %q0 TAB %q1 TAB %y0 TAB %y1; // update line + if(%custom){ %c0 = %c1; %c1 = %c;} + %dtStats.gameStats["dwmqy","t",%game,$dtStats::tmMode] = %d0 TAB %d1 TAB %w0 TAB %w1 TAB %m0 TAB %m1 TAB %q0 TAB %q1 TAB %y0 TAB %y1 TAB %c0 TAB %c1; // update line } while( !%file.isEOF() ){ %line = strreplace(%file.readline(),"%t","\t"); @@ -5611,67 +6320,78 @@ function loadGameTotalStats(%dtStats,%game){ %m0 = getField(%line,5);%m1 = getField(%line,6); %q0 = getField(%line,7);%q1 = getField(%line,8); %y0 = getField(%line,9);%y1 = getField(%line,10); + %c0 = getField(%line,11);%c1 = getField(%line,12); if(%day){ %d0 = %d1; %d1 = 0;} //if there was a change flip new with old and reset new if(%week){%w0 = %w1;%w1 = 0;} if(%month){%m0 = %m1;%m1 = 0;} if(%quarter){%q0 = %q1;%q1 = 0;} if(%year){ %y0 = %y1;%y1 = 0;} - - %dtStats.gameStats[%var,"t",%game] = %d0 TAB %d1 TAB %w0 TAB %w1 TAB %m0 TAB %m1 TAB %q0 TAB %q1 TAB %y0 TAB %y1; + if(%custom){ %c0 = %c1;%c1 = 0;} + %dtStats.gameStats[%var,"t",%game,$dtStats::tmMode] = %d0 TAB %d1 TAB %w0 TAB %w1 TAB %m0 TAB %m1 TAB %q0 TAB %q1 TAB %y0 TAB %y1 TAB %c0 TAB %c1; } } %file.close(); %file.delete(); } else// must be new person so be sure to set the dates - %dtStats.gameStats["dwmqy","t",%game] = %d TAB %d TAB %w TAB %w TAB %m TAB %m TAB %q TAB %q TAB %y TAB %y; + %dtStats.gameStats["dwmqy","t",%game, $dtStats::tmMode] = %d TAB %d TAB %w TAB %w TAB %m TAB %m TAB %q TAB %q TAB %y TAB %y TAB %c TAB %c; } function saveGameTotalStats(%dtStats,%game){ if($dtStats::debugEchos){error("saveGameTotalStats GUID = " SPC %dtStats.guid);} if(%dtStats.guid !$= "" && !%dtStats.isBot){// dont save if we are dont have a guid or is a bot - if(%dtStats.gameStats["statsOverWrite","g",%game] $= ""){%dtStats.gameStats["statsOverWrite","g",%game] = 0;} + if(%dtStats.gameStats["statsOverWrite","g",%game,$dtStats::tmMode] $= ""){%dtStats.gameStats["statsOverWrite","g",%game,$dtStats::tmMode] = 0;} %fileTotal = new FileObject(); RootGroup.add(%fileTotal); - %fileNameTotal = "serverStats/stats/"@ %game @ "/" @ %dtStats.guid @ "t.cs"; + if($dtStats::tmMode){ + %fileNameTotal = "serverStats/statsTM/"@ %game @ "/" @ %dtStats.guid @ "t.cs"; + } + else{ + %fileNameTotal = "serverStats/stats/"@ %game @ "/" @ %dtStats.guid @ "t.cs"; + } %fileTotal.OpenForWrite(%fileNameTotal); - %fileTotal.writeLine("days" @ "%t" @ strreplace(%dtStats.gameStats["dwmqy","t",%game],"\t","%t")); - %fileTotal.writeLine("gameCount" @ "%t" @ strreplace(%dtStats.gameStats["gameCount","t",%game],"\t","%t")); + %fileTotal.writeLine("days" @ "%t" @ strreplace(%dtStats.gameStats["dwmqy","t",%game,$dtStats::tmMode],"\t","%t")); + %fileTotal.writeLine("gameCount" @ "%t" @ strreplace(%dtStats.gameStats["gameCount","t",%game,$dtStats::tmMode],"\t","%t")); %fileTotal.writeLine("playerName" @ "%t" @ %dtStats.name); %fileTotal.writeLine("versionNum" @ "%t" @ $dtStats::version); %fileGame = new FileObject(); RootGroup.add(%fileGame); - %fileNameGame = "serverStats/stats/" @ %game @ "/" @ %dtStats.guid @ "g.cs"; + if($dtStats::tmMode){ + %fileNameGame = "serverStats/statsTM/" @ %game @ "/" @ %dtStats.guid @ "g.cs"; + } + else{ + %fileNameGame = "serverStats/stats/" @ %game @ "/" @ %dtStats.guid @ "g.cs"; + } %fileGame.OpenForWrite(%fileNameGame); %fileGame.writeLine("playerName" @ "%t" @ trim(%dtStats.name)); - %fileGame.writeLine("statsOverWrite" @ "%t" @ %dtStats.gameStats["statsOverWrite","g",%game]); - %fileGame.writeLine("totalGames" @ "%t" @ %dtStats.gameStats["totalGames","g",%game]); - %fileGame.writeLine("fullSet" @ "%t" @ %dtStats.gameStats["fullSet","g",%game]); - %fileGame.writeLine("dayStamp" @ "%t" @ strreplace(%dtStats.gameStats["dayStamp","g",%game],"\t","%t")); - %fileGame.writeLine("weekStamp" @ "%t" @ strreplace(%dtStats.gameStats["weekStamp","g",%game],"\t","%t")); - %fileGame.writeLine("monthStamp" @ "%t" @ strreplace(%dtStats.gameStats["monthStamp","g",%game],"\t","%t")); - %fileGame.writeLine("quarterStamp" @ "%t" @ strreplace(%dtStats.gameStats["quarterStamp","g",%game],"\t","%t")); - %fileGame.writeLine("yearStamp" @ "%t" @ strreplace(%dtStats.gameStats["yearStamp","g",%game],"\t","%t")); - %fileGame.writeLine("dateStamp" @ "%t" @ strreplace(%dtStats.gameStats["dateStamp","g",%game],"\t","%t")); - %fileGame.writeLine("timeDayMonth" @ "%t" @ strreplace(%dtStats.gameStats["timeDayMonth","g",%game],"\t","%t")); - %fileGame.writeLine("map" @ "%t" @ strreplace(%dtStats.gameStats["map","g",%game],"\t","%t")); - %fileGame.writeLine("mapID" @ "%t" @ strreplace(%dtStats.gameStats["mapID","g",%game],"\t","%t")); - %fileGame.writeLine("mapGameID" @ "%t" @ strreplace(%dtStats.gameStats["mapGameID","g",%game],"\t","%t")); - %fileGame.writeLine("gameID" @ "%t" @ strreplace(%dtStats.gameStats["gameID","g",%game],"\t","%t")); - %fileGame.writeLine("gamePCT" @ "%t" @ strreplace(%dtStats.gameStats["gamePCT","g",%game],"\t","%t")); - %fileGame.writeLine("versionNum" @ "%t" @ strreplace(%dtStats.gameStats["versionNum","g",%game],"\t","%t")); + %fileGame.writeLine("statsOverWrite" @ "%t" @ %dtStats.gameStats["statsOverWrite","g",%game,$dtStats::tmMode]); + %fileGame.writeLine("totalGames" @ "%t" @ %dtStats.gameStats["totalGames","g",%game,$dtStats::tmMode]); + %fileGame.writeLine("fullSet" @ "%t" @ %dtStats.gameStats["fullSet","g",%game,$dtStats::tmMode]); + %fileGame.writeLine("dayStamp" @ "%t" @ strreplace(%dtStats.gameStats["dayStamp","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("weekStamp" @ "%t" @ strreplace(%dtStats.gameStats["weekStamp","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("monthStamp" @ "%t" @ strreplace(%dtStats.gameStats["monthStamp","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("quarterStamp" @ "%t" @ strreplace(%dtStats.gameStats["quarterStamp","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("yearStamp" @ "%t" @ strreplace(%dtStats.gameStats["yearStamp","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("dateStamp" @ "%t" @ strreplace(%dtStats.gameStats["dateStamp","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("timeDayMonth" @ "%t" @ strreplace(%dtStats.gameStats["timeDayMonth","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("map" @ "%t" @ strreplace(%dtStats.gameStats["map","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("mapID" @ "%t" @ strreplace(%dtStats.gameStats["mapID","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("mapGameID" @ "%t" @ strreplace(%dtStats.gameStats["mapGameID","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("gameID" @ "%t" @ strreplace(%dtStats.gameStats["gameID","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("gamePCT" @ "%t" @ strreplace(%dtStats.gameStats["gamePCT","g",%game,$dtStats::tmMode],"\t","%t")); + %fileGame.writeLine("versionNum" @ "%t" @ strreplace(%dtStats.gameStats["versionNum","g",%game,$dtStats::tmMode],"\t","%t")); for(%q = 0; %q < $statsVars::count[%game]; %q++){ %varNameType = $statsVars::varNameType[%q,%game]; %varType = $statsVars::varType[%varNameType,%game]; if(%varType !$= "TTL"){ - %val = %dtStats.gameStats[%varNameType,"g",%game]; + %val = %dtStats.gameStats[%varNameType,"g",%game,$dtStats::tmMode]; %fileGame.writeLine(%varNameType @ "%t" @ strreplace(%val,"\t","%t")); } if(%varType !$= "Game"){ - %val = %dtStats.gameStats[%varNameType,"t",%game]; + %val = %dtStats.gameStats[%varNameType,"t",%game,$dtStats::tmMode]; %fileTotal.writeLine(%varNameType @ "%t" @ strreplace(%val,"\t","%t")); } } @@ -5682,39 +6402,34 @@ function saveGameTotalStats(%dtStats,%game){ } if(%dtStats.markForDelete){ if($dtStats::debugEchos){error("Client Left, Deleting Stat Object = " SPC %dtStats SPC %dtStats.guid);} + $dtStats::tbLookUP[%dtStats.guid] = ""; %dtStats.delete(); } } -function getMapIDName(%game){ - %map = cleanMapName($dtStats::LastMissionCM); - %mid = getMapID(%map,%game,0,1); - %gid = getMapID(%map,%game,1,1); - %mapNameID = %map @ "-" @ %mid @ "-" @ %gid; - return %mapNameID; -} - function incGameStats(%dtStats,%game) {// record that games stats and inc by one if($dtStats::debugEchos){error("incGameStats GUID = " SPC %dtStats.guid);} - %c = %dtStats.gameStats["statsOverWrite","g",%game]++; - if(%dtStats.gameStats["statsOverWrite","g",%game] > $dtStats::MaxNumOfGames-1 || %dtStats.gameStats["statsOverWrite","g",%game] > 99){ - %c = %dtStats.gameStats["statsOverWrite","g",%game] = 0; - %dtStats.gameStats["fullSet","g",%game] = 1; + %c = %dtStats.gameStats["statsOverWrite","g",%game,$dtStats::tmMode]++; + if(%dtStats.gameStats["statsOverWrite","g",%game,$dtStats::tmMode] > $dtStats::MaxNumOfGames-1 || %dtStats.gameStats["statsOverWrite","g",%game,$dtStats::tmMode] > 99){ + %c = %dtStats.gameStats["statsOverWrite","g",%game,$dtStats::tmMode] = 0; + %dtStats.gameStats["fullSet","g",%game,$dtStats::tmMode] = 1; } - %dtStats.gameStats["totalGames","g",%game]++; + %dtStats.gameStats["totalGames","g",%game,$dtStats::tmMode]++; - %c1 = getField(%dtStats.gameStats["gameCount","t",%game],1); + %c1 = getField(%dtStats.gameStats["gameCount","t",%game,$dtStats::tmMode],1); setValueField(%dtStats,"gameCount","t",%game,1,%c1++); - %c7 = getField(%dtStats.gameStats["gameCount","t",%game],3); + %c7 = getField(%dtStats.gameStats["gameCount","t",%game,$dtStats::tmMode],3); setValueField(%dtStats,"gameCount","t",%game,3,%c7++); - %c30 = getField(%dtStats.gameStats["gameCount","t",%game],5); + %c30 = getField(%dtStats.gameStats["gameCount","t",%game,$dtStats::tmMode],5); setValueField(%dtStats,"gameCount","t",%game,5,%c30++); - %c90 = getField(%dtStats.gameStats["gameCount","t",%game],7); + %c90 = getField(%dtStats.gameStats["gameCount","t",%game,$dtStats::tmMode],7); setValueField(%dtStats,"gameCount","t",%game,7,%c90++); - %c365 = getField(%dtStats.gameStats["gameCount","t",%game],9); + %c365 = getField(%dtStats.gameStats["gameCount","t",%game,$dtStats::tmMode],9); setValueField(%dtStats,"gameCount","t",%game,9,%c365++); + %cc = getField(%dtStats.gameStats["gameCount","t",%game,$dtStats::tmMode],11); + setValueField(%dtStats,"gameCount","t",%game,11,%cc++); setValueField(%dtStats,"dayStamp","g",%game,%c,$dtStats::curDay); setValueField(%dtStats,"weekStamp","g",%game,%c,$dtStats::curWeek); @@ -5724,8 +6439,8 @@ function incGameStats(%dtStats,%game) {// record that games stats and inc by one setValueField(%dtStats,"dateStamp","g",%game,%c,formattimestring("yy-mm-dd HH:nn:ss")); setValueField(%dtStats,"timeDayMonth","g",%game,%c,formattimestring("hh:nn:a, mm-dd")); setValueField(%dtStats,"map","g",%game,%c,$dtStats::LastMissionDN); - setValueField(%dtStats,"mapID","g",%game,%c,getMapID($dtStats::LastMissionCM,%game,0,1)); - setValueField(%dtStats,"mapGameID","g",%game,%c,getMapID($dtStats::LastMissionCM,%game,1,1)); + setValueField(%dtStats,"mapID","g",%game,%c,getMapID($dtStats::LastMissionCM,%game,1)); + setValueField(%dtStats,"mapGameID","g",%game,%c,getMapID($dtStats::LastMissionCM,%game,1)); setValueField(%dtStats,"gameID","g",%game,%c,$dtStats::gameID); setValueField(%dtStats,"gamePCT","g",%game,%c,%dtStats.gamePCT); setValueField(%dtStats,"versionNum","g",%game,%c,$dtStats::version); @@ -5744,21 +6459,21 @@ function incGameStats(%dtStats,%game) {// record that games stats and inc by one %val = %dtStats.stat[%varName]; setValueField(%dtStats,%varNameType,"g",%game,%c,%val); - for(%x = 1; %x <= 9; %x+=2){ - %t = getField(%dtStats.gameStats[%varNameType,"t",%game],%x); + for(%x = 1; %x <= 11; %x+=2){ + %t = getField(%dtStats.gameStats[%varNameType,"t",%game,$dtStats::tmMode],%x); setValueField(%dtStats,%varNameType,"t",%game,%x,addNum(%t,%val)); } case "TTL": %val = %dtStats.stat[%varName]; - for(%x = 1; %x <= 9; %x+=2){ - %t = getField(%dtStats.gameStats[%varNameType,"t",%game],%x); + for(%x = 1; %x <= 11; %x+=2){ + %t = getField(%dtStats.gameStats[%varNameType,"t",%game,$dtStats::tmMode],%x); setValueField(%dtStats,%varNameType,"t",%game,%x,addNum(%t,%val)); } case "Max": %val = %dtStats.stat[%varName]; setValueField(%dtStats,%varNameType,"g",%game,%c,%val); - for(%x = 1; %x <= 9; %x+=2){ - %t = getField(%dtStats.gameStats[%varNameType,"t",%game],%x); + for(%x = 1; %x <= 11; %x+=2){ + %t = getField(%dtStats.gameStats[%varNameType,"t",%game,$dtStats::tmMode],%x); if(%val > %t){ setValueField(%dtStats,%varNameType,"t",%game,%x,%val); } @@ -5770,8 +6485,8 @@ function incGameStats(%dtStats,%game) {// record that games stats and inc by one %val = %dtStats.stat[%varName]; setValueField(%dtStats,%varNameType,"g",%game,%c,%val); - for(%x = 1; %x <= 9; %x+=2){ - %t = getField(%dtStats.gameStats[%varNameType,"t",%game],%x); + for(%x = 1; %x <= 11; %x+=2){ + %t = getField(%dtStats.gameStats[%varNameType,"t",%game,$dtStats::tmMode],%x); if(%val < %t && %val != 0 || !%t){ setValueField(%dtStats,%varNameType,"t",%game,%x,%val); } @@ -5783,8 +6498,8 @@ function incGameStats(%dtStats,%game) {// record that games stats and inc by one %val = %dtStats.stat[%varName]; setValueField(%dtStats,%varNameType,"g",%game,%c,%val); - for(%x = 1; %x <= 9; %x+=2){ - %t = strreplace(getField(%dtStats.gameStats[%varNameType,"t",%game],%x),"%a","\t"); + for(%x = 1; %x <= 11; %x+=2){ + %t = strreplace(getField(%dtStats.gameStats[%varNameType,"t",%game,$dtStats::tmMode],%x),"%a","\t"); if(%val != 0){ %total = getField(%t,1) + %val; if(%total<950000){ @@ -5831,6 +6546,11 @@ function cropFloat(%num,%x){ return %num; } +function roundDec(%num, %places) { + %factor = mPow(10, %places); + return mCeil(%num * %factor - 0.5) / %factor; +} + function addNum(%a,%b){ if(strPos(%a,"x") == -1 && strPos(%b,"x") == -1){ %ab = %a + %b; @@ -5981,27 +6701,27 @@ function genBlanks(){ // optimization thing saves on haveing to do it with every for(%i=0; %i < $dtStats::MaxNumOfGames-1; %i++){ $dtStats::blank["g"] = $dtStats::blank["g"] TAB 0; } - for(%i=0; %i < 9; %i++){ + for(%i=0; %i < 11; %i++){ $dtStats::blank["t"] = $dtStats::blank["t"] TAB 0; } } function setValueField(%dtStats,%var,%type,%game,%c,%val){ if(%type $= "g"){ - %fc = getFieldCount(%dtStats.gameStats[%var,%type,%game]); + %fc = getFieldCount(%dtStats.gameStats[%var,%type,%game,$dtStats::tmMode]); if(%fc < 2){ - %dtStats.gameStats[%var,%type,%game] = $dtStats::blank["g"]; + %dtStats.gameStats[%var,%type,%game,$dtStats::tmMode] = $dtStats::blank["g"]; } else if( %fc > $dtStats::MaxNumOfGames){// trim it down as it as the MaxNumOfGames have gotten smaller - %dtStats.gameStats[%var,%type,%game] = getFields(%dtStats.gameStats[%var,%type,%game],0,$dtStats::MaxNumOfGames-1); + %dtStats.gameStats[%var,%type,%game,$dtStats::tmMode] = getFields(%dtStats.gameStats[%var,%type,%game,$dtStats::tmMode],0,$dtStats::MaxNumOfGames-1); } - %dtStats.gameStats[%var,%type,%game] = setField(%dtStats.gameStats[%var,%type,%game],%c, hasValue(%val)); + %dtStats.gameStats[%var,%type,%game,$dtStats::tmMode] = setField(%dtStats.gameStats[%var,%type,%game,$dtStats::tmMode],%c, hasValue(%val)); } else if(%type $= "t"){ - %fc = getFieldCount(%dtStats.gameStats[%var,%type,%game]); + %fc = getFieldCount(%dtStats.gameStats[%var,%type,%game,$dtStats::tmMode]); if(%fc < 2){ - %dtStats.gameStats[%var,%type,%game] = $dtStats::blank["t"]; + %dtStats.gameStats[%var,%type,%game,$dtStats::tmMode] = $dtStats::blank["t"]; } - %dtStats.gameStats[%var,%type,%game] = setField(%dtStats.gameStats[%var,%type,%game],%c, hasValue(%val)); + %dtStats.gameStats[%var,%type,%game,$dtStats::tmMode] = setField(%dtStats.gameStats[%var,%type,%game,$dtStats::tmMode],%c, hasValue(%val)); } } @@ -6308,32 +7028,36 @@ function deadDist(%pos,%pl){ } function dtMinMax(%statName,%group,%minMax,%value,%client){ - $Host::ClassicEvoStats = !$dtStats::evoStyleDebrief; - if(!isObject(dtGameStat)){ - new scriptObject(dtGameStat); - } - dtGameStat.gc[%group]++; - switch(%minMax){ - case 1: - if(dtGameStat.stat[%statName] < %value || dtGameStat.stat[%statName] $= ""){ - dtGameStat.stat[%statName] = %value; - dtGameStat.name[%statName] = getTaggedString(%client.name); - dtGameStat.client[%statName] = %client; - } - case 2: - if(dtGameStat.stat[%statName] > %value || dtGameStat.stat[%statName] $= ""){ - dtGameStat.stat[%statName] = %value; - dtGameStat.name[%statName] = getTaggedString(%client.name); - dtGameStat.client[%statName] = %client; - } - case 3: - dtGameStat.statTrack[%statName, %client] += %value; - %minMax = dtGameStat.statTrack[%statName, %client]; - if(dtGameStat.stat[%statName] < %value || dtGameStat.stat[%statName] $= ""){ - dtGameStat.stat[%statName] = %value; - dtGameStat.name[%statName] = getTaggedString(%client.name); - dtGameStat.client[%statName] = %client; + if($dtStats::evoStyleDebrief){ + if(!isObject(dtGameStat)){ + new scriptObject(dtGameStat); + rootGroup.add(dtGameStat); + } + if(%value != 0){ + dtGameStat.gc[%group]++; + switch(%minMax){ + case 1: + if(dtGameStat.stat[%statName] < %value || dtGameStat.stat[%statName] $= ""){ + dtGameStat.stat[%statName] = %value; + dtGameStat.name[%statName] = getTaggedString(%client.name); + dtGameStat.client[%statName] = %client; + } + case 2: + if(dtGameStat.stat[%statName] > %value || dtGameStat.stat[%statName] $= ""){ + dtGameStat.stat[%statName] = %value; + dtGameStat.name[%statName] = getTaggedString(%client.name); + dtGameStat.client[%statName] = %client; + } + case 3://value counter; + dtGameStat.statTrack[%statName, %client] += %value; + %curValue = dtGameStat.statTrack[%statName, %client]; + if(dtGameStat.stat[%statName] < %curValue || dtGameStat.stat[%statName] $= ""){ + dtGameStat.stat[%statName] = %curValue; + dtGameStat.name[%statName] = getTaggedString(%client.name); + dtGameStat.client[%statName] = %client; + } } + } } } @@ -6356,6 +7080,12 @@ function clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %d } %killerDT = %clKiller.dtStats; %victimDT = %clVictim.dtStats; + + if(%clKiller.killBy == %clVictim){ + %clKiller.killBy = 0; + %killerDT.stat["revenge"]++; + } + %clVictim.killBy = %clKiller; //fail safe in case package is out of order %victimPlayer = isObject(%clVictim.player) ? %clVictim.player : %clVictim.lastPlayer; %killerPlayer = isObject(%clKiller.player) ? %clKiller.player : %clKiller.lastPlayer; @@ -6363,7 +7093,7 @@ function clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %d armorTimer(%victimDT, 0, 1); //------------------------------------------------------------------------------ %victimDT.timeToLive += getSimTime() - %clVictim.spawnTime; - %victimDT.stat["timeTL"] = mFloor((%victimDT.timeToLive/(%clVictim.stat["deaths"]+%clVictim.stat["suicides"] ? %clVictim.stat["deaths"]+%clVictim.stat["suicides"] : 1))/1000); + %victimDT.stat["timeTL"] = mFloor(((%victimDT.timeToLive/(%clVictim.stat["deaths"]+%clVictim.stat["suicides"] ? %clVictim.stat["deaths"]+%clVictim.stat["suicides"] : 1))/1000)/60); //------------------------------------------------------------------------------ if(%clKiller.team == %clVictim.team && %clKiller != %clVictim){ %killerDT.stat["teamkillCount"]++; @@ -6443,6 +7173,7 @@ function clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %d //------------------------------------------------------------------------------ if(rayTest(%victimPlayer, $dtStats::midAirHeight)){%vcAir =1;}else{%vcAir =2;} if(rayTest(%killerPlayer, $dtStats::midAirHeight)){%kcAir =1;}else{%kcAir =2;} + %vdis = rayTestDis(%victimPlayer); switch$(%victimPlayer.getArmorSize()){ case "Light":%killerDT.stat["armorL"]++; @@ -6499,17 +7230,14 @@ function clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %d %killerDT.stat["cgKills"]++; %victimDT.stat["cgDeaths"]++; if(%killerDT.stat["cgKillDist"] < %dis){%killerDT.stat["cgKillDist"] = %dis;} - if(%killerDT.stat["cgKillVV"] < %victimVel){%killerDT.stat["cgKillVV"] = %victimVel;} - if(%killerDT.stat["cgKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["cgKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["cgCom"]++;} dtMinMax("cgKills", "wep", 1, %killerDT.stat["cgKills"], %clKiller); case $DamageType::Disc: %killerDT.stat["discKills"]++; %victimDT.stat["discDeaths"]++; + if(%vdis < 6){%killerDT.stat["discKillGround"]++;} if(%killerDT.stat["discKillDist"] < %dis){%killerDT.stat["discKillDist"] = %dis;} - if(%killerDT.stat["discKillVV"] < %victimVel){%killerDT.stat["discKillVV"] = %victimVel;} - if(%killerDT.stat["discKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["discKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["discCom"]++;} if(%clKiller.mdHit){%killerDT.stat["minePlusDiscKill"]++;} @@ -6522,8 +7250,6 @@ function clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %d %killerDT.stat["hGrenadeKills"]++; %victimDT.stat["hGrenadeDeaths"]++; if(%killerDT.stat["hGrenadeKillDist"] < %dis){%killerDT.stat["hGrenadeKillDist"] = %dis;} - if(%killerDT.stat["hGrenadeKillVV"] < %victimVel){%killerDT.stat["hGrenadeKillVV"] = %victimVel;} - if(%killerDT.stat["hGrenadeKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["hGrenadeKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["hGrenadeCom"]++;} dtMinMax("hGrenadeKills", "wep", 1, %killerDT.stat["hGrenadeKills"], %clKiller); } @@ -6531,8 +7257,6 @@ function clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %d %killerDT.stat["grenadeKills"]++; %victimDT.stat["grenadeDeaths"]++; if(%killerDT.stat["grenadeKillDist"] < %dis){%killerDT.stat["grenadeKillDist"] = %dis;} - if(%killerDT.stat["grenadeKillVV"] < %victimVel){%killerDT.stat["grenadeKillVV"] = %victimVel;} - if(%killerDT.stat["grenadeKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["grenadeKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["grenadeCom"]++;} dtMinMax("grenadeKills", "wep", 1, %killerDT.stat["grenadeKills"], %clKiller); } @@ -6543,48 +7267,36 @@ function clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %d %killerDT.stat["laserKills"]++; %victimDT.stat["laserDeaths"]++; if(%killerDT.stat["laserKillDist"] < %dis){%killerDT.stat["laserKillDist"] = %dis;} - if(%killerDT.stat["laserKillVV"] < %victimVel){%killerDT.stat["laserKillVV"] = %victimVel;} - if(%killerDT.stat["laserKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["laserKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["laserCom"]++;} dtMinMax("laserKills", "wep", 1, %killerDT.stat["laserKills"], %clKiller); case $DamageType::Mortar: %killerDT.stat["mortarKills"]++; %victimDT.stat["mortarDeaths"]++; if(%killerDT.stat["mortarKillDist"] < %dis){%killerDT.stat["mortarKillDist"] = %dis;} - if(%killerDT.stat["mortarKillVV"] < %victimVel){%killerDT.stat["mortarKillVV"] = %victimVel;} - if(%killerDT.stat["mortarKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["mortarKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["mortarCom"]++;} dtMinMax("mortarKills", "wep", 1, %killerDT.stat["mortarKills"], %clKiller); case $DamageType::Missile: %killerDT.stat["missileKills"]++; %victimDT.stat["missileDeaths"]++; if(%killerDT.stat["missileKillDist"] < %dis){%killerDT.stat["missileKillDist"] = %dis;} - if(%killerDT.stat["missileKillVV"] < %victimVel){%killerDT.stat["missileKillVV"] = %victimVel;} - if(%killerDT.stat["missileKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["missileKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["missileCom"]++;} dtMinMax("missileKills", "wep", 1, %killerDT.stat["missileKills"], %clKiller); case $DamageType::ShockLance: %killerDT.stat["shockKills"]++; %victimDT.stat["shockDeaths"]++; if(%killerDT.stat["shockKillDist"] < %dis){%killerDT.stat["shockKillDist"] = %dis;} - if(%killerDT.stat["shockKillVV"] < %victimVel){%killerDT.stat["shockKillVV"] = %victimVel;} - if(%killerDT.stat["shockKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["shockKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["shockCom"]++;} dtMinMax("shockKills", "wep", 1, %killerDT.stat["shockKills"], %clKiller); case $DamageType::Plasma: %killerDT.stat["plasmaKills"]++; %victimDT.stat["plasmaDeaths"]++; if(%killerDT.stat["plasmaKillDist"] < %dis){%killerDT.stat["plasmaKillDist"] = %dis;} - if(%killerDT.stat["plasmaKillVV"] < %victimVel){%killerDT.stat["plasmaKillVV"] = %victimVel;} - if(%killerDT.stat["plasmaKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["plasmaKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["plasmaCom"]++;} dtMinMax("plasmaKills", "wep", 1, %killerDT.stat["plasmaKills"], %clKiller); case $DamageType::Blaster: %killerDT.stat["blasterKills"]++; %victimDT.stat["blasterDeaths"]++; if(%killerDT.stat["blasterKillDist"] < %dis){%killerDT.stat["blasterKillDist"] = %dis;} - if(%killerDT.stat["blasterKillVV"] < %victimVel){%killerDT.stat["blasterKillVV"] = %victimVel;} - if(%killerDT.stat["blasterKillSV"] < %clKiller.dtShotSpeed){%killerDT.stat["blasterKillSV"] = %clKiller.dtShotSpeed;} if(%isCombo){%killerDT.stat["blasterCom"]++;} if(getSimTime() - %clKiller.blasterReflect < 256){%killerDT.stat["blasterReflectKill"]++;} dtMinMax("blasterKills", "wep", 1, %killerDT.stat["blasterKills"], %clKiller); @@ -6595,7 +7307,6 @@ function clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %d %killerDT.stat["mineKills"]++; %victimDT.stat["mineDeaths"]++; if(%killerDT.stat["mineKillDist"] < %dis){%killerDT.stat["mineKillDist"] = %dis;} - if(%killerDT.stat["mineKillVV"] < %victimVel){%killerDT.stat["mineKillVV"] = %victimVel;} if(%isCombo){%killerDT.stat["mineCom"]++;} if(%clKiller.mdHit){%killerDT.stat["minePlusDiscKill"]++;} dtMinMax("mineKills", "wep", 1, %killerDT.stat["mineKills"], %clKiller); @@ -6604,7 +7315,6 @@ function clientKillStats(%game,%clVictim, %clKiller, %damageType, %implement, %d %killerDT.stat["satchelKills"]++; %victimDT.stat["satchelDeaths"]++; if(%killerDT.stat["satchelKillDist"] < %dis){%killerDT.stat["satchelKillDist"] = %dis;} - if(%killerDT.stat["satchelKillVV"] < %victimVel){%killerDT.stat["satchelKillVV"] = %victimVel;} if(%isCombo){%killerDT.stat["satchelCom"]++;} dtMinMax("satchelKills", "wep", 1, %killerDT.stat["satchelKills"], %clKiller); case $DamageType::Explosion: @@ -6803,6 +7513,22 @@ function rayTestDis(%targetObject){ return 0; } + +function testHit2(%sClient,%tgClient){ + %plr = %tgClient.player; + %b = getField(%sClient.lastExp,3); + %a = %plr.getWorldBox(); + + %hit = (getWord(%a, 0) <= getWord(%b, 3) && getWord(%a, 3) >= getWord(%b, 0)) && + (getWord(%a, 1) <= getWord(%b, 4) && getWord(%a, 4) >= getWord(%b, 1)) && + (getWord(%a, 2)<= getWord(%b, 5) && getWord(%a, 5) >= getWord(%b, 2)); + if(%hit && (!%sClient.lastDHit || (getSimTime() - %sClient.lastDHit > 128))){ + %sClient.lastDHit = getSimTime();// lock out double hits + return 1; + } + return 0; +} + function testHit(%client){ if(isObject(%client)){ %field = %client.lastExp; @@ -6811,15 +7537,16 @@ function testHit(%client){ %mask = $TypeMasks::PlayerObjectType; %vec = vectorNormalize(vectorSub(%ePos,%sPos));// some how this vector works %ray = containerRayCast(%ePos, VectorAdd(%ePos, VectorScale(VectorNormalize(%vec), 5)), %mask, %client.player); - if(%ray){ + if(%ray && (!%client.lastDHit || (getSimTime() - %client.lastDHit > 128))){ + %client.lastDHit = getSimTime(); //%dmgType = %data.radiusDamageType; - //error(%dmgType); return 1; } } } return 0; } + function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageType, %amount){ if(%damageType == $DamageType::Explosion || %damageType == $DamageType::Ground || %damageType == $DamageType::OutOfBounds || %damageType == $DamageType::Lava || @@ -6838,7 +7565,6 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT } return; } - //------------------------------------------------------------------------------ if(%amount > 0 && %damageType > 0){ if(isObject(%sourceObject)){ @@ -6847,21 +7573,18 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT %sourceClient = %sourceObject.client; %sourceClient.lastPlayer = %sourceClient.player; %sourceDT = %sourceClient.dtStats; - %directHit = testHit(%sourceClient); %sv = mFloor(vectorLen(%sourceObject.getVelocity()) * 3.6); } else if(%sourceClass $= "Turret"){ %sourceClient = %sourceObject.owner; + if(!isObject(%sourceClient)){ + %sourceClient = %sourceObject.getControllingClient(); + } %sourceDT = %sourceClient.dtStats; - %directHit = 0; } else if(%sourceClass $= "VehicleTurret" || %sourceClass $= "FlyingVehicle" || %sourceClass $= "HoverVehicle" || %sourceClass $= "WheeledVehicle"){ %sourceClient = %sourceObject.getControllingClient(); %sourceDT = %sourceClient.dtStats; - %directHit = 0; - } - else{ - %directHit = 0; } } if(isObject(%targetObject)){ @@ -6879,8 +7602,14 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT %sourceDT.stat["friendlyFire"]++; if(getSimTime() - %sourceClient.stat["flareHit"] < 256){%sourceClient.flareSource.dtStats.stat["flareHit"]++;} } - if(%sourceClass $= "Player" && %targetClient.team != %sourceClient.team && %sourceObject != %targetObject){ - %dis = vectorDist(%targetObject.getPosition(),%sourceObject.getPosition()); + %ssc = (%sourceClass $= "VehicleTurret" || %sourceClass $= "FlyingVehicle" || %sourceClass $= "HoverVehicle" || %sourceClass $= "WheeledVehicle" || %sourceClass $= "Player" || %sourceClass $= "Turret"); + if(%ssc && %targetClient.team != %sourceClient.team && %sourceObject != %targetObject){ + if((getSimTime() - %sourceClient.lastExpTime) < 32){ + %dis = vectorDist(getField(%sourceClient.lastExp,1),getField(%sourceClient.lastExp,2)); + } + else{ + %dis = vectorDist(%targetObject.getPosition(),%sourceObject.getPosition()); + } if(!%targetObject.combo[%sourceClient,%damageType]){ %targetObject.combo[%sourceClient,%damageType] = 1; %sourceClient.player.combo[%targetObject]++; @@ -6937,101 +7666,112 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT switch$(%damageType){// list of all damage types to track see damageTypes.cs case $DamageType::Blaster: %sourceDT.stat["blasterDmg"] += %amount; + dtMinMax("blasterDmg", "wep", 1, %sourceDT.stat["blasterDmg"], %sourceClient); %sourceDT.stat["blasterHits"]++; %sourceDT.stat["blasterACC"] = (%sourceDT.stat["blasterHits"] / (%sourceDT.stat["blasterShotsFired"] ? %sourceDT.stat["blasterShotsFired"] : 1)) * 100; if(%sourceDT.stat["blasterHitDist"] < %dis){%sourceDT.stat["blasterHitDist"] = %dis;} if(%sourceDT.stat["weaponHitDist"] < %dis){%sourceDT.stat["weaponHitDist"] = %dis;} + if(%sourceDT.stat["blasterHitSV"] < %sv){%sourceDT.stat["blasterHitSV"] = %sv;} if(%rayTest >= $dtStats::midAirHeight){ if(%sourceDT.stat["blasterMAHitDist"] < %dis){%sourceDT.stat["blasterMAHitDist"] = %dis;} %sourceDT.stat["blasterMA"]++; + dtMinMax("blasterMA", "ma", 1, %sourceDT.stat["blasterMA"], %sourceClient); + dtMinMax("blasterMAHitDist", "ma", 1, %sourceDT.stat["blasterMAHitDist"], %sourceClient); + dtMidAirMessage(%sourceClient,"Blaster", %dis, %sourceDT.stat["blasterMA"]); } if(getSimTime() - %sourceObject.client.blasterReflect < 256){%sourceDT.stat["blasterReflectHit"]++;} - dtMinMax("blasterDmg", "wep", 1, %sourceDT.stat["blasterDmg"], %sourceClient); - dtMinMax("blasterMA", "ma", 1, %sourceDT.stat["blasterMA"], %sourceClient); - dtMinMax("blasterMAHitDist", "ma", 1, %sourceDT.stat["blasterMAHitDist"], %sourceClient); + case $DamageType::Plasma: %sourceDT.stat["plasmaDmg"] += %amount; + dtMinMax("plasmaDmg", "wep", 1, %sourceDT.stat["plasmaDmg"], %sourceClient); + %directHit = testHit2(%sourceClient,%targetObject.client); if(%directHit){%sourceDT.stat["plasmaHits"]++;%sourceDT.stat["plasmaDmgHits"]++;} else{%sourceDT.stat["plasmaDmgHits"]++;} %sourceDT.stat["plasmaACC"] = (%sourceDT.stat["plasmaHits"] / (%sourceDT.stat["plasmaShotsFired"] ? %sourceDT.stat["plasmaShotsFired"] : 1)) * 100; %sourceDT.stat["plasmaDmgACC"] = (%sourceDT.stat["plasmaDmgHits"] / (%sourceDT.stat["plasmaShotsFired"] ? %sourceDT.stat["plasmaShotsFired"] : 1)) * 100; if(%sourceDT.stat["plasmaHitDist"] < %dis){%sourceDT.stat["plasmaHitDist"] = %dis;} if(%sourceDT.stat["weaponHitDist"] < %dis){%sourceDT.stat["weaponHitDist"] = %dis;} + if(%sourceDT.stat["plasmaHitSV"] < %vv){%sourceDT.stat["plasmaHitSV"] = %sv;} if(%rayTest >= $dtStats::midAirHeight){ - if(%sourceDT.stat["plasmaMAHitDist"] < %dis){%sourceDT.stat["plasmaMAHitDist"] = %dis;} if(%directHit){ - dtMidAirMessage(%sourceClient,"Plasma Rifle", %dis); + if(%sourceDT.stat["plasmaMAHitDist"] < %dis){%sourceDT.stat["plasmaMAHitDist"] = %dis;} %sourceDT.stat["plasmaMA"]++; + dtMidAirMessage(%sourceClient,"Plasma Rifle", %dis, %sourceDT.stat["plasmaMA"]); + dtMinMax("plasmaMA", "ma", 1, %sourceDT.stat["plasmaMA"], %sourceClient); + dtMinMax("plasmaMAHitDist", "ma", 1, %sourceDT.stat["plasmaMAHitDist"], %sourceClient); } } - dtMinMax("plasmaDmg", "wep", 1, %sourceDT.stat["plasmaDmg"], %sourceClient); - dtMinMax("plasmaMA", "ma", 1, %sourceDT.stat["plasmaMA"], %sourceClient); - dtMinMax("plasmaMAHitDist", "ma", 1, %sourceDT.stat["plasmaMAHitDist"], %sourceClient); case $DamageType::Bullet: %sourceDT.stat["cgDmg"] += %amount; + dtMinMax("cgDmg", "wep", 1, %sourceDT.stat["cgDmg"], %sourceClient); %sourceDT.stat["cgHits"]++; %sourceDT.stat["cgACC"] = (%sourceDT.stat["cgHits"] / (%sourceDT.stat["cgShotsFired"] ? %sourceDT.stat["cgShotsFired"] : 1)) * 100; if(%sourceDT.stat["cgHitDist"] < %dis){%sourceDT.stat["cgHitDist"] = %dis;} if(%sourceDT.stat["weaponHitDist"] < %dis){%sourceDT.stat["weaponHitDist"] = %dis;} + if(%sourceDT.stat["cgHitSV"] < %sv){%sourceDT.stat["cgHitSV"] = %sv;} if(%rayTest >= $dtStats::midAirHeight){ if(%sourceDT.stat["cgMAHitDist"] < %dis){%sourceDT.stat["cgMAHitDist"] = %dis;} %sourceDT.stat["cgMA"]++; } - dtMinMax("cgDmg", "wep", 1, %sourceDT.stat["cgDmg"], %sourceClient); case $DamageType::Disc: %sourceDT.stat["discDmg"] += %amount; + dtMinMax("discDmg", "wep", 1, %sourceDT.stat["discDmg"], %sourceClient); + %directHit = testHit2(%sourceClient,%targetObject.client); if(%directHit){%sourceDT.stat["discHits"]++;%sourceDT.stat["discDmgHits"]++;} else{%sourceDT.stat["discDmgHits"]++;} %sourceDT.stat["discACC"] = (%sourceDT.stat["discHits"] / (%sourceDT.stat["discShotsFired"] ? %sourceDT.stat["discShotsFired"] : 1)) * 100; %sourceDT.stat["discDmgACC"] = (%sourceDT.stat["discDmgHits"] / (%sourceDT.stat["discShotsFired"] ? %sourceDT.stat["discShotsFired"] : 1)) * 100; if(%sourceDT.stat["discHitDist"] < %dis){%sourceDT.stat["discHitDist"] = %dis;} if(%sourceDT.stat["weaponHitDist"] < %dis){%sourceDT.stat["weaponHitDist"] = %dis;} + if(%sourceDT.stat["discHitSV"] < %sv){%sourceDT.stat["discHitSV"] = %sv;} %sourceClient.mdHit = 0; if((getSimTime() - %targetClient.mdTime1) < 256){%sourceDT.stat["minePlusDisc"]++; %sourceClient.mdHit = 1;} %targetClient.mdTime2 = getSimTime(); if(%rayTest >= $dtStats::midAirHeight){ - if(%sourceDT.stat["discMAHitDist"] < %dis){%sourceDT.stat["discMAHitDist"] = %dis;} if(%directHit){ - dtMidAirMessage(%sourceClient,"Spinfusor", %dis); + if(%sourceDT.stat["discMAHitDist"] < %dis){%sourceDT.stat["discMAHitDist"] = %dis;} %sourceDT.stat["discMA"]++; + dtMidAirMessage(%sourceClient,"Spinfusor", %dis, %sourceDT.stat["discMA"]); + dtMinMax("discMA", "ma", 1, %sourceDT.stat["discMA"], %sourceClient); + dtMinMax("discMAHitDist", "ma", 1, %sourceDT.stat["discMAHitDist"], %sourceClient); } } if(getSimTime() - %sourceObject.client.discReflect < 256){%sourceDT.stat["discReflectHit"]++;} - dtMinMax("discDmg", "wep", 1, %sourceDT.stat["discDmg"], %sourceClient); - dtMinMax("discMA", "ma", 1, %sourceDT.stat["discMA"], %sourceClient); - dtMinMax("discMAHitDist", "ma", 1, %sourceDT.stat["discMAHitDist"], %sourceClient); dtMinMax("minePlusDisc", "wep", 1, %sourceDT.stat["minePlusDisc"], %sourceClient); case $DamageType::Grenade: if($dtObjExplode.dtNade){ %sourceDT.stat["hGrenadeDmg"] += %amount; + dtMinMax("hGrenadeDmg", "wep", 1, %sourceDT.stat["hGrenadeDmg"], %sourceClient); %sourceDT.stat["hGrenadeHits"]++; %sourceDT.stat["hGrenadeACC"] = (%sourceDT.stat["hGrenadeHits"] / (%sourceDT.stat["hGrenadeShotsFired"] ? %sourceDT.stat["hGrenadeShotsFired"] : 1)) * 100; if(%sourceDT.stat["hGrenadeHitDist"] < %dis){%sourceDT.stat["hGrenadeHitDist"] = %dis;} if(%sourceDT.stat["weaponHitDist"] < %dis){%sourceDT.stat["weaponHitDist"] = %dis;} + if(%sourceDT.stat["hGrenadeHitSV"] < %sv){%sourceDT.stat["hGrenadeHitSV"] = %sv;} if(%rayTest >= $dtStats::midAirHeight){ if(%sourceDT.stat["hGrenadeMAHitDist"] < %dis){%sourceDT.stat["hGrenadeMAHitDist"] = %dis;} %sourceDT.stat["hGrenadeMA"]++; } - dtMinMax("hGrenadeDmg", "wep", 1, %sourceDT.stat["hGrenadeDmg"], %sourceClient); } else{ %sourceDT.stat["grenadeDmg"] += %amount; + dtMinMax("grenadeDmg", "wep", 1, %sourceDT.stat["grenadeDmg"], %sourceClient); + %directHit = testHit2(%sourceClient,%targetObject.client); if(%directHit){%sourceDT.stat["grenadeHits"]++;%sourceDT.stat["grenadeDmgHits"]++;} else{%sourceDT.stat["grenadeDmgHits"]++;} %sourceDT.stat["grenadeACC"] = (%sourceDT.stat["grenadeHits"] / (%sourceDT.stat["grenadeShotsFired"] ? %sourceDT.stat["grenadeShotsFired"] : 1)) * 100; %sourceDT.stat["grenadeDmgACC"] = (%sourceDT.stat["grenadeDmgHits"] / (%sourceDT.stat["grenadeShotsFired"] ? %sourceDT.stat["grenadeShotsFired"] : 1)) * 100; if(%sourceDT.stat["grenadeHitDist"] < %dis){%sourceDT.stat["grenadeHitDist"] = %dis;} + if(%sourceDT.stat["grenadeHitSV"] < %sv){%sourceDT.stat["grenadeHitSV"] = %sv;} if(%rayTest >= $dtStats::midAirHeight){ - if(%sourceDT.stat["grenadeMAHitDist"] < %dis){%sourceDT.stat["grenadeMAHitDist"] = %dis;} if(%directHit){ - dtMidAirMessage(%sourceClient, "Grenade Launcher", %dis); + if(%sourceDT.stat["grenadeMAHitDist"] < %dis){%sourceDT.stat["grenadeMAHitDist"] = %dis;} %sourceDT.stat["grenadeMA"]++; + dtMidAirMessage(%sourceClient, "Grenade Launcher", %dis, %sourceDT.stat["grenadeMA"]); + dtMinMax("grenadeMA", "ma", 1, %sourceDT.stat["grenadeMA"], %sourceClient); + dtMinMax("grenadeMAHitDist", "ma", 1, %sourceDT.stat["grenadeMAHitDist"], %sourceClient); } } - dtMinMax("grenadeDmg", "wep", 1, %sourceDT.stat["grenadeDmg"], %sourceClient); - dtMinMax("grenadeMA", "ma", 1, %sourceDT.stat["grenadeMA"], %sourceClient); - dtMinMax("grenadeMAHitDist", "ma", 1, %sourceDT.stat["grenadeMAHitDist"], %sourceClient); } case $DamageType::Laser: if(%targetObject.getClassName() $= "Player"){ @@ -7039,12 +7779,17 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT if(getWord(%damLoc,0) $= "head" && %sourceClient.team != %targetClient.team){ %sourceDT.stat["laserHeadShot"]++; %sourceDT.lastHeadShotTime = getSimTime(); + dtHeadShotMessage(%sourceClient, %dis); + } + else{ + dtLaserShotMessage(%sourceClient, %dis); } } %sourceDT.stat["laserDmg"] += %amount; %sourceDT.stat["laserHits"]++; %sourceDT.stat["laserACC"] = (%sourceDT.stat["laserHits"] / (%sourceDT.stat["laserShotsFired"] ? %sourceDT.stat["laserShotsFired"] : 1)) * 100; if(%sourceDT.stat["laserHitDist"] < %dis){%sourceDT.stat["laserHitDist"] = %dis;} + if(%sourceDT.stat["laserHitSV"] < %sv){%sourceDT.stat["laserHitSV"] = %sv;} if(%sourceDT.stat["weaponHitDist"] < %dis){%sourceDT.stat["weaponHitDist"] = %dis;} if(%rayTest >= $dtStats::midAirHeight){ if(%sourceDT.stat["laserMAHitDist"] < %dis){%sourceDT.stat["laserMAHitDist"] = %dis;} @@ -7055,35 +7800,39 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT dtMinMax("laserDmg", "wep", 1, %sourceDT.stat["laserDmg"], %sourceClient); case $DamageType::Mortar: %sourceDT.stat["mortarDmg"] += %amount; + dtMinMax("mortarDmg","wep", 1, %sourceDT.stat["mortarDmg"], %sourceClient); + %directHit = testHit2(%sourceClient,%targetObject.client); if(%directHit){%sourceDT.stat["mortarHits"]++;%sourceDT.stat["mortarDmgHits"]++;} else{%sourceDT.stat["mortarDmgHits"]++;} %sourceDT.stat["mortarACC"] = (%sourceDT.stat["mortarHits"] / (%sourceDT.stat["mortarShotsFired"] ? %sourceDT.stat["mortarShotsFired"] : 1)) * 100; %sourceDT.stat["mortarDmgACC"] = (%sourceDT.stat["mortarDmgHits"] / (%sourceDT.stat["mortarShotsFired"] ? %sourceDT.stat["mortarShotsFired"] : 1)) * 100; if(%sourceDT.stat["mortarHitDist"] < %dis){%sourceDT.stat["mortarHitDist"] = %dis;} + if(%sourceDT.stat["mortarHitSV"] < %sv){%sourceDT.stat["mortarHitSV"] = %sv;} if(%sourceDT.stat["weaponHitDist"] < %dis){%sourceDT.stat["weaponHitDist"] = %dis;} if(%rayTest >= $dtStats::midAirHeight){ - if(%sourceDT.stat["mortarMAHitDist"] < %dis){%sourceDT.stat["mortarMAHitDist"] = %dis;} if(%directHit){ - dtMidAirMessage(%sourceClient,"Fusion Mortar", %dis); + if(%sourceDT.stat["mortarMAHitDist"] < %dis){%sourceDT.stat["mortarMAHitDist"] = %dis;} %sourceDT.stat["mortarMA"]++; + dtMidAirMessage(%sourceClient,"Fusion Mortar", %dis, %sourceDT.stat["mortarMA"]); + dtMinMax("mortarMA", "ma", 1, %sourceDT.stat["mortarMA"], %sourceClient); + dtMinMax("mortarMAHitDist", "ma", 1, %sourceDT.stat["mortarMAHitDist"], %sourceClient); } } - dtMinMax("mortarDmg","wep", 1, %sourceDT.stat["mortarDmg"], %sourceClient); - dtMinMax("mortarMA", "ma", 1, %sourceDT.stat["mortarMA"], %sourceClient); - dtMinMax("mortarMAHitDist", "ma", 1, %sourceDT.stat["mortarMAHitDist"], %sourceClient); case $DamageType::Missile: %sourceDT.stat["missileDmg"] += %amount; + dtMinMax("missileDmg", "wep", 1, %sourceDT.stat["missileDmg"], %sourceClient); %sourceDT.stat["missileHits"]++; %sourceDT.stat["missileACC"] = (%sourceDT.stat["missileHits"] / (%sourceDT.stat["missileShotsFired"] ? %sourceDT.stat["missileShotsFired"] : 1)) * 100; if(%sourceDT.stat["missileHitDist"] < %dis){%sourceDT.stat["missileHitDist"] = %dis;} if(%sourceDT.stat["weaponHitDist"] < %dis){%sourceDT.stat["weaponHitDist"] = %dis;} + if(%sourceDT.stat["missileHitSV"] < %sv){%sourceDT.stat["missileHitSV"] = %sv;} if(%rayTest >= $dtStats::midAirHeight){ if(%sourceDT.stat["missileMAHitDist"] < %dis){%sourceDT.stat["missileMAHitDist"] = %dis;} %sourceDT.stat["missileMA"]++; } - dtMinMax("missileDmg", "wep", 1, %sourceDT.stat["missileDmg"], %sourceClient); case $DamageType::ShockLance: - if(%targetClient.rearshot){ + %dot = vectorDot(%sourceObject.getForwardVector(), %targetObject.getForwardVector()); + if(%dot >= mCos(1.05)){ %sourceDT.stat["shockRearShot"]++; dtMinMax("shockRearShot", "misc", 1, %sourceDT.stat["shockRearShot"], %sourceClient); } @@ -7092,9 +7841,13 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT %sourceDT.stat["shockACC"] = (%sourceDT.stat["shockHits"] / (%sourceDT.stat["shockShotsFired"] ? %sourceDT.stat["shockShotsFired"] : 1)) * 100; if(%sourceDT.stat["shockHitDist"] < %dis){%sourceDT.stat["shockHitDist"] = %dis;} if(%sourceDT.stat["weaponHitDist"] < %dis){%sourceDT.stat["weaponHitDist"] = %dis;} + if(%sourceDT.stat["shockHitSV"] < %sv){%sourceDT.stat["shockHitSV"] = %sv;} if(%rayTest >= $dtStats::midAirHeight){ if(%sourceDT.stat["shockMAHitDist"] < %dis){%sourceDT.stat["shockMAHitDist"] = %dis;} %sourceDT.stat["shockMA"]++; + if(Game.class $= "ArenaGame"){ + dtMidAirMessage(%sourceClient, "Shocklance", %dis, %sourceDT.stat["shockMA"]); + } } dtMinMax("shockDmg", "wep", 1, %sourceDT.stat["shockDmg"], %sourceClient); case $DamageType::Mine: @@ -7102,6 +7855,7 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT %sourceDT.stat["mineHits"]++; %sourceDT.stat["mineACC"] = (%sourceDT.stat["mineHits"] / (%sourceDT.stat["mineShotsFired"] ? %sourceDT.stat["mineShotsFired"] : 1)) * 100; if(%sourceDT.stat["mineHitDist"] < %dis){%sourceDT.stat["mineHitDist"] = %dis;} + if(%sourceDT.stat["mineHitVV"] < %vv){%sourceDT.stat["mineHitVV"] = %vv;} %sourceClient.mdHit = 0; if((getSimTime() - %targetClient.mdTime2) < 256){%sourceDT.stat["minePlusDisc"]++; %sourceClient.mdHit = 1;} %targetClient.mdTime1 = getSimTime(); @@ -7116,32 +7870,33 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT %sourceDT.stat["satchelHits"]++; %sourceDT.stat["satchelACC"] = (%sourceDT.stat["satchelHits"] / (%sourceDT.stat["satchelShotsFired"] ? %sourceDT.stat["satchelShotsFired"] : 1)) * 100; if(%sourceDT.stat["satchelHitDist"] < %dis){%sourceDT.stat["satchelHitDist"] = %dis;} + if(%sourceDT.stat["satchelHitVV"] < %vv){%sourceDT.stat["satchelHitVV"] = %vv;} if(%rayTest >= $dtStats::midAirHeight){%sourceDT.stat["satchelMA"]++;} dtMinMax("satchelDmg", "wep", 1, %sourceDT.stat["satchelDmg"], %sourceClient); case $DamageType::Impact: %sourceDT.stat["roadDmg"] += %amount; - dtMinMax("roadDmg", "wep", 1, %killerDT.stat["roadDmg"], %sourceClient); + dtMinMax("roadDmg", "wep", 1, %sourceDT.stat["roadDmg"], %sourceClient); case $DamageType::IndoorDepTurret: %sourceDT.stat["indoorDepTurretDmg"] += %amount; - dtMinMax("indoorDepTurretDmg", "wep", 1, %killerDT.stat["indoorDepTurretDmg"], %sourceClient); + dtMinMax("indoorDepTurretDmg", "wep", 1, %sourceDT.stat["indoorDepTurretDmg"], %sourceClient); case $DamageType::OutdoorDepTurret: %sourceDT.stat["outdoorDepTurretDmg"] += %amount; - dtMinMax("outdoorDepTurretDmg", "wep", 1, %killerDT.stat["outdoorDepTurretDmg"], %sourceClient); + dtMinMax("outdoorDepTurretDmg", "wep", 1, %sourceDT.stat["outdoorDepTurretDmg"], %sourceClient); case $DamageType::TankMortar: %sourceDT.stat["tankMortarDmg"] += %amount; - dtMinMax("tankMortarDmg", "wep", 1, %killerDT.stat["tankMortarDmg"], %sourceClient); + dtMinMax("tankMortarDmg", "wep", 1, %sourceDT.stat["tankMortarDmg"], %sourceClient); case $DamageType::TankChaingun: %sourceDT.stat["tankChaingunDmg"] += %amount; - dtMinMax("tankChaingunDmg", "wep", 1, %killerDT.stat["tankChaingunDmg"], %sourceClient); + dtMinMax("tankChaingunDmg", "wep", 1, %sourceDT.stat["tankChaingunDmg"], %sourceClient); case $DamageType::BomberBombs: %sourceDT.stat["bomberBombsDmg"] += %amount; - dtMinMax("bomberBombsDmg", "wep", 1, %killerDT.stat["bomberBombsDmg"], %sourceClient); + dtMinMax("bomberBombsDmg", "wep", 1, %sourceDT.stat["bomberBombsDmg"], %sourceClient); case $DamageType::BellyTurret: %sourceDT.stat["bellyTurretDmg"] += %amount; - dtMinMax("bellyTurretDmg", "wep", 1, %killerDT.stat["bellyTurretDmg"], %sourceClient); + dtMinMax("bellyTurretDmg", "wep", 1, %sourceDT.stat["bellyTurretDmg"], %sourceClient); case $DamageType::ShrikeBlaster: %sourceDT.stat["shrikeBlasterDmg"] += %amount; - dtMinMax("shrikeBlasterDmg", "wep", 1, %killerDT.stat["shrikeBlasterDmg"], %sourceClient); + dtMinMax("shrikeBlasterDmg", "wep", 1, %sourceDT.stat["shrikeBlasterDmg"], %sourceClient); } } } @@ -7149,29 +7904,37 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT } } -function dtMidAirMessage(%client,%porjName,%distance){ +function dtMidAirMessage(%client,%porjName,%distance, %count){ if($dtStats::midAirMessage && Game.class !$= "LakRabbitGame" && !%client.isAIControlled()){ - %client.scoreMidAir++; - bottomPrint(%client, "Midair Disk (" @ %client.scoreMidAir @ ")! Distance is " @ %distance @ " meters.", 3); - messageClient(%client, 'MsgMidAir', '\c0You received a %1 point bonus for a successful mid air shot. [%2m, %3]~wfx/misc/bounty_bonus.wav', Game.SCORE_PER_MIDAIR, mFloor(%distance), %porjName); - messageTeamExcept(%client, 'MsgMidAir', '\c5%1 hit a mid air shot. [%2m, %3]', %client.name, mFloor(%distance), %porjName); + bottomPrint(%client, "Midair" SPC %porjName SPC "(" @ %count @ ") Distance of " @ mFloor(%distance) @ " meters.", 4); + messageClient(%client, 'MsgMidAir', '~wfx/misc/bounty_bonus.wav'); + if(%porjName !$= "Blaster"){ + messageTeamExcept(%client, 'MsgMidAir', '\c5%1 hit a mid air shot. [%2m, %3]', %client.name, mFloor(%distance), %porjName); + } Game.recalcScore(%client); } } +function dtHeadShotMessage(%client,%distance){ + if($dtStats::midAirMessage && Game.class !$= "LakRabbitGame" && !%client.isAIControlled()){ + bottomPrint(%client, "Headshot! Distance of " @ mFloor(%distance) @ " meters.", 4); + messageClient(%client, 'MsgMidAir', '\c0Headshot distance of [%1m]~wfx/misc/bounty_bonus.wav', mFloor(%distance)); + //messageTeamExcept(%client, 'MsgMidAir', '\c5%1 hit a head shot. [%2m, %3]', %client.name, mFloor(%distance), %porjName); + } +} +function dtLaserShotMessage(%client,%distance){ + if($dtStats::midAirMessage && Game.class !$= "LakRabbitGame" && !%client.isAIControlled()){ + bottomPrint(%client, "HIT! Distance is " @ mFloor(%distance) @ " meters.", 4); + //messageTeamExcept(%client, 'MsgMidAir', '\c5%1 hit a head shot. [%2m, %3]', %client.name, mFloor(%distance), %porjName); + } +} + function clientShotsFired(%data, %sourceObject, %projectile){ // could do a fov check to see if we are trying to aim at a player - if(isObject(%projectile.sourceObject) && isObject(%sourceObject)){ - if(%projectile.sourceObject.getClassName() !$= "Player"){ - %sourceClient = %projectile.sourceObject.getControllingClient(); - } - else - %sourceClient = %sourceObject.client; - } - if(!isObject(%sourceClient.dtStats)) - return; - %dtStats = %sourceClient.dtStats; + %dtStats = %sourceObject.client.dtStats; + if(!isObject(%dtStats)) + return; if(%data.hasDamageRadius || %data $= "BasicShocker") %damageType = %data.radiusDamageType; else @@ -7242,16 +8005,16 @@ function getArmorBreakDown(%game,%dtStats){ return mFloor((%avg[0]/%total)*100) TAB mFloor((%avg[1]/%total)*100) TAB mFloor((%avg[2]/%total)*100) TAB mFloor((%avg[%l]/%total)*100) TAB %armor[%l]; } function getGameDataAvg(%game,%dtStats,%var){ - if(%dtStats.gameData[%game] && %dtStats.gameStats["totalGames","g",%game] != 0){ + if(%dtStats.gameData[%game,$dtStats::tmMode] && %dtStats.gameStats["totalGames","g",%game,$dtStats::tmMode] != 0){ %c = 0; - %x = %dtStats.gameStats["statsOverWrite","g",%game]; + %x = %dtStats.gameStats["statsOverWrite","g",%game,$dtStats::tmMode]; for(%i=0; %i < 32; %i++){ %v = %x - %i; if(%v < 0) %v = $dtStats::MaxNumOfGames + %v; - %pct = getField(%dtStats.gameStats["gamePCT","g",%game],%v); + %pct = getField(%dtStats.gameStats["gamePCT","g",%game,$dtStats::tmMode],%v); if(%pct > 90){ - %num = getField(%dtStats.gameStats[%var,"g",%game],%v); + %num = getField(%dtStats.gameStats[%var,"g",%game,$dtStats::tmMode],%v); if(%num){ %val += %num; %c++; @@ -7268,14 +8031,14 @@ function getGameDataAvg(%game,%dtStats,%var){ function getGameData(%game,%client,%var,%type,%value){ if(%type $= "game"){ - %total = getField(%client.dtStats.gameStats[%var,"g",%game],%value); + %total = getField(%client.dtStats.gameStats[%var,"g",%game,$dtStats::tmMode],%value); if(%total !$= "") return mFloatLength(%total,2) + 0; else error("Error getGameData" SPC %game SPC %client SPC %var SPC %type SPC %value); } else if(%type $= "total"){ - %total = getField(%client.dtStats.gameStats[%var,"t",%game],%value); + %total = getField(%client.dtStats.gameStats[%var,"t",%game,$dtStats::tmMode],%value); if(strpos(%total,"%a") != -1){ %total = getField(strreplace(%total,"%a","\t"),0); } @@ -7285,14 +8048,14 @@ function getGameData(%game,%client,%var,%type,%value){ error("Error getGameData" SPC %game SPC %client SPC %var SPC %type SPC %value); } else if(%type $= "avg"){ - if(%client.dtStats.gameStats["totalGames","g",%game] != 0){ + if(%client.dtStats.gameStats["totalGames","g",%game,$dtStats::tmMode] != 0){ %c = 0; - %x = %client.dtStats.gameStats["statsOverWrite","g",%game]; + %x = %client.dtStats.gameStats["statsOverWrite","g",%game,$dtStats::tmMode]; for(%i=0; %i < 16; %i++){ %v = %x - %i; if(%v < 0) %v = $dtStats::MaxNumOfGames + %v; - %num = getField(%client.dtStats.gameStats[%var,"g",%game],%v); + %num = getField(%client.dtStats.gameStats[%var,"g",%game,$dtStats::tmMode],%v); if(%num $= ""){ error("Error getGameData" SPC %game SPC %client SPC %var SPC %type SPC %value); break; @@ -7373,200 +8136,275 @@ function statsMenu(%client,%game){ messageClient( %client, 'ClearHud', "", 'scoreScreen', 0 ); switch$(%menu){ - case "View": - messageClient( %client, 'SetScoreHudHeader', "", "" @ getTaggedString(0.name) @ "'s Stats"); - messageClient( %client, 'SetScoreHudSubheader', "", ' Back',0); + case "TBNOTES": + %line = 'Team Balancer Read Me'; + messageClient( %client, 'SetScoreHudHeader', "",%line); + %line = ' Back - Return To Score Screen'; + messageClient( %client, 'SetScoreHudSubheader', "",%line); + messageClient(%client, 'SetLineHud', "", %tag, %index++, ""); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Group 0 is the default catch-all group; avoid crossover with this."); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Groups 1-11 are custom roles; use higher numbers mean more niche roles."); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Players are sorted within groups by their weighted stats for that role."); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Players are picked from role groups in a round-robin method for each team"); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Roles swap after both teams pick, repeating until groups are empty."); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Any remaining players are pulled from Group 0 to complete the selection."); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Fewer groups improve balance accuracy, especially in smaller game modes."); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Try your best to use different stats in groups 1-11"); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Limit crossover for important roles; use it more for niche ones."); + messageClient(%client, 'SetLineHud', "", %tag, %index++, "Stat crossover between groups can pull players into unintended roles."); - messageClient( %client, 'SetLineHud', "", %tag, %index++, "View Player and Game Stats at https://stats.playt2.com/"); - messageClient( %client, 'SetLineHud', "", %tag, %index++, ""); - - if(%isAdmin && %game $= "CTFGame") - messageClient( %client, 'SetLineHud', "", %tag, %index++, ' + Running Game Averages (Experimental)',0); - - if(%isAdmin && %game $= "CTFGame") - messageClient( %client, 'SetLineHud', "", %tag, %index++, ' + Team Ballance (Experimental)',0); - - if(%client.isSuperAdmin && $dtStats::liveStats)// for testing - messageClient( %client, 'SetLineHud', "", %tag, %index++, ' + %2 Live Stats',0,$dtStats::gtNameShort[%game]); - - messageClient( %client, 'SetLineHud', "", %tag, %index++, ' + PUGs/Tournaments/Recorded Games',0,%game,$dtStats::curMonth); - - if($dtStats::day > 1) - messageClient( %client, 'SetLineHud', "", %tag, %index++, ' + %3 Daily Leaderboards ',0,%game,$dtStats::gtNameShort[%game]); - if($dtStats::week > 1) - messageClient( %client, 'SetLineHud', "", %tag, %index++, ' + %3 Weekly Leaderboards ',0,%game,$dtStats::gtNameShort[%game]); - if($dtStats::month > 1) - messageClient( %client, 'SetLineHud', "", %tag, %index++, ' + %3 Monthly Leaderboards ',0,%game,$dtStats::gtNameShort[%game]); - if($dtStats::quarter > 1) - messageClient( %client, 'SetLineHud', "", %tag, %index++, ' + %3 Quarterly Leaderboards ',0,%game,$dtStats::gtNameShort[%game]); - if($dtStats::year > 1) - messageClient( %client, 'SetLineHud', "", %tag, %index++, ' + %3 Yearly Leaderboards ',0,%game,$dtStats::gtNameShort[%game]); - messageClient( %client, 'SetLineHud', "", %tag, %index++, ""); - if(%client.isSuperAdmin){ - %line = ' + Server Admin Panel'; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,%game,1); + case "TBX": + %opt0 = %client.GlArg3; + %opt1 = %client.GlArg4; + %opt2 = %client.GlArg5; + if(%client.tgame $= ""){ + %client.tgame = $dtStats::gtNameShort[%game]; } - - for(%v = %index; %v < 15; %v++) - messageClient( %client, 'SetLineHud', "", %tag, %index++, ""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, 'Stats Update Daily.'); - case "TB": - %inc = %client.GlArg4; - %cycle = %client.GlArg5; - messageClient( %client, 'SetScoreHudHeader', "", "Team Balance"); - messageClient( %client, 'SetScoreHudSubheader', "", ' Back - Return To Score Screen',0); - %LOArmorCount[1] = %LDArmorCount[1] = %MOArmorCount[1] = %MDArmorCount[1] = %HOArmorCount[1] = %HDArmorCount[1] = 0; - %LOArmorCount[2] = %LDArmorCount[2] = %MOArmorCount[2] = %MDArmorCount[2] = %HOArmorCount[2] = %HDArmorCount[2] = 0; - %Offensive[1] = %Offensive[2] = %Defensive[1] = %Defensive[2] = 0; - %capperCount[1] = %capperCount[2] = %baseOpCount[1] = %baseOpCount[2] = 0; - - %SLOArmorCount[1] = %SLDArmorCount[1] = %SMOArmorCount[1] = %SMDArmorCount[1] = %SHOArmorCount[1] = %SHDArmorCount[1] = 0; - %SLOArmorCount[2] = %SLDArmorCount[2] = %SMOArmorCount[2] = %SMDArmorCount[2] = %SHOArmorCount[2] = %SHDArmorCount[2] = 0; - %SOffensive[1] = %SOffensive[2] = %SDefensive[1] = %SDefensive[2] = 0; - %ScapperCount[1] = %ScapperCount[2] = %SbaseOpCount[1] = %SbaseOpCount[2] = 0; - for(%i =0; %i < ClientGroup.getCount(); %i++){ - %client = ClientGroup.getObject(%i); - %dtStats = %client.dtStats; - %team = %client.team; - - if(isObject(%dtStats)){ - %armorBD = getField(getArmorBreakDown(%game, %dtStats),4); - %offKills = getGameDataAvg(%game,%dtStats,"OffKillsTG"); - %defKills = getGameDataAvg(%game,%dtStats,"DefKillsTG"); - %kills = getGameDataAvg(%game,%dtStats,"killsTG"); - %totalDep = getGameDataAvg(%game,%dtStats,"TotalDepTG"); - %turretKills = getGameDataAvg(%game,%dtStats,"turretkillsTG"); - %flagCaps = getGameDataAvg(%game,%dtStats,"flagCapsTG"); - %flagGrabs = getGameDataAvg(%game,%dtStats,"flagGrabsTG"); - if(%armorBD $= "Light"){ - if (((%turretKills > (%kills - %defKills)) || (%totalDep > 8 && %defKills > %offKills)) && !%SbaseOpCount[%team]){ - %SbaseOp[%SbaseOpCount[%team],%team] = %client; - %SbaseOpCount[%team]++; - } - else if(%flagCaps > 0 && %flagGrabs > 0){//cappers - %Scapper[%capperCount[%team],%team] = %client; - %ScapperCount[%team]++; - } - else if( %offKills > %defKills){ // off - %SLOArmorClients[%SLOArmorCount[%team],%team] = %client; - %SLOArmorCount[%team]++; - %SOffensive[%team]++; - } - else if( %offKills <%defKills){// def - %SLDArmorClients[%SLDArmorCount[%team],%team] = %client; - %SLDArmorCount[%team]++; - %SDefensive[%team]++; - } + switch$(%opt0){ + case "AG": + $TB::statGroupCount[%client.tgame]++; + if($TB::statGroupCount[%client.tgame] > 11){//cap it no need for this many + $TB::statGroupCount[%client.tgame] = 12; } - else if(%armorBD $= "Medium"){ - if (((%turretKills > (%kills - %defKills)) || (%totalDep > 8 && %defKills > %offKills)) && !%SbaseOpCount[%team]){ - %SbaseOp[%baseOpCount[%team],%team] = %client; - %SbaseOpCount[%team]++; - } - else if(%offKills > %defKills){ // off - %SMOArmorClients[%MOArmorCount[%team],%team] = %client; - %SMOArmorCount[%team]++; - %SOffensive[%team]++; - } - else if(%offKills < %defKills){// def - %SMDArmorClients[%SMDArmorCount[%team],%team] = %client; - %SMDArmorCount[%team]++; - %SDefensive[%team]++; - } + case "RG": + $TB::statGroupCount[%client.tgame]--; + if($TB::statGroupCount[%client.tgame] < 1){ + $TB::statGroupCount[%client.tgame] = 1; } - else if(%armorBD $= "Heavy"){ - if (((%turretKills > (%kills - %defKills)) || (%totalDep > 8 && %defKills > %offKills)) && !%SbaseOpCount[%team]){ - %SbaseOp[%baseOpCount[%team],%team] = %client; - %SbaseOpCount[%team]++; - } - else if(%offKills > %defKills){ // off - %SHOArmorClients[%SHOArmorCount[%team],%team] = %client; - %SHOArmorCount[%team]++; - %SOffensive[%team]++; - } - else if(%offKills < %defKills){// def - %SHDArmorClients[%SHDArmorCount[%team],%team] = %client; - %SHDArmorCount[%team]++; - %SDefensive[%team]++; - } + case "G": + %client.tgame = %opt1; + case "Enable": + $TB::TBEnable[%client.tgame] = !$TB::TBEnable[%client.tgame]; + case "FORCE": + if(%client.isSuperAdmin){ + messageAll('MsgStats', '\c3Super Admin has forced a team rebalance. ~wfx/misc/hunters_greed.wav'); + forceTeamBal(); } + case "Log": + $TB::TBLog[%client.tgame] = !$TB::TBLog[%client.tgame]; + case "RESET": + deleteVariables("$TB::*"); + $TB::TBEnable[%client.tgame] = 0; + $TB::TBLog[%client.tgame] = 0; + $TB::statGroupCount[%client.tgame] = 1; + } + %client.GlArg3 = 0; + %client.GlArg4 = 0; + %client.GlArg5 = 0; + if($TB::statGroupCount[%client.tgame] $= ""){ + $TB::statGroupCount[%client.tgame] = 1; + } + saveTBVars(); + %line = 'Team Balancer'; + messageClient( %client, 'SetScoreHudHeader', "",%line); + %line = ' Back - Return To Score Screen [RESET ALL] [Read Me]'; + messageClient( %client, 'SetScoreHudSubheader', "",%line); + + if(%client.tgame $= "CTF"){ + %line = '[CTF] [LCTF] [Arena]'; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + } + else if(%client.tgame $= "LCTF"){ + %line = '[CTF] [LCTF] [Arena] '; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + } + else if(%client.tgame $= "Arena"){ + %line = '[CTF] [LCTF] [Arena] '; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + } + messageClient(%client, 'SetLineHud', "", %tag, %index++, ""); + if($TB::TBEnable[%client.tgame]){ + %line = 'Team Balancer [Disable]'; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + } + else{ + %line = 'Team Balancer [Enable]'; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + } + if($TB::TBLog[%client.tgame]){ + %line = 'Balancer Logging [Disable]'; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + } + else{ + %line = 'Balancer Logging [Enable]'; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + } + messageClient(%client, 'SetLineHud', "", %tag, %index++, ""); + if($TB::TBEnable[%client.tgame]){ + %line = '[Force Team Balance] - May Cause the server to hitch'; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + messageClient(%client, 'SetLineHud', "", %tag, %index++, ""); + } + %line = 'Add Groups/Roles - 12 Max <%1> '; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line, $TB::statGroupCount[%client.tgame]); + + for(%i = 0; %i < $TB::statGroupCount[%client.tgame]; %i++){ + if((%i % 4) == 0){ + %line = "Group" SPC %i SPC "\t"; + %line2 = " [Edit]\t"; } - - - if(isObject(%client.player)){ - %armor = %client.player.getArmorSize(); - if(%armor $= "Light"){ - if (((%client.turretKills > (%client.kills - %dtStats.stat["DefKills"])) || (%dtStats.stat["TotalDep"] > 8 && %dtStats.stat["DefKills"] > %dtStats.stat["OffKills"])) && !%baseOpCount[%team]){ - %baseOp[%baseOpCount[%team],%team] = %client; - %baseOpCount[%team]++; - } - else if(%client.flagCaps > 0 && %client.flagGrabs > 0){//cappers - %capper[%capperCount[%team],%team] = %client; - %capperCount[%team]++; - } - else if(%dtStats.stat["OffKills"] > %dtStats.stat["DefKills"]){ // off - %LOArmorClients[%LOArmorCount[%team],%team] = %client; - %LOArmorCount[%team]++; - %Offensive[%team]++; - } - else if(%dtStats.stat["OffKills"] < %dtStats.stat["DefKills"]){// def - %LDArmorClients[%LDArmorCount[%team],%team] = %client; - %LDArmorCount[%team]++; - %Defensive[%team]++; - } - } - else if(%armor $= "Medium"){ - if (((%client.turretKills > (%client.kills - %dtStats.stat["DefKills"])) || (%dtStats.stat["TotalDep"] > 8 && %dtStats.stat["DefKills"] > %dtStats.stat["OffKills"])) && !%baseOpCount[%team]){ - %baseOp[%baseOpCount[%team],%team] = %client; - %baseOpCount[%team]++; - } - else if(%dtStats.stat["OffKills"] > %dtStats.stat["DefKills"]){ // off - %MOArmorClients[%MOArmorCount[%team],%team] = %client; - %MOArmorCount[%team]++; - %Offensive[%team]++; - } - else if(%dtStats.stat["OffKills"] < %dtStats.stat["DefKills"]){// def - %MDArmorClients[%MDArmorCount[%team],%team] = %client; - %MDArmorCount[%team]++; - %Defensive[%team]++; - } - } - else if(%armor $= "Heavy"){ - if (((%client.turretKills > (%client.kills - %dtStats.stat["DefKills"])) || (%dtStats.stat["TotalDep"] > 8 && %dtStats.stat["DefKills"] > %dtStats.stat["OffKills"])) && !%baseOpCount[%team]){ - %baseOp[%baseOpCount[%team],%team] = %client; - %baseOpCount[%team]++; - } - else if(%dtStats.stat["OffKills"] > %dtStats.stat["DefKills"]){ // off - %HOArmorClients[%HOArmorCount[%team],%team] = %client; - %HOArmorCount[%team]++; - %Offensive[%team]++; - } - else if(%dtStats.stat["OffKills"] < %dtStats.stat["DefKills"]){// def - %HDArmorClients[%HDArmorCount[%team],%team] = %client; - %HDArmorCount[%team]++; - %Defensive[%team]++; - } - } + else if((%i % 4) == 3){ + %line = %line @ "Group" SPC %i SPC "\t"; + %line2 = %line2 @ " [Edit]\t"; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line2); + messageClient(%client, 'SetLineHud', "", %tag, %index++, ""); + } + else{ + %line = %line @ "Group" SPC %i SPC "\t"; + %line2 = %line2 @ "[Edit]\t"; } } + if((%i % 4) != 0){ + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line); + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line2); + } - %line = '%1\t%2\t%3\t%4\t%5\t%6\t%7\t%8\t%9'; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line, "Current", "Team 1", "Team 2", "Stats Calc", "Team 1", "Team 2"); + case "TBV": + %opt0 = %client.GlArg3; + %opt1 = %client.GlArg4; + %opt2 = %client.GlArg5; + if(!%client.curPage){ + %client.curPage = 1; + } + if(%client.tgame $= ""){ + %client.tgame = $dtStats::gtNameShort[%game.class]; + } + if(%client.arrowRes $= ""){ + %client.arrowRes = 1; + } + if(%client.editGrp $= ""){ + %client.editGrp = 0; + } + %perPage = 16;// num of games listed per page - %line = '%1\t%2\t%3\t%4\t%5\t%6\t%7\t%8\t%9'; - %na = 0; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Light Off", %LOArmorCount[1], %LOArmorCount[2], "|", %SLOArmorCount[1], %SLOArmorCount[2],"","",""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Medium Off", %MOArmorCount[1], %MOArmorCount[2], "|", %SMOArmorCount[1], %SMOArmorCount[2],"","",""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Heavy Off", %HOArmorCount[1], %HOArmorCount[2], "|", %SHOArmorCount[1], %SHOArmorCount[2],"","",""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Offensive", %Offensive[1], %Offensive[2], "|", %SOffensive[1], %SOffensive[2],"","",""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, ""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Light Def", %LDArmorCount[1], %LDArmorCount[2], "|", %SLDArmorCount[1], %SLDArmorCount[2],"","",""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Medium Def", %MDArmorCount[1], %MDArmorCount[2], "|", %SMDArmorCount[1], %SMDArmorCount[2],"","",""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Heavy Def", %HDArmorCount[1], %HDArmorCount[2], "|", %SHDArmorCount[1], %SHDArmorCount[2],"","",""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Defensive", %Defensive[1], %Defensive[2], "|", %SDefensive[1], %SDefensive[2],"","",""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, ""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Cappers", %capperCount[1], %capperCount[2], "|", %ScapperCount[1], %ScapperCount[2],"","",""); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"Base Op", %baseOpCount[1], %baseOpCount[2], "|", %SbaseOpCount[1], %SbaseOpCount[2],"","",""); + switch$(%opt0){ + case "X": + %client.editGrp = %opt1; + case "G": + %client.tgame = %opt1; + case "AW": + %var = $dtStats::TBG[%opt1, %client.tgame]; + %sindex = $TB::statIndex[%var, %client.tgame, %client.editGrp]; + $TB::statWeight[%sindex, %client.tgame, %client.editGrp] += %opt2; + case "RW": + %var = $dtStats::TBG[%opt1, %client.tgame]; + %sindex = $TB::statIndex[%var, %client.tgame, %client.editGrp]; + $TB::statWeight[%sindex,%client.tgame,%client.editGrp] -= %opt2; + case "AS": + %var = $dtStats::TBG[%opt1, %client.tgame]; + if($TB::statCount[%client.tgame,%client.editGrp] $= ""){ + $TB::statCount[%client.tgame, %client.editGrp] = 0; + } + + if($TB::statWeight[%var,%client.tgame, %client.editGrp] $= ""){ + %count = $TB::statCount[%client.tgame,%client.editGrp]; + $TB::statName[%count,%client.tgame,%client.editGrp] = %var; + $TB::statWeight[%count,%client.tgame,%client.editGrp] = 100; + + $TB::statIndex[%var, %client.tgame, %client.editGrp] = %count; + $TB::statCount[%client.tgame,%client.editGrp]++; + } + case "RS": + %var = $dtStats::TBG[%opt1, %client.tgame]; + %sindex = $TB::statIndex[%var, %client.tgame, %client.editGrp]; + if (%sindex !$= "") { + // Shift all elements down + for (%i = %sindex; %i < $TB::statCount[%client.tgame, %client.editGrp] - 1; %i++) { + $TB::statName[%i, %client.tgame, %client.editGrp] = $TB::statName[%i + 1, %client.tgame, %client.editGrp]; + $TB::statWeight[%i, %client.tgame, %client.editGrp] = $TB::statWeight[%i + 1, %client.tgame, %client.editGrp]; + // Update index for the moved stat + %movedVar = $TB::statName[%i, %client.tgame, %client.editGrp]; + $TB::statIndex[%movedVar, %client.tgame, %client.editGrp] = %i; + } + + // Clear last index after shifting + %last = $TB::statCount[%client.tgame, %client.editGrp] - 1; + $TB::statName[%last, %client.tgame, %client.editGrp] = ""; + $TB::statWeight[%last, %client.tgame, %client.editGrp] = ""; + + // Remove reference from index mapping + $TB::statIndex[%var, %client.tgame, %client.editGrp] = ""; + + // Decrease weight count + $TB::statCount[%client.tgame, %client.editGrp]--; + } + case "N": + %client.curPage++; + if(%client.curPage * %perPage > $dtStats::TBGC[%client.tgame]){ + %client.curPage--; + } + case "B": + %client.curPage--; + if(%client.curPage < 1){ + %client.curPage = 1; + } + case "R": + %client.curPage = 1; + case "AR": + %client.arrowRes = %opt1; + } + %client.GlArg3 = 0; + %client.GlArg4 = 0; + %client.GlArg5 = 0; + %gc = $dtStats::TBGC[%client.tgame]; + saveTBVars(); + if(%client.arrowRes == 1){ + %line = ' 0.01 0.1 1.0Stat Weights'; + } + else if(%client.arrowRes == 10){ + %line = ' 0.01 0.1 1.0Stat Weights'; + } + else if(%client.arrowRes == 100){ + %line = ' 0.01 0.1 1.0Stat Weights'; + } + messageClient( %client, 'SetScoreHudHeader', "",%line); + if(%client.curPage == 1){ + %line = ' Back - Return To Score Screen - Next Page >'; + messageClient( %client, 'SetScoreHudSubheader', "",%line); + } + else if(%client.curPage * %perPage > %gc){ + %line = ' Back - Return To Score Screen - < Back Page '; + messageClient( %client, 'SetScoreHudSubheader', "",%line); + } + else if(%client.curPage > 1){ + %line = ' Back - Return To Score Screen - < Back Page | Next Page > '; + messageClient( %client, 'SetScoreHudSubheader', "",%line); + } + %line = 'Variable NameAdd/RemoveAdjust Weight Group Crossover'; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); + + + //$dtStats::TBG[$dtStats::TBGC["ArenaGame"]++,"ArenaGame"] = "laserKillDist"; + //$dtStats::TBGC["ArenaGame"]++; + + %displayedCount = 0; // Track how many valid entries we've displayed + %startIndex = (%client.curPage - 1) * %perPage; + %indexInArray = %startIndex; + while (%displayedCount < %perPage && %indexInArray < %gc) { + %var = $dtStats::TBG[%indexInArray, %client.tgame]; + %sindex = $TB::statIndex[%var, %client.tgame, %client.editGrp]; + // Skip over "Game" category variables but continue looping + if (%sindex $= "") { + %line = ' %3ADD'; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line, "AS", %indexInArray, %var); + } + else { + %g = ""; + for(%m = 0; %m < $TB::statGroupCount[%client.tgame]; %m++){ + %si = $TB::statIndex[%var, %client.tgame, %m]; + if(%si !$= ""){ + %g = %g SPC %m; + } + } + %w = $TB::statWeight[%sindex, %client.tgame, %client.editGrp]; + %line = ' %3\tRmv\t <%4> \t%6'; + messageClient(%client, 'SetLineHud', "", %tag, %index++, %line, "RS", %indexInArray, %var, mFormatFloat(%w / 100, "%.2f"),%client.arrowRes,%g); + } + + %displayedCount++; // Increase count only for valid entries + %indexInArray++; // Always increase this to scan through full dataset + } case "SP": if(!%client.isSuperAdmin){ error(%client.nameBase SPC "failed to access server panel"); @@ -8032,11 +8870,11 @@ function statsMenu(%client,%game){ %banObj = dtBanList.getObject(%i); if(!%banObj.hide){ if(!(%banlistCount % 3)){ - %plrLine = "\t" @ %banObj.name @ ":" @ numReduce(%banObj.banLengthMin - getBanCount(%banObj.banDateTime),0); + %plrLine = "\t" @ %banObj.name @ ":" @ numReduce(%banObj.banLengthMin - getTimeDelta(%banObj.banDateTime),0); %line = "\tUnban - Perma"; } else{ - %plrLine = %plrLine @ "\t" @ %banObj.name @ ":" @ numReduce(%banObj.banLengthMin - getBanCount(%banObj.banDateTime),0); + %plrLine = %plrLine @ "\t" @ %banObj.name @ ":" @ numReduce(%banObj.banLengthMin - getTimeDelta(%banObj.banDateTime),0); %line = %line @ "\tUnban - Perma"; } %banlistCount++; @@ -8074,20 +8912,26 @@ function statsMenu(%client,%game){ compileStats(); %client.GlArg4 = 0; } - case "tmEnable": - if($dtStats::tmMode) - $dtStats::tmMode = 0; - else - $dtStats::tmMode = 1; - $dtStats::tmModeGC = 0; %client.GlArg4 = 0; - case "tmCompile": - if(!$dtStats::tmCompile){ - preLoadTurStats(0); - messageAll('MsgStats', '\c3Tournament stats build started, server preformance may degrade for a few minutes~wfx/misc/hunters_greed.wav'); + case "customAdd": + $dtServerVars::custom++; + $dtStats::curCustom = $dtServerVars::custom; + %client.GlArg4 = 0; + if(isEventPending(%client.expSch)){ + cancel(%client.expSch); } + %client.expSch = schedule(10000,0,"export", "$dtServerVars::*", "serverStats/serverVars.cs", false ); + $dtStats::reloadTotal = 1; + case "customRmv": + $dtServerVars::custom--; + $dtStats::curCustom = $dtServerVars::custom; %client.GlArg4 = 0; + if(isEventPending(%client.expSch)){ + cancel(%client.expSch); + } + %client.expSch = schedule(10000,0,"export", "$dtServerVars::*", "serverStats/serverVars.cs", false ); + $dtStats::reloadTotal = 1; case "plotEnable": %start = startPlayerPlot(%client.GlArg5*1000); if(!%start) @@ -8128,49 +8972,65 @@ function statsMenu(%client,%game){ } //------------------------------------------------------------------------------ if(%game $= "CTFGame" || %game $= "LCTFGame" || %game $= "SCtFGame"){ - if(!$Host::TournamentMode){ - if(!$dtStats::tmMode){ - %line = ' + Enable Tournament Map Stats - Auto enables with tournament mode'; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,"tmEnable"); + %tlist = 0; + if(isObject(pugList)){ + for(%i = 0; %i < pugList.getCount(); %i++){ + %gobj = pugList.getObject(%i); + %tlist += %gobj.getCount(); + } + } + if(%tlist > 0){ + if(!$Host::TournamentMode){ + if(!$dtStats::tmCompile){ + %line = ' + Compile Tournament Stats - %1 games await compiling '; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"tmCompile", %tlist); + } + else{ + %line = ' + Tournament Stats Compiling '; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"tmCompile"); + } } else{ - %line = ' + Disable Tournament Map Stats - Auto disables after 6 games'; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,"tmEnable"); + %line = ' + Disable tournament mode to compile stats'; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); } } else{ - %line = ' + Map Stats - already enabled because of tournament bode'; + %line = ' + No Tournament Map Stats To Compile'; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); + } + %glist = 0; + if(isObject(pubList)){ + for(%i = 0; %i < pubList.getCount(); %i++){ + %gobj = pubList.getObject(%i); + %glist += %gobj.getCount(); + } + } + if(%glist > 0){ + if(!$Host::TournamentMode){ + if(!$dtStats::tmCompile){ + %line = ' + Compile Map Stats - %1 games await compiling '; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line, %glist); + } + else{ + %line = ' + Stats Compiling '; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); + } + } + else{ + %line = ' + Disable tournament mode to compile stats'; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); + } + } + else{ + %line = ' + No Map Stats To Compile'; messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); } } else{ - %line = ' + Map Stats - can only be enabled in CTF or LCTF'; + %line = ' + Map stats can only be enabled in CTF - LCTF'; messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); } - if(getFieldCount($dtServerVars::pugIDS["CTFGame"]) || getFieldCount($dtServerVars::pugIDS["LCTFGame"]) || getFieldCount($dtServerVars::pugIDS["SCtFGame"]) ){ - if(!$Host::TournamentMode && !$dtStats::tmMode){ - if(!$dtStats::tmCompile){ - %line = ' + Compile Tournament Stats - %2 Games await compiling '; - %gameAmount += getFieldCount($dtServerVars::pugIDS["CTFGame"]); - %gameAmount += getFieldCount($dtServerVars::pugIDS["LCTFGame"]); - %gameAmount += getFieldCount($dtServerVars::pugIDS["SCtFGame"]); - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"tmCompile",%gameAmount); - } - else{ - %line = ' + Tournament Stats Compiling '; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,"tmCompile"); - } - } - else{ - %line = ' + No Compiling Tournament Map Stats At This Time'; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); - } - } - else{ - %line = ' + No Tournament Map Stats To Compile'; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); - } - %line = ' + Map Play Statistics'; messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,%game,1); @@ -8179,11 +9039,16 @@ function statsMenu(%client,%game){ //------------------------------------------------------------------------------ // messageClient( %client, 'SetLineHud', "", %tag, %index++, ""); - %line = ' + Server Health Info - Last Event = %1 Minutes'; %evTime = ((getSimTime() - $dtStats:lastEvent)/1000)/60; messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,%evTime); + %line = ' + Team Balancer'; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); + + %statIndex = $dtServerVars::custom > 1 ? $dtServerVars::custom : 1; + %line = ' + Custom Stat Interval - Current Index: < %4 >'; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,0,0,%statIndex); // if(!$pathMaps::running){ // %line = ' Start Player Plot + 30k + 60k + 90k + 120k'; // messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,"plotEnable"); @@ -8232,6 +9097,135 @@ function statsMenu(%client,%game){ messageClient( %client, 'SetLineHud', "", %tag, %index++, ""); + + case "CST": + %opt0 = %client.GlArg3; + %opt1 = %client.GlArg4; + %opt2 = %client.GlArg5; + + switch$(%opt0){ + case "tmc": + if(!$dtStats::tmCompile){ + buildTest(1); + messageAll('MsgStats', '\c3Tournament stats build started, server performance will degrade for a few minutes~wfx/misc/hunters_greed.wav'); + } + %client.GlArg3 = 0; + case "rmv": + %opt1.select = 0; + case "add": + %opt1.select = 1; + case "del": + if(isObject(%opt1)){ + %opt1.delete(); + pugList.schedule(1000,"save","serverStats/pugLog.cs", 0); + } + } + + messageClient( %client, 'SetScoreHudHeader', "", "Map Stats Compile"); + if($dtStatsImgBuild || $dtStats::tmCompile){ + %line = ' Back - Return To Score Screen Stats Compiling '; + messageClient( %client, 'SetScoreHudSubheader', "", %line,0); + } + else{ + if(($HostGamePlayerCount - $HostGameBotCount) < 6){ + %line = ' Back - Return To Score Screen Compile Selected Stats'; + messageClient( %client, 'SetScoreHudSubheader', "", %line,0); + } + else{ + %line = ' Back - Return To Score Screen Compile Stats Locked'; + messageClient( %client, 'SetScoreHudSubheader', "", %line,0); + } + } + + + %hasCount = 0; %line = ""; + for(%i = 0; %i < pugList.getCount(); %i++){ + %grpObj = pugList.getObject(%i); + for(%x = 0; %x < %grpObj.getCount(); %x++){ + %mid = %grpObj.getObject(%x); + if(%client.statSlot == %mid.statSlot){ + %line = %mid.mapName SPC %mid.teamOne SPC %mid.teamTwo SPC %mid.gameType SPC %mid.date; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); + if(!%mid.select){ + %line = " "; + } + else{ + %line = " "; + } + + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); + } + } + } + + //%so = new scriptObject(){ + //pugID = $dtStats::gameID; + //mapName = $MissionDisplayName; + //date = formattimestring("M-d-yy"); + //teamOne = $TeamScore[1]; + //teamTwo = $TeamScore[2]; + //gameType = %game.class; + //}; + + case "CSG": + %opt0 = %client.GlArg3; + %opt1 = %client.GlArg4; + %opt2 = %client.GlArg5; + + switch$(%opt0){ + case "gmc": + if(!$dtStats::tmCompile){ + buildTest(0); + messageAll('MsgStats', '\Map stats build started, server performance will degrade for a few minutes~wfx/misc/hunters_greed.wav'); + } + %client.GlArg3 = 0; + case "rmv": + %opt1.select = 0; + case "add": + %opt1.select = 1; + case "del": + if(isObject(%opt1)){ + %opt1.delete(); + pubList.schedule(1000,"save","serverStats/pubLog.cs", 0); + } + } + + messageClient( %client, 'SetScoreHudHeader', "", "Map Stats Compile"); + if($dtStatsImgBuild || $dtStats::tmCompile){ + %line = ' Back - Return To Score Screen Stats Compiling '; + messageClient( %client, 'SetScoreHudSubheader', "", %line,0); + } + else{ + if(($HostGamePlayerCount - $HostGameBotCount) < 6){ + %line = ' Back - Return To Score Screen Compile Selected Stats'; + messageClient( %client, 'SetScoreHudSubheader', "", %line,0); + } + else{ + %line = ' Back - Return To Score Screen Compile Stats Locked'; + messageClient( %client, 'SetScoreHudSubheader', "", %line,0); + } + } + + + %hasCount = 0; %line = ""; + for(%i = 0; %i < pubList.getCount(); %i++){ + %grpObj = pubList.getObject(%i); + for(%x = 0; %x < %grpObj.getCount(); %x++){ + %mid = %grpObj.getObject(%x); + if(%client.statSlot == %mid.statSlot){ + %line = %mid.mapName SPC %mid.teamOne SPC %mid.teamTwo SPC %mid.gameType SPC %mid.date; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); + if(!%mid.select){ + %line = " "; + } + else{ + %line = " "; + } + + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line); + } + } + } case "MAP": %opt0 = %client.GlArg3; %opt1 = %client.GlArg4; @@ -8995,6 +9989,9 @@ function statsMenu(%client,%game){ case "SV"://Server %vLPage = %client.GlArg4; %field5 = strreplace(%client.GlArg5,"-","\t"); + if(%client.lgame !$= getField(%field5,0)){ + %new = 1; + } %client.lgame = %switch = getField(%field5,0); %client.cat = %cat = getField(%field5,1); if(%vLPage == -1) @@ -9004,7 +10001,7 @@ function statsMenu(%client,%game){ %perPage = 14;// num of games listed per page if(%cat $= "R"){ - getMapID($CurrentMission,%game,0,1); + getMapID($CurrentMission,%game,1); for(%i = 1; %i <= $mapID::countGame[%client.lgame]; %i++){ %map = $mapID::IDNameGame[%i,%client.lgame]; $dtServer::playCount[%map,%client.lgame] = 0; @@ -9034,7 +10031,7 @@ function statsMenu(%client,%game){ %client.cat = %cat = 1; } else if(%cat !$= "C"){ - if($dtStats::sortCat != %cat){ + if($dtStats::sortCat != %cat || %new){ for(%i = 1; %i <= $mapID::countGame[%client.lgame]; %i++){ %maxCount = %i; switch$(%cat){ @@ -9196,7 +10193,6 @@ function statsMenu(%client,%game){ $dtStats::sortCat = 1; } } - error($dtStats::sortCat); } %client.GlArg5 = %client.lgame @ "-C"; } @@ -9488,8 +10484,8 @@ function statsMenu(%client,%game){ %mon = $lData::mon[%lType, %client.lgame, %page]; if(%build $= "Build" && !$dtStatsImgBuild){ - genBigStats(%client.lgame, getField(%mon,0),getField(%mon,1)); - messageAll('MsgStats', '\c3Stats build started, server preformance may degrade for a few minutes~wfx/misc/hunters_greed.wav'); + genBigStats(%client.lgame, %lType, getField(%mon,0),getField(%mon,1)); + messageAll('MsgStats', '\c3Stats image build started, server performance may degrade for a few minutes~wfx/misc/hunters_greed.wav'); $dtStatsImgBuild = 1; } } @@ -9506,25 +10502,34 @@ function statsMenu(%client,%game){ switch$(%lType){ case "day": %lTypeName = "Daily"; + %lTypeNameShort = "Day"; messageClient( %client, 'SetScoreHudHeader', "", '%1 Leaderboards For %2',%lTypeName,"Day:" @ %mon); case "week": %lTypeName = "Weekly"; + %lTypeNameShort = "Week"; messageClient( %client, 'SetScoreHudHeader', "", '%1 Leaderboards For %2',%lTypeName,"Week:" @ %mon); case "month": %lTypeName = "Monthly"; + %lTypeNameShort = "Month"; messageClient( %client, 'SetScoreHudHeader', "", '%1 Leaderboards For %2',%lTypeName,monthString(%mon)); case "quarter": %lTypeName = "Quarterly"; + %lTypeNameShort = "Quarter"; messageClient( %client, 'SetScoreHudHeader', "", '%1 Leaderboards For %2',%lTypeName,"Q:" @ %mon); case "year": %lTypeName = "Yearly"; + %lTypeNameShort = "Year"; messageClient( %client, 'SetScoreHudHeader', "", '%1 Leaderboards For %2',%lTypeName,%year); + case "custom": + %lTypeName = "Custom"; + %lTypeNameShort = "Custom"; + messageClient( %client, 'SetScoreHudHeader', "", '%1 Leaderboards For %2',%lTypeName,%mon); } if(%client.isSuperAdmin){ - if($dtStatsImgBuild) - messageClient( %client, 'SetScoreHudSubheader', "", ' Return To Score Screen \t Generate Img For %4 \t Server Admin Panel ',0,%client.lgame,1,monthString(%mon),%page); + if($dtStatsImgBuild || $dtStats::tmCompile) + messageClient( %client, 'SetScoreHudSubheader', "", ' Return To Score Screen \t Generate Img For %4 \t Server Admin Panel ',0,%client.lgame,1,%lType $= "month" ? monthString(%mon) : ("custom" SPC %mon),%page,%lType); else - messageClient( %client, 'SetScoreHudSubheader', "", ' Return To Score Screen \t Generate Img For %4 \t Server Admin Panel ',0,%client.lgame,1,monthString(%mon),%page); + messageClient( %client, 'SetScoreHudSubheader', "", ' Return To Score Screen \t Generate Img For %4 \t Server Admin Panel ',0,%client.lgame,1,%lType $= "month" ? monthString(%mon) : ("custom" SPC %mon) , %page, %lType); } else messageClient( %client, 'SetScoreHudSubheader', "", ' Return To Score Screen',0,%game,1); @@ -9568,24 +10573,35 @@ function statsMenu(%client,%game){ } if($lData::monCount[%client.lgame,%lType] > 1){ + error(%lTypeNameShort); + %vw = (%lType $= "custom") ? "month" : "custom"; + %vn = (%lType $= "custom") ? "Monthly" : "Custom"; if(%page == 1){ - %line = 'Previous Month'; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,%lType,%page+1,%client.lgame); + %line = ' [View %6 Stats] Previous %5'; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,%lType,%page+1,%client.lgame,%lTypeNameShort,%vn); } else if(%page >= $lData::monCount[%client.lgame,%lType]){ - %line = 'Next Month'; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,%lType,%page-1,%client.lgame); + %line = ' [View %6 Stats] Next %5'; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,%lType,%page-1,%client.lgame,%lTypeNameShort,%vn); } else{ - %line = 'Previous Month | Next Month'; - messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,%lType,%page-1,%page+1,%client.lgame); + %line = ' [View %6 Stats] Previous %6 | Next %6'; + messageClient( %client, 'SetLineHud', "", %tag, %index++, %line,0,%lType,%page-1,%page+1,%client.lgame,%lTypeNameShort,%vn); + } + } + else{ + if(%lType !$= "custom"){ + messageClient( %client, 'SetLineHud', "", %tag, %index++, "" @ " [View Custom Stats]"); + } + else{ + messageClient( %client, 'SetLineHud', "", %tag, %index++, "" @ " [View Monthly Stats]"); } } } else{//no data for selected game type if(%client.isSuperAdmin){ - if($dtStatsImgBuild) + if($dtStatsImgBuild || $dtStats::tmCompile) messageClient( %client, 'SetScoreHudSubheader', "", ' Return To Score Screen \t Generate Img For %4 \t Server Admin Panel ',0,%client.lgame,1,monthString(%mon),%page); else messageClient( %client, 'SetScoreHudSubheader', "", ' Return To Score Screen \t Generate Img For %4 \t Server Admin Panel ',0,%client.lgame,1,monthString(%mon),%page); @@ -9606,6 +10622,12 @@ function statsMenu(%client,%game){ messageClient( %client, 'SetLineHud', "", %tag, %index++, 'View other gametypes'); messageClient( %client, 'SetLineHud', "", %tag, %index++, "" @ %line); } + if(%lType !$= "custom"){ + messageClient( %client, 'SetLineHud', "", %tag, %index++, "" @ " [View Custom Stats]"); + } + else{ + messageClient( %client, 'SetLineHud', "", %tag, %index++, "" @ " [View Monthly Stats]"); + } } case "GLBOARDS": %lType = %client.curLType; @@ -11190,7 +12212,7 @@ function statsMenu(%client,%game){ // LeaderBoards //////////////////////////////////////////////////////////////////////////////// -function getTimeDelta(%d, %year){ +function getTimeDayDelta(%d, %year){ %dif = $dtStats::curYear - %year; %days += 365 * (%dif-1); %days += 366 - %d; @@ -11198,6 +12220,17 @@ function getTimeDelta(%d, %year){ return %days; } +function autoCompileStats(){ + if(!$Host::TournamentMode){ + if(!$dtStats::building){ + lStatsCycle(1, 1); + } + else{ + error("Stats Already Compiling"); + } + } +} + function compileStats(){ if(!$dtStats::building){ lStatsCycle(1, 1); @@ -11208,8 +12241,8 @@ function compileStats(){ } function lStatsCycle(%build,%runReset){ // starts and manages the build/sort cycle - if($dtStats::debugEchos){error("lStatsCycle" SPC $dtStats::build["day"] SPC $dtStats::week && !$dtStats::build["week"] SPC - $dtStats::build["month"] SPC $dtStats::build["quarter"] SPC $dtStats::build["year"] SPC $dtStats::lCount);} + if($dtStats::debugEchos){error("lStatsCycle" SPC $dtStats::build["day"] SPC $dtStats::build["week"] SPC + $dtStats::build["month"] SPC $dtStats::build["quarter"] SPC $dtStats::build["year"] SPC $dtStats::build["custom"] SPC $dtStats::lCount);} if(%runReset){ if(!$dtStats::statsSave){ $dtStats::statReset = 1; @@ -11217,7 +12250,7 @@ function lStatsCycle(%build,%runReset){ // starts and manages the build/sort cyc $dtStats::hostTimeLimit = $Host::TimeLimit; if(isGameRun()){//if for some reason the game is running extend the time limit untill done Game.voteChangeTimeLimit(1,$Host::TimeLimit+120); - messageAll('MsgStats', '\c3Stats build started, adjusting time limit temporarily'); + messageAll('MsgStats', '\c3Stats build started, adjusting time limit temporarily~wfx/misc/hunters_horde.wav'); $dtStats::timeChange =1; } } @@ -11233,6 +12266,7 @@ function lStatsCycle(%build,%runReset){ // starts and manages the build/sort cyc $dtStats::build["month"] = 0; $dtStats::build["quarter"] = 0; $dtStats::build["year"] = 0; + $dtStats::build["custom"] = 0; $dtStats::lCount = 0; $dtStats::building = 1; if(!$dtStats::timeChange){ @@ -11289,6 +12323,14 @@ function lStatsCycle(%build,%runReset){ // starts and manages the build/sort cyc } preLoadStats(%game,"year"); } + else if($dtStats::custom > 0 && !$dtStats::build["custom"]){ + %game = $dtStats::gameType[$dtStats::lCount]; + if($dtStats::lCount++ >= $dtStats::gameTypeCount){ + $dtStats::build["custom"] = 1; // mark as done + $dtStats::lCount = 0; // reset + } + preLoadStats(%game,"custom"); + } else{ if($dtStats::debugEchos){error("leaderBoards finished building");} schedule(5000,0,"loadLeaderboards",1);// reset and reload leaderboards @@ -11299,7 +12341,6 @@ function lStatsCycle(%build,%runReset){ // starts and manages the build/sort cyc messageAll( 'MsgStats', '\c3Stats build complete, reverting time back to normal'); $dtStats::timeChange = 0; } - preLoadTurStats(0); } } // only load one gameType/leaderboard at at time to reduce memory allocation @@ -11323,7 +12364,8 @@ function markNewDay(){// updates are dates when the server is ready to cycle ove $dtStats::curMonth = getMonthNum(); $dtStats::curQuarter = getQuarterNum(); $dtStats::curYear = getYear(); - if($dtStats::debugEchos){error("MarkNewDay =" SPC $dtStats::curDay SPC $dtStats::curWeek SPC $dtStats::curMonth SPC $dtStats::curQuarter SPC $dtStats::curYear);} + $dtStats::curCustom = $dtServerVars::custom > 1 ? $dtServerVars::custom : 1; + if($dtStats::debugEchos){error("MarkNewDay =" SPC $dtStats::curDay SPC $dtStats::curWeek SPC $dtStats::curMonth SPC $dtStats::curQuarter SPC $dtStats::curYear SPC $dtStats::curCustom);} } // var old new old new old new old new old new // var day day week week month month quarter quarter year year @@ -11336,6 +12378,7 @@ function loadStatsData(%filepath,%game,%lType,%fileNum,%total){ case "month": %mon = $dtStats::curMonth; %fieldOld = 5; %fieldNew = 6; case "quarter":%mon = $dtStats::curQuarter; %fieldOld = 7; %fieldNew = 8; case "year": %mon = $dtStats::curYear; %fieldOld = 9; %fieldNew = 10; + case "custom": %mon = $dtStats::curCustom; %fieldOld = 11; %fieldNew = 12; default: %mon = getMonthNum(); %fieldOld = 5; %fieldNew = 6; } %file = new FileObject(); @@ -11391,6 +12434,7 @@ function sortLStats(%c,%game,%lType){ case "month": %mon = $dtStats::curMonth; case "quarter":%mon = $dtStats::curQuarter; case "year": %mon = $dtStats::curYear; + case "custom": %mon = $dtStats::curCustom; default: error("ltype is not set"); return; } //%fc = getFileCount("serverStats/LData/-CTFGame*.cs"); @@ -11499,7 +12543,7 @@ function loadLeaderboards(%reset){ // loads up leaderboards markNewDay();//called when server starts and when build completes dtCleanUp(0); if(!isEventPending($dtStats::buildEvent)) - $dtStats::buildEvent = schedule(getTimeDif($dtStats::buildSetTime),0,"compileStats"); + $dtStats::buildEvent = schedule(getTimeDif($dtStats::buildSetTime),0,"autoCompileStats"); $dtStats::building = 0; if(isFile("serverStats/saveVars.cs")) exec("serverStats/saveVars.cs"); @@ -11754,6 +12798,8 @@ function isFileExpired(%lType,%d,%year){ if(%mon <= $dtStats::year){ return 0; } + case "custom": + return 0; } return 1; } @@ -11835,6 +12881,31 @@ function clearStatFile(%file,%filepath,%i,%count, %stats,%type){ %file.close(); } } + +function buildTest(%mode){ + if(!$dtStats::tmCompile){ + %list = !%mode ? pubList : pugList; + for(%i = 0; %i < %list.getCount(); %i++){ + %gameType = %list.getObject(%i); + $dtStats::pugCount[%gameType.game] = 0; + for(%x = 0; %x < %gameType.getCount(); %x++){ + %game = %gameType.getObject(%x); + if(%game.select){ + %count = $dtStats::pugCount[%gameType.game]; + $dtStats::pugIDS[%gameType.game,%count] = %game.pugID; + $dtStats::pugMap[%gameType.game,%count] = %game.mapName; + $dtStats::pugDate[%gameType.game,%count] = %game.date; + $dtStats::pugFS[%gameType.game,%count] = %game.teamOne SPC %game.teamTwo; + $dtStats::pugCount[%gameType.game]++; + error( $dtStats::pugCount[%gameType.game]); + } + } + } + $dtStats::path = (!%mode) ? "stats" : "statsTM"; + preLoadTurStats(0); + } +} + function preLoadTurStats(%gameIndex){ //queue up files for processing if(!%gameIndex){ $dtGameIndex = 0; @@ -11842,9 +12913,9 @@ function preLoadTurStats(%gameIndex){ //queue up files for processing } if(%gameIndex < $dtStats::gameTypeCount){ %game = $dtStats::gameType[$dtGameIndex]; - if($dtStats::debugEchos){error("preLoadTurStats queuing up files for" SPC %game SPC getFieldCount($dtServerVars::pugIDS[%game]));} - if(getFieldCount($dtServerVars::pugIDS[%game]) > 0){ - %folderPath = "serverStats/stats/" @ %game @ "/*g.cs"; + if($dtStats::debugEchos){error("preLoadTurStats queuing up files for" SPC %game SPC $dtStats::pugCount[%game]);} + if($dtStats::pugCount[%game] > 0){ + %folderPath = "serverStats/" @ $dtStats::path @ "/" @ %game @ "/*g.cs"; %total = getFileCount(%folderPath); if(!%total){ return; @@ -11861,9 +12932,8 @@ function preLoadTurStats(%gameIndex){ //queue up files for processing } } else{ - $dtStats::tmCompile = 0; dtSaveServerVars(); - compileGameImage(0); + compileGameImage(-1); } } @@ -11895,10 +12965,10 @@ function loadTurStatsData(%file,%game,%fileNum,%total){ //%dtTeamGame = strreplace(%fObj.readline(),"%t","\t");//18 %found = 0; - for(%x = 0; %x < getFieldCount($dtServerVars::pugIDS[%game]); %x++){ + for(%x = 0; %x < $dtStats::pugCount[%game]; %x++){ for(%i = 0; %i < getFieldCount(%gameIDLine); %i++){ %gid = getField(%gameIDLine,%i); - if(%gid $= getField($dtServerVars::pugIDS[%game],%x)){ + if(%gid $= $dtStats::pugIDS[%game,%x]){ %gameList[%x] = %i; %found = 1; break; @@ -11920,7 +12990,7 @@ function loadTurStatsData(%file,%game,%fileNum,%total){ %var = getField(%line,0); %cat = $statsVars::varType[%var,%game]; %gListCount = 0; - for(%x = 0; %x < getFieldCount($dtServerVars::pugIDS[%game]); %x++){ + for(%x = 0; %x < $dtStats::pugCount[%game]; %x++){ %gameIndex = %gameList[%x]; if(%gameIndex != -1){ %gListCount++; @@ -11966,8 +13036,8 @@ function sortTurStats(%c, %gameIndex, %game){ if(!isObject(LFData)){ new FileObject(LFData); RootGroup.add(LFData); - LFData.openForWrite("serverStats/pugData/" @ cleanMapName(getField($dtServerVars::pugMap[%game],%gameIndex)) @ "-" @ %game @ "-" @ getField($dtServerVars::pugIDS[%game],%gameIndex) @ "-G.cs"); - LFData.writeLine(getField($dtServerVars::pugMap[%game],%gameIndex) @ "%t" @ %game @ "%t" @ getField($dtServerVars::pugIDS[%game],%gameIndex) @ "%t" @ getField($dtServerVars::pugDate[%game],%gameIndex) @ "%t" @ getField($dtServerVars::pugFS[%game],%gameIndex)); + LFData.openForWrite("serverStats/gmData/" @ cleanMapName($dtStats::pugMap[%game, %gameIndex]) @ "-" @ %game @ "-" @ $dtStats::pugIDS[%game, %gameIndex] @ "-G.cs"); + LFData.writeLine($dtStats::pugMap[%game,%gameIndex] @ "%t" @ %game @ "%t" @ $dtStats::pugIDS[%game,%gameIndex] @ "%t" @ $dtStats::pugDate[%game, %gameIndex] @ "%t" @ $dtStats::pugFS[%game,%gameIndex]); // build out header %var = "scoreTG"; @@ -12003,7 +13073,7 @@ function sortTurStats(%c, %gameIndex, %game){ %sObj = serverStats.getObject(%i); %team = getField(%sObj.LStats["dtTeamGame"], %gameIndex); if(%team == 1){ - %teamOneNameLine[0] = %teamOneNameLine[0] TAB %sObj.name; + %teamOneNameLine[0] = %teamOneNameLine[0] TAB %sObj.name; %teamOneDataLine[1] = %teamOneDataLine[1] TAB getField(%sObj.LStats[%var], %gameIndex); %teamOneDataLine[2] = %teamOneDataLine[2] TAB getField(%sObj.LStats["offenseScoreTG"], %gameIndex); %teamOneDataLine[3] = %teamOneDataLine[3] TAB getField(%sObj.LStats["defenseScoreTG"], %gameIndex); @@ -12011,7 +13081,7 @@ function sortTurStats(%c, %gameIndex, %game){ %teamOneDataLine[5] = %teamOneDataLine[5] TAB getField(%sObj.LStats["flagCapsTG"], %gameIndex); } else if(%team == 2){ - %teamTwoNameLine[0] = %teamTwoNameLine[0] TAB %sObj.name; + %teamTwoNameLine[0] = %teamTwoNameLine[0] TAB %sObj.name; %teamTwoDataLine[1] = %teamTwoDataLine[1] TAB getField(%sObj.LStats[%var], %gameIndex); %teamTwoDataLine[2] = %teamTwoDataLine[2] TAB getField(%sObj.LStats["offenseScoreTG"], %gameIndex); %teamTwoDataLine[3] = %teamTwoDataLine[3] TAB getField(%sObj.LStats["defenseScoreTG"], %gameIndex); @@ -12125,7 +13195,7 @@ function sortTurStats(%c, %gameIndex, %game){ } if(%c++ < $statsVars::count[%game]) schedule($dtStats::sortSpeed,0,"sortTurStats",%c,%gameIndex,%game); - else if(%gameIndex++ < getFieldCount($dtServerVars::pugIDS[%game])){ + else if(%gameIndex++ < $dtStats::pugCount[%game]){ LFData.close(); LFData.delete(); schedule($dtStats::sortSpeed,0,"sortTurStats",0,%gameIndex,%game); @@ -12142,11 +13212,13 @@ function sortTurStatsT(%c, %game){ if(!isObject(LFData)){ new FileObject(LFData); RootGroup.add(LFData); - LFData.openForWrite("serverStats/pugData/" @ "-" @ %game @ "-" @ formattimestring("dd-mm-yy") @"-T.cs"); - LFData.writeLine(strreplace($dtServerVars::pugIDS[%game],"\t","%t")); - LFData.writeLine(strreplace($dtServerVars::pugMap[%game],"\t","%t")); - LFData.writeLine(strreplace($dtServerVars::pugDate[%game],"\t","%t")); - LFData.writeLine(strreplace($dtServerVars::pugFS[%game],"\t","%t")); + %file = "serverStats/gmData/" @ "-" @ %game @ "-" @ dtMarkDate() @"-T.cs"; + $dtStats::totalPath = %file; + LFData.openForWrite(%file); + //LFData.writeLine(strreplace($dtStats::pugIDS[%game],"\t","%t")); + //LFData.writeLine(strreplace($dtStats::pugMap[%game],"\t","%t")); + //LFData.writeLine(strreplace($dtStats::pugDate[%game],"\t","%t")); + //LFData.writeLine(strreplace($dtStats::pugFS[%game],"\t","%t")); } %var = $statsVars::varNameType[%c,%game]; @@ -12159,8 +13231,8 @@ function sortTurStatsT(%c, %game){ // If the current element is less than the next element, bring the next element to the front %aObj = serverStats.getObject(%j); %bObj = serverStats.getObject(%j + 1); - %A = getField(%aObj.LStats[%var],%gameIndex); - %B = getField(%bObj.LStats[%var],%gameIndex); + %A = %aObj.LStatsT[%var]; + %B = %bObj.LStatsT[%var]; if (%A > %B) { serverStats.bringToFront(%bObj); } @@ -12168,14 +13240,15 @@ function sortTurStatsT(%c, %game){ } } else{ + %len = serverStats.getCount(); for (%i = 0; %i < %len - 1; %i++) { for (%j = 0; %j < %len - %i - 1; %j++) { // If the current element is less than the next element, bring the next element to the front %aObj = serverStats.getObject(%j); %bObj = serverStats.getObject(%j + 1); - %A = getField(%aObj.LStats[%var],%gameIndex); - %B = getField(%bObj.LStats[%var],%gameIndex); + %A = %aObj.LStatsT[%var]; + %B = %bObj.LStatsT[%var]; if (%A < %B) { serverStats.bringToFront(%bObj); } @@ -12183,8 +13256,8 @@ function sortTurStatsT(%c, %game){ } } - %teamAllNameLine = 0 TAB "name" TAB %var; - %teamAllDataLine = 0 TAB "data" TAB %var; + %teamAllNameLine = "name" TAB %var; + %teamAllDataLine = "data" TAB %var; %write = 0; for (%i = 0; %i < %len; %i++) { @@ -12199,6 +13272,8 @@ function sortTurStatsT(%c, %game){ if(%write){ LFData.writeLine(strreplace(%teamAllNameLine,"\t","%t")); LFData.writeLine(strreplace(%teamAllDataLine,"\t","%t")); + $gData::data[%var,%game] = getFields(%teamAllDataLine, 2, getFieldCount(%teamAllDataLine)-1); + $gData::name[%var,%game] = getFields(%teamAllNameLine, 2, getFieldCount(%teamAllNameLine)-1); } } if(%c++ < $statsVars::count[%game]) @@ -12210,16 +13285,13 @@ function sortTurStatsT(%c, %game){ preLoadTurStats($dtGameIndex++); } } - - - //////////////////////////////////////////////////////////////////////////////// //Server Stats //////////////////////////////////////////////////////////////////////////////// $dtStats::prefTestTime = 512;// the lower the better tracking $dtStats::prefTestIdleTime = 60*1000;// if no one is playing just run slow -$dtStats::prefTolerance = 128;//this number is to account for base line preformance and differences between engine simTime and realtime +$dtStats::prefTolerance = 128;//this number is to account for base line performance and differences between engine simTime and realtime $dtStats::prefLog = 0; // enable logging of server hangs $dtStats::eventLockout = 15*1000;//every 10 sec $dtStats::tsLimit = 0.22; //note this value is heavly effected by packet rate so if you change this be sure to test low and high client rates @@ -12314,7 +13386,6 @@ function dtPingStats(){ %cl.dtStats.stat["idleTime"] += ($dtStats::prefTestTime/1000)/60; if(!%cl.isAIControlled()){ %ping = %cl.getPing(); - %cl.lastPing = %ping; %cl.pingTotal += %ping; %cl.pingCount++; %cl.dtStats.stat["pingAvg"] = %cl.pingTotal / %cl.pingCount; @@ -12501,6 +13572,12 @@ function dtSaveServerVars(){ schedule(1000 * %i++,0,"export", "$dtServer::team*", "serverStats/teamWL.cs", false ); schedule(1000 * %i++,0,"export", "$mapID::*", "serverStats/mapIDList.cs", false ); schedule(1000 * %i++,0,"export", "$dtServer::event*", "serverStats/eventLog.cs", false ); + if(isObject(pugList)){ + pugList.schedule(1000 * %i++,"save","serverStats/pugLog.cs", 0); + } + if(isObject(pubList)){ + pubList.schedule(1000 * %i++,"save","serverStats/pubLog.cs", 0); + } if($dtStats::ctfTimes) schedule(1000 * %i++,0,"export", "$dtServer::capTimes*", "serverStats/capTimes.cs", false ); } @@ -12528,6 +13605,7 @@ function dtLoadServerVars(){// keep function at the bottom $dtServerVars::crashLog[$dtServerVars::crashLogCount++] = %date @ "-" @ %upTime @ "-" @ %mis @ "-" @ $dtServerVars::lastGameType @ "-" @ $dtServerVars::lastPlayerCount; schedule(30000,0,"dtEventLog","Server Crash" SPC %date SPC "Pl Count =" SPC $dtServerVars::lastPlayerCount SPC "Map =" SPC %mis, 0); } + schedule(30001,0,"dtEventLog","Last Server Uptime =" SPC %date SPC "Up Time =" SPC %upTime SPC %mis, 0); } if($dtServerVars::upTimeCount >= 30) $dtServerVars::upTimeCount = 0; @@ -12562,7 +13640,12 @@ function dtLoadServerVars(){// keep function at the bottom exec("serverStats/capTimes.cs"); if(isFile("serverStats/mapPlayRot.cs")) exec("serverStats/mapPlayRot.cs"); - + if(isFile("serverStats/pugLog.cs")) + exec("serverStats/pugLog.cs"); + if(isFile("serverStats/pubLog.cs")) + exec("serverStats/pubLog.cs"); + if(isFile("serverStats/tbVars.cs")) + exec("serverStats/tbVars.cs"); $dtServer::eventLogCount = 0; if(isFile("serverStats/eventLog.cs")) exec("serverStats/eventLog.cs"); @@ -12748,7 +13831,7 @@ function loadDTBanlist(){ RootGroup.add(dtBanList); for (%i = 0; %i < dtBanList.getCount(); %i++){//keeps less junk in the ban file %obj = dtBanList.getObject(%i); - %delta = getBanCount(%obj.banDateTime); + %delta = getTimeDelta(%obj.banDateTime); if (%delta > %obj.banLengthMin){ unbanUserObj(%obj); %i = 0;// reset @@ -12898,8 +13981,10 @@ package dtBanSys{ //Reapply the gag function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch ){ + if (banList_checkClient(%client, getField(%client.t2csri_authInfo, 3))){ + return 0; + } parent::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch ); - %client.isGagged = ($chatGagged[getClientCleanIP(%client)] || $chatGagged[%client.guid]); //restore status } @@ -12908,7 +13993,8 @@ package dtBanSys{ %time = (%time $= "") ? 100000 : %time; %name = getClientBanName(%guid, %ipAddress); %bareIP = getCleanIP(%ipAddress); - if(!isObject($dtBanTemp::GUID[%guid]) && !isObject($dtBanTemp::GUID[%bareIP])){ + //error("GUID" SPC %guid SPC "IP" SPC %bareIP); + if(!isObject($dtBanTemp::GUID[%guid]) && !isObject($dtBanTemp::IP[%bareIP])){ if(!isObject(dtBanList)){ new simGroup(dtBanList); RootGroup.add(dtBanList); @@ -12918,64 +14004,20 @@ package dtBanSys{ name = %name; guid = %guid; ip = %bareip; - banDateTime = dtMarkDate(); + banDateTime = dtMarkDate(); banLengthMin = %time; }; dtBanList.add(%banObj); - if(!%bareIP) + if(%bareIP !$= "0") $dtBanTemp::IP[%bareIP] = %banObj; if(%guid){ $dtBanTemp::GUID[%guid] = %banObj; rmvWhiteListGuid(%guid); } } - if(isObject($dtBanTemp::GUID[%guid]) && !isObject($dtBanTemp::GUID[%bareIP])){ - %obj = $dtBanTemp::GUID[%guid]; - %obj.ip = %bareIP; - } - else if(isObject($dtBanTemp::GUID[%bareIP]) && !isObject($dtBanTemp::GUID[%guid])){ - %obj = $dtBanTemp::GUID[%bareIP]; - %obj.guid = %guid; - } - saveBanList(); } - function banList_checkIP(%client){ - %ip = getClientCleanIP(%client); - %obj = $dtBanTemp::IP[%ip]; - if(isObject(%obj) && %obj.banDateTime > 0){ - %delta = getBanCount(%obj.banDateTime); - if (%delta < %obj.banLengthMin){ - pushFailJoin(%obj.name, %obj.gui, 0, "Kick/Ban" SPC %obj.banDateTime - %delta SPC "Minutes Left", 1); - return 1; - } - else{ - unbanUserObj(%obj); - } - } - return 0; - } - - // from tribes next did not want to override this but need to pass %client id into ban check to avoid wierd issues - function serverCmdt2csri_challengeResponse(%client, %serverChallenge){ - if (%client.doneAuthenticating) - return; - - if (%client.t2csri_serverChallenge $= %serverChallenge){ - // check to see if the client is GUID banned, now that we verified their certificate - if (banList_checkClientGUID(%client, getField(%client.t2csri_authInfo, 3))){ - return; - } - - // client checks out... continue loading sequence - %client.onConnect(%client.tname, %client.trgen, %client.tskin, %client.tvoic, %client.tvopi); - } - else{ - %client.setDisconnectReason("Invalid server challenge. Check your account key for corruption."); - %client.delete(); - } - } }; function dtIsAdmin(%client,%guid){ @@ -12999,12 +14041,14 @@ function dtIsAdmin(%client,%guid){ return false; } - - -function banList_checkClientGUID(%client, %guid){// only one we care about in whitelist mode - %obj = $dtBanTemp::GUID[%guid]; +function banList_checkClient(%client, %guid){// only one we care about in whitelist mode + //error("banlist check" SPC "client" SPC %client SPC "Guid" SPC %guid); + %objA = $dtBanTemp::GUID[%guid]; + %ip = getClientCleanIP(%client); + %objB = $dtBanTemp::IP[%ip]; + %obj = (isObject(%objA) == 1) ? %objA : %objB; if (isObject(%obj) && %obj.banDateTime > 0){ - %delta = getBanCount(%obj.banDateTime); + %delta = getTimeDelta(%obj.banDateTime); if (%delta < %obj.banLengthMin){ pushFailJoin(%obj.name, %guid, 0, "Kick/Ban" SPC %obj.banLengthMin - %delta SPC "Minutes Left",1); @@ -13016,30 +14060,31 @@ function banList_checkClientGUID(%client, %guid){// only one we care about in wh unbanUserObj(%obj); } } + if(isObject(%objA)){ + %realName = getField(%client.t2csri_authInfo, 0 ); + if(%realName !$= "") + %name = trim(%realName); + else + %name = trim(stripChars( detag( getTaggedString( %fc.name ) ), "\cp\co\c6\c7\c8\c9\c0" )); - %realName = getField(%client.t2csri_authInfo, 0 ); - if(%realName !$= "") - %name = trim(%realName); - else - %name = trim(stripChars( detag( getTaggedString( %fc.name ) ), "\cp\co\c6\c7\c8\c9\c0" )); + %safe = ( dtIsAdmin(%client,%guid) || isObject($dtWhtList::WhiteList[%guid])); + if(!%safe){ + pushFailJoin(%name, %guid, 0, "Not Whitelisted", 0); + if($dtServerVars::WhiteListMode){ + %client.setDisconnectReason("Server is locked, please message admin or wait for approval"); + %client.delete(); + return 1; + } + } - %safe = ( dtIsAdmin(%client,%guid) || isObject($dtWhtList::WhiteList[%guid])); - if(!%safe){ - pushFailJoin(%name, %guid, 0, "Not Whitelisted", 0); - if($dtServerVars::WhiteListMode){ - %client.setDisconnectReason("Server is locked, please message admin or wait for approval"); + // this is here in case of banned ip is a whitelisted account + if($dtServerVars::IPBanListMode && $dtIPList[%ip] && !isObject($dtWhtList::WhiteList[%guid])){ + pushFailJoin(%name, %client.guid, %ip, "IP Ban List", 2); + %client.setDisconnectReason("You are not allowed to play on this server."); %client.delete(); return 1; } } - - %ip = getClientCleanIP(%client);// this is here in case of banned ip is a whitelisted account - if($dtServerVars::IPBanListMode && $dtIPList[%ip] && !isObject($dtWhtList::WhiteList[%guid])){ - pushFailJoin(%name, %client.guid, %ip, "IP Ban List", 2); - %client.setDisconnectReason("You are not allowed to play on this server."); - %client.delete(); - return 1; - } return 0; } @@ -13174,7 +14219,7 @@ function getCleanIP(%ip){ // variable access bug workaround return 0; } -function getBanCount(%dateTime){ +function getTimeDelta(%dateTime){ //banDateTime = "05\t01\t2024\t13\t00"; %d = getWord(%dateTime,0); %m = getWord(%dateTime,1); %y = getWord(%dateTime,2); %h = getWord(%dateTime,3); %n = getWord(%dateTime,4); @@ -13236,6 +14281,7 @@ function saveBanList(){ function banSaveExport(%file){ %fobj = new fileObject(); + RootGroup.add(%fobj); %fobj.openForWrite(%file); %fobj.writeLine("new SimGroup(dtBanList) {"); for(%i = 0; %i < dtBanList.getCount(); %i++){ @@ -13312,8 +14358,9 @@ if (!isActivePackage(dtBanSys)){ if(!isFile("scripts/autoexec/dtBanSystem.cs")){ activatePackage(dtBanSys); } - else + else{ error("Error old ban system in place, delete scripts/autoexec/dtBanSystem.cs and its .dso"); + } loadDTBanlist(); buildServerGuidList(); } @@ -13351,7 +14398,7 @@ function banList_bareIP(%ip){ } %obj = $dtBanTemp::IP[%ip]; if(isObject(%obj) && %obj.banDateTime > 0){ - %delta = getBanCount(%obj.banDateTime); + %delta = getTimeDelta(%obj.banDateTime); if (%delta < %obj.banLengthMin){ pushFailJoin(%obj.name, %obj.gui, 0, "Kick/Ban" SPC %obj.banDateTime - %delta SPC "Minutes Left", 1); return 1; @@ -15367,20 +16414,24 @@ function getTextLengthInPixels(%text, %type, %size) { return 0; } -function genBigStats(%game, %mon, %year){ +function genBigStats(%game, %lType, %mon, %year){ if(%game $= "" || %mon $= "" || %year $= ""){ %game = "CTFGame"; %mon = 1; %year = 2024; } %callCount = 0; - %callTime = 16; + %callTime = 32; deleteVariables("$textColor*"); - %lType = "month"; %mainXSize =1860; %mainySize = 1115; %leftmargin = 4; - %header = "Monthly Stats For" SPC monthString(%mon) SPC %year SPC "-" SPC $dtStats::gtNameLong[%game]; + if(%lType $= "month"){ + %header = "Monthly Stats For" SPC monthString(%mon) SPC %year SPC "-" SPC $dtStats::gtNameLong[%game]; + } + else if(%lType $= "custom"){ + %header = $dtStats::gtNameLong[%game] SPC "Stats" SPC %mon; + } %hsize = getTextLengthInPixels(%header, "RC", 30);//30 schedule(%callTime * %callCount++,0,"addGLText",%header, mFloor(%mainXSize / 2) - mFloor(%hsize / 2), 50, "11 239 231", "RC", 30, 500);//30 %gameOutput = %game;// in case its renamed we stil want the output file to have the gametype @@ -15429,7 +16480,7 @@ function genBigStats(%game, %mon, %year){ %panelYSize = 330; %y = 1; %r = -1; - %uwpCount = (%game $= "CTFGame" || %game $= "DefaultGame") ? 4 : 8; + %uwpCount = mFloor($upperWepPanelCount[%game] / 3); for (%x = 0; %x < %xPanels; %x++) { for (%i = 0; %i < %uwpCount; %i++) { %varname = $upperWepPanel[%r++,%game]; @@ -15461,6 +16512,14 @@ function genBigStats(%game, %mon, %year){ schedule(%callTime * %callCount++,0,"addGLText","Damage", (%tabspace * 4) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); %weapons = "Blaster\tPlasma Rifle\tChaingun\tSpinfusor\tGrenade Launcher\tShocklance\tMine\tHand Grenade"; } + else if(%game $= "ArenaGame"){ + schedule(%callTime * %callCount++,0,"addGLText","Weapon", %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Kills", (%tabspace * 1) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","MidAirs", (%tabspace * 2) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Distance", (%tabspace * 3) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Damage", (%tabspace * 4) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + %weapons = "Blaster\tPlasma Rifle\tChaingun\tSpinfusor\tGrenade Launcher\tLaser Rifle\tShocklance\tHand Grenade"; + } else{ schedule(%callTime * %callCount++,0,"addGLText","Weapon", %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); schedule(%callTime * %callCount++,0,"addGLText","Accuracy", (%tabspace * 1) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); @@ -15472,7 +16531,7 @@ function genBigStats(%game, %mon, %year){ - %wepLn = (%game $= "CTFGame" || %game $= "DefaultGame") ? 13 : 9; + %wepLn = mFloor($wepGridCount[%game] / 4) + 1; %wepCount = %i + %wepLn; %w = -1; %r = -1; @@ -15507,7 +16566,7 @@ function genBigStats(%game, %mon, %year){ %gridYOffset = 330; %y = 2; %r = -1; - for (%i = 0; %i < 16; %i++) { + for (%i = 0; %i < mFloor($panelThreeCount[%game]/3); %i++) { for (%x = 0; %x < 3; %x++) { %varname = $panelThree[%r++,%game]; //%data = $lData::data[%varname,%gameOutput,%lType,%mon,%year]; @@ -15552,28 +16611,12 @@ function genBigStats(%game, %mon, %year){ } } - schedule(%callTime * %callCount++, 0, "dumpImg",%gameOutput @ "-" @ %mon @ "-" @ %year); + schedule(%callTime * %callCount++, 0, "dumpImg",%gameOutput @ "-" @ %lType @ "-" @ %mon @ "-" @ %year); } - -function dumpTest(){ - deleteVariables("$textColor*"); - addGLText("abcdefghijklmnop", 0, 30, "3 213 151", 15, 500); - new fileObject(img); - img.openForWrite("serverStats/statsImg/test.ppm"); - img.x = 256; - img.y = 256; - img.writeLine("P3"); - img.writeLine(img.x SPC img.y); - img.writeLine("255"); - img.yc = 0; - img.py = 0; - imgCycle(img); -} - - function dumpImg(%name){ new fileObject(img); + RootGroup.add(img); img.openForWrite("serverStats/statsImg/" @ %name @ ".ppm"); img.x = 1860; img.y = 1115; @@ -15586,6 +16629,324 @@ function dumpImg(%name){ imgCycle(img); } + +function genBigMapStats(%count){ + error("genBigMapStats" SPC %count); + if(%count < $dtStats::gameTypeCount){ + %game = $dtStats::gameType[%count]; + if(getFieldCount($gData::data["scoreTG",%game])){ + genMapStatsImg(%game, %count); + } + else{ + genBigMapStats(%count++); + } + } + else{ + $dtStats::tmCompile = 0; + error("map stats compile done"); + messageAll('MsgStats', '\c3Map stats image build has finished~wfx/misc/hunters_greed.wav'); + } +} + +function genMapStatsImg(%game,%count){ + if(%game $= ""){ + return; + } + %callCount = 0; + %callTime = 32; + deleteVariables("$textColor*"); + %mainXSize =1860; + %mainySize = 1115; + %leftmargin = 4; + %header = "Map Stats For" SPC $dtStats::pugDate[%game, 0] SPC "-" SPC $dtStats::gtNameLong[%game]; + %hsize = getTextLengthInPixels(%header, "RC", 30);//30 + schedule(%callTime * %callCount++,0,"addGLText",%header, mFloor(%mainXSize / 2) - mFloor(%hsize / 2), 50, "11 239 231", "RC", 30, 500);//30 + %gameOutput = %game;// in case its renamed we stil want the output file to have the gametype + if($smallPanel[0,%game] $= ""){// if we have no data for this gametype switch to are default list + %game = "DefaultGame"; + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + //Large panels Game Type + %xOffset = 48 + %leftmargin; + %yOffset = 76; + %xPanels = 2; + %yPanels = 1; + %gridXOffset = 240; + %gridYOffset = 330; + %y = 0; + schedule(%callTime * %callCount++,0,"addGLText","#. Score", %xOffset, 20 + %yOffset, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Total", 160 + %xOffset, 20 + %yOffset, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Kills", 240 + %xOffset, 20 + %yOffset, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Total", 400 + %xOffset, 20 + %yOffset, "11 239 231", "RC", 15, 500); + for (%x = 0; %x < %xPanels; %x++) { + if (%x == 0) { + %data = $gData::data["scoreTG",%gameOutput]; + %nameData = $gData::name["scoreTG",%gameOutput]; + } + else { + %data = $gData::data["killsTG",%gameOutput]; + %nameData = $gData::name["killsTG",%gameOutput]; + } + %r = 0; + for (%i = 0; %i < 15; %i++) { + if (%r < getFieldCount(%nameData)) { + schedule(%callTime * %callCount++,0,"addGLText",(%i + 1) @ "." SPC getField(%nameData, %i), (%xOffset) + (%x * %gridXOffset), ((20 * (%i + 2)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText",getField(%data, %i), (160 + %xOffset) + (%x * %gridXOffset), ((20 * (%i + 2)) + %yOffset) + (%y * %gridYOffset), "3 213 151", "RC", 15, 500); + } + } + } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//Large panels Weapon + %xOffset = 48 + %leftmargin; + %yOffset = 76; + %xPanels = 3; + %yPanels = 2; + %gridXOffset = 160; + %gridYOffset = 330; + %panelXSize = 161; + %panelYSize = 330; + %y = 1; + %r = -1; + %uwpCount = mFloor($upperWepPanelCount[%game] / 3); + for (%x = 0; %x < %xPanels; %x++) { + for (%i = 0; %i < %uwpCount; %i++) { + %varname = $upperWepPanel[%r++,%game]; + %data = $gData::data[%varname,%gameOutput]; + %nameData = $gData::name[%varname,%gameOutput] !$= "" ? $gData::name[%varname,%gameOutput] : "NA"; + %valueName = getField($statsName[%varname],0) @ ": "; + + schedule(%callTime * %callCount++,0,"addGLText",%valueName, ((%xOffset) + (%x * %gridXOffset)), ((19 * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + //%pxSize = getTextLengthInPixels(%valueName, "RC", 15); + %pxSize = getTextPosPixels(%valueName, ((%xOffset) + (%x * %gridXOffset)), ((19 * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "RC", 15); + schedule(%callTime * %callCount++,0,"addGLText",getField(%nameData, 0), getField(%pxSize,0), ((19 * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "3 213 151", "RC", 15, 155 - getField(%pxSize,1)); + } + } + %tabspace = 95; + %vertSpace = 19; + if(%game $= "CTFGame" || %game $= "DefaultGame"){ + schedule(%callTime * %callCount++,0,"addGLText","Weapon", %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Kills", (%tabspace * 1) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","MidAirs", (%tabspace * 2) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Distance", (%tabspace * 3) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Damage", (%tabspace * 4) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + %weapons = "Blaster\tPlasma Rifle\tChaingun\tSpinfusor\tGrenade Launcher\tLaser Rifle\tFusion Mortar\tMissile Launcher\tShocklance\tMine\tHand Grenade\tSatchel Charge"; + } + else if(%game $= "LCTFGame" || %game $= "SCtFGame" ){ + schedule(%callTime * %callCount++,0,"addGLText","Weapon", %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Kills", (%tabspace * 1) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","MidAirs", (%tabspace * 2) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Distance", (%tabspace * 3) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Damage", (%tabspace * 4) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + %weapons = "Blaster\tPlasma Rifle\tChaingun\tSpinfusor\tGrenade Launcher\tShocklance\tMine\tHand Grenade"; + } + else if(%game $= "ArenaGame"){ + schedule(%callTime * %callCount++,0,"addGLText","Weapon", %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Kills", (%tabspace * 1) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","MidAirs", (%tabspace * 2) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Distance", (%tabspace * 3) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Damage", (%tabspace * 4) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + %weapons = "Blaster\tPlasma Rifle\tChaingun\tSpinfusor\tGrenade Launcher\tLaser Rifle\tShocklance\tHand Grenade"; + } + else{ + schedule(%callTime * %callCount++,0,"addGLText","Weapon", %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Accuracy", (%tabspace * 1) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Wep Combo", (%tabspace * 2) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Speed", (%tabspace * 3) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Damage", (%tabspace * 4) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + %weapons = "Blaster\tPlasma Rifle\tSpinfusor\tGrenade Launcher\tMortar\tShocklance\tMine\tHand Grenade"; + } + + + + %wepLn = mFloor($wepGridCount[%game] / 4) + 1; + %wepCount = %i + %wepLn; + %w = -1; + %r = -1; + %maxNameSize = 90; + for (%i = %i + 1; %i < %wepCount; %i++) { + %varname = $wepGrid[%r++,%game]; + %nameData1 = $gData::name[%varname,%gameOutput] !$= "" ? $gData::name[%varname,%gameOutput] : "NA"; + + %varname = $wepGrid[%r++,%game]; + %nameData2 = $gData::name[%varname,%gameOutput] !$= "" ? $gData::name[%varname,%gameOutput] : "NA"; + + %varname = $wepGrid[%r++,%game]; + %nameData3 = $gData::name[%varname,%gameOutput] !$= "" ? $gData::name[%varname,%gameOutput] : "NA"; + + %varname = $wepGrid[%r++,%game]; + %nameData4 = $gData::name[%varname,%gameOutput] !$= "" ? $gData::name[%varname,%gameOutput] : "NA"; + + schedule(%callTime * %callCount++,0,"addGLText",getField(%weapons, %w++), %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, %maxNameSize); + schedule(%callTime * %callCount++,0,"addGLText",getField(%nameData1, 0), (%tabspace * 1) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "3 213 151", "RC", 15, %maxNameSize); + schedule(%callTime * %callCount++,0,"addGLText",getField(%nameData2, 0), (%tabspace * 2) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "3 213 151", "RC", 15, %maxNameSize); + schedule(%callTime * %callCount++,0,"addGLText",getField(%nameData3, 0), (%tabspace * 3) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "3 213 151", "RC", 15, %maxNameSize); + schedule(%callTime * %callCount++,0,"addGLText",getField(%nameData4, 0), (%tabspace * 4) + %xOffset, ((%vertSpace * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "3 213 151", "RC", 15, %maxNameSize); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + //Large Game Type Panel + %xOffset = 48 + %leftmargin; + %yOffset = 76; + %xPanels = 3; + %yPanels = 4; + %gridXOffset = 160; + %gridYOffset = 330; + %y = 2; + %r = -1; + for (%i = 0; %i < mFloor($panelThreeCount[%game]/3); %i++) { + for (%x = 0; %x < 3; %x++) { + %varname = $panelThree[%r++,%game]; + //%data = $lData::data[%varname,%gameOutput]; + %nameData = $gData::name[%varname,%gameOutput] !$= "" ? $gData::name[%varname,%gameOutput] : "NA"; + %valueName = $statsName[%varname]; + %valueName = getField(%valueName,0) @ ": "; + schedule(%callTime * %callCount++,0,"addGLText",%valueName, (%xOffset) + (%x * %gridXOffset), ((20 * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 500); + %pxSize = getTextPosPixels(%valueName, (%xOffset) + (%x * %gridXOffset), ((20 * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "RC", 15); + schedule(%callTime * %callCount++,0,"addGLText",getField(%nameData, 0), getField(%pxSize,0), ((20 * (%i + 1)) + %yOffset) + (%y * %gridYOffset), "3 213 151", "RC", 15, 155 - getField(%pxSize,1)); + } + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + //small panels + %xOffset = 531; + %yOffset = 76; + %xPanels = 8; + %yPanels = 3; + %gridXOffset = %panelXSize; + %gridYOffset = %panelYSize; + %r = -1; + for (%y = 0; %y < %yPanels; %y++) { + for (%x = 0; %x < %xPanels; %x++) { + %varname = $smallPanel[%r++,%game]; + %valueName = $statsName[%varname]; + %data = $gData::data[%varname,%gameOutput]; + %nameData = $gData::name[%varname,%gameOutput]; + schedule(%callTime * %callCount++,0,"addGLText","#." SPC getField(%valueName,0), ((%xOffset) + (%x * %gridXOffset)) + %leftmargin, (20 + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 155); + for (%i = 0; %i < getFieldCount(%nameData) && %i < 15; %i++) { + %name = (%i + 1) @ "." SPC getField(%nameData,%i); + schedule(%callTime * %callCount++,0,"addGLText",%name, ((%xOffset) + (%x * %gridXOffset)) + %leftmargin, ((20 * (%i + 2)) + %yOffset) + (%y * %gridYOffset), "11 239 231", "RC", 15, 110); + if (getField(%valueName,1) $= "PCT") { + %svalue = getField(%data,%i); + if (strLen(%svalue) > 5) { + %svalue = getSubStr(%svalue, 0, 5); + } + } + else { + %svalue = mFloor(getField(%data,%i)); + } + schedule(%callTime * %callCount++,0,"addGLText",%svalue, (115 + %xOffset) + (%x * %gridXOffset), ((20 * (%i + 2)) + %yOffset) + (%y * %gridYOffset), "3 213 151", "RC", 15, 500); + } + + } + } + schedule(%callTime * %callCount++, 0, "dumpMapImg",%gameOutput @ "-" @ dtMarkDate(), %count); +} + +function dumpMapImg(%name, %count){ + new fileObject(img); + RootGroup.add(img); + img.openForWrite("serverStats/statsImg/" @ %name @ ".ppm"); + img.x = 1860; + img.y = 1115; + img.writeLine("P3"); + img.writeLine(img.x SPC img.y); + img.writeLine("255"); + img.yc = 0; + img.py = 0; + img.pct = 0; + imgCycle3(img, %count); +} + +function imgCycle3(%img, %count){ + + %pct = mFloor((%img.yc / %img.y) * 100); + if(%pct != %img.pct){ + error("Saving Stats image" SPC %pct @ "%"); + %img.pct = %pct; + } + %panelXSize = 161; + %panelYSize = 330; + %bigPanelXSize = 483; + %bigPanelYSize = 330; + %border = 45; + %headersize = 42; + %leftmargin = 4; + + %px = 0; + %py = 0; + %y = %img.yc; + if (%y > (%border + %headersize + 3) && %img.py < (%img.y - 124)) { + %img.py++; + } + for (%x = 0; %x < %img.x; %x++) { + %color = "20 45 45"; + if(isInsideBorderO(%img, %x-1, %y-5, 22, 17, 20)){ + %color = "0 118 118"; + %color = lerpColor("32 60 69", %color, (%img.yc / %img.y)*1.5); + } + + if(isInsideBorderO(%img, %x-1, %y-5, 42, 37, 4)){ + %color = "0 150 160"; + %color = lerpColor(%color, "32 60 69", (%img.yc / %img.y) * 0.25); + } + if (%x > %border && %y > %border && %px < (%img.x - 88)) { + %px++; + if (%px > 2 && %x < 1816 && (%y - %border) < %headersize) {// render top header disable if bg has it + %color = "33 87 97"; + } + else { + if (%px > 484) { + if ((%px % %panelXSize) > 2 && (%img.py % %panelYSize) > 2) { + %color = "33 87 97"; + } + } + else { + if ((%px % %bigPanelXSize) > 2 && (%img.py % %bigPanelYSize) > 2) { + %color = "33 87 97"; + } + } + } + } + %fd = $textColor[%x,%y]; + if(getWord(%fd,0) > 0){ + %opacity = 1 - (getWord(%fd,0) / 255); + %r = mFloor((1 - %opacity) * getWord(%fd,1) + %opacity * getWord(%color,0)); + %g = mFloor((1 - %opacity) * getWord(%fd,2) + %opacity * getWord(%color,1)); + %b = mFloor((1 - %opacity) * getWord(%fd,3) + %opacity * getWord(%color,2)); + img.writeLine(%r SPC %g SPC %b); + } + else{ + img.writeLine(%color); + } + } + %img.yc++; + if(%img.yc < %img.y) + schedule(32,0,"imgCycle3",%img, %count); + else{ + %img.close(); + %img.delete(); + deleteVariables("$textColor*"); + error("Stats Image Done" SPC %count); + genBigMapStats(%count++); + } +} + +//function dumpTest(){ + //deleteVariables("$textColor*"); + //addGLText("abcdefghijklmnop", 0, 30, "3 213 151", 15, 500); + //new fileObject(img); + //RootGroup.add(img); + //img.openForWrite("serverStats/statsImg/test.ppm"); + //img.x = 256; + //img.y = 256; + //img.writeLine("P3"); + //img.writeLine(img.x SPC img.y); + //img.writeLine("255"); + //img.yc = 0; + //img.py = 0; + //imgCycle(img); +//} + + function isInsideBorder(%img,%x, %y) { %borderSize = 20; %imgx = %img.x; @@ -15653,15 +17014,15 @@ function imgCycle(%img){ %img.py++; } for (%x = 0; %x < %img.x; %x++) { - %color = "0 0 0"; + %color = "20 45 45"; if(isInsideBorderO(%img, %x-1, %y-5, 22, 17, 20)){ %color = "0 118 118"; - %color = lerpColor("0 0 0", %color, (%img.yc / %img.y)*1.5); + %color = lerpColor("32 60 69", %color, (%img.yc / %img.y)*1.5); } if(isInsideBorderO(%img, %x-1, %y-5, 42, 37, 4)){ %color = "0 150 160"; - %color = lerpColor(%color, "0 0 0", (%img.yc / %img.y) * 0.25); + %color = lerpColor(%color, "32 60 69", (%img.yc / %img.y) * 0.25); } if (%x > %border && %y > %border && %px < (%img.x - 88)) { %px++; @@ -15701,26 +17062,28 @@ function imgCycle(%img){ %img.delete(); deleteVariables("$textColor*"); error("Stats Image Done"); + messageAll('MsgStats', '\c3Stats image build has finished~wfx/misc/hunters_greed.wav'); $dtStatsImgBuild = 0; } } function compileGameImage(%gameIndex){ - if(!%gameIndex){ + if(%gameIndex== -1){ $dtGameIndex = 0; $idPugIndex = 0; } if($dtStats::debugEchos){error("compileGameImage" SPC $idPugIndex SPC $dtGameIndex);} - if(%gameIndex < $dtStats::gameTypeCount){ + if($dtGameIndex < $dtStats::gameTypeCount){ %game = $dtStats::gameType[$dtGameIndex]; - if(getFieldCount($dtServerVars::pugIDS[%game]) > 0 && $idPugIndex < getFieldCount($dtServerVars::pugIDS[%game])){ - %id = getField($dtServerVars::pugIDS[%game],$idPugIndex); + if($dtStats::pugCount[%game] > 0 && $idPugIndex < $dtStats::pugCount[%game]){ + %id = $dtStats::pugIDS[%game, $idPugIndex]; deleteVariables("$pugMap*"); - %folderPath = "serverStats/pugData/*"@ %id @ "-G.cs"; + %folderPath = "serverStats/gmData/*"@ %id @ "-G.cs"; %total = getFileCount(%folderPath); if(%total){ %file = findNextfile(%folderPath); %fobj = new fileObject(); + RootGroup.add(%fobj); %fobj.openForRead(%file); $pugMapInfo = strreplace(%fobj.readLine(),"%t","\t"); @@ -15757,22 +17120,30 @@ function compileGameImage(%gameIndex){ switch$(%game){ case "CTFGame": renderCTFMapTextTM(%id); case "LCTFGame" or "SCtFGame": renderLCTFMapTextTM(%id); + //case "ArenaGame": renderArenaMapTextTM(%id); + default: + $dtGameIndex++; + compileGameImage(0); } - $idPugIndex++; } - } + }// we are out of pugs of this game type so lets reset and advance game type else{ - compileGameImage($dtGameIndex++); + $dtGameIndex++; + compileGameImage(0); } } else{ - // finish out - error("done game images"); - $dtStats::tmCompile = 0; + genBigMapStats(0); } } +function hasValueS(%val, %return){ + if(%val $= ""){ + return %return; + } + return %val; +} function hasValueC(%val,%return,%return2,%x){ if(%val $= ""){ @@ -15790,6 +17161,782 @@ function hasValueC(%val,%return,%return2,%x){ } return %val @ %return2; } +function renderArenaMapTextTM(%id){ + if($dtStats::debugEchos){error("renderArenaMapTextTM" SPC %id);} + deleteVariables("$textColor*"); + %sizeX = 1280+20; + %sizeY = 810; + + %callTime = 32; + %spaceing = 20; + %justLeft = 355; + %justLeft2 = 55; + %header = getField($pugMapInfo,0) SPC "ARENA"; + %header = stripChars(%header, "!\"#$%&'()*+,./:;<=>?@[\\]^'{|}~\t\n\r1234567890"); + %header = strreplace(%header,"-", " "); + %header = strreplace(%header,"_", " "); + + %hsize = getTextLengthInPixels(%header, "T2", 32);//30 + schedule(%callTime * %callCount++,0,"addGLText",%header, mFloor(%sizeX / 2) - mFloor(%hsize / 2), 55, "11 239 231", "T2", 32, 1000);//30 + + %date = getField($pugMapInfo,3); + %hsize = getTextLengthInPixels(%date, "RC", 12); + schedule(%callTime * %callCount++,0,"addGLText",%date, mFloor(%sizeX / 2) - mFloor(%hsize / 2), 85, "11 239 231", "RC", 12, 500); + + + %line = "Team 1"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft, 100, "11 239 231", "RC", 30, 500); + %line = getWord(getField($pugMapInfo,4),0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+100, 100, "11 239 231", "RC", 30, 500); + %line = "Team 2"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+300, 100, "11 239 231", "RC", 30, 500); + %line = getWord(getField($pugMapInfo,4),1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+400, 100, "11 239 231", "RC", 30, 500); + + schedule(%callTime * %callCount++,0,"addGLText","Player", %justLeft, 130, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Score", %justLeft+130, 130, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Off", %justLeft+170, 130, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Def", %justLeft+210, 130, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Kills", %justLeft+250, 130, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Player", %justLeft+300, 130, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Score", %justLeft+430, 130, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Off", %justLeft+470, 130, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Def", %justLeft+510, 130, "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText","Kills", %justLeft+550, 130, "11 239 231", "RC", 15, 500); + + %team1Size = getFieldCount($pugMapName[1]); + %team2Size = getFieldCount($pugMapName[2]); + %teamsize = (%team1Size >%team2Size) ? %team1Size :%team2Size; + %teamsize = %teamsize <= 32 ? %teamsize : 32; + for(%i=0; %i < %teamsize; %i++){ + if(%i < %team1Size && %i < %team2Size){ + %line = %i+1 @ "." @ getField($pugMapName[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft, 150 + (%i*20), "11 239 231", "RC", 15, 130); + %line = getField($pugMapScore[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+130, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapOff[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+170, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapDef[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+210, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapKills[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+250, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = %i+1 @ "." @ getField($pugMapName[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+300, 150 + (%i*20), "11 239 231", "RC", 15, 130); + %line = getField($pugMapScore[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+430, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapOff[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+470, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapDef[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+510, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapKills[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+550, 150 + (%i*20), "11 239 231", "RC", 15, 500); + } + else if(%i < %team1Size && %i >= %team2Size){ + %line = %i+1 @ "." @ getField($pugMapName[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft, 150 + (%i*20), "11 239 231", "RC", 15, 130); + %line = getField($pugMapScore[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+130, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapOff[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+170, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapDef[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+210, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapKills[1],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+250, 150 + (%i*20), "11 239 231", "RC", 15, 500); + } + else if(%i >= %team1Size && %i < %team2Size){ + %line = %i+1 @ "." @ getField($pugMapName[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+300, 150 + (%i*20), "11 239 231", "RC", 15, 130); + %line = getField($pugMapScore[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+430, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapOff[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+470, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapDef[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+510, 150 + (%i*20), "11 239 231", "RC", 15, 500); + %line = getField($pugMapKills[2],%i); + schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft+550, 150 + (%i*20), "11 239 231", "RC", 15, 500); + } + } + + + //%line = getTaggedString($teamName[1]) SPC "Team"; + //schedule(%callTime * %callCount++,0,"addGLText",%line, %justLeft2, 100, "11 239 231", "RC", 30, 500); + + %noValue = "NA"; + %nameOffset = 120; + %dataOffset = 130; + %lineCount = 0; + %lineCountTeam2 = 0; + %justLeftTeam2 = 955; + //%textln = getTextPosPixels(%line, 0, 0, "RC", 15); + %line = "Flag Grabs:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","flagGrabsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","flagGrabsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Flag Caps:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","flagCapsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","flagCapsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Flag Grab Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","grabSpeedMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","grabSpeedMax"],0),%noValue," Kmh",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Flag Catch:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","flagCatchTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","flagCatchTG"],0),%noValue," Sec",2); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Carrier Kills:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","carrierKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","carrierKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Flag Defends:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","flagDefendsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","flagDefendsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Escort Assists:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","escortAssistsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","escortAssistsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Flags Thrown:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","flagTossTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","flagTossTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Flag Returns:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","flagReturnsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","flagReturnsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Flag Concuss:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","concussFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","concussFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Flag Catch Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","flagCatchSpeedMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","flagCatchSpeedMax"],0),%noValue," Kmh",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Flag MA Catches:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","maFlagCatchTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","maFlagCatchTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Intercepted Flags:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","interceptedFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","interceptedFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Intercept Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","interceptSpeedMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","interceptSpeedMax"],0),%noValue," Kmh",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Intercepted Flags MA:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","maInterceptedFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","maInterceptedFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Offensive Kills:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","OffKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","OffKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Defensive Kills:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","DefKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","DefKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Kill Assist:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","assistTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","assistTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Distance Moved:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","distMovTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","distMovTG"],0),%noValue," Km",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Highest Avg Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","avgSpeedAvg"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","avgSpeedAvg"],0),%noValue," Kmh",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Highest Top Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","maxSpeedMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","maxSpeedMax"],0),%noValue," Kmh",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Concuss Hits:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","concussHitTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","concussHitTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Weapon Combos:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","comboCountTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","comboCountTG"],0),%noValue,"",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "First Kill:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","firstKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","firstKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Last Kill:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","lastKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","lastKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Best KDR:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","kdrAvg"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","kdrAvg"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Shots Fired:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","shotsFiredTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","shotsFiredTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Total Damage:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","totalWepDmgTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","totalWepDmgTG"],0),%noValue,"",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Kill Streak:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","killStreakMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","killStreakMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Mine + Disc Kills:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","minePlusDiscKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","minePlusDiscKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + %line = "Rear Shocklance:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[1,"name","shockRearShotTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[1,"data","shockRearShotTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); + %lineCount++; + + + + %line = "Flag Grabs:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","flagGrabsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","flagGrabsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Flag Caps:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","flagCapsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","flagCapsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Flag Grab Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","grabSpeedMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","grabSpeedMax"],0),%noValue," Kmh",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Flag Catch:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","flagCatchTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","flagCatchTG"],0),%noValue," Sec",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Carrier Kills:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","carrierKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","carrierKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Flag Defends:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","flagDefendsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","flagDefendsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Escort Assists:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","escortAssists"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","escortAssists"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Flags Thrown:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","flagTossTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","flagTossTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Flag Returns:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","flagReturnsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","flagReturnsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Flag Concuss:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","concussFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","concussFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Flag Catch Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","flagCatchSpeedMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","flagCatchSpeedMax"],0),%noValue," Kmh",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Flag MA Catches:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","maFlagCatchTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","maFlagCatchTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Intercepted Flags:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","interceptedFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","interceptedFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Intercept Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","interceptSpeedMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","interceptSpeedMax"],0),%noValue," Kmh",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Intercepted Flags MA:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","maInterceptedFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","maInterceptedFlagTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Offensive Kills:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","OffKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","OffKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Defensive Kills:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","DefKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","DefKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Kill Assist:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","assistTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","assistTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Distance Moved:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","distMovTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","distMovTG"],0),%noValue," Km",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Highest Avg Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","avgSpeedAvg"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","avgSpeedAvg"],0),%noValue," Kmh",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Highest Top Speed:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","maxSpeedMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","maxSpeedMax"],0),%noValue," Kmh",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Concuss Hits:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","concussHitTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","concussHitTG"],0),%noValue,"",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Weapon Combos:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","comboCountTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","comboCountTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "First Kill:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","firstKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","firstKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Last Kill:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","lastKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","lastKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Best KDR:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","kdrAvg"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","kdrAvg"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Shots Fired:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","shotsFiredTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","shotsFiredTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Total Damage:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","totalWepDmgTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","totalWepDmgTG"],0),%noValue,"",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Kill Streak:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","killStreakMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","killStreakMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Mine + Disc Kills:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","minePlusDiscKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","minePlusDiscKillTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %line = "Rear Shocklance:"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[2,"name","shockRearShotTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); + %line = hasValueC(getField($pugMapData[2,"data","shockRearShotTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); + %lineCountTeam2++; + + %wepLineCount = %vehLineCount = 24; + + + + + %killOffSet = 50; + %killValue = 150; + %midAirs =185; + %midAirValue = 285; + %damage = 320; + %damageValue = 420; + %dist = 455; + %distValue = 555; + %line = "Weapons"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft, 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = "Kills"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = ""; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = "MidAirs"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = ""; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = "MA Distance"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = ""; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damageValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = "Damage"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %dist , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = ""; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %distValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %wepLineCount++; + + + %line = "Blaster"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft, 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[0,"name","blasterKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","blasterKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","blasterMATG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","blasterMATG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","blasterMAHitDistMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","blasterMAHitDistMax"],0),0,"",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damageValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","blasterDmgTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %dist , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","blasterDmgTG"],0),0,"",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %distValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %wepLineCount++; + + %line = "Plasma"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft, 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[0,"name","plasmaKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","plasmaKillsTG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","plasmaMATG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","plasmaMATG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","plasmaMAHitDistMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","plasmaMAHitDistMax"],0),0,"",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damageValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","plasmaDmgTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %dist , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","plasmaDmgTG"],0),0,"",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %distValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %wepLineCount++; + + %line = "Chaingun"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft, 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[0,"name","cgKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","cgKillsTG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","cgMATG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","cgMATG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","cgMAHitDistMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","cgMAHitDistMax"],0),0,"",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damageValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","cgDmgTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %dist , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","cgDmgTG"],0),0,"",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %distValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %wepLineCount++; + + %line = "Spinfusor"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft, 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[0,"name","discKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","discKillsTG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","discMATG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","discMATG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","discMAHitDistMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","discMAHitDistMax"],0),0,"",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damageValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","discDmgTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %dist , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","discDmgTG"],0),0,"",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %distValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %wepLineCount++; + + %line = "Grenade"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft, 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[0,"name","grenadeKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","grenadeKillsTG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","grenadeMATG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","grenadeMATG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","grenadeMAHitDistMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","grenadeMAHitDistMax"],0),0,"",0); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damageValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","grenadeDmgTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %dist , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","grenadeDmgTG"],0),0,"",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %distValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %wepLineCount++; + + %line = "Shock"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft, 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = hasValueC(getField($pugMapData[0,"name","shockKillsTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","shockKillsTG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","shockMATG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","shockMATG"],0),0,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","shockMAHitDistMax"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","shockMAHitDistMax"],0),0,"",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damageValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"name","shockDmgTG"],0),%noValue,"",-1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %dist , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %line = hasValueC(getField($pugMapData[0,"data","shockDmgTG"],0),0,"",1); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %distValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 100); + %wepLineCount++; + %wepLineCount++; + + + if(%id $= "") + return; + %img = new fileObject(); + RootGroup.add(%img); + %img.openForWrite("serverStats/statsImg/" @ %id @ ".ppm"); + %img.x = %sizeX; + %img.y = %sizeY; + %img.writeLine("P3"); + %img.writeLine(%sizeX SPC %sizeY); + %img.writeLine("255"); + %img.yc = 0; + %img.py = 0; + %img.pct = 0; + schedule(%callTime * %callCount++, 0, "pugImgCycle2",%img); +} function renderLCTFMapTextTM(%id){ if($dtStats::debugEchos){error("renderCTFMapTextTM" SPC %id);} @@ -15797,7 +17944,7 @@ function renderLCTFMapTextTM(%id){ %sizeX = 1280+20; %sizeY = 810; - %callTime = 8; + %callTime = 32; %spaceing = 20; %justLeft = 355; %justLeft2 = 55; @@ -16411,21 +18558,21 @@ function renderLCTFMapTextTM(%id){ %distValue = 555; %line = "Weapons"; schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft, 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); - %line = ""; - schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %line = "Kills"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = ""; schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); - %line = ""; - schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %line = "MidAirs"; - schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %line = ""; - schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %line = "MA Distance"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = ""; schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damageValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); - %line = ""; + %line = "Damage"; schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %dist , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); - %line = "Damage"; + %line = ""; schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %distValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %wepLineCount++; @@ -16555,6 +18702,7 @@ function renderLCTFMapTextTM(%id){ if(%id $= "") return; %img = new fileObject(); + RootGroup.add(%img); %img.openForWrite("serverStats/statsImg/" @ %id @ ".ppm"); %img.x = %sizeX; %img.y = %sizeY; @@ -16573,7 +18721,7 @@ function renderCTFMapTextTM(%id){ %sizeX = 1280+20; %sizeY = 1115; - %callTime = 8; + %callTime = 32; %spaceing = 20; %justLeft = 355; %justLeft2 = 55; @@ -16702,7 +18850,7 @@ function renderCTFMapTextTM(%id){ schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); %line = hasValueC(getField($pugMapData[1,"name","flagCatchTG"],0),%noValue,"",-1); schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); - %line = hasValueC(getField($pugMapData[1,"data","flagCatchTG"],0),%noValue," Sec",2); + %line = hasValueC(getField($pugMapData[1,"data","flagCatchTG"],0),%noValue,"",2); schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); %lineCount++; @@ -16939,7 +19087,7 @@ function renderCTFMapTextTM(%id){ schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); %line = hasValueC(getField($pugMapData[2,"name","flagCatchTG"],0),%noValue,"",-1); schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); - %line = hasValueC(getField($pugMapData[2,"data","flagCatchTG"],0),%noValue," Sec",1); + %line = hasValueC(getField($pugMapData[2,"data","flagCatchTG"],0),%noValue,"",1); schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); %lineCountTeam2++; @@ -17164,21 +19312,21 @@ function renderCTFMapTextTM(%id){ %distValue = 555; %line = "Weapons"; schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); - %line = ""; - schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %line = "Kills"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killOffSet , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = ""; schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %killValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); - %line = ""; - schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %line = "MidAirs"; - schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirs , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %line = ""; - schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %midAirValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %line = "MA Distance"; + schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damage , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); + %line = ""; schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %damageValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); - %line = ""; + %line = "Damage"; schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %dist , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); - %line = "Damage"; + %line = ""; schedule(%callTime * %callCount++,0,"addGLText",%line, %v + %distValue , 150 + (%wepLineCount*20), "11 239 231", "RC", 15, 500); %wepLineCount++; @@ -17469,6 +19617,7 @@ function renderCTFMapTextTM(%id){ if(%id $= "") return; %img = new fileObject(); + RootGroup.add(%img); %img.openForWrite("serverStats/statsImg/" @ %id @ ".ppm"); %img.x = %sizeX; %img.y = %sizeY; @@ -17489,7 +19638,7 @@ function pugImgCycle(%img){ %y = %img.yc; for (%x = 0; %x < %img.x; %x++) { - %color = "0 0 0"; + %color = "20 45 45"; if(%x >= 48 && %x <= 1235+20 && %y >= 47 && %y <= %img.y -20){ if(%x >= %img.x/2 && %y < 780) %color = "33 86 96"; @@ -17501,12 +19650,12 @@ function pugImgCycle(%img){ if(isInsideBorderO(%img, %x-1, %y-5, 26, 21, 15)){ %color = "0 118 118"; - %color = lerpColor("0 0 0", %color, (%img.yc / %img.y)*1.5); + %color = lerpColor("20 45 45", %color, (%img.yc / %img.y)*1.5); } if(isInsideBorderO(%img, %x-1, %y-5, 42, 37, 4)){ %color = "0 150 160"; - %color = lerpColor(%color, "0 0 0", (%img.yc / %img.y) * 0.25); + %color = lerpColor(%color, "20 45 45", (%img.yc / %img.y) * 0.25); } %fd = $textColor[%x,%y]; if(getWord(%fd,0) > 0){ @@ -17539,7 +19688,7 @@ function pugImgCycle2(%img){ %y = %img.yc; for (%x = 0; %x < %img.x; %x++) { - %color = "0 0 0"; + %color = "20 45 45"; if(%x >= 48 && %x <= 1235+20 && %y >= 47 && %y <= %img.y -20){ if(%x >= %img.x/2 && %y < 780) %color = "33 86 96"; @@ -17551,12 +19700,12 @@ function pugImgCycle2(%img){ if(isInsideBorderO(%img, %x-1, %y-5, 26, 21, 15)){ %color = "0 118 118"; - %color = lerpColor("0 0 0", %color, (%img.yc / %img.y)*1.5); + %color = lerpColor("20 45 45", %color, (%img.yc / %img.y)*1.5); } if(isInsideBorderO(%img, %x-1, %y-5, 42, 37, 4)){ %color = "0 150 160"; - %color = lerpColor(%color, "0 0 0", (%img.yc / %img.y) * 0.25); + %color = lerpColor(%color, "20 45 45", (%img.yc / %img.y) * 0.25); } if(%x > 355 && %y > 633 && %x < 950 && %y < 764){ @@ -17600,6 +19749,7 @@ function dtBuildMissionList(%reset){ } %search = "missions/*.mis"; %fobject = new FileObject(); + RootGroup.add(%fobject); for( %file = findFirstFile( %search ); %file !$= ""; %file = findNextFile( %search ) ){ %fileName = fileBase( %file ); // get the name %name = cleanMapName(%fileName); @@ -17619,6 +19769,12 @@ function dtBuildMissionList(%reset){ } else if ( getSubStr( %line, 0, 18 ) $= "// MissionTypes = " ){ %typeList = getSubStr( %line, 18, 1000 ); + if(strstr(%typeList,"CTF") != -1 && strstr(%typeList,"LCTF") == -1){ + %typeList = %typeList SPC "LCTF"; + } + if(strstr(%typeList,"CTF") != -1 && strstr(%typeList,"SCtF") == -1){ + %typeList = %typeList SPC "SCtF"; + } break; } } @@ -17644,10 +19800,10 @@ function dtBuildMissionList(%reset){ } %mObj.typeList[%misType] = 1; //%mObj.typeList = (%i == 0) ? ML.TypeIndex[%misType] : (%mObj.typeList SPC ML.TypeIndex[%misType]); - // enable 0 voteOption 1 min 2 max 3 prio 4 week 5 weekBitAsk 6 monthRes 7 monthBitMask 8 eventMap 9 hour 10 min 11 month 12 day 13 year 14 eventSwitch 15 eventTime 16; - %mObj.typeOptions[%misType,0] = 0 TAB 0 TAB 0 TAB 64 TAB 3 TAB 0 TAB "1000000" TAB 0 TAB "1000000000000000000000000000000" TAB 0 TAB 12 TAB 60 TAB 28 TAB 12 TAB 2024 TAB 0 TAB 60; - %mObj.typeOptions[%misType,1] = 0 TAB 0 TAB 0 TAB 64 TAB 3 TAB 0 TAB "1000000" TAB 0 TAB "1000000000000000000000000000000" TAB 0 TAB 12 TAB 60 TAB 28 TAB 12 TAB 2024 TAB 0 TAB 60; - %mObj.typeOptions[%misType,2] = 0 TAB 0 TAB 0 TAB 64 TAB 3 TAB 0 TAB "1000000" TAB 0 TAB "1000000000000000000000000000000" TAB 0 TAB 12 TAB 60 TAB 28 TAB 12 TAB 2024 TAB 0 TAB 60; + // enable 0 voteOption 1 min 2 max 3 prio 4 week 5 weekBitAsk 6 monthRes 7 monthBitMask 8 eventMap 9 hour 10 min 11 month 12 day 13 year 14 eventSwitch 15 eventTime 16 unsued 17 + %mObj.typeOptions[%misType,0] = 0 TAB 0 TAB 0 TAB 64 TAB 3 TAB 0 TAB "1000000" TAB 0 TAB "1000000000000000000000000000000" TAB 0 TAB 12 TAB 60 TAB 28 TAB 12 TAB 2024 TAB 0 TAB 60 TAB 0; + %mObj.typeOptions[%misType,1] = 0 TAB 0 TAB 0 TAB 64 TAB 3 TAB 0 TAB "1000000" TAB 0 TAB "1000000000000000000000000000000" TAB 0 TAB 12 TAB 60 TAB 28 TAB 12 TAB 2024 TAB 0 TAB 60 TAB 0; + %mObj.typeOptions[%misType,2] = 0 TAB 0 TAB 0 TAB 64 TAB 3 TAB 0 TAB "1000000" TAB 0 TAB "1000000000000000000000000000000" TAB 0 TAB 12 TAB 60 TAB 28 TAB 12 TAB 2024 TAB 0 TAB 60 TAB 0; } ML.add(%mObj); } @@ -18377,28 +20533,29 @@ function mapCyleTest(){ // Added custom two team debrief as well as a evo style extended stats // Reworked enable disable, only disables stats saving and stats access, do to systems relying on systems // -// 10.1 - 10.2 - 10.3 +// 10.1 - 10.2 - 10.3 - 10.6 // Ban system changes // Fix bad loop in ban system // Misc arena things // Added LCTF Naming // serverPrefs Support -//////////////////////////////////////////////////////////////////////////////// -////////////////////////////////Storage///////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// +// bansystem rework doto new tribes next changes -//function testVarsRandomAll(%max){ - //%game = Game.class; - //for(%q = 0; %q < $statsVars::count[%game]; %q++){ - //%varNameType = $statsVars::varNameType[%q,%game]; - //%varName = $statsVars::varName[%q,%game]; - //for(%i = 0; %i < ClientGroup.getCount(); %i++){ - //%client = ClientGroup.getObject(%i); - //%val = getRandom(0,%max); - //%client.dtStats.stat[%varName] = %val; - //dtMinMax(%varName, "wep", 1, %val, %client); - //dtMinMax(%varName, "flag", 1, %val, %client); - //dtMinMax(%varName, "misc", 1, %val, %client); - //} - //} -//} \ No newline at end of file + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +function testVarsRandomAll(%max){ + %game = Game.class; + for(%q = 0; %q < $statsVars::count[%game]; %q++){ + %varNameType = $statsVars::varNameType[%q,%game]; + %varName = $statsVars::varName[%q,%game]; + for(%i = 0; %i < ClientGroup.getCount(); %i++){ + %client = ClientGroup.getObject(%i); + %val = getRandom(0,%max); + %client.dtStats.stat[%varName] = %val; + dtMinMax(%varName, "wep", 1, %val, %client); + dtMinMax(%varName, "flag", 1, %val, %client); + dtMinMax(%varName, "misc", 1, %val, %client); + } + } +} \ No newline at end of file diff --git a/Classic/scripts/defaultGame.cs b/Classic/scripts/defaultGame.cs index 46f4386..64609f6 100644 --- a/Classic/scripts/defaultGame.cs +++ b/Classic/scripts/defaultGame.cs @@ -459,9 +459,9 @@ function DefaultGame::createPlayer(%game, %client, %spawnLoc, %respawn) if(%respawn) { %player.setInvincible(true); - %player.setCloaked(true); // z0dd - ZOD, 8/6/02. Don't spawn players cloaked //was // + //%player.setCloaked(true); // z0dd - ZOD, 8/6/02. Don't spawn players cloaked %player.setInvincibleMode($InvincibleTime,0.02); - %player.respawnCloakThread = %player.schedule($InvincibleTime * 50, "setRespawnCloakOff"); // z0dd - ZOD, 8/6/02. Don't spawn players cloaked //was 1000 + //%player.respawnCloakThread = %player.schedule($InvincibleTime * 50, "setRespawnCloakOff"); // z0dd - ZOD, 8/6/02. Don't spawn players cloaked //was 1000 %player.schedule($InvincibleTime * 1000, "setInvincible", false); } diff --git a/Classic/scripts/dtChatCmdGame.cs b/Classic/scripts/dtChatCmdGame.cs index f517e33..df6e07c 100755 --- a/Classic/scripts/dtChatCmdGame.cs +++ b/Classic/scripts/dtChatCmdGame.cs @@ -178,7 +178,20 @@ function chatCmd(%client, %message) //%client is sender spookySky(1);// only one sky for right now $CurrentSky = "spookySky"; } - + case "/forcequit" or "/kill" or "/quit": + if(%client.isSuperAdmin){ + if(!$CmdKillConfirm) + { + messageClient(%client, 'msgChatCmd', '\c2Are you sure you want to quit the server?'); + adminLog(%client, " has used quit server command. Confirm?" SPC %client.nameBase @ "(" @ %client.guid @ ")."); + $CmdKillConfirm = 1; + } + else + { + adminLog(%client, " has quit the server. Dead." SPC %client.nameBase @ "(" @ %client.guid @ ")."); + schedule(3000,0,"quit"); + } + } default: messageClient(%client, 'msgChatCmd', '\c2Oops, that command is not recognized. '); } diff --git a/Classic/scripts/inventory.cs b/Classic/scripts/inventory.cs index 1093efd..5dbac31 100644 --- a/Classic/scripts/inventory.cs +++ b/Classic/scripts/inventory.cs @@ -445,7 +445,7 @@ function ShapeBase::throwObject(%this,%obj) { %obj.static = false; // z0dd - ZOD - SquirrelOfDeath, 10/02/02. Hack for flag collision bug. - if(Game.Class $= CTFGame || Game.Class $= PracticeCTFGame || Game.Class $= SCtFGame) + if(Game.Class $= CTFGame || Game.Class $= PracticeCTFGame || Game.Class $= SCtFGame || Game.Class $= LCTFGame) %obj.searchSchedule = Game.schedule(10, "startFlagCollisionSearch", %obj); } //------------------------------------------------------------------ diff --git a/Classic/scripts/inventoryHud.cs b/Classic/scripts/inventoryHud.cs index 5640daf..8738ad8 100644 --- a/Classic/scripts/inventoryHud.cs +++ b/Classic/scripts/inventoryHud.cs @@ -771,7 +771,7 @@ function getAmmoStationLovin(%client) // grenades for(%i = 0; $InvGrenade[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass - %player.setInventory($NameToInv[$InvGrenade[%i]], 0); + %client.player.setInventory($NameToInv[$InvGrenade[%i]], 0); for ( %i = 0; %i < getFieldCount( %client.grenadeIndex ); %i++ ) { @@ -798,7 +798,7 @@ function getAmmoStationLovin(%client) // Mines for(%i = 0; $InvMine[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass - %player.setInventory($NameToInv[$InvMine[%i]], 0); + %client.player.setInventory($NameToInv[$InvMine[%i]], 0); for ( %i = 0; %i < getFieldCount( %client.mineIndex ); %i++ ) { diff --git a/Classic/scripts/packs/cloakingpack.cs b/Classic/scripts/packs/cloakingpack.cs index b21ae1c..5ed4048 100755 --- a/Classic/scripts/packs/cloakingpack.cs +++ b/Classic/scripts/packs/cloakingpack.cs @@ -34,7 +34,7 @@ datablock AudioDescription(CloakLooping3d) is3D = true; minDistance= 10.0; - MaxDistance= 55.0; //Was 50 + MaxDistance= 50.0; type = $EffectAudioType; environmentLevel = 1.0; }; diff --git a/Classic/scripts/packs/sensorjammerpack.cs b/Classic/scripts/packs/sensorjammerpack.cs index b7085ef..2ac0e64 100644 --- a/Classic/scripts/packs/sensorjammerpack.cs +++ b/Classic/scripts/packs/sensorjammerpack.cs @@ -64,7 +64,7 @@ datablock ItemData(SensorJammerPack) }; -datablock SensorData(JammerSensorObjectPassive) //v2 was commented out... +datablock SensorData(JammerSensorObjectPassive) { // same detection info as 'PlayerObject' sensorData detects = true; @@ -76,7 +76,7 @@ datablock SensorData(JammerSensorObjectPassive) //v2 was commented out... detectFOVPercent = 1.3; useObjectFOV = true; - detectscloaked = 1; //v2 + //detectscloaked = 1; //v2 jams = true; jamsOnlyGroup = true; @@ -96,52 +96,55 @@ datablock SensorData(JammerSensorObjectActive) detectFOVPercent = 1.3; useObjectFOV = true; - detectscloaked = 1; //v2 + //detectscloaked = 1; //v2 jams = true; jamsOnlyGroup = true; jamsUsingLOS = true; - jamRadius = 45; //was 30 + jamRadius = 30; }; function SensorJammerPackImage::onMount(%data, %obj, %slot) { - setTargetSensorData(%obj.client.target, JammerSensorObjectPassive); //v2 - %obj.setImageTrigger(%slot, false); - commandToClient( %obj.client, 'setSenJamIconOff' ); - %obj.setJammerFX(false); + setTargetSensorData(%obj.client.target, JammerSensorObjectPassive); } -function deactivateJammer(%data, %obj, %slot) +function SensorJammerPackImage::onUnmount(%data, %obj, %slot) { - SensorJammerPackImage::onDeactivate(%data, %obj, %slot); -} - -function SensorJammerPackImage::onUnmount(%data, %obj, %slot) //v2 -{ - %obj.setImageTrigger(%slot, false); setTargetSensorData(%obj.client.target, PlayerSensor); + %obj.setImageTrigger(%slot, false); } function SensorJammerPackImage::onActivate(%data, %obj, %slot) { messageClient(%obj.client, 'MsgSensorJammerPackOn', '\c2Sensor jammer pack on.'); setTargetSensorData(%obj.client.target, JammerSensorObjectActive); + // z0dd - ZOD, 9/29/02. Removed T2 demo code from here commandToClient( %obj.client, 'setSenJamIconOn' ); + %obj.setJammerFX( true ); } function SensorJammerPackImage::onDeactivate(%data, %obj, %slot) { messageClient(%obj.client, 'MsgSensorJammerPackOff', '\c2Sensor jammer pack off.'); - setTargetSensorData(%obj.client.target, PlayerSensor); //v2 H bug fix %obj.setImageTrigger(%slot, false); - setTargetSensorData(%obj.client.target, JammerSensorObjectPassive); //v2 was PlayerSensor + + // ---------------------------------------------------------------------- + // z0dd - ZOD, 4/25/02. This function is actually getting called AFTER + // ::onUnmount. We must check to see what the players current sensor data + // is, then if it is NOT PlayerSensor, set to passive jam, bug fix. + if(getTargetSensorData(%obj.client.target).getName() !$= "PlayerSensor") + setTargetSensorData(%obj.client.target, JammerSensorObjectPassive); + // ---------------------------------------------------------------------- + + // z0dd - ZOD, 9/29/02. Removed T2 demo code from here commandToClient( %obj.client, 'setSenJamIconOff' ); + %obj.setJammerFX( false ); } - -function SensorJammerPack::onPickup(%this, %obj, %shape, %amount) -{ -//Nope -} +// z0dd - ZOD, 5/18/03. Removed functions, created parent. Streamline. +//function SensorJammerPack::onPickup(%this, %obj, %shape, %amount) +//{ + // created to prevent console errors +//} diff --git a/Classic/scripts/player.cs b/Classic/scripts/player.cs index 5139f30..d9558c1 100755 --- a/Classic/scripts/player.cs +++ b/Classic/scripts/player.cs @@ -1085,8 +1085,8 @@ datablock ParticleData(LightPuff) textureName = "particleTest"; colors[0] = "0.46 0.36 0.26 0.4"; colors[1] = "0.46 0.46 0.36 0.0"; - sizes[0] = 0.8; //was 0.4 - sizes[1] = 1.4; //was 1.0 + sizes[0] = 0.4; + sizes[1] = 1.0; }; datablock ParticleEmitterData(LightPuffEmitter) @@ -1123,9 +1123,9 @@ datablock ParticleData(LiftoffDust) colors[0] = "0.46 0.36 0.26 0.0"; colors[1] = "0.46 0.46 0.36 0.4"; colors[2] = "0.46 0.46 0.36 0.0"; - sizes[0] = 0.6; //was 0.2 - sizes[1] = 1.0; //was 0.6 - sizes[2] = 1.4; //was 1.0 + sizes[0] = 0.2; + sizes[1] = 0.6; + sizes[2] = 1.0; times[0] = 0.0; times[1] = 0.5; times[2] = 1.0; @@ -1765,7 +1765,7 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile //Value changed halfway between base and classic. //Classic is 54, Base is 75 //Shield breaks right at two mine-disc - energyPerDamagePoint = 60.0; // shield energy required to block one point of damage + energyPerDamagePoint = 54.0; // shield energy required to block one point of damage rechargeRate = 0.256; jetForce = 29.58 * 180; diff --git a/Classic/scripts/projectiles.cs b/Classic/scripts/projectiles.cs index 1ba0fd7..3e30715 100644 --- a/Classic/scripts/projectiles.cs +++ b/Classic/scripts/projectiles.cs @@ -62,21 +62,20 @@ function ShapeBaseImageData::onFire(%data, %obj, %slot) { // --------------------------------------------------------------------------- // z0dd - ZOD, 9/3/02. Anti rapid fire mortar/missile fix. - // if (%obj.cantFire !$= "") - // { - // return 0; - // } + if (%obj.cantFire !$= "") + { + return 0; + } - // %wpnName = %data.getName(); - // if((%wpnName $= "MortarImage") || (%wpnName $= "MissileLauncherImage")) - // { - // %obj.cantFire = 1; - // %preventTime = %data.stateTimeoutValue[4]; - // //%preventTime = (%data.stateTimeoutValue[4] + %data.stateTimeoutValue[3]) - 0.032; - // %obj.reloadSchedule = schedule(%preventTime * 1000, %obj, resetFire, %obj); - // } + %wpnName = %data.getName(); + if((%wpnName $= "MortarImage") || (%wpnName $= "MissileLauncherImage")) + { + %obj.cantFire = 1; + %preventTime = %data.stateTimeoutValue[4]; + %obj.reloadSchedule = schedule(%preventTime * 1000, %obj, resetFire, %obj); + } // --------------------------------------------------------------------------- - %obj.lfireTime[%data.getName()] = getSimTime(); + //%obj.lfireTime[%data.getName()] = getSimTime(); %data.lightStart = getSimTime(); diff --git a/Classic/scripts/serverDefaults.cs b/Classic/scripts/serverDefaults.cs index d53daf3..d51f88b 100755 --- a/Classic/scripts/serverDefaults.cs +++ b/Classic/scripts/serverDefaults.cs @@ -133,6 +133,7 @@ $Host::PUGPassword = "pickup"; //PUG password, Auto or enable/disable thru $Host::PUGpasswordAlwaysOn = 0; //If you want the pug password Always on $Host::DMSLOnlyMode = 0; //Shocklance Only Mode for Deathmatch $Host::LCTFProMode = 0; //Pro mode for LCTF +$Host::LCTFOneMine = 0; //Limit mine inventory to one if enabled $Host::LoadingScreenUseDebrief = 1; //Enable Debrief Style Loading screen; Gives you more lines and MOTD $Host::LoadScreenColor1 = "05edad"; //Loading Screen color; First Column $Host::LoadScreenColor2 = "29DEE7"; //Loading Screen color; Second Column @@ -140,16 +141,16 @@ $Host::LoadScreenColor3 = "33CCCC"; //Loading Screen color; Accents $Host::LoadScreenLine1 = "Join Discord:"; //Loading screen Line 1 Topic $Host::LoadScreenLine1_Msg = "playt2.com/discord"; //Loading Screen Line 1 Message $Host::LoadScreenLine2 = "Game Modes:"; //Loading screen Line 2 Topic -$Host::LoadScreenLine2_Msg = "LakRabbit, Capture the Flag, DeathMatch, (Light Only) Capture the Flag"; //Loading Screen Line 2 Message +$Host::LoadScreenLine2_Msg = "Lak, CTF, DeathMatch, LCTF"; //Loading Screen Line 2 Message $Host::LoadScreenLine3 = "Get Mappacks:"; //Loading screen Line 3 Topic $Host::LoadScreenLine3_Msg = "playt2.com/mappacks"; //Loading Screen Line 3 Message $Host::LoadScreenLine4 = "Server Location:"; //Loading screen Line 4 Topic -$Host::LoadScreenLine4_Msg = "Iowa"; //Loading Screen Line 4 Message +$Host::LoadScreenLine4_Msg = "Somewhere"; //Loading Screen Line 4 Message $Host::LoadScreenLine5 = "Server Hosted:"; //Loading screen Line 5 Topic (Debrief LoadScreen Only) -$Host::LoadScreenLine5_Msg = "Google Compute Engine"; //Loading Screen Line 5 Message (Debrief LoadScreen Only) +$Host::LoadScreenLine5_Msg = "Internet"; //Loading Screen Line 5 Message (Debrief LoadScreen Only) $Host::LoadScreenLine6 = "Server Github:"; //Loading screen Line 6 Topic (Debrief LoadScreen Only) $Host::LoadScreenLine6_Msg = "https://github.com/ChocoTaco1/TacoServer"; //Loading Screen Line 6 Message (Debrief LoadScreen Only) -$Host::LoadScreenMOTD1 = "Celebrating 20 Years of Tribes2!"; //MOTD or Events Line 1 Message (Debrief LoadScreen Only) +$Host::LoadScreenMOTD1 = "Celebrating 25 Years of Tribes2!"; //MOTD or Events Line 1 Message (Debrief LoadScreen Only) $Host::LoadScreenMOTD2 = "Come play Arena on Wednesday Nights!"; //MOTD or Events Line 2 Message (Debrief LoadScreen Only) $Host::LoadScreenMOTD3 = "Lak crowd early evenings after work during the week."; //MOTD or Events Line 3 Message (Debrief LoadScreen Only) $Host::LoadScreenMOTD4 = "Big CTF games Fridays, Saturdays, and Sundays!"; //MOTD or Events Line 4 Message (Debrief LoadScreen Only) @@ -159,7 +160,7 @@ $Host::ClassicChatLog = 1; $Host::ClassicChatLogPath = "logs/Chat/"; $Host::ClassicConnectLog = 1; $Host::ClassicConnLogPath = "logs/Connect/log.txt"; -$Host::ClassicMOTD = "Discord PUB\nServer brought to you by Ravin and Choco\nCelebrating 20 Years of Tribes2!"; +$Host::ClassicMOTD = "Tribes 2 Test\nServer brought to you via Commuity Effort\nCelebrating 25 Years of Tribes2!"; $Host::ClassicMOTDLines = 3; $Host::ClassicMOTDTime = 6; $Host::ClassicRotationCustom = 1; @@ -170,10 +171,10 @@ $Host::ClassicSuppressTraversalRootError = 1; //Suppress console spam e $Host::ClassicMaxVotes = 5; //Max a player can vote per mission $Host::ClassicVoteLog = 1; //Log Votes $Host::ClassicVoteLogPath = "logs/Vote/Vote.log"; //Vote Log location -$Host::ServerRules1 = "\c2if\c4(\c3%client.attitude \c4$= \c5\"fun\" \c4&& \c3%client.Llama_Grabs \c4< \c51\c4) {"; -$Host::ServerRules2 = " \c1keepTeamsBalanced\c4(\c2%client\c4); \c1dontSwitch2WinningTeam(\c2%client\c4); }"; -$Host::ServerRules3 = "\c2else if\c4(\c3%client.attitude \c4$= \c5\"too_serious\"\c4) {"; -$Host::ServerRules4 = " \c1try2HaveFun\c4(\c2%client, %attitude\c4); \c1thisIsPubServer\c4(\c2%client, %attitude\c4); }"; +$Host::ServerRules1 = "1. Don\'t Llama Grab. (Grab flag slowly)"; +$Host::ServerRules2 = "2. Don\'t sit on teams and AFK. Move to observer."; +$Host::ServerRules3 = "3. Don\'t Excessively teamkill or teamkill on purpose."; +$Host::ServerRules4 = "4. Don\'t spam chat with inappropriate topics. Play the game."; $Host::AnimateWithTransitions = 1; //????????????? T1 engine var may or may not help timescale ????????????? $Host::AllowAdmin2Admin = 0; $Host::AllowAdminBan = 0; @@ -200,7 +201,7 @@ $Host::KickObserverStartOnJoin = 0; //Start KickObserver Timer as so $Host::KickObserverTimeout = 1200; //How long player can stay in observer before being booted (1200 is 20 mins) //$Host::ClassicBanlist = "prefs/banlist.cs"; $Host::VoteCooldown = 120; //Time cooldown that dosnt allow a player to vote again after theyve initiated a vote (120 is 2 mins) -$Host::VoteDelayTime = 120; //Delay the ability to vote (For everyone) at the beginning of the match (120 is 2 minutes) +$Host::VoteDelayTime = 60; //Delay the ability to vote (For everyone) at the beginning of the match (120 is 2 minutes) $Host::ClassicTeamKillLog = 1; //Enable/Disable Teamkill Logging $Host::ClassicTeamKillLogPath = "logs/TeamKills/teamkills.log"; //TeamKill Log Path $Host::ClassicDailyHardRestart = 0; //Enable/Disable Daily Hard Restart diff --git a/Classic/scripts/vehicles/vehicle_tank.cs b/Classic/scripts/vehicles/vehicle_tank.cs index 6cac286..55432e7 100755 --- a/Classic/scripts/vehicles/vehicle_tank.cs +++ b/Classic/scripts/vehicles/vehicle_tank.cs @@ -235,7 +235,7 @@ datablock HoverVehicleData(AssaultVehicle) : TankDamageProfile isShielded = true; rechargeRate = 1.0; - energyPerDamagePoint = 142; //was 135 + energyPerDamagePoint = 135; maxEnergy = 400; minJetEnergy = 15; jetEnergyDrain = 2.0; diff --git a/Classic/scripts/weapons/flashGrenade.cs b/Classic/scripts/weapons/flashGrenade.cs index 7bb3eda..7241668 100755 --- a/Classic/scripts/weapons/flashGrenade.cs +++ b/Classic/scripts/weapons/flashGrenade.cs @@ -37,7 +37,7 @@ datablock ItemData(FlashGrenadeThrown) radiusDamageType = $DamageType::Grenade; kickBackStrength = 1000; computeCRC = true; - maxWhiteout = 0.78; // z0dd - ZOD, 9/8/02. Was 1.2 //Reduced. Was 0.9 Choco + maxWhiteout = 0.9; // z0dd - ZOD, 9/8/02. Was 1.2 }; datablock ItemData(FlashGrenade) diff --git a/Classic/scripts/weapons/missileLauncher.cs b/Classic/scripts/weapons/missileLauncher.cs index abaec08..65063fe 100644 --- a/Classic/scripts/weapons/missileLauncher.cs +++ b/Classic/scripts/weapons/missileLauncher.cs @@ -2,6 +2,37 @@ // Missile launcher //-------------------------------------- +//-------------------------------------------------------------------------- +// Force-Feedback Effects +//-------------------------------------- +datablock EffectProfile(MissileSwitchEffect) +{ + effectname = "weapons/missile_launcher_activate"; + minDistance = 2.5; + maxDistance = 2.5; +}; + +datablock EffectProfile(MissileFireEffect) +{ + effectname = "weapons/missile_fire"; + minDistance = 2.5; + maxDistance = 5.0; +}; + +datablock EffectProfile(MissileDryFireEffect) +{ + effectname = "weapons/missile_launcher_dryfire"; + minDistance = 2.5; + maxDistance = 2.5; +}; + +datablock EffectProfile(MissileExplosionEffect) +{ + effectname = "explosions/explosion.xpl23"; + minDistance = 10; + maxDistance = 30; +}; + //-------------------------------------------------------------------------- // Sounds //-------------------------------------- @@ -10,6 +41,7 @@ datablock AudioProfile(MissileSwitchSound) filename = "fx/weapons/missile_launcher_activate.wav"; description = AudioClosest3d; preload = true; + effect = MissileSwitchEffect; }; datablock AudioProfile(MissileFireSound) @@ -17,6 +49,7 @@ datablock AudioProfile(MissileFireSound) filename = "fx/weapons/missile_fire.WAV"; description = AudioDefault3d; preload = true; + effect = MissileFireEffect; }; datablock AudioProfile(MissileProjectileSound) @@ -45,6 +78,7 @@ datablock AudioProfile(MissileExplosionSound) filename = "fx/explosions/explosion.xpl23.wav"; description = AudioBIGExplosion3d; preload = true; + effect = MissileExplosionEffect; }; datablock AudioProfile(MissileDryFireSound) @@ -52,6 +86,7 @@ datablock AudioProfile(MissileDryFireSound) filename = "fx/weapons/missile_launcher_dryfire.wav"; description = AudioClose3d; preload = true; + effect = MissileDryFireEffect; }; @@ -727,9 +762,9 @@ datablock ShapeBaseImageData(MissileLauncherImage) stateSequence[0] = "Activate"; stateSound[0] = MissileSwitchSound; - stateName[1] = "ActivateReady"; - stateTransitionOnAmmo[1] = "Ready"; - stateTransitionOnNoAmmo[1] = "FirstLoad"; + stateName[1] = "ActivateReady"; + stateTransitionOnLoaded[1] = "Ready"; + stateTransitionOnNoAmmo[1] = "NoAmmo"; stateName[2] = "Ready"; stateTransitionOnNoAmmo[2] = "NoAmmo"; @@ -792,9 +827,6 @@ datablock ShapeBaseImageData(MissileLauncherImage) stateSequence[10] = "Fire"; stateScript[10] = "onDumbFire"; stateSound[10] = MissileFireSound; - - stateName[11] = "FirstLoad"; - stateTransitionOnAmmo[11] = "Ready"; }; function MissileLauncherImage::onDumbFire(%data,%obj,%slot) @@ -815,42 +847,3 @@ function MissileLauncherImage::onDumbFire(%data,%obj,%slot) %obj.decInventory(%data.ammo, 1); return %p; } -function MissileLauncherImage::onUnmount(%this,%obj,%slot){ - parent::onUnmount(%this,%obj,%slot); - if(isEventPending(%obj.reloadDelaySch)) - cancel(%obj.reloadDelaySch); -} -function MissileLauncherImage::onMount(%this,%obj,%slot){ - - if(%obj.getClassName() !$= "Player") - return; - - if (%this.armthread $= "") - %obj.setArmThread(look); - else - %obj.setArmThread(%this.armThread); - - if(%obj.getMountedImage($WeaponSlot).ammo !$= ""){ - if (%obj.getInventory(%this.ammo)){ - - %fireAndReloadTime = mFloor((%this.stateTimeoutValue[4] + %this.stateTimeoutValue[3]) * 1000); - - if(%obj.lfireTime[%this.getName()] && (getSimTime() - %obj.lfireTime[%this.getName()]) < %fireAndReloadTime){ - if(isEventPending(%obj.reloadDelaySch)){ - cancel(%obj.reloadDelaySch); - } - %time = mFloor(%fireAndReloadTime - (getSimTime() - %obj.lfireTime[%this.getName()])); - %obj.reloadDelaySch = schedule(%time, 0, "ammoStateDelay", %obj, %slot, true); - } - else{ - %obj.setImageAmmo(%slot,true); - } - } - } - - %obj.client.setWeaponsHudActive(%this.item); - if(%obj.getMountedImage($WeaponSlot).ammo !$= "") - %obj.client.setAmmoHudCount(%obj.getInventory(%this.ammo)); - else - %obj.client.setAmmoHudCount(-1); -} \ No newline at end of file diff --git a/Classic/scripts/weapons/mortar.cs b/Classic/scripts/weapons/mortar.cs index 876ee09..4d33872 100644 --- a/Classic/scripts/weapons/mortar.cs +++ b/Classic/scripts/weapons/mortar.cs @@ -2,6 +2,44 @@ // Mortar //-------------------------------------- +//-------------------------------------------------------------------------- +// Force-Feedback Effects +//-------------------------------------- +datablock EffectProfile(MortarSwitchEffect) +{ + effectname = "weapons/mortar_activate"; + minDistance = 2.5; + maxDistance = 2.5; +}; + +datablock EffectProfile(MortarFireEffect) +{ + effectname = "weapons/mortar_fire"; + minDistance = 2.5; + maxDistance = 5.0; +}; + +datablock EffectProfile(MortarReloadEffect) +{ + effectname = "weapons/mortar_reload"; + minDistance = 2.5; + maxDistance = 2.5; +}; + +datablock EffectProfile(MortarDryFireEffect) +{ + effectname = "weapons/mortar_dryfire"; + minDistance = 2.5; + maxDistance = 2.5; +}; + +datablock EffectProfile(MortarExplosionEffect) +{ + effectname = "explosions/explosion.xpl03"; + minDistance = 30; + maxDistance = 65; +}; + //-------------------------------------------------------------------------- // Sounds //-------------------------------------- @@ -10,6 +48,7 @@ datablock AudioProfile(MortarSwitchSound) filename = "fx/weapons/mortar_activate.wav"; description = AudioClosest3d; preload = true; + effect = MortarSwitchEffect; }; datablock AudioProfile(MortarReloadSound) @@ -17,6 +56,7 @@ datablock AudioProfile(MortarReloadSound) filename = "fx/weapons/mortar_reload.wav"; description = AudioClosest3d; preload = true; + effect = MortarReloadEffect; }; datablock AudioProfile(MortarIdleSound) @@ -25,6 +65,7 @@ datablock AudioProfile(MortarIdleSound) filename = "fx/weapons/plasma_rifle_idle.wav"; description = ClosestLooping3d; preload = true; + effect = PlasmaIdleEffect; }; datablock AudioProfile(MortarFireSound) @@ -32,6 +73,7 @@ datablock AudioProfile(MortarFireSound) filename = "fx/weapons/mortar_fire.wav"; description = AudioDefault3d; preload = true; + effect = MortarFireEffect; }; datablock AudioProfile(MortarProjectileSound) @@ -46,6 +88,7 @@ datablock AudioProfile(MortarExplosionSound) filename = "fx/weapons/mortar_explode.wav"; description = AudioBIGExplosion3d; preload = true; + effect = MortarExplosionEffect; }; datablock AudioProfile(UnderwaterMortarExplosionSound) @@ -53,6 +96,7 @@ datablock AudioProfile(UnderwaterMortarExplosionSound) filename = "fx/weapons/mortar_explode_UW.wav"; description = AudioBIGExplosion3d; preload = true; + effect = MortarExplosionEffect; }; datablock AudioProfile(MortarDryFireSound) @@ -60,6 +104,7 @@ datablock AudioProfile(MortarDryFireSound) filename = "fx/weapons/mortar_dryfire.wav"; description = AudioClose3d; preload = true; + effect = MortarDryFireEffect; }; //---------------------------------------------------------------------------- @@ -740,8 +785,8 @@ datablock ShapeBaseImageData(MortarImage) stateSound[0] = MortarSwitchSound; stateName[1] = "ActivateReady"; - stateTransitionOnAmmo[1] = "Ready"; - stateTransitionOnNoAmmo[1] = "FirstLoad"; + stateTransitionOnLoaded[1] = "Ready"; + stateTransitionOnNoAmmo[1] = "NoAmmo"; stateName[2] = "Ready"; stateTransitionOnNoAmmo[2] = "NoAmmo"; @@ -775,50 +820,4 @@ datablock ShapeBaseImageData(MortarImage) stateSound[6] = MortarDryFireSound; stateTimeoutValue[6] = 1.5; stateTransitionOnTimeout[6] = "NoAmmo"; - - stateName[7] = "FirstLoad"; - stateTransitionOnAmmo[7] = "Ready"; }; - -function MortarImage::onUnmount(%this,%obj,%slot){ - parent::onUnmount(%this,%obj,%slot); - if(isEventPending(%obj.reloadDelaySch)) - cancel(%obj.reloadDelaySch); -} -function MortarImage::onMount(%this,%obj,%slot){ - - if(%obj.getClassName() !$= "Player") - return; - - if (%this.armthread $= "") - %obj.setArmThread(look); - else - %obj.setArmThread(%this.armThread); - - if(%obj.getMountedImage($WeaponSlot).ammo !$= ""){ - if (%obj.getInventory(%this.ammo)){ - %fireAndReloadTime = mFloor((%this.stateTimeoutValue[4] + %this.stateTimeoutValue[3]) * 1000); - if(%obj.lfireTime[%this.getName()] && (getSimTime() - %obj.lfireTime[%this.getName()]) < %fireAndReloadTime){ - if(isEventPending(%obj.reloadDelaySch)){ - cancel(%obj.reloadDelaySch); - } - %time = mFloor(%fireAndReloadTime - (getSimTime() - %obj.lfireTime[%this.getName()])); - %obj.reloadDelaySch = schedule(%time, 0, "ammoStateDelay", %obj, %slot, true); - } - else{ - %obj.setImageAmmo(%slot,true); - } - } - } - - %obj.client.setWeaponsHudActive(%this.item); - if(%obj.getMountedImage($WeaponSlot).ammo !$= "") - %obj.client.setAmmoHudCount(%obj.getInventory(%this.ammo)); - else - %obj.client.setAmmoHudCount(-1); -} - -function ammoStateDelay(%obj, %slot, %state){ - if(isObject(%obj) && %obj.getState() !$= "Dead") - %obj.setImageAmmo(%slot, %state); -} \ No newline at end of file diff --git a/README.md b/README.md index 568c238..a7e3d5f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Tribes 2](https://media.discordapp.net/attachments/1160685717303861413/1160685718176280666/68747470733a2f2f63646e2e646973636f72646170702e636f6d2f6174746163686d656e74732f3532313739373031323031343735393937302f3637383436303530353539373134393231342f5461636f5365727665722e706e67.png?ex=671814cf&is=6716c34f&hm=7d071d3b2e221ad89b80de48f91e4ed17d548573c16ed512f3a03efaa719b605&) +![Tribes 2](https://playt2.com/images/avatar300.png) # TacoServer ## A Tribes 2 server with competitive features that is also open-source. @@ -45,19 +45,20 @@ Discord: [Tribes 2 Discord](https://playt2.com/discord) --- ### Important Gameplay Changes over stock classic - - OG blaster buffed for Heavy Armors - - No Vehicle Zone around flag is bigger 5 >> 15 - - Heavy Shield Nerfed (54 to block 1 DMG, is now 60) + - OG blaster buffed against Heavy Armors (Not Tournament Mode Only) - Max FOV 120 >> 138 (For Wide Screens) - - Item respawn time can be changed (default 30) - - Cloak Sound 50m >> 55m - - Bigger ground dust puffs (For cloak) 0.4 larger - - Sensor Jammer jam radius is buffed to jam cloaks 30 >> 45 - - Sensor Jammer can passively see cloaker's triangle - - Mortor reload rework (Player can throw, but must wait until reload time has passed) - - Tank Shield Nerf (135 to block 1 DMG, is now 142) - - Whiteout grenades are less seizurely (Due to spamming) 0.9 >> 0.78 - - All water viscosity follows a global preset + - Item respawn time can be changed (Optional) + - All water viscosity follows a global preset (3) + - No Vehicle Zone around flag is bigger 5 >> 15 + - Heavy Shield Nerfed (54 to block 1 DMG, is now 60) + - Cloak Sound 50m >> 55m + - Bigger ground dust puffs (For cloak) 0.4 larger + - Sensor Jammer jam radius is buffed to jam cloaks 30 >> 45 + - Sensor Jammer can passively see cloaker's triangle + - Mortor reload rework (Player can throw, but must wait until reload time has passed) + - Tank Shield Nerf (135 to block 1 DMG, is now 142) + - Whiteout grenades are less seizurely (Due to spamming) 0.9 >> 0.78 + - Spawn fade-in effect ---