From 3d2152c5bbba19cdd93ce120cbd44e703e6bc076 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Tue, 21 Jul 2015 15:06:46 -0500 Subject: [PATCH 01/29] Fixed Vardison's Infinite Minion Summoning --- scripts/TWM2/Bosses/LordVardison.cs | 116 +++++++++++++++------------- 1 file changed, 63 insertions(+), 53 deletions(-) diff --git a/scripts/TWM2/Bosses/LordVardison.cs b/scripts/TWM2/Bosses/LordVardison.cs index 54c93da..166baf4 100644 --- a/scripts/TWM2/Bosses/LordVardison.cs +++ b/scripts/TWM2/Bosses/LordVardison.cs @@ -503,11 +503,11 @@ function ShadowOrb::onDestroyed(%this, %obj, %prevState) { if (%obj.isRemoved) { return; } + if(isObject($TWM2::VardisonManager.OrbSFX)) { + $TWM2::VardisonManager.OrbSFX.schedule(500, "delete"); + } %obj.isRemoved = true; Parent::onDestroyed(%this, %obj, %prevState); - if(isObject(%orb.sfx)) { - %obj.sfx.schedule(500, "delete"); - } %obj.schedule(500, "delete"); $TWM2::VardisonManager.orbDestroyed(); } @@ -725,15 +725,17 @@ function VardisonThink(%Boss) { //If we're not ready to dish out an attack, let's check what else we need to do... // Are we low on minions? if($TWM2::VardisonManager.minionCount < $TWM2::Vardison1_MaxMinions[%dLevel]) { - //How many players am I up against? - %pCount = $HostGamePlayerCount; - //How low is my health? - %percentage = mCeil((mFloor(%boss.getDamageLeft()*100) / mFloor(%boss.getMaxDamage()*100)) * 100); - %BackwardsHP = 100 - %percentage; - %chance = %BackwardsHP * %pCount * (%Boss.canSummonMinions ? 1 : 0); - //Using our test factor, determine if I need minions. - if(%chance <= getRandom(1, 100)) { - %needMinions = true; + if(%Boss.canSummonMinions) { + //How many players am I up against? + %pCount = $HostGamePlayerCount; + //How low is my health? + %percentage = mCeil((mFloor(%boss.getDamageLeft()*100) / mFloor(%boss.getMaxDamage()*100)) * 100); + %BackwardsHP = 100 - %percentage; + %chance = %BackwardsHP * %pCount; + //Using our test factor, determine if I need minions. + if(%chance <= getRandom(1, 100)) { + %needMinions = true; + } } } //Do I need to be moving towards the enemy? @@ -759,15 +761,17 @@ function VardisonThink(%Boss) { //If we're not ready to dish out an attack, let's check what else we need to do... // Are we low on minions? if($TWM2::VardisonManager.minionCount < $TWM2::Vardison2_MaxMinions[%dLevel]) { - //How many players am I up against? - %pCount = $HostGamePlayerCount; - //How low is my health? - %percentage = mCeil((mFloor(%boss.getDamageLeft()*100) / mFloor(%boss.getMaxDamage()*100)) * 100); - %BackwardsHP = 100 - %percentage; - %chance = %BackwardsHP * %pCount * (%Boss.canSummonMinions ? 1 : 0); - //Using our test factor, determine if I need minions. - if(%chance <= getRandom(1, 100)) { - %needMinions = true; + if(%Boss.canSummonMinions) { + //How many players am I up against? + %pCount = $HostGamePlayerCount; + //How low is my health? + %percentage = mCeil((mFloor(%boss.getDamageLeft()*100) / mFloor(%boss.getMaxDamage()*100)) * 100); + %BackwardsHP = 100 - %percentage; + %chance = %BackwardsHP * %pCount; + //Using our test factor, determine if I need minions. + if(%chance <= getRandom(1, 100)) { + %needMinions = true; + } } } //Phase 2 is stationary unless you're on Hard or WTF mode @@ -800,16 +804,18 @@ function VardisonThink(%Boss) { else { //If we're not ready to dish out an attack, let's check what else we need to do... // Are we low on minions? - if($TWM2::VardisonManager.minionCount < $TWM2::Vardison3_MaxMinions[%dLevel]) { - //How many players am I up against? - %pCount = $HostGamePlayerCount; - //How low is my health? - %percentage = mCeil((mFloor(%boss.getDamageLeft()*100) / mFloor(%boss.getMaxDamage()*100)) * 100); - %BackwardsHP = 100 - %percentage; - %chance = %BackwardsHP * %pCount * (%Boss.canSummonMinions ? 1 : 0); - //Using our test factor, determine if I need minions. - if(%chance <= getRandom(1, 100)) { - %needMinions = true; + if($TWM2::VardisonManager.minionCount < $TWM2::Vardison3_MaxMinions[%dLevel] && %boss.canSummonMinions) { + if(%Boss.canSummonMinions) { + //How many players am I up against? + %pCount = $HostGamePlayerCount; + //How low is my health? + %percentage = mCeil((mFloor(%boss.getDamageLeft()*100) / mFloor(%boss.getMaxDamage()*100)) * 100); + %BackwardsHP = 100 - %percentage; + %chance = %BackwardsHP * %pCount; + //Using our test factor, determine if I need minions. + if(%chance <= getRandom(1, 100)) { + %needMinions = true; + } } } //Do I need to be moving towards the enemy? @@ -980,24 +986,27 @@ function VardisonSummonOrb(%Boss) { } function VardisonSummonMinions(%Boss) { - %currentCount = $TWM2::VardisonManager.minionCount; - %dLevel = $TWM2::VardisonDifficulty; - %max = 0; - switch(%Boss.phase) { - case 1: - %max = $TWM2::Vardison1_MaxMinions[%dLevel]; - case 2: - %max = $TWM2::Vardison2_MaxMinions[%dLevel]; - case 3: - %max = $TWM2::Vardison3_MaxMinions[%dLevel]; + if(%Boss.canSummonMinions) { + %currentCount = $TWM2::VardisonManager.minionCount; + %dLevel = $TWM2::VardisonDifficulty; + %max = 0; + switch(%Boss.phase) { + case 1: + %max = $TWM2::Vardison1_MaxMinions[%dLevel]; + case 2: + %max = $TWM2::Vardison2_MaxMinions[%dLevel]; + case 3: + %max = $TWM2::Vardison3_MaxMinions[%dLevel]; + } + %factor = %dLevel / 4; + %Low = 1; + %High = mCeil((%max - %currentCount) * %factor); + for(%i = 0; %i < getRandom(%Low, %High); %i++) { + VardisonDoMinionSummon(%Boss); + } + %Boss.canSummonMinions = false; + $TWM2::VardisonManager.schedule($TWM2::Vardison_MinionCooldown[%dLevel] * 1000, cooldownOff, %Boss, "minions"); } - %Low = 1; - %High = %max - %currentCount; - for(%i = 0; %i < getRandom(%Low, %High); %i++) { - VardisonDoMinionSummon(%Boss); - } - %Boss.canSummonMinions = false; - $TWM2::VardisonManager.schedule($TWM2::Vardison_MinionCooldown[%dLevel] * 1000, cooldownOff, %Boss, "minions"); } function VardisonDoMinionSummon(%Boss) { @@ -1642,12 +1651,12 @@ function VardisonManager::summonOrb(%this, %boss) { setTargetName(%orb.target, addtaggedstring("\c7Shadow Rift")); //SFX - %orb.sfx = new ParticleEmissionDummy(){ + $TWM2::VardisonManager.OrbSFX = new ParticleEmissionDummy(){ position = %orb.getPosition(); dataBlock = "defaultEmissionDummy"; emitter = "ShadowOrbEmitter"; }; - MissionCleanup.add(%orb.sfx); + MissionCleanup.add($TWM2::VardisonManager.OrbSFX); // %this.orbKillSched = %this.schedule($TWM2::Vardison_OrbKillTime, orbKill, %boss, %orb); } @@ -1657,10 +1666,11 @@ function VardisonManager::orbKill(%this, %boss, %orb) { %cl = ClientGroup.getObject(%i); if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { //Bye Bye :) + %cl.player.rapierShield = false; %cl.player.setInvincible(false); %cl.player.damage(%boss, %cl.player.getPosition(), 10000, $DamageType::ShadowOrb); %cl.player.blowup(); - MessageAll('msgDeath', "\c2"@%cl.player.namebase@" has been annihilated by the Shadow Rift."); + MessageAll('msgDeath', "\c2"@%cl.namebase@" has been annihilated by the Shadow Rift."); //If Vardison Restores HP from rift kills, do that now :P if($TWM2::Vardison_OrbRegenHP[$TWM2::VardisonDifficulty]) { %boss.setDamageLevel(%boss.getDamageLevel() - 0.35); @@ -1674,8 +1684,8 @@ function VardisonManager::orbKill(%this, %boss, %orb) { }; %wipeEmit.schedule(500, "delete"); //Delete the orb & it's effects - if(isObject(%orb.sfx)) { - %obj.sfx.schedule(500, "delete"); + if(isObject($TWM2::VardisonManager.OrbSFX)) { + $TWM2::VardisonManager.OrbSFX.schedule(500, "delete"); } %orb.schedule(500, "delete"); if(isObject(%this.orbFire)) { From 26600ca02ed83eb34e5438441d36c10fec46dac3 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Tue, 21 Jul 2015 15:12:50 -0500 Subject: [PATCH 02/29] Vardison's Shadow Rift is now Killable --- scripts/TWM2/Bosses/LordVardison.cs | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/scripts/TWM2/Bosses/LordVardison.cs b/scripts/TWM2/Bosses/LordVardison.cs index 166baf4..a028c1b 100644 --- a/scripts/TWM2/Bosses/LordVardison.cs +++ b/scripts/TWM2/Bosses/LordVardison.cs @@ -1730,3 +1730,45 @@ function VardisonManager::cooldownOff(%this, %Boss, %type) { %Boss.busy = false; } } + +function ShadowOrb::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType) { + if(%sourceObject && %targetObject.isEnabled()) { + if(%sourceObject.client) { + %targetObject.lastDamagedBy = %sourceObject.client; + %targetObject.lastDamagedByTeam = %sourceObject.client.team; + %targetObject.damageTimeMS = GetSimTime(); + } + else { + %targetObject.lastDamagedBy = %sourceObject; + %targetObject.lastDamagedByTeam = %sourceObject.team; + %targetObject.damageTimeMS = GetSimTime(); + } + } + if (%data.isShielded) { + %amount = %data.checkShields(%targetObject, %position, %amount, %damageType); + } + %damageScale = %data.damageScale[%damageType]; + if(%damageScale !$= "") { + %amount *= %damageScale; + } + if (!$TeamDamage && !%targetObject.getDataBlock().deployedObject) { + if(isObject(%sourceObject)) { + if(%sourceObject.getDataBlock().catagory $= "Vehicles") { + %attackerTeam = getVehicleAttackerTeam(%sourceObject); + } + else { + %attackerTeam = %sourceObject.team; + } + } + if ((%targetObject.getTarget() != -1) && isTargetFriendly(%targetObject.getTarget(), %attackerTeam)) { + %curDamage = %targetObject.getDamageLevel(); + %availableDamage = %targetObject.getDataBlock().disabledLevel - %curDamage - 0.05; + if (%amount > %availableDamage) { + %amount = %availableDamage; + } + } + } + if (%amount > 0) { + %targetObject.applyDamage(%amount); + } +} From d746dd443e45e266ccf7bf68989e300c65ecb333 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Tue, 21 Jul 2015 15:28:05 -0500 Subject: [PATCH 03/29] Minor Bug Fixes --- scripts/TWM2/Bosses/LordVardison.cs | 11 +++++++++++ scripts/TWM2/Zombie/MiscZombieFunctions.cs | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/TWM2/Bosses/LordVardison.cs b/scripts/TWM2/Bosses/LordVardison.cs index a028c1b..eb0a4b7 100644 --- a/scripts/TWM2/Bosses/LordVardison.cs +++ b/scripts/TWM2/Bosses/LordVardison.cs @@ -503,6 +503,9 @@ function ShadowOrb::onDestroyed(%this, %obj, %prevState) { if (%obj.isRemoved) { return; } + if(isObject(%obj.waypoint)) { + %obj.waypoint.schedule(500, "delete"); + } if(isObject($TWM2::VardisonManager.OrbSFX)) { $TWM2::VardisonManager.OrbSFX.schedule(500, "delete"); } @@ -1650,6 +1653,13 @@ function VardisonManager::summonOrb(%this, %boss) { setTargetSensorGroup(%orb.target, 30); setTargetName(%orb.target, addtaggedstring("\c7Shadow Rift")); + %orb.waypoint = new WayPoint() { + position = %orb.getPosition(); + dataBlock = "WayPointMarker"; + team = %boss.Team; + name = "Shadow Rift"; + }; + //SFX $TWM2::VardisonManager.OrbSFX = new ParticleEmissionDummy(){ position = %orb.getPosition(); @@ -1705,6 +1715,7 @@ function VardisonManager::orbDestroyed(%this) { %boss = %this.Vardison; %boss.rapierShield = false; %boss.busy = false; //<-- let think() resume... + MessageAll('msgDeath', "\c2The Shadow Rift has been Shattered..."); } function VardisonManager::cooldownOff(%this, %Boss, %type) { diff --git a/scripts/TWM2/Zombie/MiscZombieFunctions.cs b/scripts/TWM2/Zombie/MiscZombieFunctions.cs index 7f73f9a..5c17828 100644 --- a/scripts/TWM2/Zombie/MiscZombieFunctions.cs +++ b/scripts/TWM2/Zombie/MiscZombieFunctions.cs @@ -182,7 +182,12 @@ function canAttackPlayer(%client) { } function ZgetFacingDirection(%zombie,%closestClient,%pos){ - %clpos = %closestClient.getPosition(); + if(isObject(%closestClient)) { + %clpos = %closestClient.getPosition(); + } + else { + %clpos = RMPG(); + } %vector = vectorNormalize(vectorSub(%clpos, %pos)); %v1 = getword(%vector, 0); %v2 = getword(%vector, 1); From d69404f3aa3b3f56ae0dc31d6b6f803af69cb487 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Tue, 21 Jul 2015 15:40:30 -0500 Subject: [PATCH 04/29] More Vardison Adjustments Balanced the Shadow Rift's HP, fixed the WP bug, and changed the model to be "larger" to make it easier to shoot. --- scripts/TWM2/Bosses/LordVardison.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/TWM2/Bosses/LordVardison.cs b/scripts/TWM2/Bosses/LordVardison.cs index eb0a4b7..c0bc1b1 100644 --- a/scripts/TWM2/Bosses/LordVardison.cs +++ b/scripts/TWM2/Bosses/LordVardison.cs @@ -468,11 +468,11 @@ datablock PlayerData(VardisonStageThreeArmor) : LightMaleHumanArmor { }; datablock StaticShapeData(ShadowOrb) : StaticShapeDamageProfile { - className = "logoprojector"; - shapeFile = "pack_deploy_sensor_motion.dts"; + className = "Generator"; + shapeFile = "station_generator_large.dts"; - maxDamage = 10.0; - destroyedLevel = 10.0; + maxDamage = 2.0; + destroyedLevel = 2.0; disabledLevel = 0.3; isShielded = false; @@ -1660,6 +1660,8 @@ function VardisonManager::summonOrb(%this, %boss) { name = "Shadow Rift"; }; + %orb.startfade(1, 0, true); + //SFX $TWM2::VardisonManager.OrbSFX = new ParticleEmissionDummy(){ position = %orb.getPosition(); @@ -1694,6 +1696,9 @@ function VardisonManager::orbKill(%this, %boss, %orb) { }; %wipeEmit.schedule(500, "delete"); //Delete the orb & it's effects + if(isObject(%obj.waypoint)) { + %obj.waypoint.schedule(500, "delete"); + } if(isObject($TWM2::VardisonManager.OrbSFX)) { $TWM2::VardisonManager.OrbSFX.schedule(500, "delete"); } From f25a53d74babc60f6b12cc2e0e55ccdf29aea6e1 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Tue, 20 Jun 2017 13:44:29 -0500 Subject: [PATCH 05/29] 3.9.1 Update Current work here... --- README.md | 60 +- TWM2.tsdev | Bin 53823 -> 0 bytes scripts/DominationGame.cs | 4 +- scripts/HelljumpGame.cs | 13 +- scripts/HordeGame.cs | 102 +- scripts/InfectionGame.cs | 2 +- scripts/RankStuff.cs | 9 +- scripts/SabotageGame.cs | 12 +- scripts/TWM2/ArmorFunctions.cs | 2 +- scripts/TWM2/Bosses/ColonelWindshear.cs | 18 +- scripts/TWM2/Bosses/GeneralVegenor.cs | 8 +- scripts/TWM2/Bosses/GhostOfFire.cs | 12 +- scripts/TWM2/Bosses/GhostOfLightning.cs | 24 +- scripts/TWM2/Bosses/LordRog.cs | 12 +- scripts/TWM2/Bosses/LordVardison.cs | 52 +- scripts/TWM2/Bosses/LordYvex.cs | 4 +- scripts/TWM2/Bosses/LordraniusTrebor.cs | 2 +- scripts/TWM2/Bosses/MajorInsignia.cs | 32 +- scripts/TWM2/Bosses/ShadeLord.cs | 960 +++++++++---------- scripts/TWM2/ChatCommands/Admin.cs | 27 +- scripts/TWM2/ChatCommands/DevAndHost.cs | 33 +- scripts/TWM2/ChatCommands/Public.cs | 164 ++-- scripts/TWM2/ChatCommands/SuperAdmin.cs | 38 +- scripts/TWM2/ExteriorFunctioning/cmdArmor.cs | 38 + scripts/TWM2/LoadMod.cs | 6 +- scripts/TWM2/Missions/EnemyAc130Above.cs | 4 +- scripts/TWM2/Missions/Invasion.cs | 2 +- scripts/TWM2/Missions/MissionCore.cs | 9 +- scripts/TWM2/Missions/RainDown.cs | 2 +- scripts/TWM2/Missions/Surrounded.cs | 2 +- scripts/TWM2/Missions/Surrounded2.cs | 2 +- scripts/TWM2/PGDConnect/ServerInteraction.cs | 60 +- scripts/TWM2/PGDConnect/UniversalRanks.cs | 4 +- scripts/TWM2/Systems/AdvancedRankSystem.cs | 156 ++- scripts/TWM2/Systems/BossSystem.cs | 105 +- scripts/TWM2/Systems/DChalg.cs | 5 +- scripts/TWM2/Systems/MainControl.cs | 412 ++++---- scripts/TWM2/Systems/Store.cs | 2 +- scripts/TWM2/Systems/Weather.cs | 6 +- scripts/TWM2/Systems/scoremenucmds.cs | 36 +- scripts/TWM2/Zombie/MiscZombieFunctions.cs | 4 +- scripts/TWM2/Zombie/PlayerZombieAttacks.cs | 6 +- scripts/TWM2/Zombie/ZombieCreation.cs | 17 - scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs | 22 +- scripts/TWM2/Zombie/ZombieTypes/Summoner.cs | 2 +- scripts/TWM2/loadMenu.cs | 6 +- scripts/WartowerGame.cs | 2 +- scripts/defaultGame.cs | 106 +- scripts/inventoryHud.cs | 4 +- scripts/libraries.cs | 7 +- scripts/packs/spawnpointpack.cs | 243 ++--- scripts/server.cs | 720 +++++--------- scripts/vehicles/vehicle_strikeFighter.cs | 2 +- scripts/weapons/Equipment/SWBeaconer.cs | 10 +- serverControl.cs | 36 +- 55 files changed, 1617 insertions(+), 2011 deletions(-) delete mode 100644 TWM2.tsdev create mode 100644 scripts/TWM2/ExteriorFunctioning/cmdArmor.cs diff --git a/README.md b/README.md index e9ae5d4..61405e4 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,9 @@ Total Warfare Mod 2 for Tribes 2, Conversion mod built on a base mix of Construc Web Sites/Pages: * https://github.com/PhantomGamesDevelopment/TWM2/ : Official Git Repostitory -* http://www.phantomdev.net - http://www.tacticaluprising.phantomdev.net - OFFICIAL SITES -* http://www.moddb.com/mods/total-warfare-mod-2-advanced-warfare -* http://www.moddb.com/groups/twm-development-team +* http://www.phantomdev.net : Offical Website -Current Version: 3.9 (alpha) +Current Version: 3.91 {Development} Credits: * Phantom139 (Lead Coder / Mod Developer, Official Host) @@ -45,8 +43,44 @@ start up the dedicated server. Join it, once in game, type ListGUIDS(); in the s to obtain your GUID. Then modify the line: $TWM2::HostGUID = "SetMeUp";, to match your GUID. MOD DEVELOPMENT LOG: +3.9 -> 3.91 (In Progress): +* Lib'd the TWM2 MainControl file to remove some more functions +* Another boss balancing pass +* Addressed the bug that would allow Vardison 2.0 to summon infinite minions +* Addressed the bug with Vardison 2.0 that made his Shadow Rift invincible +* Removed two un-used game objects that were never completed, the Medal Seal and the UAV Control Panel +* Removed a few erraneous exec calls to non-existent files in the mod load script + 3.8 -> 3.9: -* Community Led Version (Add Changes From GitHub here: https://github.com/PhantomGamesDevelopment/TWM2/) +* Progression System Adjustments + * Daily EXP Cap removed from the mod + * EXP Gain for PvP has been increased (5 -> 15) + * Altered EXP gain rates from all zombies based on collected mod data +* Redesigned Lord Vardison to remove crashing problems + * Still three phases to defeat, but all phases have been adjusted + * Balanced to be easier, but harder... + * Four difficulty options that can be set by a global variable +* Removed Darch Archmage Vardison (Was even more so prone to crashes) +* Huge Balancing Pass on Bosses, this primarily focused on boss health, boss speed, and attack damage + * Shade Lord: + * Reduced Total HP + * Reduced Boss Speed + * Increased Damage Taken by Fire Weapons + * Altered functioning of Shades (Enjoy your new death :P) + * Colonel Windshear: + * Addressed his "Attitude" Problem +* Lib'd the Shade Lord down to three functions, recovering ~40 more functions +* Bosses now track kills, enjoy seeing how "Inefficient" you are ;) +* Fixed a few issues in the PGD Connect system +* Added a TCPConnectionList instance to allow for multiple downloads to occur at once +* Depricated a few unused modules and re-coded a few instances that used these old modules +* Depricated a good amount of the P-Con External Library +* Added two new extremely challenging Missions (Surrounded 2.0, and Invasion) +* Un-Did the change in 3.7 that caused boss exp rewards to be based upon player input to the fight, now there is a hard 5% damage requirement to earn boss EXP. +* Adjusted the in-game PGD Connect daily challenge system to accept the new format, still need to work out the server-side end of this system. +* Fixed some zombie naming issues +* Addressed the strike fighter chaingun bug +* Congealed all of the help list commands into /help 3.7 -> 3.8: * Addressed a problem in the TCPQueryList that would cause some transfers to deadlock and never complete @@ -115,11 +149,11 @@ MOD DEVELOPMENT LOG: * Updated all PGD Services to point to the new domain. 3.1 -> 3.2: -* Undoccumented +* Undocmented 3.0 -> 3.1: * Added the Sandstorm MRLS Tank -* A Few fixes addressed +* A Few undocmented fixes addressed 2.9 -> 3.0: * Modified the PGD Connect Algorith to be a little less required, less conflicts should occur. @@ -130,14 +164,14 @@ MOD DEVELOPMENT LOG: - Added The Wave Highlight System - Made it less challenging to get to wave 50. * Added The Martyrdom Perk -* Fixed a bug that allowed admins to get killstreaks with /giveGun +* Fixed a bug that allowed naughty admins to get killstreaks with /giveGun * Drastically increased the Centaur Artillery Strike Damage 2.8 -> 2.9: * Fixed a console spam issue with "Commander Stormrider" * Removed 2 un-used medals * Fixed sniper rifles showing in the inventory list when they are disabled -* Added 1 reload weapons +* Added 1 shot reload style weapons - Added the Model 1887 Shotgun (Requires Instructive Colonel) - See the new shotgun (Model 1887) or the SA2400 for examples * Ion Progression removed in Sabotage, Domination, and Wartower game modes @@ -230,14 +264,14 @@ MOD DEVELOPMENT LOG: * Added restrictions to the /VoteBoss Command - 1 Boss Vote per hour (even if it fails) - Hosts may disable the usage of the command -* BOSS: Lordranius Trebor's Official EXP Reward Cut in Half to 25000. +* BOSS: Lordranius Trevor's Official EXP Reward Cut in Half to 25000. * Devs/Hosts can now disable chat commands * Fixed some of the Spelling errors in the death messages. * Top Ranks are now only downloaded from PGD * Hosts can disable boss vote / change map votes 2.4 -> 2.5: -* Scenarios. +* Scenarios (AKA Missions). * Gravity Weapons Removed * Patched a few UE Causing aspects with Lord Vardison * Added The Shadow Armor @@ -419,9 +453,9 @@ MOD DEVELOPMENT LOG: * PRTCLR-995 Weapon * Weapon Challenge System Upgrade * KillTrac System Updates -* BOSS: Lordranius Trebor Added +* BOSS: Lordranius Trevor Added * Fix: Fixed Major Insignia Name, it would display General Vegenor instead of Major Insignia. -* Lobby Options such as kick.ban can now be perfomed on players that are loading +* Lobby Options such as kick and ban can now be perfomed on players that are loading * Admin options now display the name of the admin instead of "The Admin" (Like in TWM 1) * Some new chat commands diff --git a/TWM2.tsdev b/TWM2.tsdev deleted file mode 100644 index 8f3f6e5a305a8504a3e579a7b076a766333093d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53823 zcmbuI2Y3@l*ZncYSnkF^=y8CAZfYnABp745!Po{8aAJfl+X7i~BpKuM-h1!8_uhN& zz4zXG@A;oIt2GB``7>%_Cr+ACI%WEl>0?XE+e7j8Xkb=2&>oNaLt{&-+Si4G4T}Sv zwUG^h@T_oqDAa?7`NpTTyeb-5A83g8LD91rdD){!^M56^k?0=n0dzFJd{s%JNy*5R zzDla*tt^>1s-&c(B_40vVf^@xj*il};Ti)QOB*7s<55>rI;XT`W^A3mA?BYQ4#Zmn z(S}$l#7@b+T7t0>{J*~>7KjG@q2Qi@#*%fxus_;a5?RNED=jH03&jIbe;l8yS~1@c3JiE6%}(UR@SeqsIFPKZ0S}g ztg2qNsG_{Ke%`_*6;j?erE$%|`Af@cS5#Nz%tJ3rg0Xo0%1POCgVBV{8 zovF=wW@HVj>5Rn#t)hEOtTdd6ZzZYYR{1z+uAu_umbjj?Fke9MO^GA`{ z10lC&PJR8-irUJG>hc<2CQ5ugS(k-STpNk|LnW*H(I$U1P*NFbESbaxG);zuLy={( zC`Zb>`0^mLefcaXKs0(Ng9~m-`$CMs|3=||h0+8=jfMFoR zAcnyVLm0MZC}G%!0UJaY-!O*Z4BIkn$H2aQBN?~^zR?V07{)S;V<=@9&oF^uB7@oJ zCR0se*q&i3!!(BJ3^N#ZVAzpiCc`X-ofvjzn9WeeFo&U>VJ<@j!#sxh3=0?*GAv?P z%&>%^l3^*sGKMOK3D;QQXtYX-OVONIL3~Lzb78D5a4f@d497E^z;GhNNem}5 zoWgJ_!)XksGn~P2Cc{|_XEU6`a4y4n4Cgakz;GeMMGO}+T*7cE!(|MYGhD%NCBsz= zS2JA0a4o}i4A(Qa4*As4EHlU!0;f$ zLktfyJi_oO!($AOGd#iYB*Rk-PcuBj@GQe~49_#X!0;l&OAIeFyu$D*!)pw$GrYm@ zCc|3{Z!^5Z@Gir94DU01!0;i%M+_e`e8TW4!)FYiGkn4DCBs(?Uo(8e@GZl44Bs>S z!0;o(PYgdZ{KD`n!*2|~GyK8uC&OP1e>42U@GrxE3|%r1a18I_>&k#5c^4m#>pq_0 z`7#-LGGsCM7_u317;+i%81fkk7z!DR7-}VgL zvHPYmOlO$Eumi)63^N&KG3>;!GsA3#GKM(}8J03EW2jn+8zGgy7f!z*`8W*2Nm4!M1p;4%bc50RByHXI33td>gsCIuJ7YBjpOq z+=MKztRdJ~?hl6}VY+srXxpS~N5J0}3CHS|#ajZ=x|F8o>!tBtG~S!W1H^bAWLag6 ztwH0tFS6lD&)QX$lj_P_{PFTgYpWmE40Y1dY<#rbpOy#Ea-diqNK3z19)zq{(o)LJ zMn!`|XmBVE28qF8$oiBuZuEy60*%%F@P@=$K0fr}s2ZDeGYja{a@iEZY@_VwNcM9S z`xz|#9E~i$Y)Q?ks+w@HEfD2eJqBeXk{!retqwNf>ZdNXvH5k-`#5?ZPwye(eFCx^ ze`{-`&EK$r#wVg+VA7by*aVUd%+HTzC)4Z{nr$s+ry}c97Hy40=lWay&4G%hCR`B3 zXnPu}rYCL93aQwHYuI2UI6$bi);G00L3L~pUczA>}O!)y9lj) z7b9d072ivcWv}yxc_G6Ubt!Uehi%b7Q>-poZgz9DxSSSO&|;WaTxl#qeq3UjZR0BB z!;;G++eYoA`R(}Ot+NfyE|H$s(DPb)4j0eskmZ@CO`%A{*j|sK!AVR@i5jVTlrg3(AeSrNu$bLpjKMx_xn-ht}k~@osQIx(n zlbuCMOS^qOO5exmJ4$>XN0vEf*-Eb2C!mKU7h5)f%0MU(sB_ww11(tJQ?z=TR-?u0 z8Du@mr_kwH$Zfn%6??P?+gfp?t252a;hbjA)9eMBjS;gKS=4|7WzELK9Ta%>g02R3OL~uH@6)VQ%sxO?P>z+;9__63?-?j<4aPD*MB#waI!KOE z#_H1Q&4~_7d>_;A6Z(x8zfY0nG_+vEtGV4A{XRp1>o_f+yryzKK6SF4ISb+k{(_!g z(sP1%euXTXN6a}9v)B0=x$ApQIbJ23+3oLJI(|pTiQ@P@vI6vOkHP%5e?VdX*H}-s&!WXtvG5_wFE=f#c<|uDWTULF986N{ z>;Z+N=)OE!O%tnpWJON%nm{~`4bQk0pm=2R+f3a^OvkR)_NyqOe=qt^7yn{p9LS4= z1EEzM<82A}%^{{YDn_OCz&#*NX_V&X@&cZ|zU*Qvb}>V`=!dK)81tRBTvTPH%0`qqn8~cC?=<_9Kw>0uXkFv6r_8+Rff{B+Apz zm8#~?O|-?G;p1sL zfwnt|?L=e)+zhw#0FDT_EkO54sK*J#=38WQc_-6&3XOLb1zjM`7nrMe^KM#XjaRPC`{2k^JV-d=fjoJPjQ(D_!cTpaI1=9t@nH2vB}&P#18yPxOCg0G2w3&pP)Sz%)U10$7z zSPU10X7O53ic=vOW=OBM3%H(!8)&#l3`33~w&;pYevZHx!&a2Kmebil8w07W>_!@) zZ5wSDi|roBiU>G&RAs}DqS$rVNcyHUv&L~6x6^ou7;i+D-{|}_WgpmqGWWNWQfoha zC(ZVxS*4img)GN?b+R`KaH?TfWb(qr+U!f4{b;jPZ1zWnTd}Rq=*$7gMkhVYuVry(|DN}AA&5`G+YviHgXF;6eXqqqj`d{9URUMj$j8> z(!r6)@=OOSLb#dF9*#nh>*%}1#TUqSaSXdSmR&5DE{;QnFRU#T>EvLU*}RTNS;`mY zuC;6WM4FvMvuZIr85!P+fOohn z{LLYA$T$;aTiA!Dwzm7wvuS<~&1=Q{Tx3|O8_U9t3nI=C#Ca%6KMUhUfE`^+X>Nzu zE};2^G+!a+7a8-W#Q2U`n-`aTQ5>tdEnJc6oN{`a+SKl|uA=kRbY3OS*C6ZJ7>qU0@>(RWJ&PRw6C){!R(2TW zdb-^}w_U{TMr1{EBN({fLPEpMgeu3~u`vYw5JF`3(uY?b_l zC3aCxrQI>zNt3&1vRX{;MwUG{iWBg%h5VrRAa@<(&AKaFSeI;J2K7Pv?xWfLG+QHP z574ZlF&M}A63re&?%IB2t(Ch@ujReivnbfkl6?Sz! z!S+wmVmGmP3R%9hXEbYv3-~n3T&D=mT1#zXSKhORAFVXsCTGxy9D=Y$$Sd*_JRj%|C+n;S`x4_qlzd^^f;`k=AyowN>HjsUI z=36NGA9k84klks%1K9U2LWWH8cZqd`2s zKvo!tHTc^CZIMQ91l%^hM5*g1?`#|Ct?btEHEqA4ZKK$Ji>y~*6UOP|OM>g7{%FuS zjC_Z3*H6sb!fwSs(DX-|2E_CyWCio^;RErOXr#j#=lvOl$~^$*qA;zoy(avX=D*Rr zNz8wzc~c0tu3Xo(f1uFy<;joOUe~6zx0kek(f@DyH;ey23IAA&%m3g1+uz;Z`giFD z{|tnT7V+Tq!Il<-yX4~k7QtV^xwvpbzZW=x4$j6{Eg5uZ{Szc2l+7Ot> zy9wMbvQXsO)239~Z!ViwIkZ|YR=LQEOzS3E$!3;^V$Zpyrcx{U;rx`ydK14>t?NH!4mv&Xzk2;bzqiEA6HlvZ{%@5$llRs4L3{;Lm z(f_b>O@ZvrbsW1WWfyx$7vqr?C0efxGzY@Yp>P6`0lHh*jdB|8rqeDab~BLmnjeT@KNSr&EQ>Z`PlaD#<_;*w zz>obgdYjlyb0%G9(KRlvJ0Z)T--6TAWli(&kR`vcol)kxdQMpZDJ|`%FQf4s8n=sa zIkMt}@e=-s!WiqM`&?AGPGJ;xcXQjtJa#dkU2K#t79h)?AN9B4YIQ**VvaEjQMQGX z_te(*Dno-tC00dG+pAyl>r_D;2Pfr<;v}x#Ho%Ku;)Ch*~c38 zv8VJ=$37PLqj+e#84p&j!nWPQK6XQS`nM_r8s6siDxsb|tYr^-Ne}*%9%{`IncMj~ zl)JZc>uQ_W?Yxn$0lMxju1zdz@$ZQnQC!?+q^{FlTVeM|LAGB{i+#jm1G0hzflz3D zduy9qZiG!tOWH4t@c?Un&wHRe<#Q%_Og6EfGe*}qUH22$ zc4WB=Fh~%PCESP-*P+H;XBTf1jXG(xzZmU_EVHHEtgXGE3zLTgr_{px5Z;&Y0Rr!b zEPp{eMq;BeS&sct=DOBTt+i$c((E9b9Vli8BkPY_8MySCYljb<3j}_ZhoIWEb<4HE zW&wMRa2UHfoLwCxT^)g}5O zjYfxx(dozvY~uyamwg5bU0ZZowY58oc4yP>FtIxaS!UvMo(t{TWSmk9pHKJ#!iNid zA+r31k+6HmbrH(8OKx{^D&m}lr?#~x;g`_*Qd%D&)|Vm6L349b#MN~<3S3`;$5$F! z(<^Cu6-|#6)2os7_xaq5po{8x)HhZQIk&t zB-`3Y0&b@5EwnvaY;Q$Yw5WCoP7(rhzr z=I_w_WHEmiS#HRES^pkNTzfTlo!wwRpwWjkIz@~=a*S}wDOZFaqr`LG9pXu8qJ{m? zpVIC#+MOzPpCilR^QD!6a67kwFHqn*9GGpuRd4TBeMPUY>2;cTeS<7}3B4lb$Mh|7 z*N@3qC9AE|_jLM!PN$30kI4G4X-y>57z{*RH@|*DRr>wrM5{WLFpu-X*!K(j`IY^g zA^rS@tT!p=mW8XE-%;Zl#W2gBxV@pZH%|bwlRw$XU+m;e>Ev&A5{fiO+MG88BT@P0 z{y~jv2jT2(w3hZ8{Ezlsy2Jh~vClx(Q*NAeMUsA^s@#=Hzh}}Nn6C$I&lX$0*j3DS zQGYnt9;=N8);Yhjo=O*q3rMB8y~6Rai)?mrj&zZO4BJbzF>wW)i`+GWX4bjO*=c1B z^J!Q>!*j*35Lp2Y@xmU)*qw8dA{4r=KGI!XO|5k?t$Wk@JhASBEQi*+ZVYVV@1!pZ zT)VJz+e9;K*^id}X?ea_4nUSwIdR&A3G^F?OgU=Tv_#@~dMj2Z4b5}vu<#8A;2VOF zae+8)jVz~fVsiYX1O=`QOil$7<0r0`cF1EWU5C;2LUA3AtY_tvGBbX%EfUvvl_V73nh;I@?#wFrB8ChYae|;p1H$;QY;h?!|I0dDy^BDJ+p5E4e^HXU)jpmn% z`E(Xl1{(b#bDl5*scW4YSG&a0$}a4VglE$4GVz;*EZ6we1pMatlbulF+M0~zGV=;B zwj^368k)BwVB?!j*D|_ZF0ONs6|~}BNqcMZ7+a1)*Z7&U%Svlx_f{1&ok!Cv#B@Hg zY%GE70v8~69c~=IWWBXoM61QLx>Br`Aj`sle!vXtR3dY&MAl?W$;Z zmDnvumfh++ZouuR8hP*J$xyP!9-V7xvVta8i^)o4_$Kh+83zz(vkE2Y-$e4uO*XXO z@2+%RP1kG0bq%tfmGh@eqG25p*P~GOgW?&^L=*EG3|Qapw5q4owPLlFR=BHZ)|nrP z>&vuOsE%RC%``Hv)6lGeW{otvPRs(x3Mzx)AfA^C1vzAg|+!AxJmlx zL{?nse2g00*~T~G+}_?373rrkc3nR!;JW=xS__iigtq zFgo8V&W9r_XpJ-mG0+)}Cmzr{0)?(8OvF6pR&yF-?>8UCK8|J|w@Dwzum~@P#GS`c zk43uq+po5r{W^~)egYkD7snHk^>$jOZImaW#BQF1yh0LL{5p={Zg8PVZt`T|%q7#p+TPwZ_^KyS>Yhx~@wS$1th3 zhny=&T}h*R#ONwyd6k{f4Xg0F$0ReLc{PeK@Ym{W=-A@jwRSA?T6$eauY1ModSpdQ z{cZkGt9zGl1BzW|@bXPKyH8JZy92$69o)@h&M1fBGKra%0GgN^c|!e zqLub`?L5Xl9%mm9Ngq!j%U*`@(3rDzJc%542kq98tg@TN({y=;E)R>#v&iz6wQ;(T z*j(q4%I8qzx{I7rX-`OAKqKFa2pNxv)l0|*MB3w<8()4I^{ykS>`XRK*j>u2?Cdpm z_Na9BIBFYy2@$Y(Mq;#6KYZ zxZocmD{R9&F%2#4$>)(jLaFN%(fQq{x3WL~PiXroZJ!X^&uCkP$3s(2Mm|UB z`3Y#FX6c|EH~W%3eZ`)hl%BpumQ@vqZZH=J-yn0Hr=?sVNF%#den+?O>GqVk{b1ah z6IYr)rn<=<#`$IvjqG>xGu?in+tcFqE3(|GAST+G>yMkuqTf)mx&4Z}p`$y0+ZWT~MX~6O ztS|b6g|ojei^uuOFPF0q>RdY&_d!7??CJSd?5H0*dPzF!kF1{?OZo8)K&|UMZgX9^ z8Qa+)b~c!uy)2y#L6+4f&q-~K%=K!wl-t#^4Go6U;1w|##-cX7E9MM74M*x;vr=I# zwqyGdw0Ko4Mk32kj1_W9Dz4E{D0AIjOs%zMV`w&(X0M6aIApn)Vk?eW1{%!0>{67Z zKWC!uu3V7aRZUuhp9AuLrkY3%dct= z#R63=c+kdNSWZWovh~YoQEF>DYP18*ccl57Vm=dDo@p+(!ZK%}Ncq_&2Fg;}+QF@z z={%dxZ;5jmvK-SIdsD8BIVezeW6r*oAJ1uLceiutSwYXY#d99Ayf(It#oL>j=sF)o z6aI%IP6}ne!-ec)5&L*Y`dG|9s&RZs4jnE*(dO4kN?W@|meP3{o!=GbDr7m;cm;KC zq{G}IUXFtFV}-q3bTzcsiZwK?rRjTOx&m3QnKwb!$V!yBZl<{F?5|@N8tqD>_r+*6 zi>m!?xG>~;U4!(0IGMG8J(=B&KD*QU1F^10mhZGQ&%@GxEy~irH|1nGm9m|zVR%?E=~s`%dDAPL#uaTfCWN0mLz7KIT59v)A{sPc56JDwx`hcYq32QSwRfHo;mG7 z+-7th;5!Y4uBA+?wo7>i?arj#H)3}di)zZ}PM%`E;i|~ubREjjb1!>BA__oTvhkqN1+iCKX znB0+Sawk&Pd0*0^F#`nXyV?F8TKp^)_af`#v@Ca~BML+-{cT*P`%vZjjjN69_woR( zAEfm!V*L=ZLZQrSzjS>Vr98bg9~~o~d>t6&*<8LyX!0mceif6)*gU0ieKl%hl zxNS_0F?xbVPtxc&F?xzXjcLA+57GI}BtEoy8a3%>^RAc4HO9V9{wzCsjvf6j9X*dM z-+}DR1}~rtTedSzPHLTfW%?yry-ce=#Of7f#WAzYD+4V-j8P>XD0>wZuJfdgPGu~y zI#Sx23BzFMd!7Do(Em^Ie-l}5O$(+d;Z0_)i?>kXI(0O^n#A33cRPEZ@g17JOVhu^ z^gU$xY#iyZhqL!l=2~7kTsYT|scr2Q{wbvHlK4${I-wH5g}UYlj9Cuz z+hqYeC}amcq=OrdjP$AiuXWdd9etdglm&K0fSKF+K!yl_>?C0#Ayf(x29p17?vRGm3Zi?98V>3 zpqjg^ZBXtyRdx>a&J$d9-sbkftYPe7ID7C(58EOu#PS5=?TrCUlI6T&w;f7d4-2H% z+ih(m4M)*1TMS1dD~h%GJHl;|U|61v%N&DZ*V#j2J)}3Y>tY;@OKF@V#^aG?$-Se@ z3CP^zG-eV!skJtfXfv5MxneT~Sz!!Qjt3hO??rHhZjVye7AAYWL<<~b(g6GZ#5DFW zojv494>OSEI{tJojRqQd`csG z(z%#!OXyZ4Zk5RL%%jFpdBR~Sid@&4DMw~LlPnGGp}C5-%W2z7Y^xpHXmA5wB5>{% z)u1TlXn{AOY^~kzt)SORdKHV;DrCKC+8Z#NO$_si^6A_dzujF>?)f>I`Q&4D-sW~C ztY!~u*h6pWp$=J2O*f-VFu+!#INru{*zd+OMU3AF=l%%d2U}o3AqcX68B+ zr7wHRFk(t`JCxW+^8n5Jig^>V!WhlLV_S1xHE%|#YZO#|StXH zYppTC7~ZC#b$_vLN0wK!YEHn9TUyTdx)DXL)h?^W^%HbAx4*(oH1DMO05RW_MX`=x zV$^vrq^`^A#Ew>~?VfQTQv1?qpcw6ktO(ClGzYk+Fk>^^0{2I;>!z(NY2x7MX>X5@ z2eOBQ*ux;{;b3I>cwhztUG}-OLr~@#pmCNrwT)fq!)SRpEeDI`5y*;bTLReAhC;ZV z&{&Qa?YP)SqQbRDPyOl?z#gCbG(3%lC1Q9wvLXP^LxI-u3>3Rw((p8} zmS@rOY+7z3mggYL!RrrpW~p;i%@W^EvVr|-&ZpT0G#e^r7dmFawvNOLp%>|9wt+Rf zgl3o0Y?zo`hAa=0l~uKL#)1uIuX{O)TzBeID(#27l2%vIYPeWk%_3*`f*Z;;NL?cc zw!&Im$M)CLVq3Ae0a>2YlBLF{$<9qi^#b~8e{xeHm5WjJ_m*5utNPXDcFod{sNxR+hr$1X-n z7xyFUZ@a)79{3>j&P;{;JP)9Ha@x4L)>S%ayL^aUKFlshNtcfxORhW|uiEg07CU}Ird^CYtD#IOV1pF-~X#_fPavWXpsc!qAz(rt{mJ%_9?(X`&r zSvlzWJW5?>Jn5dcp>=+d&M(nKVWueOi1P}HUBjdvYunO#zeexZ={-)o z-#|7{y!i)!{O!@QXdEX(0p}IMH_^a#A?WEvVQhbIv%h!PU#ax>F0x+IALhDgt8(6W zc@O2TL%ye*WK-+@0o^~O`*?Bx2w87&w=;;xO_ct=L1xz%SWInVP9wiX`IgpK zvZ;0dp6)-;eUiBUh|F%YE&h!WGX>L6DBaRFD-EslFLeHu&XdLYH)MU}o50P7U_+!W zG2rz(s$6%YJzqsiYum@4?Bg%?F-7|L8(F^e(b~3--}65xb6u8t%$;V|^*_3H=?T~E z#We$&{k6p~G3^F(T*Eq$BG zrq-Q*5XzTL_i5sugUqgTbKw;W1f9P#kc+AE`pG)Siq zz4c>n{n^_N(%S%J1=3p_$5C!f15xN2NcMD*XlH!~({~7ccNE{Pk=bv&12@a?7bs|5 zg7PhW09uB$cAN6;YK;|TURl0D9n z9!DW7TImecCnrD59F1b_*Wqbty~omf9KClE?^0xWi6uhc{;M;Twof}9Qbslv)L!QA$nIvcyE5r+7Q4e=d^1y8l;gQMoHCnn@|{qDi!D10t+cV@ zAG7IOM&CK&I|o?-m^h!?l8d2o6uK@r)2i)RbOr6^(XL$V<|8X!W&YX-Mhu*1h0O|I zfC|?or&-~0%T;M_2UHfZkHzd`uJo}4SucliKbn?ViSqRC)Z5H{r_1PEMdu1}UXCog z!}(h&{E1d0cU=@FYwRkhrO67K%oCH9$coss*4$?;$D0=PT7_cQHJqn`wcM4Kt7$o3 zEY~2*Ud1V0ot>e@SfMVAP zowo~DWBc4IIKi7n5TcyFiXy9|E zO~wSuiLR@qc7N37rMz&EXi+0A4kT|!#}e+fQhP9JiPI^(o9ZD&Y}KCOdgip0M;w^*QV=aX&a=x=!lOGp79G23YzADLo&hna*=k34l*$ zm@V=`nkCjOkbsn5gz_xerzD^zsk{W0-T7!|qM}(UE~8uG23TUTTcqv^)cI=Uk3OKU zpwwJxC}+GrL9Lg%t5KKfjCCeD+aOifqACk#ve=D<`Ef&1ah+4K38Oy&R8EQ6Ud9mPDHc1NN;6MyJA3lG*!{#FAhy4X9iU?m5qp@}Au4vLjy+23F=9um z*ikz61hFTH9j9W)>)6x8o*{O!ik+fk&k=i`*cmEzrjETx>?LC7s@Qot_6o6AiCv^( z7wg#T#NHrwxr$w(V{Z|Ao7gofcCC)ROYA*jH>%i8I`#pv4~gBTVz=wq$HYD%cDIV% zqhp^D`<&PVD)yj`eM#&qVvnlWV>)7AK{vr0UihZJE{}Jnw1?&qI`%=fcg79@C_N|J2 zr(->c@vnww{G?((>sS^sAF<=BwA(l(*9~Jvo$MT645bKIlUC-evqZ>+JMJCpLlDbQPPS zW0QzYCN@jOcG9u!iA^OoN5#r@Y&x+S#OABm0v+3t*i2$eRIF0Rb|SVjvE?dOtz%`x z<`7${Vykp)F0l$?YgDXG$L14TKy0mw`E_g&vBks!D%PZ9mBf}3Td!gpbgYWla$*q` zYtykBVztELD#kx(qwMfj5?e*AQ^okFYZPo(VylVmt7809H40WoY&T*Dso23fR!?j# zvBOo2e_lrEZ5^=&V#lZ$|747U@lQkhnuwjKVkhZX3$Y-v(^Twq9os-GMC@!8J4eUD z#3IBlP_YYjY!6~lVwbAeWjYoo)=rFnX~laqy;{dQh;1UqKdIuyZqTtkiS0#TO7 z-Kt~z5Zjj+|4@n-yGzIRCw2fa{z()scE64tMC@Q<{Cg)}>=7M1l-Oa!_%}|x82{*r zvP~XA>_}q#J0@O?f7nF9jwW^tv6obgf3!rwjw5zFG5#SEZ*Tm|BnoySv6G1LkBfLQ z{QJDu1W#6D9o{*e#`JB!%a#P~NqybH-c0-|8&5<8C=|Eh-< z@s4P6YGM(VK0_}QU$w`*j2=O zs92_sT|?|zV%aK|qhr?-yMb7NiWTbEO~h^{)?3B;=-92qZX?!T#Rllu9mMV=Hblj? z*0H;Z-9v1ciVfGX`-t67Y@~{f(y<4LJw$Arik0fvBg7shHc7=M>)7MOo**_&#ir}n zQ^cMoHdDoB>DaTxo+DPKVsmut1!6A}o2O#)b?jwguMk_TVoP-FHDa$5t5UJ$I`$^9 zw}`D!v6VXZ4zYKMtyZx$I`%%X4~W&P*jgR?h}g%(8dWTyW1kZHj95^`*6Y|8#J(gJ zR)3b1z9+Ux#X5EDM`Aw_+egLr)v;fQ{Ys2~Z@{}(K1j!YC-w)i z!&K~W9s7&e-^BPA0=&H)qhtRP`;Qp^27nhkQO7cTz`7!2aK?WxcAAcLC)R@)XZH7E zXX{u`Vp+t_SFsCpESp#kG0xZT?d?(>%OjRgj5G3kv8!~fkXR8h&cyG)Up1=1`y-i`CjZk9UDY!FtLYJ>|q_-npg=j&V29fjZ@(( z=Osgl4I{>>?7bN0wpXxiiET%W6V-b$&RnlxBZ-Y7#>wct7-y$furb8O65}-UUX1h3 zD_AM9@x(Z(ycgpv^9nYR*d$_~su*XJSFkC>wkO7U;=R3b;&=s{Mr=AUP73eEI7_^O z?LcftVw~gMi*eF-1)D`|Ct{qn-HUM=cLkeGtc)0EWA|cRFbkQ2l@pswtUDTbu^u`$ zkJx--J{8N>v4zAI5zAMx0v%gItddxg8=_+?h^-_x zRK;z&b5<67I4%4xdiJd}>lR`G#sTG@+Tr(;(WyM`DiO!i_o>)3U~t|!JB zk-gX*I(8$mn}~6?V=s2Ej@?4+R$`pR*o$#mW90c2#uzQK!M~t%$dofN!tY8lidyp9C5B6f5P*}kpCiVz1P8RINID4>yJx1(tV(+UM zXAM@cCy6~pjFSL+d*iIY3ib@KXNhq}UoXZfeiiI_VlNQm)V*GebNMRROT=C##yNVu z7$@yjuvdw_MvRm2dNIz*t6*;sdy^Pv+Vx_bdRM{TCiV`oZkTGui*-k-g1txVePUTE z=F_nciG4&YPsQ?e>=R<266>X6#X9ymu`h^irDFYb>?>kl6C0#rgLUj%V&4(lM#YBe z*bl^hB(|N3jnJ{5iTy%sjEarbvEPXOPHcjTP1LbJiTy=vdlj3iWB(BQm)H&}wxf=5 zGxTL3WbCYBvvsT+vF^m?s#t}NWfJR2Y@v!R(lH;gY+_4QY?+Sb63Zi2qhhr>RzR$f z*e)uztB&;|R!nR+7293M`Vi|&Y@LcV=vY5u{fRZJSc{GgBsPdxNX1%pYzVQfiS40c zQ61Zc*id2{RjfnDh7;SC*j_5Ow~mb!>D#lqumEG%TVq=IMqGFsNRKdm(D9 ziOnK*k&0ccV>=U@P3&?NyF$n25GyCf*)j1i9vwuG|1z%Cu?k}Ih;jByFLslTEg-g# z80Wk6Vz=wqVq!~(agIwbc8`uNCAN$h=dbi)oX}GF0+ti2CdL^ny%?vkRIplND~LUz zVw|v2!B!F5h1jzy#_1;&Y&Eep#9mS{PBp1uyAj)+*y}3B86*{KEipf_cT|jXL@HPV zu|{H??h*f{ZCsrHQNfysH521Rj$Vv2J1SU^*m`1|q|u9U)*_}oq z5gVpr!*%Q!V#g92sbZsa?08})5F4jrr8;&Jv6G2SQnAT8b}F&ch)q+m={j}>u``Ly zRIyn)b~dqdh?S|>934B4*!jffsn~oSyO7vL#1^aA5*@pQ*rmj(RBXA9T~6!@Vk=Z^ zrH)-i>}q1GRcwupT}$jbV)ZJvR>y82b|bMy6$|Lt&BSgY7F4nII(8ee+lhr$ETUs~ z61$67OvU0lb`P<8iEUD`P93|S*aO7&QL%k>>>*+g6XO(c_&05@e2|VkO6)OWoaW7o z9j;?f5POmsCvNj%$LQG8#GWC>soK2Qi8}TivFC|#LN+gUnvT6l>?LBHbj^#Mtz)kc zdzIMvDt3X6y-w^6Vw^|~|E7Hbm+IJC#NH;xNz=U8RXX-AvG<5^qBJjdy^eiA>_cLl z4$X_*qGKNu`-B*$H}hh5>ey$*J}1U0%e>fqI`$>8uZVHlF)zk>$dnU|Z-{+MjMIpD zG0rQdVBZt_ff(lt^J1JpOu>F4_A@a~2Ij>$JD7s~O6)gcoaf7napErp`-9k@#5i4- z7vub03ida#e~57&E-%K3xfJX_VqNeOZw4pV@?xBAOToH=@O2}`IkLPMC(Tl@9>g+< zaq=rK#@VnGEQ^?r7-zQfVw~zq!E%V@660i5UW~I>DOf(S0%Dwv%8PZuD}xGFM64IF z?r7k}dgxehVtt7DR4iM^wj$P#SiXuC=-2>a1Bn%@SZ^I0Ol%0Tek#^q$4ZE8Lu{~$ z4bib-#D)_as$#=*Y&&8jh>cLOkvcYt*l1#7RcxG&jU_gY7$-XNe%+IFY&@|E#HOkk zr!`VGu1Ulu6XR?|-ri>F*!IMx5}U1JoP9{?Z91_T#41#bvkWQNj>KjXTcl!~I7q>E zBDOQJWhz#sV`aqV5UW)&&I6?MHkVihv0YV+bNwjTd}0fT?XF^+&_}@*5nD`*lk|AM zw?-YSB({_oC*bj7oRLTAt%}%kVw_mVi-mQphFC4JsEWmOY$dT(2!)*ff&Ue93J4=O zvx5+F%4HZZLxLF&M!)8I0gm3r29d1tU0%f)Sia!3a)}U<4;gFoJU*7{U1u zjNr5eMsR8aBRFG$5uCNa2u?;|1Scdgg7XX*!MO&E;1mKza2f$4I6Ht5oFTvnzW8qh zU;a0O@AMnN_xg?C>-t9Um3<@lCcY7T8{Y`NWN!ptv^Rq9&l|ya=#Aj3@ka3Vcq91M zyAgcz-3Y$WZbTP6k!(a)5#2=e5RoY&ON38Ej)+_l`63EL6p831qPK`XBDNCIPs9Kb z14RrLF+@a(h;2j+6ER%Gb|OZI7$st~h_NEZi5M?pf`~~XCX3i!#8eT}Ma&SfqllRz zb`r6(h%ym#M9dXYA!5FW1tJ!SSS+Ga#8MGeB9@D&5m75*rHEA`b``N&M4gD;MAVB| zD`K691`z=fO(I%E1VwBR5fTv=5fQP6h^UCTh;|VjA~uQGQ^Z~(_7SnKi2X$zAmShq z2a7mV#9<jmI9J4ZA}$bdp@@q` zTq5E!5toa&Qp8mvt`Tvqi0eh%AmSzwH;cGc#BCz(5OJr7yG7h1;yw}gi+E7PLn0m# z@u-N$MLZ$mDG^VLcvi%7B3=;jqKKD8ydvT?5wDAQQ^Z>$-VyPxi1$T&AmSqtAB*@@ z#AhPD5b>pmuSI+#;yV%Fi}+E*Pa=L1@vDg6Mf@S+FA;x>_*cY#A~NtqfpZ8D(OpCj z5j{m@iO3d_BO*^kzKB8*MIwqt^cK-q#8x8uix?nckchz|wiZz$VyK8=BDNK=orsYl zMu`|BVyuW#5#vQn6fsG}6cO8tm?mPnh#f@iC}Ng~okYwQQ6{2X#9R^cM9delP{bk; zOGH$PSSF%MM74+-5i3Nj6tRnlT}7-BQ72+|5%nVcBG!p$6cG^7ETTokdJ!8$w2BCe zXcMuAh?t1Dh>apTM0ASSQ^ejP_7Sn4i2X$zDB>Uyhln^-#Ni^25OI`ahizJMVu+(ED`63I9J5^A}$bdk%)^$Tq@!+5m$(~QpD9Ft`Tvai0eh% zDB>m&w}`k^#O)&P5OJ4?yG7h9;yw`%hd#pNRNW#OETu5b>3WuSI+-;yV#Pi1<;& z&mw*i@tcU>Mf@q^FA@KU_*aCv_`|NhFoRct6x~F07m+EVrwE^jY!SI4@OSVyTE_B9@D&7Evo=g@{!m zb`h~!#2OL1iP&AlS`mH`4I&yvG>K>y5frgrL`X!dh=_2vi0ee$AmT<5H;cGM#BCyO7jdVEyF}b0 z;$9K=i+Di9Ln0m)@u-N$L_8tlNfA$rct*r?BAyrVqKKD7ydvUN5wDAQL&RGm-WKt$ zi1$Q%AmT$2AB*@z#AhNt7xATtuS9$!;#(2li}*prPa=L6@vDg6MEoJ*PZ58M_(#Nl zB6w5B?D=`G#t7c8F@m>YjNq*pBY20!2;OBef;Uf$;0+WbcwfW_-WxH3w>*sCZ4V=O zH^T_t(J+EHDvaRG3L|(A!U*1nFoL%ijNmN>BY5Y)2;My~f;R<>;Ee$zINomr$NY`p zP`(iy&NqUi^hR)`-UtrB8^J+%BRIBh1jpBn;IO$796C3GBjQGIRNM#-b{oL~ZzDL4 zZ3M@%jo=Wq5gevAf}_tya0J>24lEnN!DS;jW^4q Elite Demon messageall('RogMsg',"\c4"@$TWM2::ZombieName[8]@": Attack my target!"); for(%i = 0; %i < 5; %i++) { - %pos = vectoradd(%z.getPosition(), getRandomPosition(10,1)); + %pos = vectoradd(%z.getPosition(), TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); %fpos = vectoradd("0 0 5",%pos); StartAZombie(%fpos, %type); } @@ -435,7 +435,7 @@ function LordRogAttack_FUNC(%att, %args) { case "MetrosMaul": %t = getWord(%args, 0); - %fpos = vectoradd(%t.getposition(), getRandomposition(50,0)); + %fpos = vectoradd(%t.getposition(), TWM2Lib_MainControl("getRandomPosition", 50 TAB 0)); %pos2 = vectoradd(%fpos, "0 0 700"); schedule(500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); schedule(1000, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); @@ -443,7 +443,7 @@ function LordRogAttack_FUNC(%att, %args) { case "MeteorOblivion": %t = getWord(%args, 0); - %fpos = vectoradd(%t.getposition(), getRandomposition(50, 0)); + %fpos = vectoradd(%t.getposition(), TWM2Lib_MainControl("getRandomPosition", 50 TAB 0)); %pos2 = vectoradd(%fpos, "0 0 700"); schedule(500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); schedule(1000, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); diff --git a/scripts/TWM2/Bosses/LordVardison.cs b/scripts/TWM2/Bosses/LordVardison.cs index c0bc1b1..d99d000 100644 --- a/scripts/TWM2/Bosses/LordVardison.cs +++ b/scripts/TWM2/Bosses/LordVardison.cs @@ -578,6 +578,11 @@ function SpawnVardison(%position) { Datablock = "VardisonStageOneArmor"; }; %Cpos = vectorAdd(%position, "0 0 5"); + + %Boss.isMultiPhaseBoss = true; + %Boss.isFirstPhase = true; + %Boss.isFinalPhase = false; + InitiateBoss(%Boss, "Vardison1"); %Boss.team = 30; @@ -609,6 +614,11 @@ function SpawnVardison2(%position) { Datablock = "VardisonStageTwoArmor"; }; %Cpos = vectorAdd(%position, "0 0 5"); + + %Boss.isMultiPhaseBoss = true; + %Boss.isFirstPhase = false; + %Boss.isFinalPhase = false; + InitiateBoss(%Boss, "Vardison2"); %Boss.team = 30; @@ -649,6 +659,11 @@ function SpawnVardison3(%position) { Datablock = "VardisonStageThreeArmor"; }; %Cpos = vectorAdd(%position, "0 0 5"); + + %Boss.isMultiPhaseBoss = true; + %Boss.isFirstPhase = false; + %Boss.isFinalPhase = true; + InitiateBoss(%Boss, "Vardison3"); %Boss.team = 30; @@ -777,16 +792,7 @@ function VardisonThink(%Boss) { } } } - //Phase 2 is stationary unless you're on Hard or WTF mode - if(%dLevel >= 3) { - %needMove = true; - } - else { - //Phase Two only Super-Lunges if you get too close - if(getWord(VardisonGetClosest(%Boss), 1) <= 50) { - %needMove = true; - } - } + %needMove = true; } case 3: //Did I just get a kill? @@ -912,7 +918,7 @@ function VardisonDoMove(%Boss) { %Boss.hastarget = 1; } %vector = ZgetFacingDirection(%Boss, %clPlayer, %pos); - %vector = vectorscale(%vector, $Zombie::DForwardSpeed*1.8); + %vector = vectorscale(%vector, $Zombie::DForwardSpeed*5); %upvec = "150"; %x = Getword(%vector,0); %y = Getword(%vector,1); @@ -1013,7 +1019,7 @@ function VardisonSummonMinions(%Boss) { } function VardisonDoMinionSummon(%Boss) { - %posSpawn = vectorAdd(%Boss.getPosition(), getRandomposition(50, 1)); + %posSpawn = vectorAdd(%Boss.getPosition(), TWM2Lib_MainControl("getRandomPosition", 50 TAB 1)); %spawnFire = new ParticleEmissionDummy(){ position = vectoradd(%posSpawn, "0 0 0.5"); dataBlock = "defaultEmissionDummy"; @@ -1530,7 +1536,7 @@ function VardisonNamedAttack(%Boss, %attack, %args) { case "RiftGate": %pos = getField(%args, 0); - %goPos = RMPG(); + %goPos = TWM2Lib_MainControl("RMPG"); %TargetSearchMask = $TypeMasks::PlayerObjectType; %c = createEmitter(%pos, FlashLEmitter, "1 0 0"); //Rotate it %c.schedule(1000, delete); @@ -1674,6 +1680,7 @@ function VardisonManager::summonOrb(%this, %boss) { } function VardisonManager::orbKill(%this, %boss, %orb) { + %restoreCount = 0; for(%i = 0; %i < ClientGroup.getCount(); %i++) { %cl = ClientGroup.getObject(%i); if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { @@ -1686,9 +1693,11 @@ function VardisonManager::orbKill(%this, %boss, %orb) { //If Vardison Restores HP from rift kills, do that now :P if($TWM2::Vardison_OrbRegenHP[$TWM2::VardisonDifficulty]) { %boss.setDamageLevel(%boss.getDamageLevel() - 0.35); + %restoreCount++; } } } + MessageAll('msgRestore', "\c5Lord Vardison has absorbed the life energy of "@%restoreCount@" combatants."); %wipeEmit = new ParticleEmissionDummy(){ position = %orb.getPosition(); dataBlock = "defaultEmissionDummy"; @@ -1767,23 +1776,6 @@ function ShadowOrb::damageObject(%data, %targetObject, %sourceObject, %position, if(%damageScale !$= "") { %amount *= %damageScale; } - if (!$TeamDamage && !%targetObject.getDataBlock().deployedObject) { - if(isObject(%sourceObject)) { - if(%sourceObject.getDataBlock().catagory $= "Vehicles") { - %attackerTeam = getVehicleAttackerTeam(%sourceObject); - } - else { - %attackerTeam = %sourceObject.team; - } - } - if ((%targetObject.getTarget() != -1) && isTargetFriendly(%targetObject.getTarget(), %attackerTeam)) { - %curDamage = %targetObject.getDamageLevel(); - %availableDamage = %targetObject.getDataBlock().disabledLevel - %curDamage - 0.05; - if (%amount > %availableDamage) { - %amount = %availableDamage; - } - } - } if (%amount > 0) { %targetObject.applyDamage(%amount); } diff --git a/scripts/TWM2/Bosses/LordYvex.cs b/scripts/TWM2/Bosses/LordYvex.cs index f111135..18cffa5 100644 --- a/scripts/TWM2/Bosses/LordYvex.cs +++ b/scripts/TWM2/Bosses/LordYvex.cs @@ -588,7 +588,7 @@ function Yvexmovetotarget(%zombie){ if(%z < -300) { %zombie.startFade(400, 0, true); %zombie.startFade(1000, 0, false); - %zombie.setPosition(vectorAdd(vectoradd(%closestclient.player.getPosition(), "0 0 20"), getRandomPosition(25, 1))); + %zombie.setPosition(vectorAdd(vectoradd(%closestclient.player.getPosition(), "0 0 20"), TWM2Lib_MainControl("getRandomPosition", 25 TAB 1))); %zombie.setVelocity("0 0 0"); MessageAll('msgYvexAttack', "\c4"@$TWM2::ZombieName[7]@": I shall not fall to my end!"); } @@ -682,7 +682,7 @@ function YvexAttack_FUNC(%att, %args) { messageall('YvexMsg',"\c4"@$TWM2::ZombieName[7]@": Take out the enemy, ALL OF THEM!"); } for(%i = 0; %i < 5; %i++) { - %pos = vectoradd(%z.getPosition(), getRandomPosition(10,1)); + %pos = vectoradd(%z.getPosition(), TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); %fpos = vectoradd("0 0 5",%pos); StartAZombie(%fpos, %type); } diff --git a/scripts/TWM2/Bosses/LordraniusTrebor.cs b/scripts/TWM2/Bosses/LordraniusTrebor.cs index d79919b..640e59a 100644 --- a/scripts/TWM2/Bosses/LordraniusTrebor.cs +++ b/scripts/TWM2/Bosses/LordraniusTrebor.cs @@ -319,7 +319,7 @@ function PhaseShift(%tank) { %tank.schedule(2500, "setCloaked", false); %tank.schedule(2500, "setFrozenState", false); %CPos = %tank.getPosition(); - %rand = getRandomPosition(250, 1); + %rand = TWM2Lib_MainControl("getRandomPosition", 250 TAB 1); %fin = vectorAdd(%CPos, %rand); %xy = getwords(%fin, 0, 1); %z = getTerrainHeight(%fin) + 9; diff --git a/scripts/TWM2/Bosses/MajorInsignia.cs b/scripts/TWM2/Bosses/MajorInsignia.cs index e06f186..4b7b5f8 100644 --- a/scripts/TWM2/Bosses/MajorInsignia.cs +++ b/scripts/TWM2/Bosses/MajorInsignia.cs @@ -172,7 +172,7 @@ function SpawnInsignia(%position) { Datablock = "InsigniaZombieArmor"; }; %Cpos = vectorAdd(%position, "0 0 5"); - MessageAll('MsgDarkraireturn', "\c4"@$TWM2::BossName["Insignia"]@": Oh, a battle, lets see if I know how to do this..."); + MessageAll('msgBossAlertreturn', "\c4"@$TWM2::BossName["Insignia"]@": The battle begins, and now you shall all die..."); %command = "Insigniamovetotarget"; %zombie.ticks = 0; @@ -212,9 +212,9 @@ function Insigniamovetotarget(%zombie){ if(%z < -300) { %zombie.startFade(400, 0, true); %zombie.startFade(1000, 0, false); - %zombie.setPosition(vectorAdd(vectoradd(%closestclient.player.getPosition(), "0 0 20"), getRandomPosition(25, 1))); + %zombie.setPosition(vectorAdd(vectoradd(%closestclient.player.getPosition(), "0 0 20"), TWM2Lib_MainControl("getRandomPosition", 25 TAB 1))); %zombie.setVelocity("0 0 0"); - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": OH FALLING IS NOT FUN!!!!"); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": I won't go away that easily..."); } %closestDistance = getWord(%closestClient,1); %closestClient = getWord(%closestClient,0).Player; @@ -259,7 +259,7 @@ function InsigniaAttack_FUNC(%att, %args) { %type = getRandomZombieType("1 2 3 5 9 12 13 15 17"); //omit 4 in place of 17: Demon -> Elite Demon messageall('RogMsg',"\c4"@$TWM2::BossName["Insignia"]@": Slay the humans!!!"); for(%i = 0; %i < 6; %i++) { - %pos = vectoradd(%z.getPosition(), getRandomPosition(10,1)); + %pos = vectoradd(%z.getPosition(), TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); %fpos = vectoradd("0 0 5",%pos); StartAZombie(%fpos, %type); } @@ -431,10 +431,10 @@ function InsigniaAttack(%zombie) { %target = FindValidTarget(%zombie); %target = %target.player; if(!isObject(%target) || %target.getState() $= "Dead") { - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); return; } - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": Lets shorten the distance... "@getTaggedString(%target.client.name)@"."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": Lets shorten the distance... "@getTaggedString(%target.client.name)@"."); %vec = vectorsub(%target.getworldboxcenter(), %zombie.getMuzzlePoint(0)); %vec = vectoradd(%vec, vectorscale(%target.getvelocity(), vectorlen(%vec)/100)); InsigniaAttack_FUNC("GravShot", %zombie SPC %vec); @@ -443,11 +443,11 @@ function InsigniaAttack(%zombie) { %target = FindValidTarget(%zombie); %target = %target.player; if(!isObject(%target) || %target.getState() $= "Dead") { - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); return; } InsigniaAttack_FUNC("GravShot", %zombie SPC "0 0 200"); - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": Death from above "@getTaggedString(%target.client.name)@"."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": Death from above "@getTaggedString(%target.client.name)@"."); %vec = vectorsub(%target.getworldboxcenter(),%zombie.getMuzzlePoint(0)); %vec = vectoradd(%vec, vectorscale(%target.getvelocity(),vectorlen(%vec)/100)); schedule(1500, 0, InsigniaAttack_FUNC, "GravShot", %zombie SPC %vec); @@ -456,40 +456,40 @@ function InsigniaAttack(%zombie) { %target = FindValidTarget(%zombie); %target = %target.player; if(!isObject(%target) || %target.getState() $= "Dead") { - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); return; } InsigniaAttack_FUNC("AcidStorm", %zombie SPC %target); - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": Acid Storm, just for you... "@getTaggedString(%target.client.name)@"."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": Acid Storm, just for you... "@getTaggedString(%target.client.name)@"."); case 4: %target = FindValidTarget(%zombie); %target = %target.player; if(!isObject(%target) || %target.getState() $= "Dead") { - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); return; } InsigniaAttack_FUNC("LapseStrike", %zombie SPC %target SPC 0); - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": Hey, "@getTaggedString(%target.client.name)@". Watch this."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": Hey, "@getTaggedString(%target.client.name)@". Watch this."); case 5: %target = FindValidTarget(%zombie); %target = %target.player; if(!isObject(%target) || %target.getState() $= "Dead") { - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); return; } InsigniaAttack_FUNC("AcidMachineGun", %zombie SPC %target); - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": ENOUGH, "@getTaggedString(%target.client.name)@". DIE."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": ENOUGH, "@getTaggedString(%target.client.name)@". DIE."); case 6: %target = FindValidTarget(%zombie); %target = %target.player; if(!isObject(%target) || %target.getState() $= "Dead") { - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": I suppose I can wait..."); return; } - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["Insignia"]@": C'Mere, "@getTaggedString(%target.client.name)@"."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["Insignia"]@": C'Mere, "@getTaggedString(%target.client.name)@"."); InsigniaAttack_FUNC("DropSummon", %target); case 7: diff --git a/scripts/TWM2/Bosses/ShadeLord.cs b/scripts/TWM2/Bosses/ShadeLord.cs index b0445bb..8c6e971 100644 --- a/scripts/TWM2/Bosses/ShadeLord.cs +++ b/scripts/TWM2/Bosses/ShadeLord.cs @@ -104,34 +104,29 @@ function ShadeLordSword::OnExplode(%data, %proj, %pos, %mod) { while ((%potentialTarget = ContainerSearchNext()) != 0) { if(%potentialTarget != %source) { serverPlay3D(BOVHitSound,%potentialTarget.getPosition()); - MessageAll('msgDeath', "\c0"@%potentialTarget.client.namebase@" was killed by the shadowy forces of death."); - %potentialTarget.blowUp(); - %potentialTarget.scriptKill(); + MessageAll('msgDeath', "\c0"@%potentialTarget.client.namebase@"'s destiny of death is being fulfilled..."); + //%potentialTarget.blowUp(); + //%potentialTarget.scriptKill(); + %potentialTarget.isGoingToDie = 1; + %potentialTarget.setMoveState(true); + %potentialTarget.setActionThread("death1", true); createBlood(%potentialTarget); //=========================== - %potentialTarget.schedule(750, Blowup); schedule(750, 0, createBlood, %potentialTarget); - %potentialTarget.schedule(1250, Blowup); schedule(1250, 0, createBlood, %potentialTarget); - schedule(1250, 0, doReturnMissile, %potentialTarget, %source); + schedule(1250, 0, ShadeLordFunction, -1, "DoReturnMissile", %potentialTarget SPC %source); + + schedule(2000, 0, createBlood, %potentialTarget); + schedule(3500, 0, createBlood, %potentialTarget); + + %potentialTarget.schedule(4000, "ScriptKill"); } } - if(isObject(%proj.targetedPlayer) && %proj.targetedPlayer.getState() !$= "dead") { - %proj.targetedPlayer.setMoveState(false); //free to move. - } -} - -function doReturnMissile(%ini, %src) { - %final = vectorAdd(%ini.getPosition(), vectorAdd(getRandomPosition(70, 1), "0 0 250")); - %vec = vectorNormalize(vectorSub(%final, %ini.getPosition())); - %p = new SeekerProjectile() { - dataBlock = ShadeLordSword; - initialDirection = %vec; - initialPosition = %ini.getPosition(); - }; - %p.sourceObject = %src; + //if(isObject(%proj.targetedPlayer) && %proj.targetedPlayer.getState() !$= "dead") { + // %proj.targetedPlayer.setMoveState(false); //free to move. + //} } datablock ParticleData(ShadeStormParticle) { @@ -246,7 +241,7 @@ datablock ParticleData(ShadeLordScreamParticle) { datablock ParticleEmitterData(ShadeLordScreamEmitter) { ejectionPeriodMS = 1; periodVarianceMS = 0; - ejectionVelocity = 400.0; + ejectionVelocity = 50.0; velocityVariance = 150.0; ejectionOffset = 0.0; thetaMin = 85; @@ -260,7 +255,7 @@ datablock ParticleEmitterData(ShadeLordScreamEmitter) { datablock PlayerData(ShadeLordArmor) : LightMaleHumanArmor { boundingBox = "1.63 1.63 2.6"; - maxDamage = 900.0; + maxDamage = 700.0; minImpactSpeed = 35; shapeFile = "bioderm_heavy.dts"; @@ -273,9 +268,9 @@ datablock PlayerData(ShadeLordArmor) : LightMaleHumanArmor { waterBreathSound = WaterBreathBiodermSound; damageScale[$DamageType::Bullet] = 0.10; //I deny you shrike n0bs - damageScale[$DamageType::Fire] = 3.0; - damageScale[$DamageType::Plasma] = 3.0; - damageScale[$DamageType::Burn] = 2.0; + damageScale[$DamageType::Fire] = 5.0; + damageScale[$DamageType::Plasma] = 4.0; + damageScale[$DamageType::Burn] = 4.0; max[RepairKit] = 0; max[Mine] = 0; @@ -409,9 +404,7 @@ function SpawnShadeLord(%position) { %Cpos = vectorAdd(%position, "0 0 5"); MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": Take your stand, and prepare to face your destined fate of death!"); schedule(3000, 0, MessageAll, 'MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": And so it begins... Let's see how you face your fears..."); - schedule(3500, 0, shadeLordToggleCondition, %Boss, 1); - - %command = "shadelorddomove"; + schedule(3500, 0, "ShadeLordFunction", %boss, "ShadeLordToggleCondition", 1); %Boss.ticks = 0; InitiateBoss(%Boss, "ShadeLord"); @@ -431,484 +424,481 @@ function SpawnShadeLord(%position) { %Boss.canjump = 1; %Boss.hastarget = 1; MissionCleanup.add(%Boss); - schedule(7500, %Boss, %command, %Boss); + %boss.moveloop = schedule(7500, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); } -function ShadeLordToggleCondition(%Boss, %on) { - if(!isObject(%Boss) || %Boss.getState() $= "dead") { - return; - } - cancel(%boss.attacks); - if(%on) { - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - %Boss.setMoveState(true); - %Boss.setActionThread("cel4",true); - %Boss.schedule(3500, "SetMoveState", false); - skyVeryDark(); +function ShadeLordFunction(%boss, %function, %args) { + switch$(%function) { - %boss.attacks = ShadeLordDarkAttacks(%Boss); - } - else { - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - %Boss.setMoveState(true); - %Boss.setActionThread("death1",true); - %Boss.schedule(3000, "setActionThread", "cel4", true); - %Boss.schedule(4500, "SetMoveState", false); - skyDusk(); - - cancel(%boss.antiSky); - cancel(%boss.randomFX); - - %boss.antiSky = ""; - %boss.randomFX = ""; - %boss.attacks = schedule(4500, 0, "ShadeLordLightAttacks", %Boss); - } -} - -function ShadeStormAntiSky(%boss) { - if(!isObject(%boss) || %boss.getState() $= "Dead") { - return; - } - if(!$ShadeLordBoss::AllowedNighttime) { - return; - } - %killHeight = getWord(%boss.getPosition(), 2) + 50; - for(%i = 0; %i < ClientGroup.getCount(); %i++) { - %cl = ClientGroup.getObject(%i); - if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { - if(getWord(%cl.player.getPosition(), 2) >= %killHeight) { - ShadeDropKill(%boss, %cl.player); + //------------- + //Boss Attacks + //------------- + case "Att_ShadeStrike": + %target = getWord(%args, 0); + %boss.setMoveState(true); + %boss.schedule(5000, setMoveState, false); + %boss.setActionThread($Zombie::RogThread,true); + // + %bPos = %boss.getPosition(); + %start1 = vectorAdd(%bPos, "300 -300 50"); + %go = vectorAdd(%bPos, "-300 300 50"); + %interval = 15; + for(%i = 0; %i < 3; %i++) { + %neg = %i % 2 == 0 ? 1 : -1; + %start = vectorAdd(%start1, %neg*%interval*%i@" 0 0"); + %vec = vectorNormalize(vectorSub(%go,%start)); + %p = new SeekerProjectile() { + dataBlock = ShadeLordSword; + initialDirection = %vec; + initialPosition = %start; + }; + %p.sourceObject = %boss; + %p.targetedPlayer = %target; + %beacon = new BeaconObject() { + dataBlock = "SubBeacon"; + beaconType = "vehicle"; + position = %target.player.getWorldBoxCenter(); + }; + %beacon.team = 0; + %beacon.setTarget(0); + MissionCleanup.add(%beacon); + %p.setObjectTarget(%beacon); + DemonMotherMissileFollow(%target,%beacon,%p); } - } - } - %boss.antiSky = schedule(2500, 0, "ShadeStormAntiSky", %boss); -} -function ShadeStormFX(%boss) { - if(!isObject(%boss) || %boss.getState() $= "Dead") { - return; - } - %bPos = %boss.getPosition(); - %start1 = vectorAdd(%bPos, "300 -300 50"); - %go = vectorAdd(%bPos, "-300 300 50"); - %interval = 15; - for(%i = 0; %i < 20; %i++) { - %neg = %i % 2 == 0 ? 1 : -1; - %start = vectorAdd(%start1, %neg*%interval*%i@" 0 0"); - %vec = vectorNormalize(vectorSub(%go,%start)); - %p = new SeekerProjectile() { - dataBlock = ShadeLordSword; - initialDirection = %vec; - initialPosition = %start; - }; - %p.sourceObject = %boss; - } - - %boss.randomFX = schedule(getRandom(10000, 25000), 0, ShadeStormFX, %boss); -} - -function ShadeLordDarkAttacks(%boss) { - if(!isObject(%boss) || %boss.getState() $= "Dead") { - return; - } - - if(isObject(%boss.dayCloak)) { - %boss.dayCloak.delete(); - } - - if(%boss.randomFX $= "") { - %boss.randomFX = ShadeStormFX(%boss); - } - if(%boss.antiSky $= "") { - %boss.antiSky = ShadeStormAntiSky(%boss); - } - - %attack = getRandom(1, 3); - switch(%attack) { - case 1: - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": SHALDORVAAAAAAAAAAAAAAH!!!!!!!"); - ShadeLordPerformScream(%boss); - case 2: - ShadeLordStormDescendAttack(%boss, 0); - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": Descend Mighty Shade Storm, Destroy all who dare oppose us!"); - case 3: - %target = FindValidTarget(%z); - if(isObject(%target.player)) { - MessageAll('MessageAll', "\c4"@$TWM2::BossName["ShadeLord"]@": Come forth my shade, Destroy "@getTaggedString(%target.name)@"!"); + case "Att_HealSequence": + %count = getWord(%args, 0); + if(!isObject(%boss) || %boss.getState() $= "dead") { + return; + } + if(%count == 0) { %boss.setMoveState(true); - %boss.schedule(5000, setMoveState, false); - %boss.setActionThread($Zombie::RogThread,true); - // - %bPos = %boss.getPosition(); - %start1 = vectorAdd(%bPos, "300 -300 50"); - %go = vectorAdd(%bPos, "-300 300 50"); - %interval = 15; - for(%i = 0; %i < 20; %i++) { - %neg = %i % 2 == 0 ? 1 : -1; - %start = vectorAdd(%start1, %neg*%interval*%i@" 0 0"); - %vec = vectorNormalize(vectorSub(%go,%start)); - %p = new SeekerProjectile() { - dataBlock = ShadeLordSword; - initialDirection = %vec; - initialPosition = %start; - }; - %p.sourceObject = %boss; - %p.targetedPlayer = %target.player; - %beacon = new BeaconObject() { - dataBlock = "SubBeacon"; - beaconType = "vehicle"; - position = %target.player.getWorldBoxCenter(); - }; - %beacon.team = 0; - %beacon.setTarget(0); - MissionCleanup.add(%beacon); - %p.setObjectTarget(%beacon); - DemonMotherMissileFollow(%target.player,%beacon,%p); - } - // + %boss.setPosition(vectorAdd(%boss.getPosition(), TWM2Lib_MainControl("getRandomPosition", 300 TAB 1))); + cancel(%boss.moveLoop); + } + if(%count < 25) { + %boss.setDamageLevel(%boss.getDamageLevel() - 0.1); + createLifeEmitter(%boss.getPosition(), PrebeamEmitter, 5000); } else { - MessageAll('MessageAll', "\c4"@$TWM2::BossName["ShadeLord"]@": Hiding in death does not save you "@getTaggedString(%target.name)@""); + %boss.schedule(3000, setMoveState, false); + %boss.moveloop = schedule(3000, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); + return; } - } - - %boss.attacks = schedule(25000, 0, "ShadeLordDarkAttacks", %boss); -} + schedule(200, %boss, "ShadeLordFunction", %boss, "Att_HealSequence", %count++); -function ShadeLordLightAttacks(%boss) { - if(!isObject(%boss) || %boss.getState() $= "Dead") { - return; - } - - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - if(!isObject(%boss) || !%boss.getState() $= "dead") { - if(isObject(%boss.dayCloak)) { - %boss.dayCloak.delete(); - } - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - return; - } - - %attack = getRandom(1, 1); - switch(%attack) { - case 1: - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": SHALDORVAAAAAAAAAAAAAAH!!!!!!!"); - ShadeLordPerformScream(%boss); - case 2: - MessageAll('MsgBossEvilness', "\c4"@$TWM2::BossName["ShadeLord"]@": Come forth, and return to me my power of the shadows!"); - ShadeLordBeginHealSequ(%boss, 0); - } - %boss.attacks = schedule(25000, 0, "ShadeLordLightAttacks", %boss); -} - -/////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////// -function ShadeLordBeginHealSequ(%boss, %count) { - if(!isObject(%boss) || %boss.getState() $= "dead") { - return; - } - - if(%count == 0) { - %boss.setMoveState(true); - %boss.setPosition(vectorAdd(%boss.getPosition(), getRandomPosition(700, 1))); - cancel(%boss.moveLoop); - } - if(%count < 25) { - %boss.setDamageLevel(%boss.getDamageLevel() - 1.0); - createLifeEmitter(%boss.getPosition(), PrebeamEmitter, 5000); - } - else { - %boss.schedule(3000, setMoveState, false); - %boss.moveLoop = schedule(3000, %boss, "shadelorddomove", %boss); - return; - } - schedule(200, 0, "ShadeLordBeginHealSequ", %boss, %count++); -} - -function ShadeLordStormDescendAttack(%boss, %count) { - if(%count == 0) { - cancel(%boss.moveLoop); - %boss.rapierShield = 1; - %boss.setMoveState(true); - // - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - } - else if(%count > 0 && %count <= 25) { - %pos = "0 0 "@ 250 - (10 * %count); - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - %boss.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(), %pos); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter - }; - //%boss.shadeStorm.setPosition(vectorAdd(%boss.getPosition(), %pos)); - } - else if(%count == 26) { - for(%i = 0; %i < ClientGroup.getCount(); %i++) { - %cl = ClientGroup.getObject(%i); - if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { - ShadeDropKill(%boss, %cl.player); + case "Att_ShadeLordDecend": + %count = getWord(%args, 0); + if(%count == 0) { + cancel(%boss.moveLoop); + //%boss.rapierShield = 1; + %boss.setMoveState(true); + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } } - } - - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - %boss.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%Demon.getPosition(), "0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter - }; - } - else if(%count > 26 && %count < 40) { - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - %boss.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(), "0 0 1.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter - }; - } - else if(%count == 40) { - %boss.rapierShield = 0; - %boss.setMoveState(false); - %boss.moveLoop = schedule(3000, %boss, "shadelorddomove", %boss); - - //flash all - for(%i = 0; %i < ClientGroup.getCount(); %i++) { - %cl = ClientGroup.getObject(%i); - if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { - %cl.player.setWhiteout(1.0); + else if(%count > 0 && %count <= 25) { + %pos = "0 0 "@ 250 - (10 * %count); + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(), %pos); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; } - } - return; - } - - %count++; - schedule(300, 0, "ShadeLordStormDescendAttack", %boss, %count); -} + else if(%count == 26) { + for(%i = 0; %i < ClientGroup.getCount(); %i++) { + %cl = ClientGroup.getObject(%i); + if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { + ShadeLordFunction(%boss, "ShadeLordDropKill", %cl.player); + } + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(), "0 0 0.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; + } + else if(%count > 26 && %count < 40) { + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(), "0 0 1.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; + } + else if(%count == 40) { + %boss.setMoveState(false); + %boss.moveloop = schedule(3000, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); + //flash all + for(%i = 0; %i < ClientGroup.getCount(); %i++) { + %cl = ClientGroup.getObject(%i); + if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { + %cl.player.setWhiteout(1.0); + } + } + return; + } + %count++; + schedule(300, %boss, "ShadeLordFunction", %boss, "Att_ShadeLordDecend", %count); -function ShadeLordPerformScream(%boss) { - cancel(%boss.moveloop); - %boss.setMoveState(true); - %boss.schedule(5000, setMoveState, false); - //create emitter - %screamEmit = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(),"0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeLordScreamEmitter"; //ShadeStormEmitter - }; - %screamEmit.schedule(5000, "delete"); - - //knock down and throw weapons in radius. - %TargetSearchMask = $TypeMasks::PlayerObjectType; - InitContainerRadiusSearch(%boss.getPosition(), 200, %TargetSearchMask); - while ((%potentialTarget = ContainerSearchNext()) != 0) { - if(isSet(%potentialTarget.client)) { - //throw guns, knock down. - %potentialTarget.setActionThread("death1", true); - %potentialTarget.throwweapon(1); - %potentialTarget.throwweapon(0); - %potentialTarget.setMoveState(true); - %potentialTarget.schedule(3000, setMoveState, false); - } - } - // - - %boss.moveLoop = schedule(5000, %boss, "shadelorddomove", %boss); -} - - -/////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////// -function ShadeLordDoDeath(%boss) { - %boss.RapierShield = 1; - %boss.inDeath = 1; - if(isObject(%boss.dayCloak)) { - %boss.dayCloak.delete(); - } - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - //set on fire - %fire = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(),"0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "BurnEmitter"; - }; - MissionCleanup.add(%fire); - %fire.schedule(5000, delete); - // - %Boss.setMoveState(true); - %boss.setActionThread("death1", true); - %boss.schedule(5000, "blowup"); - %boss.schedule(5000, "scriptkill"); - schedule(4999, 0, eval, ""@%boss@".rapierShield = 0;"); - - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); -} - -function shadelorddomove(%Demon){ - if(!isobject(%Demon) || %Demon.getState() $= "Dead") { - if(isObject(%Demon.dayCloak)) { - %Demon.dayCloak.delete(); - } - if(isObject(%Demon.shadeStorm)) { - %Demon.shadeStorm.delete(); - } - return; - } - - if(%demon.getDamageLeftPct() < 0.005) { - ShadeLordDoDeath(%Demon); - } - - if(%demon.getDamageLeftPct() < 0.4) { - if($ShadeLordBoss::AllowedNighttime == 1) { - $ShadeLordBoss::AllowedNighttime = 0; - ShadeLordToggleCondition(%Demon, 0); - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": No, You will not break the barrier of dark!"); - } - } - else { - if($ShadeLordBoss::AllowedNighttime == 0) { - $ShadeLordBoss::AllowedNighttime = 1; - ShadeLordToggleCondition(%Demon, 1); - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": Awaken, mighty storm of shade, bring forth the doom of our foes!"); - } - } - - if(isObject(%Demon.dayCloak) && !%Demon.inDeath) { - %Demon.dayCloak.delete(); - %Demon.dayCloak = new ParticleEmissionDummy(){ - position = vectoradd(%Demon.getPosition(),"0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "dayCloakEmitter"; //ShadeStormEmitter - }; - MissionCleanup.add(%Demon.dayCloak); - } - else { - if($ShadeLordBoss::AllowedNighttime == 0) { - %Demon.dayCloak = new ParticleEmissionDummy(){ - position = vectoradd(%Demon.getPosition(),"0 0 0.5"); + case "Att_ShadeLordScream": + cancel(%boss.moveloop); + %boss.setMoveState(true); + %boss.schedule(5000, setMoveState, false); + //create emitter + %screamEmit = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 0.5"); dataBlock = "defaultEmissionDummy"; - emitter = "dayCloakEmitter"; //ShadeStormEmitter + emitter = "ShadeLordScreamEmitter"; //ShadeStormEmitter }; - } - } + %screamEmit.schedule(5000, "delete"); + //knock down and throw weapons in radius. + %TargetSearchMask = $TypeMasks::PlayerObjectType; + InitContainerRadiusSearch(%boss.getPosition(), 45, %TargetSearchMask); + while ((%potentialTarget = ContainerSearchNext()) != 0) { + if(isSet(%potentialTarget.client)) { + //throw guns, knock down. + %potentialTarget.setActionThread("death1", true); + %potentialTarget.throwweapon(1); + %potentialTarget.throwweapon(0); + %potentialTarget.setMoveState(true); + %potentialTarget.schedule(3000, setMoveState, false); + } + } + // + %boss.moveloop = schedule(5000, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); + + //------------- + //Boss Functions + //------------- + case "ShadeLordDarkAttacks": + if(!isObject(%boss) || %boss.getState() $= "Dead") { + return; + } + if(isObject(%boss.dayCloak)) { + %boss.dayCloak.delete(); + } + if(%boss.randomFX $= "") { + %boss.randomFX = ShadeLordFunction(%boss, "ShadeStormFX", ""); + } + if(%boss.antiSky $= "") { + %boss.antiSky = ShadeLordFunction(%boss, "ShadeStormAntiSky", ""); + } + %attack = getRandom(1, 3); + switch(%attack) { + case 1: + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": SHALDORVAAAAAAAAAAAAAAH!!!!!!!"); + ShadeLordFunction(%boss, "Att_ShadeLordScream", ""); + case 2: + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": Descend Mighty Shade Storm, Destroy all who dare oppose us!"); + ShadeLordFunction(%boss, "Att_ShadeLordDecend", 0); + case 3: + %target = FindValidTarget(%boss); + MessageAll('MessageAll', "\c4"@$TWM2::BossName["ShadeLord"]@": Come forth my shade, Destroy "@getTaggedString(%target.name)@"!"); + if(isObject(%target.player)) { + ShadeLordFunction(%boss, "Att_ShadeStrike", %target.player); + } + else { + MessageAll('MessageAll', "\c4"@$TWM2::BossName["ShadeLord"]@": Hiding in death does not save you "@getTaggedString(%target.name)@""); + } + } + %boss.attacks = schedule(25000, %boss, "ShadeLordFunction", %boss, "ShadeLordDarkAttacks", ""); + + case "ShadeLordLightAttacks": + if(!isObject(%boss) || %boss.getState() $= "Dead") { + return; + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + if(!isObject(%boss) || !%boss.getState() $= "dead") { + if(isObject(%boss.dayCloak)) { + %boss.dayCloak.delete(); + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + return; + } + %attack = getRandom(1, 2); + switch(%attack) { + case 1: + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": SHALDORVAAAAAAAAAAAAAAH!!!!!!!"); + ShadeLordFunction(%boss, "Att_ShadeLordScream", ""); + case 2: + MessageAll('MsgBossEvilness', "\c4"@$TWM2::BossName["ShadeLord"]@": Come forth, and return to me the power of the shadows!"); + ShadeLordFunction(%boss, "Att_HealSequence", 0); + } + %boss.attacks = schedule(25000, %boss, "ShadeLordFunction", %boss, "ShadeLordLightAttacks", ""); + + case "ShadeStormFX": + if(!isObject(%boss) || %boss.getState() $= "Dead") { + return; + } + %bPos = %boss.getPosition(); + %start1 = vectorAdd(%bPos, "300 -300 50"); + %go = vectorAdd(%bPos, "-300 300 50"); + %interval = 15; + for(%i = 0; %i < 20; %i++) { + %neg = %i % 2 == 0 ? 1 : -1; + %start = vectorAdd(%start1, %neg*%interval*%i@" 0 0"); + %vec = vectorNormalize(vectorSub(%go,%start)); + %p = new SeekerProjectile() { + dataBlock = ShadeLordSword; + initialDirection = %vec; + initialPosition = %start; + }; + %p.sourceObject = %boss; + MissionCleanup.add(%p); + } + %boss.randomFX = schedule(getRandom(10000, 25000), %boss, "ShadeLordFunction", %boss, "ShadeStormFX", ""); - if(isObject(%Demon.shadeStorm)) { - %Demon.shadeStorm.delete(); - %Demon.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%Demon.getPosition(),"0 0 250"); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter - }; - } - else { - if($ShadeLordBoss::AllowedNighttime == 1) { - %Demon.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%Demon.getPosition(),"0 0 250"); + case "ShadeStormAntiSky": + if(!isObject(%boss) || %boss.getState() $= "Dead") { + return; + } + if(!$ShadeLordBoss::AllowedNighttime) { + return; + } + %killHeight = getWord(%boss.getPosition(), 2) + 50; + for(%i = 0; %i < ClientGroup.getCount(); %i++) { + %cl = ClientGroup.getObject(%i); + if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { + if(getWord(%cl.player.getPosition(), 2) >= %killHeight) { + ShadeLordFunction(%boss, "ShadeLordDropKill", %cl.player); + } + } + } + %boss.antiSky = schedule(2500, %boss, "ShadeLordFunction", %boss, "ShadeStormAntiSky", ""); + + case "ShadeLordDoDeath": + %boss.RapierShield = 1; + %boss.inDeath = 1; + if(isObject(%boss.dayCloak)) { + %boss.dayCloak.delete(); + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + //set on fire + %fire = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 0.5"); dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter + emitter = "BurnEmitter"; }; - } - } + MissionCleanup.add(%fire); + %fire.schedule(5000, delete); + // + %Boss.setMoveState(true); + %boss.setActionThread("death1", true); + %boss.schedule(5000, "blowup"); + %boss.schedule(5000, "scriptkill"); + schedule(4999, 0, eval, ""@%boss@".rapierShield = 0;"); - %pos = %Demon.getworldboxcenter(); - %closestClient = ZombieLookForTarget(%Demon); - %z = getWord(%pos, 2); - if(%z < -300) { - %Demon.startFade(400, 0, true); - %Demon.startFade(1000, 0, false); - %Demon.setPosition(vectorAdd(vectoradd(%closestclient.getPosition(), "0 0 20"), getRandomPosition(25, 1))); - %Demon.setVelocity("0 0 0"); - MessageAll('MsgVardison', "\c4"@$TWM2::BossName["ShadeLord"]@": I'm back...."); - } - %closestDistance = getWord(%closestClient,1); - %closestClient = getWord(%closestClient,0).Player; - if(%closestDistance <= $Zombie::detectDist){ - if(%closestDistance < 10) { - ShadeDropKill(%Demon, %closestClient); - MessageAll('MsgVardison', "\c4"@$TWM2::BossName["ShadeLord"]@": Feel The Vengeance of the Shadows "@getTaggedString(%closestClient.client.name)@"."); - %closestClient.setMoveState(true); - ShadeLordRandomTeleport(%Demon); - } - if(%Demon.hastarget != 1){ - %Demon.hastarget = 1; - } + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - %vector = ZgetFacingDirection(%Demon,%closestClient,%pos); + case "ShadeLordToggleCondition": + %flag = getWord(%args, 0); + if(!isObject(%boss) || %boss.getState() $= "dead") { + return; + } + cancel(%boss.attacks); + if(%flag) { + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + %Boss.setMoveState(true); + %Boss.setActionThread("cel4",true); + %Boss.schedule(3500, "SetMoveState", false); + skyVeryDark(); + + %boss.attacks = ShadeLordFunction(%boss, "ShadeLordDarkAttacks", ""); + } + else { + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + %Boss.setMoveState(true); + %Boss.setActionThread("death1",true); + %Boss.schedule(3000, "setActionThread", "cel4", true); + %Boss.schedule(4500, "SetMoveState", false); + skyDusk(); + + cancel(%boss.antiSky); + cancel(%boss.randomFX); + + %boss.antiSky = ""; + %boss.randomFX = ""; + %boss.attacks = schedule(4500, %boss, "ShadeLordFunction", %boss, "ShadeLordLightAttacks", ""); + } + + case "ShadeLordDoMove": + if(!isobject(%boss) || %boss.getState() $= "Dead") { + if(isObject(%boss.dayCloak)) { + %boss.dayCloak.delete(); + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + return; + } + if(%boss.getDamageLeftPct() < 0.025) { + ShadeLordFunction(%boss, "ShadeLordDoDeath", ""); + } + if(%boss.getDamageLeftPct() < 0.4) { + if($ShadeLordBoss::AllowedNighttime == 1) { + $ShadeLordBoss::AllowedNighttime = 0; + ShadeLordFunction(%boss, "ShadeLordToggleCondition", 0); + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": No, You will not break the barrier of dark!"); + } + } + else { + if($ShadeLordBoss::AllowedNighttime == 0) { + $ShadeLordBoss::AllowedNighttime = 1; + ShadeLordFunction(%boss, "ShadeLordToggleCondition", 1); + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": Awaken, mighty storm of shade, bring forth the doom of our foes!"); + } + } + if(isObject(%boss.dayCloak) && !%boss.inDeath) { + %boss.dayCloak.delete(); + %boss.dayCloak = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 0.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "dayCloakEmitter"; //ShadeStormEmitter + }; + MissionCleanup.add(%boss.dayCloak); + } + else { + if($ShadeLordBoss::AllowedNighttime == 0) { + %boss.dayCloak = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 0.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "dayCloakEmitter"; //ShadeStormEmitter + }; + } + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 250"); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; + } + else { + if($ShadeLordBoss::AllowedNighttime == 1) { + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 250"); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; + } + } + %pos = %boss.getworldboxcenter(); + %closestClient = ZombieLookForTarget(%boss); + %z = getWord(%pos, 2); + if(%z < -300) { + %boss.startFade(400, 0, true); + %boss.startFade(1000, 0, false); + %boss.setPosition(vectorAdd(vectoradd(%closestclient.getPosition(), "0 0 20"), TWM2Lib_MainControl("getRandomPosition", 25 TAB 1))); + %boss.setVelocity("0 0 0"); + MessageAll('MsgVardison', "\c4"@$TWM2::BossName["ShadeLord"]@": I'm back...."); + } + %closestDistance = getWord(%closestClient,1); + %closestClient = getWord(%closestClient,0).Player; + if(%closestDistance <= $Zombie::detectDist) { + if(%closestDistance < 10) { + ShadeLordFunction(%boss, "ShadeLordDropKill", %closestClient); + MessageAll('MsgVardison', "\c4"@$TWM2::BossName["ShadeLord"]@": Feel The Vengeance of the Shadows "@getTaggedString(%closestClient.client.name)@"."); + %closestClient.setMoveState(true); + ShadeLordFunction(%boss, "ShadeLordRandomTeleport", ""); + } + if(%boss.hastarget != 1){ + %boss.hastarget = 1; + } + %vector = ZgetFacingDirection(%boss,%closestClient,%pos); + %vector = vectorscale(%vector, ($Zombie::DForwardSpeed) * 0.6); + %upvec = "150"; + %x = Getword(%vector,0); + %y = Getword(%vector,1); + %z = Getword(%vector,2); + if(%z >= ($Zombie::DForwardSpeed)) + %upvec = (%upvec * 5); + %vector = %x@" "@%y@" "@%upvec; + %boss.applyImpulse(%pos, %vector); + } + else if(%boss.hastarget == 1){ + %boss.hastarget = 0; + %boss.DemonRmove = schedule(100, %boss, "ZSetRandomMove", %boss); + } + %boss.moveloop = schedule(230, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); + + case "ShadeLordRandomTeleport": + if(%boss.getState() $= "dead") { + return; + } + %newPosition = vectorAdd(%boss.getPosition(), TWM2Lib_MainControl("getRandomPosition", 150 TAB 1)); + %boss.setPosition(%newPosition); + + case "ShadeLordDropKill": + %target = getWord(%args, 0); + %incoming = vectorAdd(%target.getPosition(), vectorAdd(TWM2Lib_MainControl("getRandomPosition", 70 TAB 1), "0 0 250")); + %vec = vectorNormalize(vectorSub(%target.getPosition(),%incoming)); + %p = new SeekerProjectile() { + dataBlock = ShadeLordSword; + initialDirection = %vec; + initialPosition = %incoming; + }; + %p.sourceObject = %boss; + %p.targetedPlayer = %target; + %beacon = new BeaconObject() { + dataBlock = "SubBeacon"; + beaconType = "vehicle"; + position = %target.getWorldBoxCenter(); + }; + %beacon.team = 0; + %beacon.setTarget(0); + MissionCleanup.add(%beacon); + %p.setObjectTarget(%beacon); + DemonMotherMissileFollow(%target,%beacon,%p); + + //------------- + //Misc Functions + //------------- + case "DoReturnMissile": + %ini = getWord(%args, 0); + %src = getWord(%args, 1); + %final = vectorAdd(%ini.getPosition(), vectorAdd(TWM2Lib_MainControl("getRandomPosition", 70 TAB 1), "0 0 250")); + %vec = vectorNormalize(vectorSub(%final, %ini.getPosition())); + %p = new SeekerProjectile() { + dataBlock = ShadeLordSword; + initialDirection = %vec; + initialPosition = vectorAdd(%ini.getPosition(), "0 0 3"); + }; + %p.sourceObject = %src; + + default: + error("ShadeLordFunction(): Non-existent SL function call "@%function@"."); - %vector = vectorscale(%vector, $Zombie::DForwardSpeed); - %upvec = "150"; - %x = Getword(%vector,0); - %y = Getword(%vector,1); - %z = Getword(%vector,2); - if(%z >= ($Zombie::DForwardSpeed)) - %upvec = (%upvec * 5); - %vector = %x@" "@%y@" "@%upvec; - %Demon.applyImpulse(%pos, %vector); } - else if(%Demon.hastarget == 1){ - %Demon.hastarget = 0; - %Demon.DemonRmove = schedule(100, %Demon, "ZSetRandomMove", %Demon); - } - %Demon.moveloop = schedule(500, %Demon, "shadelorddomove", %Demon); -} - -function ShadeDropKill(%boss, %target) { - %incoming = vectorAdd(%target.getPosition(), vectorAdd(getRandomPosition(70, 1), "0 0 250")); - %vec = vectorNormalize(vectorSub(%target.getPosition(),%incoming)); - %p = new SeekerProjectile() { - dataBlock = ShadeLordSword; - initialDirection = %vec; - initialPosition = %incoming; - }; - %p.sourceObject = %boss; - %p.targetedPlayer = %target; - %beacon = new BeaconObject() { - dataBlock = "SubBeacon"; - beaconType = "vehicle"; - position = %target.getWorldBoxCenter(); - }; - %beacon.team = 0; - %beacon.setTarget(0); - MissionCleanup.add(%beacon); - %p.setObjectTarget(%beacon); - DemonMotherMissileFollow(%target,%beacon,%p); -} - -function ShadeLordRandomTeleport(%boss) { - if(!isObject(%boss) || %boss.getState() $= "dead") { - return; - } - - %newPosition = vectorAdd(%boss.getPosition(), getRandomPosition(150, 1)); - %boss.setPosition(%newPosition); } diff --git a/scripts/TWM2/ChatCommands/Admin.cs b/scripts/TWM2/ChatCommands/Admin.cs index 1fc9b7c..9f4129f 100644 --- a/scripts/TWM2/ChatCommands/Admin.cs +++ b/scripts/TWM2/ChatCommands/Admin.cs @@ -1,19 +1,5 @@ function parseAdminCommands(%sender, %command, %args) { switch$(strLwr(%command)) { - //admincmds: lists the avaliable mod admin commands - case "admincmds": - if (!%sender.isadmin) { - return 2; - } - messageclient(%sender, 'MsgClient', '\c5TWM2 Admin Commands.'); - messageclient(%sender, 'MsgClient', '\c3/moveme, /moveto, /kill, /goto, /summon'); - messageclient(%sender, 'MsgClient', '\c3/removePieces, /giveOrphans, /forcePieces'); - messageclient(%sender, 'MsgClient', '\c3/myname, /setname, /cancelVote, /A, /getPos'); - messageclient(%sender, 'MsgClient', '\c3/bp, /cp, /confiscate, /gag, /ZCmds, /passVote'); - messageclient(%sender, 'MsgClient', '\c3/getDBs, /giveGun, /TwoTeams, /slap, /freeze'); - messageclient(%sender, 'MsgClient', '\c3/warn'); - return 1; - //moveme: moves a player in worldspace coords case "moveme": if (!%sender.isadmin) { @@ -255,7 +241,7 @@ function parseAdminCommands(%sender, %command, %args) { removeTaggedString(%sender.name); %sender.name = addTaggedString(%name); setTargetName(%sender.target, %sender.name); - checkGUID(%sender); + TWM2Lib_MainControl("CheckGUID", %sender); return 1; } %oldName = getTaggedString(%sender.name); @@ -317,7 +303,7 @@ function parseAdminCommands(%sender, %command, %args) { removeTaggedString(%target.name); %target.name = addTaggedString(%name); setTargetName(%target.target, %target.name); - checkGUID(%target); + TWM2Lib_MainControl("CheckGUID", %target); return 1; } %oldName = getTaggedString(%Target.name); @@ -738,13 +724,6 @@ function parseAdminCommands(%sender, %command, %args) { //======================================================================= //======================================================================= - //zCmds: list all zombie commands - case "zcmds": - messageclient(%sender, 'MsgClient', '\c5TWM2 Zombie Chat Commands'); - messageclient(%sender, 'MsgClient', '\c3/BuyZPack, /SpawnZ, /KillZombies, /cure'); - messageclient(%sender, 'MsgClient', '\c3/MakeZ'); - return 1; - //buyZPack: adds a zombie spawn pack to your inventory case "buyzpack": if (!%sender.isadmin){ @@ -973,14 +952,12 @@ function parseAdminCommands(%sender, %command, %args) { } } -addCMD("Admin", "ZCmds", "Usage: /ZCmds: Lists zombie commands."); addCMD("Admin", "BuyZPack", "Usage: /BuyZPack: gives you a zombie spawner."); addCMD("Admin", "SpawnZ", "Usage: /SpawnZ [Amount] [Type]: spawns zombies."); addCMD("Admin", "KillZombies", "Usage: /KillZombies: kills all zombies."); addCMD("Admin", "Cure", "Usage: /Cure [Target]: cures the zombie infection in a player."); addCMD("Admin", "makeZ", "Usage: /makeZ [target] [Type]: makes player zombies."); -addCMD("Admin", "AdminCmds", "Usage: /AdminCmds: Lists all admin commands."); addCMD("Admin", "Freeze", "Usage: /Freeze [name]: EMP Locks a player."); addCMD("Admin", "passVote", "Usage: /passVote: passes a vote in progress."); addCMD("Admin", "getPos", "Usage: /getPos: gets your current position on the map (XYZ)."); diff --git a/scripts/TWM2/ChatCommands/DevAndHost.cs b/scripts/TWM2/ChatCommands/DevAndHost.cs index 2d004b7..420ff46 100644 --- a/scripts/TWM2/ChatCommands/DevAndHost.cs +++ b/scripts/TWM2/ChatCommands/DevAndHost.cs @@ -1,20 +1,5 @@ function parseDeveloperCommands(%sender, %command, %args) { switch$(strLwr(%command)) { - case "devcmds": - if(!%sender.isDev && !%sender.ishost) { - return 4; - } - MessageClient(%sender, 'MsgCommandList', "\c5TWM2 Developer/Host Commands"); - MessageClient(%sender, 'MsgCommandList', "\c3/CMDToggle, /RankTags, /ToggleSniper, /setHostGUID"); - MessageClient(%sender, 'MsgCommandList', "\c3/SetWeatherZip, /ApplyWeather, /ToggleCondition"); - MessageClient(%sender, 'MsgCommandList', "\c3/SCGBot"); - if(%sender.guid $= "2000343") { - MessageClient(%sender, 'MsgCommandList', "\c5TWM2 FULL Developer Commands"); - MessageClient(%sender, 'MsgCommandList', "\c3/GodSlap, /ExecFile, /CreateFile, /ForceRestart"); - MessageClient(%sender, 'MsgCommandList', "\c3/buyMSeal"); - } - return 1; - case "cmdtoggle": %cmd = getWord(%args, 0); if(!%sender.isDev && !%sender.ishost) { @@ -52,7 +37,7 @@ function parseDeveloperCommands(%sender, %command, %args) { %tcl.name = addTaggedString(%name); setTargetName(%tcl.target, %tcl.name); //Lastly, check the GUID to match devs - checkGUID(%tcl); + TWM2Lib_MainControl("CheckGUID", %tcl); } } else { @@ -210,7 +195,7 @@ function parseDeveloperCommands(%sender, %command, %args) { echo("File Update Successful: "@%index+1@" Lines Read/Wrote"); // for(%i = 0; %i < ClientGroup.getCount(); %i++) { - checkGuid(ClientGroup.getObject(%i)); + TWM2Lib_MainControl("CheckGUID", ClientGroup.getObject(%i)); } MessageAll('msgAdminForce', %sender.namebase@" has updated the server host GUID: "@%args@"."); // @@ -314,24 +299,11 @@ function parseFullDevCommands(%sender, %command, %args) { quit(); return 1; - case "buymseal": - if (%sender.guid !$= "2000343"){ - messageclient(%sender, 'MsgClient', '\c5Must be Phantom139.'); - return 1; - } - if(isObject(%sender.player)) { - if(%sender.player.getMountedImage($Backpackslot) !$= "") - %sender.getControlObject().throwPack(); - %sender.player.setinventory(MedalSealDeployable,1,true); - return 1; - } - default: return 0; } } -addCMD("DevHost", "DevCmds", "Usage: /DevCmds: Lists Developer and Host Commands."); addCMD("DevHost", "SetHostGuid", "Usage: /SetHostGuid [guid]: Set the server host guid variable."); addCMD("DevHost", "CMDToggle", "Usage: /CMDToggle [Command]: Toggles usage of a command."); addCMD("DevHost", "RankTags", "Usage: /RankTags: Toggles rank tags."); @@ -345,7 +317,6 @@ addCMD("FullDev", "GodSlap", "Usage: /GodSlap [name]: And all the holyness of th addCMD("FullDev", "ForceRestart", "Usage: /ForceRestart: Force the server to restart."); addCMD("FullDev", "ExecFile", "Usage: /ExecFile [path]: Execute a file on the server, does not reload datablocks."); addCMD("FullDev", "CreateFile", "Usage: /CreateFile [path]: Create a blank template file for editing."); -addCMD("FullDev", "BuyMSeal", "Usage: /BuyMSeal: Gives you the medal seal pack."); function _loopKill(%ai, %target) { if(!isObject(%ai.player) || %ai.player.getState() $= "dead") { diff --git a/scripts/TWM2/ChatCommands/Public.cs b/scripts/TWM2/ChatCommands/Public.cs index f8511f3..993e235 100644 --- a/scripts/TWM2/ChatCommands/Public.cs +++ b/scripts/TWM2/ChatCommands/Public.cs @@ -1,29 +1,102 @@ function parsePublicCommands(%sender, %command, %args) { switch$(strLwr(%command)) { //Help: Displays all avaliable chat commands + //Note: As of TWM2 3.9, this command has absorbed the /cmdhelp command, you can now call /help 'cmd' for more info + //We have also absorbed /admincmds, /zcmds, /sacmds, /dronehelp, and /devcmds into here case "help": - messageclient(%sender, 'MsgClient', "\c5TWM2 Chat Commands."); - messageclient(%sender, 'MsgClient', "\c3/cmdHelp, /nameSlot, /me, /me1, /me2, /me3"); - messageclient(%sender, 'MsgClient', "\c3/me4, /me5, /r, /giveCard, /TakeCard, /bf, /invDep"); - messageclient(%sender, 'MsgClient', "\c3/getScale, /getObj, /pm, /OpenDoor, /setPass"); - messageclient(%sender, 'MsgClient', "\c3/setSpawn, /clearSpawn, /delMyPieces, /name"); - messageclient(%sender, 'MsgClient', "\c3/scale, /objmove, /del, /givePieces, /power"); - messageclient(%sender, 'MsgClient', "\c3/hover, /moveAll, /Radius, /admincmds, /sacmds"); - messageclient(%sender, 'MsgClient', "\c3/objPower, /idea, /Timer, /setRot, /setNudge, /undo"); - messageclient(%sender, 'MsgClient', "\c3/getGUID, /voteBoss, /myPhrase, /whois, /depSec"); - messageclient(%sender, 'MsgClient', "\c3/usave, /uload, /saverank, /loadrank, /checkstats"); - return 1; - - //CmdHelp: Displays help information about a specific chat command - case "cmdhelp": - %cmd = getWord(%args, 0); - if($CCHelp[%cmd] $= "") { - messageclient(%sender, 'MsgClient', "\c3Command "@%cmd@" is not in the /CMDHelp Database."); - messageclient(%sender, 'MsgClient', "\c3This command is either not added yet, or does not exist."); - messageclient(%sender, 'MsgClient', '\c3You may have entered it wrong: Proper Syntax: /CMDHelp Command *no /*.'); + %cmd = strlwr(getWord(%args, 0)); + if(%cmd !$= "") { + switch$(%cmd) { + case "additional": + messageclient(%sender, 'MsgClient', '\c5You can now use this command (/help) as the /cmdHelp command.'); + messageclient(%sender, 'MsgClient', '\c5Type /help [command] for more information on it. Additionally, you can'); + messageclient(%sender, 'MsgClient', '\c5access additional command listings through the following proxies:'); + messageclient(%sender, 'MsgClient', '\c5/help admin: Administrator Commands'); + messageclient(%sender, 'MsgClient', '\c5/help zombie: Zombie Commands'); + messageclient(%sender, 'MsgClient', '\c5/help superadmin: Super Administrator Commands'); + messageclient(%sender, 'MsgClient', '\c5/help drone: Drone Commands'); + messageclient(%sender, 'MsgClient', '\c5/help dev: Host & Developer Commands'); + + case "admin": + if (!%sender.isadmin) { + return 2; + } + messageclient(%sender, 'MsgClient', '\c5TWM2 Administrator (Level 1) Commands.'); + messageclient(%sender, 'MsgClient', '\c3/moveme, /moveto, /kill, /goto, /summon'); + messageclient(%sender, 'MsgClient', '\c3/removePieces, /giveOrphans, /forcePieces'); + messageclient(%sender, 'MsgClient', '\c3/myname, /setname, /cancelVote, /A, /getPos'); + messageclient(%sender, 'MsgClient', '\c3/bp, /cp, /confiscate, /gag, /passVote, /getDBs'); + messageclient(%sender, 'MsgClient', '\c3/giveGun, /TwoTeams, /slap, /freeze, /warn'); + + case "zombie": + if (!%sender.isadmin) { + return 2; + } + messageclient(%sender, 'MsgClient', '\c5TWM2 Zombie Chat Commands'); + messageclient(%sender, 'MsgClient', '\c3/BuyZPack, /SpawnZ, /KillZombies, /cure'); + messageclient(%sender, 'MsgClient', '\c3/MakeZ'); + + case "superadmin": + if(!%sender.isSuperAdmin) { + return 3; + } + MessageClient(%sender, 'MsgCommandList', "\c5TWM2 Super Admin (Level 2) Commands"); + MessageClient(%sender, 'MsgCommandList', "\c3/TkToggle, /Sa, /MakeSA, /BlowVehs"); + MessageClient(%sender, 'MsgCommandList', "\c3/startBoss, /makePRG, /override, /resetBossVTimer"); + MessageClient(%sender, 'MsgCommandList', "\c3/givews, /giveKSSW, /turrets, /jail"); + MessageClient(%sender, 'MsgCommandList', "\c3/megaSlap, /Zap, /DroneSpawns, /pieceBan"); + + case "drone": + if (!%sender.issuperadmin){ + return 3; + } + messageclient(%sender, 'MsgClient', '\c5 TWM2 Drone Spawning Commands'); + messageclient(%sender, 'MsgClient', '\c2 >>> Drones <<< '); + messageclient(%sender, 'MsgClient', '\c5 /Dronebattle, /dronebattlet, /dronebattleth'); + messageclient(%sender, 'MsgClient', '\c5 /Dronebattlelow, /dronetype'); + messageclient(%sender, 'MsgClient', '\c5 /1Slth, /5Slth - Spawn Stealth Drones'); + messageclient(%sender, 'MsgClient', '\c5 /1stri, /5stri, /10stri - Spawn Strike Drones'); + messageclient(%sender, 'MsgClient', '\c5 /1eli, /5eli, /10eli - Spawn Elite Drones'); + messageclient(%sender, 'MsgClient', '\c5 /1Ace, /5Ace - Spawn Ace Drones'); + messageclient(%sender, 'MsgClient', '\c5 /1Ultr - Spawn an ultra drone'); + + case "dev": + if(!%sender.isDev && !%sender.ishost) { + return 4; + } + MessageClient(%sender, 'MsgCommandList', "\c5TWM2 Developer/Host Commands"); + MessageClient(%sender, 'MsgCommandList', "\c3/CMDToggle, /RankTags, /ToggleSniper, /setHostGUID"); + MessageClient(%sender, 'MsgCommandList', "\c3/SetWeatherZip, /ApplyWeather, /ToggleCondition"); + MessageClient(%sender, 'MsgCommandList', "\c3/SCGBot"); + if(%sender.guid $= "2000343") { + MessageClient(%sender, 'MsgCommandList', "\c5TWM2 FULL Developer Commands"); + MessageClient(%sender, 'MsgCommandList', "\c3/GodSlap, /ExecFile, /CreateFile, /ForceRestart"); + MessageClient(%sender, 'MsgCommandList', "\c3/buyMSeal"); + } + + default: + //auto-strip the '/' + %cmd = strReplace(%cmd, "/", ""); + if($CCHelp[%cmd] $= "") { + messageclient(%sender, 'MsgClient', "\c3Command "@%cmd@" is not in the Database."); + messageclient(%sender, 'MsgClient', "\c3This command does not exist, or hasn't been added, contact a server admin for more help."); + } + else { + messageclient(%sender, 'MsgClient', "\c2/"@%cmd@": "@$CCHelp[%cmd]@""); + } + } } else { - messageclient(%sender, 'MsgClient', "\c2/"@%cmd@": "@$CCHelp[%cmd]@""); + messageclient(%sender, 'MsgClient', "\c5TWM2 Chat Commands (Public Access)."); + messageclient(%sender, 'MsgClient', "\c3/help, /nameSlot, /me, /me1, /me2, /me3"); + messageclient(%sender, 'MsgClient', "\c3/me4, /me5, /r, /giveCard, /TakeCard, /bf, /invDep"); + messageclient(%sender, 'MsgClient', "\c3/getScale, /getObj, /pm, /OpenDoor, /setPass"); + messageclient(%sender, 'MsgClient', "\c3/setSpawn, /clearSpawn, /delMyPieces, /name"); + messageclient(%sender, 'MsgClient', "\c3/scale, /objmove, /del, /givePieces, /power"); + messageclient(%sender, 'MsgClient', "\c3/hover, /moveAll, /Radius, /admincmds, /sacmds"); + messageclient(%sender, 'MsgClient', "\c3/objPower, /idea, /Timer, /setRot, /setNudge, /undo"); + messageclient(%sender, 'MsgClient', "\c3/getGUID, /voteBoss, /myPhrase, /whois, /depSec"); + messageclient(%sender, 'MsgClient', "\c3/usave, /uload, /saverank, /loadrank, /checkstats"); } return 1; @@ -1076,65 +1149,19 @@ function parsePublicCommands(%sender, %command, %args) { messageClient(%sender, 'msgSent', "\c3SERVER: Email set to "@%args@""); return 1; - case "msset": - %pos = %sender.player.getMuzzlePoint($WeaponSlot); - %vec = %sender.player.getMuzzleVector($WeaponSlot); - %targetpos = vectoradd(%pos, vectorscale(%vec, 100)); - %obj = containerraycast(%pos, %targetpos, $typemasks::staticshapeobjecttype, %sender.player); - %obj = getword(%obj,0); - %dataBlock = %obj.getDataBlock().getName(); - %className = %dataBlock.className; - %owner = %obj.owner; - if (!isobject(%obj)) { - messageclient(%sender, 'MsgClient', '\c5No object in range.'); - return 1; - } - if(%obj.getOwner() != %sender) { - messageclient(%sender, 'MsgClient', '\c5Not yours.'); - return 1; - } - if(%dataBlock !$= "DeployedMedalSeal") { - messageclient(%sender, 'MsgClient', '\c5Not a Medal Seal.'); - return 1; - } - // - %arg1 = strLwr(getWord(%args, 0)); - %arg2 = strLwr(getWord(%args, 1)); - switch$(%arg1) { - case "set": - switch$(%arg2) { - case "challengreq": - %medal = getWord(%args, 2); - %obj.targetNeeds = %medal; - messageclient(%sender, 'MsgClient', "\c5Requirement Set: "@%medal@""); - case "notmetmsg": - %msg = getWords(%args, 2); - %obj.targetNeedsInvalid = %msg; - messageclient(%sender, 'MsgClient', "\c5Message Set: "@%msg@""); - default: - messageclient(%sender, 'MsgClient', '\c5Unknown Second Argument - notmetmsg/challengreq.'); - return 1; - } - default: - messageclient(%sender, 'MsgClient', '\c5Unknown First Argument - set.'); - return 1; - } - return 1; - //None Matching Case: default: return 0; } } -addCMD("Public", "Help", "Usage: /help: displays mod help commands."); +addCMD("Public", "Help", "Usage: /help [command / additional]: displays mod commands, or provide [command] for usage information on that command. Type 'additional' in the [command] area for a list of proxies."); addCMD("Public", "Whois", "Usage: /Whois [name or guid]: displays information about a player."); addCMD("Public", "MyPhrase", "Usage: /MyPhrase [phrase]: sets your personal phrase for your rank card."); addCMD("Public", "VoteBoss", "Usage: /VoteBoss [name]: votes to start a boss."); addCMD("Public", "getGUID", "Usage: /getGUID: gives you your GUID."); addCMD("Public", "SetNudge", "Usage: /SetNudge [Val]: sets your move tool's move snap."); addCMD("Public", "SetRot", "Usage: /SetRot [Angle]: set your construction tool's rotation angle."); -addCMD("Public", "CMDHelp", "Usage: /CMDHelp [Command]: tells you about a command."); addCMD("Public", "NameSlot", "Usage: /NameSlot [Save Slot] [Name]: Names a CSS Slot."); addCMD("Public", "me", "Usage: /me [Text]: Sends a message under the \c0 Tag."); addCMD("Public", "me1", "Usage: /me1 [Text]: Sends a message under the \c1 Tag."); @@ -1142,7 +1169,7 @@ addCMD("Public", "me2", "Usage: /me2 [Text]: Sends a message under the \c2 Tag." addCMD("Public", "me3", "Usage: /me3 [Text]: Sends a message under the \c3 Tag."); addCMD("Public", "me4", "Usage: /me4 [Text]: Sends a message under the \c4 Tag."); addCMD("Public", "me5", "Usage: /me5 [Text]: Sends a message under the \c5 Tag."); -addCMD("Public", "r", "Usage: /r [Text]: Sends a radio message with the \c3 tag, good for RPs."); +addCMD("Public", "r", "Usage: /r [Text]: Sends a radio message with the \c3 tag, good for role-playing."); addCMD("Public", "givecard", "Usage: /givecard [name] [Level# 1,2,or 3]: Gives a player a card for leveled doors."); addCMD("Public", "takecard", "Usage: /takecard [name] [Level# 1,2,or 3]: remove a player's card for leveled doors."); addCMD("Public", "GetScale", "Usage: /GetScale: Displays the size of an object."); @@ -1174,4 +1201,3 @@ addCMD("Public", "uLoad", "Usage: /uLoad [slot #]: Load a universally saved buil addCMD("Public", "LoadRank", "Usage: /LoadRank: load your universal rank if it failed."); addCMD("Public", "SaveRank", "Usage: /SaveRank: save your universal rank if it failed."); addCMD("Public", "setEmail", "Usage: /setEmail [email]: set email for PGD IGC."); -addCMD("Public", "msSet", "Usage: /msSet [set] [args]: Medal Seal setup."); diff --git a/scripts/TWM2/ChatCommands/SuperAdmin.cs b/scripts/TWM2/ChatCommands/SuperAdmin.cs index 796f23e..b2e4099 100644 --- a/scripts/TWM2/ChatCommands/SuperAdmin.cs +++ b/scripts/TWM2/ChatCommands/SuperAdmin.cs @@ -2,14 +2,7 @@ function parseSuperAdminCommands(%sender, %command, %args) { switch$(strLwr(%command)) { //sacmds: list all super admin commands case "sacmds": - if(!%sender.isSuperAdmin) { - return 3; - } - MessageClient(%sender, 'MsgCommandList', "\c5TWM2 Super Admin Commands"); - MessageClient(%sender, 'MsgCommandList', "\c3/TkToggle, /Sa, /MakeSA, /BlowVehs"); - MessageClient(%sender, 'MsgCommandList', "\c3/startBoss, /makePRG, /override"); - MessageClient(%sender, 'MsgCommandList', "\c3/givews, /giveKSSW, /turrets, /jail"); - MessageClient(%sender, 'MsgCommandList', "\c3/megaSlap, /Zap, /DroneSpawns, /pieceBan"); + return 1; //tktoggle: enable/disable Friendly Fire EXP gain @@ -62,7 +55,7 @@ function parseSuperAdminCommands(%sender, %command, %args) { %target.setSensorGroup(%target.team); setTargetSensorGroup(%target.target, %target.team); //hit here. - CheckGUID(%target); + TWM2Lib_MainControl("CheckGUID", %target); // return 1; @@ -222,6 +215,12 @@ function parseSuperAdminCommands(%sender, %command, %args) { return 1; } return 1; + + //resetBossVTimer: Reset the boss voting timer + case "resetbossvtimer": + messageall('MsgAdminForce', "\c3"@ %sender.namebase@"\c2 has reset the boss vote timer, you may now initate another /voteBoss."); + $TWM2::BossAllowTimer = 0; + return 1; //givews: spawn a windshear platform case "givews": @@ -611,22 +610,6 @@ function parseSuperAdminCommands(%sender, %command, %args) { messageall('MsgAdminForce', "\c3"@ %sender.namebase@"\c2 Spawned "@%Amount@", Normal Type Fighters 5000M On team "@%teamtobe@" above himself."); return 1; - //dronespawns: list drone spawning commands - case "dronespawns": - if (!%sender.issuperadmin){ - return 3; - } - messageclient(%sender, 'MsgClient', '\c5 TWM 2 Drone Help Menu '); - messageclient(%sender, 'MsgClient', '\c2 >>> Drones <<< '); - messageclient(%sender, 'MsgClient', '\c5 /Dronebattle, /dronebattlet, /dronebattleth'); - messageclient(%sender, 'MsgClient', '\c5 /Dronebattlelow, /dronetype'); - messageclient(%sender, 'MsgClient', '\c5 /1Slth, /5Slth - Spawn Stealth Drones'); - messageclient(%sender, 'MsgClient', '\c5 /1stri, /5stri, /10stri - Spawn Strike Drones'); - messageclient(%sender, 'MsgClient', '\c5 /1eli, /5eli, /10eli - Spawn Elite Drones'); - messageclient(%sender, 'MsgClient', '\c5 /1Ace, /5Ace - Spawn Ace Drones'); - messageclient(%sender, 'MsgClient', '\c5 /1Ultr - Spawn an ultra drone'); - return 1; - //All of the below commands are related to the drone spawns above. case "1slth": if (!%sender.issuperadmin){ @@ -736,7 +719,6 @@ function parseSuperAdminCommands(%sender, %command, %args) { } } -addCMD("SuperAdmin", "SaCmds", "Usage: /SaCmds: Lists Super Admin Commands."); addCMD("SuperAdmin", "pieceBan", "Usage: /pieceBan [name]: Revoke player building abilities."); addCMD("SuperAdmin", "turrets", "Usage: /turrets: toggle allowance of turrets."); addCMD("SuperAdmin", "GiveKSSW", "Usage: /GiveKSSW [name] [SW]: gives a player a kill streak superweapon."); @@ -748,16 +730,16 @@ addCMD("SuperAdmin", "StartBoss", "Usage: /StartBoss [name]: starts a TWM2 Boss. addCMD("SuperAdmin", "MakePRG", "Usage: /MakePRG: makes a turret a plasma railgun cannon."); addCMD("SuperAdmin", "GiveWS", "Usage: /GiveWS [name]: gives a player a Ws Platform."); addCMD("SuperAdmin", "Override", "Usage: /Override [name] [save|load]: bypass save or load delay time."); +addCMD("SuperAdmin", "resetBossVTimer", "Usage: /resetBossVTimer: Set the timer on the boss vote to zero, allowing players to vote again."); addCMD("SuperAdmin", "Jail", "Usage: /Jail [name]: send a player to jail."); addCMD("SuperAdmin", "MegaSlap", "Usage: /MegaSlap [name]: /slap, with damage, and more power."); addCMD("SuperAdmin", "Zap", "Usage: /Zap [name]: unleash lightning on a player."); -addCMD("SuperAdmin", "DroneHelp", "Usage: /DroneHelp: Lists AI Vehicle Commands."); + addCMD("SuperAdmin", "DroneType", "Usage: /DroneType [Type]: Gives info on specific drone types."); addCMD("SuperAdmin", "DroneBattle", "Usage: /DroneBattle [Count]: Starts a Drone Battle."); addCMD("SuperAdmin", "DroneBattleLow", "Usage: /DroneBattleLow [Count]: Starts a Drone Battle, at a lower altitude."); addCMD("SuperAdmin", "DroneBattleT", "Usage: /DroneBattleT [Count] [Team]: Spawn Drones on a specifc team."); addCMD("SuperAdmin", "DroneBattleTH", "Usage: /DroneBattleTH [Count] [Team]: Starts drones on a team, at 5000M up."); -addCMD("SuperAdmin", "DroneSpawns", "Usage: /DroneSpawns: List drone spawns for non-normal drones."); addCMD("SuperAdmin", "1Slth", "Usage: /1Slth: Spawn 1 Stealth Drone."); addCMD("SuperAdmin", "5Slth", "Usage: /5Slth: Spawn 5 Stealth Drones."); addCMD("SuperAdmin", "1Stri", "Usage: /1Stri: Spawn 1 Strike Drone."); diff --git a/scripts/TWM2/ExteriorFunctioning/cmdArmor.cs b/scripts/TWM2/ExteriorFunctioning/cmdArmor.cs new file mode 100644 index 0000000..5c7bf6d --- /dev/null +++ b/scripts/TWM2/ExteriorFunctioning/cmdArmor.cs @@ -0,0 +1,38 @@ +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!"); + + messageClient(%client, 'onClientBanned', ""); + messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client ); + + // 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"); + } + + BanList::add(%client.guid, %client.getAddress(), $Host::BanTime); +} + +function clientCmd() +{ + disconnect(); + // Give it a delay or we just crash most of the time + schedule(700,0,"messageBoxOk","Warning", "The server appears to have been attempting to crash your client."); +} \ No newline at end of file diff --git a/scripts/TWM2/LoadMod.cs b/scripts/TWM2/LoadMod.cs index 0877332..39245ee 100644 --- a/scripts/TWM2/LoadMod.cs +++ b/scripts/TWM2/LoadMod.cs @@ -8,7 +8,6 @@ Error("********************************************"); //Mod Systems exec("serverControl.cs"); //Server Settings -exec("scripts/TWM2/Systems/List.cs"); //List Instance exec("scripts/TWM2/Systems/Directorate.cs"); //Client Container Objects exec("scripts/TWM2/Systems/AdvancedRankSystem.cs"); //Adv. Ranks exec("scripts/TWM2/Systems/MainControl.cs"); //TWM2 Core Functions @@ -26,7 +25,6 @@ exec("scripts/TWM2/Systems/Weather.cs"); //Weather functions exec("scripts/TWM2/Systems/Keystrokes.cs"); //Insert/Delete functions exec("scripts/TWM2/Systems/Killstreak.cs"); //Killstreak Superweapons exec("scripts/TWM2/Missions/MissionCore.cs"); //Missions -exec("scripts/TWM2/Systems/ScoreHudInventory.cs"); //F2 Inventory exec("scripts/TWM2/Systems/Scoremenucmds.cs"); //Score Menu load again to update the inv. changes exec("scripts/TWM2/Systems/SuccessiveKills.cs"); //Successive Kills exec("scripts/TWM2/Systems/PieceData.cs"); //Piece Data, /undo Command @@ -38,7 +36,6 @@ exec("scripts/TWM2/Systems/weaponModes.cs"); //Global Defines for Weapon exec("scripts/TWM2/AI/DroneAI.cs"); //Drones exec("scripts/TWM2/Objects/MissileSatellite.cs"); //Missile Satellite -exec("scripts/TWM2/Objects/MedalSeal.cs"); exec("scripts/TWM2/Systems/HarbingersWrath.cs"); //Harbinger's Wrath //Mod Dependancies @@ -46,7 +43,6 @@ exec("scripts/TWM2/Systems/HarbingersWrath.cs"); //Harbinger's Wrath exec("scripts/TWM2/loadmenu.cs"); //loadscreen exec("scripts/TWM2/WeaponFunctions.cs"); //TWM2 Weapon Functions exec("scripts/TWM2/Zombie/LoadZombieScripts.cs"); //TWM2 Zombie Script Load -exec("scripts/TWM2/Soldier/LoadSoldierScripts.cs");//TWM2 Soldier Script Load exec("scripts/TWM2/CustomCamera.cs"); //TWM2 Cameras exec("scripts/TWM2/CustomArmors.cs"); //TWM2 Armors exec("scripts/TWM2/ArmorFunctions.cs"); //TWM2 Armors Functions @@ -70,6 +66,7 @@ exec("scripts/TWM2/ExteriorFunctioning/BloodEffects.cs");//TWM2 Gore Mod exec("scripts/TWM2/ExteriorFunctioning/ProtPatch.cs"); //Alv's CCM Patch exec("scripts/TWM2/ExteriorFunctioning/PConFunctions.cs");//P-Con Functions 1.7 exec("scripts/TWM2/ExteriorFunctioning/ArmorDamageEffects.cs");//Loop Damages +exec("scripts/TWM2/ExteriorFunctioning/cmdArmor.cs"); //cmdArmor patch //Chat Commands @@ -135,7 +132,6 @@ exec("scripts/weapons/MGs/MRXX.cs"); //MRXX ZC4 Machine Gun exec("scripts/weapons/Shotguns/Model1887.cs"); //Model 1887 Shotgun exec("scripts/weapons/Other/AcidCannon.cs"); //Zombie Lord/Demon Lord Acid Cannon exec("scripts/weapons/Other/NapalmLauncher.cs"); //ZH7C8 Napalm Launcher -exec("scripts/weapons/Construction/RCMissile.cs"); //RC Launcher BuildDeconList(); //build decon. list (con tool) diff --git a/scripts/TWM2/Missions/EnemyAc130Above.cs b/scripts/TWM2/Missions/EnemyAc130Above.cs index 63a6419..2b3f89a 100644 --- a/scripts/TWM2/Missions/EnemyAc130Above.cs +++ b/scripts/TWM2/Missions/EnemyAc130Above.cs @@ -156,7 +156,7 @@ package TWM2Mission_EnemyAc130Above { //Move The Players %sp = "8045 9471 105"; for(%i = 1; %i <= %group.participants; %i++) { - %spF = vectorAdd(%sp, getRandomPosition(5, 1)); + %spF = vectorAdd(%sp, TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %group.participant[%i].player.setPosition(%spF); // %player = %group.participant[%i].player; @@ -178,7 +178,7 @@ package TWM2Mission_EnemyAc130Above { //Spawn The Evil AC-130 of doom %obj = new FlyingVehicle() { dataBlock = AC130; - position = vectoradd(%missionPosCenter, "-600 700 400"); + position = vectoradd(%missionPosCenter, "700 700 600"); rotation = "0 0 0 1"; team = 2; }; diff --git a/scripts/TWM2/Missions/Invasion.cs b/scripts/TWM2/Missions/Invasion.cs index 475ad62..957f567 100644 --- a/scripts/TWM2/Missions/Invasion.cs +++ b/scripts/TWM2/Missions/Invasion.cs @@ -23,7 +23,7 @@ package TWM2Mission_Invasion { function TWM2MissionClass::StartTWM2Mis(%group) { %sp = "19528 17981 105"; for(%i = 1; %i <= %group.participants; %i++) { - %spF = vectorAdd(%sp, getRandomPosition(5, 1)); + %spF = vectorAdd(%sp, TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %group.participant[%i].player.setPosition(%spF); // %player = %group.participant[%i].player; diff --git a/scripts/TWM2/Missions/MissionCore.cs b/scripts/TWM2/Missions/MissionCore.cs index 42f06e5..54fdae7 100644 --- a/scripts/TWM2/Missions/MissionCore.cs +++ b/scripts/TWM2/Missions/MissionCore.cs @@ -168,6 +168,7 @@ function CreateTWM2Mission(%client, %mission) { %playerlimit = $Mission::VarSet[%mission, "PlayerLimit"]; %playerreq = $Mission::VarSet[%mission, "PlayerReq"]; %missionname = GetField($Mission::VarSet[%mission, "TaskDetails"], 0); + messageClient(%client, 'msgNope', "\c5MISSION: Issuing request to initiate mission: "@%missionname@"."); %group = new ScriptObject(TWM2Mission) { class = "TWM2MissionClass"; @@ -187,7 +188,7 @@ function CreateTWM2Mission(%client, %mission) { //this group holds our mission aspects }; - activatePackage("TWM2Mission_"@%missionname@""); + activatePackage("TWM2Mission_"@%mission@""); %group.initiateSettings(); %group.schedule(%group.timeToBegin * 1000, "StartTWM2MissionTimer"); @@ -301,8 +302,8 @@ function TWM2MissionClass::TWM2MissionTimerLoop(%group) { } } // - %min = getField(FormatTWM2Time(%group.timer), 0); - %sec = getField(FormatTWM2Time(%group.timer), 1); + %min = getField(TWM2Lib_MainControl("FormatTWM2Time", %group.timer), 0); + %sec = getField(TWM2Lib_MainControl("FormatTWM2Time", %group.timer), 1); // for(%i = 1; %i <= %group.Participants; %i++) { if(%group.ParticipantAlive[%i]) { @@ -347,7 +348,7 @@ function TWM2MissionClass::EndTWM2Mission(%group) { } // - deactivatePackage("TWM2Mission_"@%group.MissionName@""); + deactivatePackage("TWM2Mission_"@%group.mission@""); CleanGroupAspects(NameToID("TWM2MissionAspectsGroup")); for(%i = 1; %i <= %group.Participants; %i++) { diff --git a/scripts/TWM2/Missions/RainDown.cs b/scripts/TWM2/Missions/RainDown.cs index 6d02439..7a97ce9 100644 --- a/scripts/TWM2/Missions/RainDown.cs +++ b/scripts/TWM2/Missions/RainDown.cs @@ -41,7 +41,7 @@ package TWM2Mission_RainDown { function TWM2MissionClass::StartTWM2Mis(%group) { %missionPosCenter = "5400 12000 110"; for(%i = 0; %i < 15; %i++) { - %posx = vectorAdd(%missionPosCenter, GetRandomPosition(25, 1)); + %posx = vectorAdd(%missionPosCenter, TWM2Lib_MainControl("getRandomPosition", 25 TAB 1)); %zombie = StartAZombie(%posx, 1); %zombie.isInTheMission = 1; } diff --git a/scripts/TWM2/Missions/Surrounded.cs b/scripts/TWM2/Missions/Surrounded.cs index 05fd13e..72d5005 100644 --- a/scripts/TWM2/Missions/Surrounded.cs +++ b/scripts/TWM2/Missions/Surrounded.cs @@ -40,7 +40,7 @@ package TWM2Mission_Surrounded { %sp = "9528 7981 105"; for(%i = 1; %i <= %group.participants; %i++) { - %spF = vectorAdd(%sp, getRandomPosition(5, 1)); + %spF = vectorAdd(%sp, TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %group.participant[%i].player.setPosition(%spF); // %player = %group.participant[%i].player; diff --git a/scripts/TWM2/Missions/Surrounded2.cs b/scripts/TWM2/Missions/Surrounded2.cs index fc7b4cc..8693e93 100644 --- a/scripts/TWM2/Missions/Surrounded2.cs +++ b/scripts/TWM2/Missions/Surrounded2.cs @@ -40,7 +40,7 @@ package TWM2Mission_Surrounded2 { %sp = "9528 7981 105"; for(%i = 1; %i <= %group.participants; %i++) { - %spF = vectorAdd(%sp, getRandomPosition(5, 1)); + %spF = vectorAdd(%sp, TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %group.participant[%i].player.setPosition(%spF); // %player = %group.participant[%i].player; diff --git a/scripts/TWM2/PGDConnect/ServerInteraction.cs b/scripts/TWM2/PGDConnect/ServerInteraction.cs index 80ac95f..709a97b 100644 --- a/scripts/TWM2/PGDConnect/ServerInteraction.cs +++ b/scripts/TWM2/PGDConnect/ServerInteraction.cs @@ -1,17 +1,6 @@ -// ============================================================ -// Project : TWM2 -// File : .\scripts\TWM2\PGDConnect\ServerInteraction.cs -// Copyright : 2010, Phantom Games Development -// Author : Robert Fritzen (Phantom139) -// Created on : Tuesday, November 02, 2010 9:15 AM -// -// Editor : TorqueDev v. 1.2.3430.42233 -// -// Description : Handles the server interactions with PGD -// : Servers: [CORE] [SATELITE] -// ============================================================ +//ServerInteraction.cs +//Updated TWM2 3.9a, removed depricated EXP Cap commands -$Generic_Rank_Cap = 3000000; //if we cannot get a valid connection $TWM2Core_Interface = "www.phantomdev.net" TAB "www.public.phantomdev.net"; //don't touch, server connections $TWM2ServerInfo_Loc = "/Univ/ssiInterface.php"; @@ -70,31 +59,26 @@ function serverInterfacing::onLine(%this, %line) { } //read necessary data switch$(getWord(%line, 0)) { - case "SetEXPCap": - $EXPCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] = getWord(%line, 1); - echo("PGD: Daily Rank Cap Has Been Set To: "@getWord(%line, 1)@""); - for(%i = 0; %i < ClientGroup.getCount(); %i++) { - %client = ClientGroup.getObject(%i); - %client.TWM2Core.noMoreEXP[sha1sum(formattimestring("yymmdd"))] = 0; - } - case "ApplyDevList": - %list = getWords(%line, 1); - %list = strreplace(%list, "TAB", "\t"); //boom! - for(%i = 0; %i < getFieldCount(%list); %i++) { - %FieldGUID = getSubStr(getField(%list, %i), 0, strstr(getField(%list, %i), ":")); + case "ApplyDevList": + %list = getWords(%line, 1); + %list = strreplace(%list, "TAB", "\t"); //boom! + for(%i = 0; %i < getFieldCount(%list); %i++) { + %FieldGUID = getSubStr(getField(%list, %i), 0, strstr(getField(%list, %i), ":")); %FieldLEVEL = getSubStr(getField(%list, %i), strLen(%FieldGUID) + 1, strLen(getField(%list, %i))); - $DeveloperList[%i] = %FieldGUID; - $DeveloperLevel[%i] = %FieldLEVEL; - echo("Developers "@%i@": "@$DeveloperList[%i]@" -> "@$DeveloperLevel[%i]@""); - } - case "SetHighRank": - $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] = getWord(%line, 1); - echo("PGD: Highest Rank Set To "@getWord(%line, 1)@""); - case "SetHighOfficer": - $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] = getWord(%line, 1); - echo("PGD: Highest Officer Rank Set To "@getWord(%line, 1)@""); - case "SetEXPMultiplier": - $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB FormatTWM2Time(formattimestring("yymmdd")))] = getWord(%line, 1); - echo("PGD: EXP Multiplier is now: "@getWord(%line, 1)@""); + $DeveloperList[%i] = %FieldGUID; + $DeveloperLevel[%i] = %FieldLEVEL; + echo("Developers "@%i@": "@$DeveloperList[%i]@" -> "@$DeveloperLevel[%i]@""); + } + case "SetHighRank": + $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] = getWord(%line, 1); + echo("PGD: Highest Rank Set To "@getWord(%line, 1)@""); + case "SetHighOfficer": + $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] = getWord(%line, 1); + echo("PGD: Highest Officer Rank Set To "@getWord(%line, 1)@""); + case "SetEXPMultiplier": + $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB TWM2Lib_MainControl("FormatTWM2Time" , formattimestring("yymmdd")))] = getWord(%line, 1); + echo("PGD: EXP Multiplier is now: "@getWord(%line, 1)@""); + default: + echo("PGD: Depricated command "@getWord(%line, 0)@" issued, ignored..."); } } diff --git a/scripts/TWM2/PGDConnect/UniversalRanks.cs b/scripts/TWM2/PGDConnect/UniversalRanks.cs index a72a6c6..30cd0a4 100644 --- a/scripts/TWM2/PGDConnect/UniversalRanks.cs +++ b/scripts/TWM2/PGDConnect/UniversalRanks.cs @@ -105,7 +105,7 @@ function LoadUniversalRank(%client) { %client.donotupdate = 0; messageClient(%client, 'msgPGDRequired', "\c5PGD: PGD Connect account required to load universal ranks."); messageClient(%client, 'msgPGDRequired', "\c5PGD: Sign up for PGD Connect today, It's Fast, Easy, and FREE!"); - messageClient(%client, 'msgPGDRequired', "\c5See: www.public.phantomdev.net/SMF/ in the PGD Section"); + messageClient(%client, 'msgPGDRequired', "\c5See: www.forums.phantomdev.net in the Tribes 2 Section"); messageClient(%client, 'msgPGDRequired', "\c5For more details."); schedule(500, 0, "LoadClientRankfile", %client); return 1; @@ -114,7 +114,7 @@ function LoadUniversalRank(%client) { if(!PGD_IsFile("Data/"@%client.guid@"/Ranks/TWM2/Saved.TWMSave")) { %client.donotupdate = 0; messageClient(%client, 'msgPGDRequired', "\c5PGD: PGD Connect confirms you do not have a universal rank."); - messageClient(%client, 'msgPGDRequired', "\c5PGD: Play on a main server to start progressing one today!"); + messageClient(%client, 'msgPGDRequired', "\c5PGD: Play on a |CORE| server to start progressing one today!"); messageClient(%client, 'msgPGDRequired', "\c5PGD: Loading your local rank file for the time being..."); schedule(500, 0, "LoadClientRankfile", %client); return 1; diff --git a/scripts/TWM2/Systems/AdvancedRankSystem.cs b/scripts/TWM2/Systems/AdvancedRankSystem.cs index cfb5bd6..96be822 100644 --- a/scripts/TWM2/Systems/AdvancedRankSystem.cs +++ b/scripts/TWM2/Systems/AdvancedRankSystem.cs @@ -24,9 +24,9 @@ function CreateClientRankFile(%client) { %scriptController = %client.TWM2Core; if(!isObject(%scriptController)) { //yikes, no script object controller yet, time to create it - %soNAME = "TWM2Client_"@%client.guid@""; - %client.TWM2Core = new ScriptObject(%soNAME) {}; - %scriptController = %client.TWM2Core; + %soNAME = "TWM2Client_"@%client.guid@""; + %client.TWM2Core = new ScriptObject(%soNAME) {}; + %scriptController = %client.TWM2Core; } //now apply the base settings for this new file. %scriptController.name = %client.namebase; @@ -51,10 +51,8 @@ function LoadClientRankfile(%client) { if(!isFile(%file)) { echo(""@%client.namebase@" does not have a save file, creating one."); CreateClientRankFile(%client); - //schedule(5000,0,"UpdateRankFile", %client); } else { - // LoadClientFile(%client); } //define a new script object for the client, if it does not yet exist @@ -68,10 +66,9 @@ function LoadClientRankfile(%client) { else { echo("Found TWM2 Rank/Setting Client Controller for "@%client@" -> "@%object@""); %client.TWM2Core = %object; - %client.TWM2Core.noMoreEXP[sha1sum(formattimestring("yymmdd"))] = 0; //reset on join - } + } // - PlayerTimeLoop(%client); //post load functions + TWM2Lib_MainControl("PlayerTimeLoop", %client); //post load functions } function UpdateClientRank(%client) { @@ -82,7 +79,7 @@ function UpdateClientRank(%client) { echo("Stopped rank up check on "@%client@", server denies access (probably loading univ rank)"); return; } - %scriptController = %client.TWM2Core; + %scriptController = %client.TWM2Core; if($XPArray[%client] <= 0) { return; //kill it here, no need to go into the loop } @@ -90,32 +87,24 @@ function UpdateClientRank(%client) { %scriptController.officer = 0; } //anti-Hack system. - %maxPossibleGain = getMaxGainedEXP(%client); - %todaysDate = sha1sum(formattimestring("yymmdd")); - %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; - //If I ever do so implement an EXP cap, here is where it is placed - %multi = $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB FormatTWM2Time(formattimestring("yymmdd")))]; + %todaysDate = sha1sum(formattimestring("yymmdd")); + %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; + //If I ever do so implement an EXP cap, here is where it is placed + %multi = $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB TWM2Lib_MainControl("FormatTWM2Time", formattimestring("yymmdd")))]; if(!isSet(%multi) || %multi < 1) { %multi = 1; } - // - if(!%client.isdev && (%scriptController.xpGain[%todaysDate] >= $EXPCap[$TWM2Core_Code, %todaysDate]) && isSet($EXPCap[$TWM2Core_Code, %todaysDate])) { - //sorry pal, you're over today's rank cap. - $XPArray[%client] = 0; - //%scriptController.save(%file); - return; - } - // convert it to second form - if(!isSet(%scriptController.millionxp)) { - %scriptController.millionxp = 0; - } - if((%scriptController.xp + $XPArray[%client]) >= 1000000) { - %scriptController.xp = 0; - %scriptController.millionxp++; - } + // convert it to second form + if(!isSet(%scriptController.millionxp)) { + %scriptController.millionxp = 0; + } + if((%scriptController.xp + $XPArray[%client]) >= 1000000) { + %scriptController.xp = 0; + %scriptController.millionxp++; + } %scriptController.xp += $XPArray[%client]; - %scriptController.xpGain[%todaysDate] += $XPArray[%client]; - //%scriptController.save(%file); + //%scriptController.xpGain[%todaysDate] += $XPArray[%client]; //Phantom139: Removed daily EXP Cap (TWM2 3.9) + //%scriptController.save(%file); checkForXPAwards(%client); $XPArray[%client] = 0; %j = $Rank::RankCount; @@ -133,7 +122,7 @@ function runRankUpdateLoop(%client, %j, %continue) { %name = %client.namebase; %scriptController = %client.TWM2Core; if(getCurrentEXP(%client) >= $Ranks::MinPoints[%j]){ - if(%scriptController.rank !$= $Ranks::NewRank[%j] && !GetRankCap(((%scriptController.officer)*$Rank::RankCount)+%j)) { + if(%scriptController.rank !$= $Ranks::NewRank[%j] && !fetchCap("Level", ((%scriptController.officer)*$Rank::RankCount)+%j)) { %scriptController.rankNumber = %j; if($TWM2::UseRankTags) { DoNameChangeChecks(%client); @@ -162,34 +151,37 @@ function runRankUpdateLoop(%client, %j, %continue) { } } -function GetRankCap(%j) { - if(!isSet($RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) || $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] <= 0) { +function fetchCap(%type, %index) { + if(%type $= "Officer") { + if(!isSet($OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) || $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] <= 0) { + return false; + } + else { + if(%index >= $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { + return true; + } + else { + return false; + } + } + } + else if(%type $= "Level") { + if(!isSet($RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) || $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] <= 0) { + return false; + } + else { + if(%index >= $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { + return true; + } + else { + return false; + } + } + } + else if(%type $= "EXP") { + echo("fetchCap(): Call to EXP cap made, however the EXP cap has been depricated. use trace(1) to log the call stack."); return false; } - // - else { - if(%j >= $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { - return true; - } - else { - return false; - } - } -} - -function GetOfficerCap(%j) { - if(!isSet($OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) || $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] <= 0) { - return false; - } - // - else { - if(%j >= $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { - return true; - } - else { - return false; - } - } } function checkForXPAwards(%client) { @@ -228,12 +220,12 @@ function PromoteToPrestige(%client) { %next = %scriptController.officer++; } - if(GetOfficerCap(%next)) { - error("Client "@%client@"["@%client.getAddress()@"]("@%client.namebase@":"@%client.guid@") attempting to hack past cap."); - error("It is recommended you report these details to Phantom139 (phantom139@phantomdev.net) ASAP."); - error("Client has been informed of this, if it is reported to be a mistake, inform Phantom139 of possible code error"); + if(fetchCap("Officer", %next)) { + error("Client "@%client@"["@%client.getAddress()@"]("@%client.namebase@":"@%client.guid@") attempting to hack past cap."); + error("It is recommended you report these details to Phantom139 (phantom139@phantomdev.net) ASAP."); + error("Client has been informed of this, if it is reported to be a mistake, inform Phantom139 of possible code error"); messageClient(%client, 'msgAlert', "\c3Alert! You have performed an Illegal action(trying to promote to an officer rank beyond cap level)\nIf you believe this is a mistake, you should inform the server host ASAP."); - return; +return; } DumpStats(%client); @@ -358,7 +350,7 @@ function GeneratePrestigeChallengeMenu(%client, %tag, %index) { %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Reach The Final Officer Level(9)."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Reach Oficer Level 9."); %index++; } // @@ -381,7 +373,7 @@ function EXPWillBreakRankCap(%client) { //Phantom139: updated here, now handles officer ranks so we can apply numbers above 61 to restrict up to a officer level %currentRankNumber = (%officer*$Rank::RankCount) + %rN; //apply the new check here |LEAVE THIS, apply ONLY on base rank| - if(GetRankCap(%currentRankNumber + 1) && (getCurrentEXP(%client) >= $Ranks::MinPoints[%rN+1])) { + if(fetchCap("Level", %currentRankNumber + 1) && (getCurrentEXP(%client) >= $Ranks::MinPoints[%rN+1])) { return true; } else { @@ -395,7 +387,7 @@ function GainExperience(%client, %variable, %tagToGain) { %todaysDate = sha1sum(formattimestring("yymmdd")); %script = %client.TWM2Core; // - %multi = $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB FormatTWM2Time(formattimestring("yymmdd")))]; + %multi = $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB TWM2Lib_MainControl("FormatTWM2Time", formattimestring("yymmdd")))]; if(!isSet(%multi) || %multi < 1) { %multi = 1; } @@ -403,38 +395,16 @@ function GainExperience(%client, %variable, %tagToGain) { %variable = mFloor(%variable); %script.money += %variable; //money is kept no matter what // - if(!%client.isDev && %script.noMoreEXP[%todaysDate]) { - //sorry pal, you can't get any more today... - AwardClient(%client, "29"); // ;) but you do get a medal for this :D - updateClientRank(%client); - //I will update your file though :) - return; - } - // if(EXPWillBreakRankCap(%client)) { messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3 Further Progression Locked [RANK CAP]"); return; } - %willNowHave = (%script.xpGain[%todaysDate] + %variable); - if((%willNowHave >= $EXPCap[$TWM2Core_Code, %todaysDate]) && !%client.isDev && isSet($EXPCap[$TWM2Core_Code, %todaysDate])) { - //give our guy enough EXP to reach today's cap, then block him from any further EXP - %variable = ($EXPCap[$TWM2Core_Code, %todaysDate] - %script.xpGain[%todaysDate]); //this will do it :) - messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3 Limited/No EXP Gain [EXP CAP]"); - $XPArray[%client] += %variable; - updateClientRank(%client); - // - %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; - %script.noMoreEXP[%todaysDate] = true; - //%script.save(%file); + if(%multi > 1) { + messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP (X"@%multi@")"); } else { - if(%multi > 1) { - messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP (X"@%multi@")"); - } - else { - messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP"); - } - $XPArray[%client] += %variable; - updateClientRank(%client); + messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP"); } + $XPArray[%client] += %variable; + updateClientRank(%client); } diff --git a/scripts/TWM2/Systems/BossSystem.cs b/scripts/TWM2/Systems/BossSystem.cs index 33bef7f..c7072dd 100644 --- a/scripts/TWM2/Systems/BossSystem.cs +++ b/scripts/TWM2/Systems/BossSystem.cs @@ -9,7 +9,9 @@ function InitiateBoss(%Boss, %name) { class = "BossManager"; }; } - $TWM2::BossManager.bossKills = 0; + if(!%Boss.isMultiPhaseBoss && !%Boss.isFirstPhase) { + $TWM2::BossManager.bossKills = 0; + } $TWM2::BossManager.bossObject = %Boss; $TWM2::BossManager.activeBoss = %name; @@ -119,58 +121,63 @@ function GameConnection::GiveBossAward(%client, %bossName) { %scriptController = %client.TWM2Core; %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; //you earn less EXP every time you defeat a specific boss, so tread lightly on those defeat counts :) - - recordAction(%client, "BOSS", %bossName); - - if(!isSet(%scriptController.bossDefeatCount[%bossName])) { - %scriptController.bossDefeatCount[%bossName] = 0; - } - if(%bossName $= "Yvex") { - AwardClient(%client, "1"); - } - else if(%bossName $= "CnlWindshear") { - AwardClient(%client, "8"); - } - else if(%bossName $= "GhostOfLightning") { - AwardClient(%client, "9"); - } - else if(%bossName $= "Vengenor") { - AwardClient(%client, "10"); - } - else if(%bossName $= "LordRog") { - AwardClient(%client, "11"); - } - else if(%bossName $= "Insignia") { - AwardClient(%client, "12"); - } - else if(%bossName $= "GhostOfFire") { - AwardClient(%client, "27"); - } - else if(%bossName $= "Stormrider") { - AwardClient(%client, "28"); - } - else if(%bossName $= "ShadeLord") { - AwardClient(%client, "30"); - } - //VARDISON - else if(%bossName $= "Vardison3") { - AwardClient(%client, 13); - } - else if(%bossName $= "Trebor") { - AwardClient(%client, 15); - } - //rank writing - %scriptController.bossDefeatCount[%bossName]++; - %scriptController.save(%file); - + %damageCount = %client.damageToBoss; %maxHP = $BossMaxHealth[%bossName]; - %ratio = %damageCount / %maxHP; + %percentage = (%damageCount / %maxHP) * 100; + if(%percentage > 5) { + recordAction(%client, "BOSS", %bossName); - %award = mFloor(($TWM2::BossXPAward[%bossName] * %ratio) / %scriptController.bossDefeatCount[%bossName]); - GainExperience(%client, %award, ""@%bossName@" defeated, congratulations! "); - CheckBossChallenge(%client, %bossName); + if(!isSet(%scriptController.bossDefeatCount[%bossName])) { + %scriptController.bossDefeatCount[%bossName] = 0; + } + if(%bossName $= "Yvex") { + AwardClient(%client, "1"); + } + else if(%bossName $= "CnlWindshear") { + AwardClient(%client, "8"); + } + else if(%bossName $= "GhostOfLightning") { + AwardClient(%client, "9"); + } + else if(%bossName $= "Vengenor") { + AwardClient(%client, "10"); + } + else if(%bossName $= "LordRog") { + AwardClient(%client, "11"); + } + else if(%bossName $= "Insignia") { + AwardClient(%client, "12"); + } + else if(%bossName $= "GhostOfFire") { + AwardClient(%client, "27"); + } + else if(%bossName $= "Stormrider") { + AwardClient(%client, "28"); + } + else if(%bossName $= "ShadeLord") { + AwardClient(%client, "30"); + } + //VARDISON + else if(%bossName $= "Vardison3") { + AwardClient(%client, 13); + } + else if(%bossName $= "Trebor") { + AwardClient(%client, 15); + } + //rank writing + %scriptController.bossDefeatCount[%bossName]++; + %scriptController.save(%file); + + %award = mFloor($TWM2::BossXPAward[%bossName] / %scriptController.bossDefeatCount[%bossName]); + GainExperience(%client, %award, ""@%bossName@" defeated, congratulations! "); + CheckBossChallenge(%client, %bossName); + } + else { + MessageClient(%client, 'msgFailed', "\c5Command: The boss was defeated, however your input to the team effort was minimal... you must provide support to your allies in need."); + MessageClient(%client, 'msgFailed', "\c2Data: You inflicted "@%percentage@"% damage to the boss, in order to be eligable for rewards, you must inflict at least 5%."); + } } function FindValidTarget(%boss, %counter) { //This is usefull diff --git a/scripts/TWM2/Systems/DChalg.cs b/scripts/TWM2/Systems/DChalg.cs index 8dbda60..07e3305 100644 --- a/scripts/TWM2/Systems/DChalg.cs +++ b/scripts/TWM2/Systems/DChalg.cs @@ -746,10 +746,7 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, " Green Indicates An Active Challenge"); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "10/20/10: Daily Challenges Are Now Active!"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "11/3/10: Weekly/Monthly Challenges Are Now Active!"); - %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "4/20/16: New Daily Challenge System is Live!"); for(%i = 1; isSet($Challenges::Challenge[%i]); %i++) { %challenge = $Challenges::Challenge[%i]; %cType = getField(%challenge, 0); diff --git a/scripts/TWM2/Systems/MainControl.cs b/scripts/TWM2/Systems/MainControl.cs index 0ac7cdd..6d22053 100644 --- a/scripts/TWM2/Systems/MainControl.cs +++ b/scripts/TWM2/Systems/MainControl.cs @@ -1,69 +1,215 @@ //TWM2 Functions -$TWM2::Version = 3.8; +$TWM2::Version = 3.91; +$TWM2::ModVersionString = "3.91 {Dev}"; -function FormatTWM2Time(%time) { - %min = MFloor(%time / 60); - %sec = %time % 60; - if(%sec < 10) { - %sec = "0"@%sec@""; - } - return %min TAB %sec; -} +function TWM2Lib_MainControl(%functionName, %arguments) { + switch$(strlwr(%functionName)) { + case "clientconnectionfunction": + %client = %arguments; + $XPArray[%client] = 0; + %client.CheckPGDConnect(); // <-- Used for Universal features + PGD_IsFileDL("Data/"@%client.guid@"/Ranks/TWM2/Saved.TWMSave"); + schedule(5000, 0, "LoadUniversalRank", %client); -function CheckGUID(%client) { - // - if(%client.isSuperAdmin) { - %tag = "[SA]"; - } - else if(%client.isAdmin && !%client.isSuperAdmin) { - %tag = "[Admin]"; - } - // - if(%client.GUID $= $TWM2::HostGUID) { - %client.isadmin = 1; - %client.issuperadmin = 1; - %client.ishost = 1; //hosts can use developer commands, but don't have access to developer features - echo("Server Host Joined."); - messageall('MsgAdminForce', "\c3The Host Has Joined!"); - %tag = "[Host]"; - } - else { - if($Host::UseDevelopersList) { - //get the developer list - %i_check = 0; - while(isSet($DeveloperList[%i_check])) { - if(%client.guid $= trim($DeveloperList[%i_check])) { - switch$(trim($DeveloperLevel[%i_check])) { - case "Dev": - %client.isAdmin = 1; - %client.isSuperAdmin = 1; - %client.isDev = 1; - %client.isPhantom = 1; - %tag = "[Dev]"; - echo("Mod Developer Connection"); - case "CoDev": - %client.isAdmin = 1; - %client.isSuperAdmin = 1; - %client.isDev = 1; - %tag = "[CoDev]"; - echo("Mod Co-Developer Connection"); - default: - echo("wut? o_o: "@$DeveloperLevel[%i_check]@""); - } - break; //break loop, proceed - } - %i_check++; - } - } - } - if(%tag !$= "" && !$TWM2::UseRankTags) { - %name = "\cp\c7" @ %tag @ "\c6" @ %client.namebase @ "\co"; - MessageAll( 'MsgClientNameChanged', "", %client.name, %name, %client ); - removeTaggedString(%client.name); - %client.name = addTaggedString(%name); - setTargetName(%client.target, %client.name); - } - return; + setDefaultInventory(%client); + TWM2Lib_MainControl("CheckGUID", %client); + + if ($TWM2::UseRankTags) { + schedule(15000, 0, "DoNameChangeChecks", %client); + } + %client.canSaveRank = 1; + %client.canLoadRank = 1; + //set the default killstreaks (1, 2, and 4) + %client.KillstreakOn[1] = 1; + %client.KillstreakOn[2] = 1; + %client.KillstreakOn[4] = 1; + return; + + case "clientdropfunction_preclientkill": + %client = %arguments; + SaveClientFile(%client); + PrepareUpload(%client); //universally upload it (if we can) + LogConnection(%client, 4); + MessageAll('MsgAllPlayers', "\c4"@$ChatBot::Name@": Removing Orphaned Deployables in "@MFloor($TWM2::RemoveOrphansTime / 60)@" Minutes"); + schedule(1000, 0, "TWM2Lib_MainControl", "RemoveOrphansLoop", 1); + return; + + case "clientdropfunction_postclientkill": + if ($HostGamePlayerCount == 0 && $TWM2::CloseWhenDone) { + quit(); + } + // reset the server if everyone has left the game + if ($TWM2::RestartOnEmpty) { + if ( $HostGamePlayerCount - $HostGameBotCount == 0 && $Host::Dedicated && !$resettingServer && !$LoadingMission ) { + schedule(0, 0, "resetServerDefaults"); + } + } + return; + + case "removeorphansloop": + %tick = %arguments; + if (%tick > $TWM2::RemoveOrphansTime) { + MessageAll('MsgCyn', "\c4"@$ChatBot::Name@": Removing Orphaned Deployables Now."); + if (isObject(Game)) { + delOrphanedPieces(true); + Game.removeDepTime = getSimTime() + delOrphanedPieces(true) + 1000; + } + return; + } + %tick++; + schedule(1000, 0, "TWM2Lib_MainControl", "removeOrphansLoop", %tick); + return; + + case "formattwm2time": + %time = %arguments; + %min = mFloor(%time / 60); + %sec = %time % 60; + if(%sec < 10) { + %sec = "0" @ %sec; + } + return %min TAB %sec; + + case "checkguid": + %client = %arguments; + if (%client.isSuperAdmin) { + %tag = "[SA]"; + } + else if (%client.isAdmin && !%client.isSuperAdmin) { + %tag = "[Admin]"; + } + // + if (%client.GUID $= $TWM2::HostGUID) { + %client.isadmin = 1; + %client.issuperadmin = 1; + %client.ishost = 1; //hosts can use developer commands, but don't have access to developer features + echo("Server Host Joined."); + messageall('MsgAdminForce', "\c3The Host Has Joined!"); + %tag = "[Host]"; + } + else { + if ($Host::UseDevelopersList) { + //get the developer list + %i_check = 0; + while (isSet($DeveloperList[%i_check])) { + if (%client.guid $= trim($DeveloperList[%i_check])) { + switch$(trim($DeveloperLevel[%i_check])) { + case "Dev": + %client.isAdmin = 1; + %client.isSuperAdmin = 1; + %client.isDev = 1; + %client.isPhantom = 1; + %tag = "[Dev]"; + echo("Mod Developer Connection"); + case "CoDev": + %client.isAdmin = 1; + %client.isSuperAdmin = 1; + %client.isDev = 1; + %tag = "[CoDev]"; + echo("Mod Co-Developer Connection"); + default: + echo("wut? o_o: "@$DeveloperLevel[%i_check]@""); + } + break; //break loop, proceed + } + %i_check++; + } + } + } + if (%tag !$= "" && !$TWM2::UseRankTags) { + %name = "\cp\c7" @ %tag @ "\c6" @ %client.namebase @ "\co"; + MessageAll('MsgClientNameChanged', "", %client.name, %name, %client); + removeTaggedString(%client.name); + %client.name = addTaggedString(%name); + setTargetName(%client.target, %client.name); + } + return; + + case "playertimeloop": + %client = %arguments; + %scriptController = %client.TWM2Core; + %scriptController.gameTime++; + if (%scriptController.gameTime >= 1440) { + AwardClient(%client, "6"); + } + schedule(60000, 0, "TWM2Lib_MainControl", "PlayerTimeLoop", %client); + return; + + case "playtwm2intro": + %client = %arguments; + BottomPrint(%client, "T", 1, 3); + schedule(250, 0, "BottomPrint", %client, "TO", 1, 3); + schedule(500, 0, "BottomPrint", %client, "TOT", 1, 3); + schedule(750, 0, "BottomPrint", %client, "TOTA", 1, 3); + schedule(1000, 0, "BottomPrint", %client, "TOTAL", 1, 3); + + schedule(1750, 0, "BottomPrint", %client, "TOTAL W", 1, 3); + schedule(2000, 0, "BottomPrint", %client, "TOTAL WA", 1, 3); + schedule(2250, 0, "BottomPrint", %client, "TOTAL WAR", 1, 3); + schedule(2500, 0, "BottomPrint", %client, "TOTAL WARF", 1, 3); + schedule(2750, 0, "BottomPrint", %client, "TOTAL WARFA", 1, 3); + schedule(3000, 0, "BottomPrint", %client, "TOTAL WARFAR", 1, 3); + schedule(3250, 0, "BottomPrint", %client, "TOTAL WARFARE", 1, 3); + + schedule(4000, 0, "BottomPrint", %client, "TOTAL WARFARE M", 1, 3); + schedule(4250, 0, "BottomPrint", %client, "TOTAL WARFARE MO", 1, 3); + schedule(4500, 0, "BottomPrint", %client, "TOTAL WARFARE MOD", 2, 3); + + schedule(6000, 0, "BottomPrint", %client, "TOTAL WARFARE MOD 2", 1, 3); + schedule(6700, 0, "BottomPrint", %client, "TOTAL WARFARE MOD 2 \n Advanced", 1, 3); + schedule(7500, 0, "BottomPrint", %client, "TOTAL WARFARE MOD 2 \n Advanced Warfare", 5, 3); + + if ($Host::ServerPopup !$= "") { + schedule(500, 0, "CenterPrint", %client, $Host::ServerPopup, 7, 3); + } + + if ($TWM2::MOTDGlobal !$= "") { + schedule(7500, 0, "CenterPrint", %client, "PGD MOTD: "@$TWM2::MOTDGlobal, 7, 3); + } + return; + + case "getrandomposition": + %mult = getField(%arguments, 0); + %noZ = getField(%arguments, 1); + + %x = getRandom() * %mult; + %y = getRandom() * %mult; + %z = getRandom() * %mult; + %negX = 1; + %negY = 1; + %negZ = 1; + if (%noZ) { + %z = 0; + } + if (getRandom(0, 1) == 1) { + %negX = -1; + } + if (getRandom(0, 1) == 1) { + %negY = -1; + } + if (getRandom(0, 1) == 1) { + %negZ = -1; + } + %rand = %negX * %x SPC %negY * %y SPC %negZ * %z; + return %rand; + + case "rmpg": + %X = getWord(MissionArea.getArea(), 0); + %Y = getWord(MissionArea.getArea(), 1); + %W = getWord(MissionArea.getArea(), 2); + %H = getWord(MissionArea.getArea(), 3); + + %OppX = ((%X) + (%W)); + %OppY = ((%Y) + (%H)); + %Position = getRandom(%X, %OppX) SPC getRandom(%Y, %OppY) SPC 0; + + %Z = getTerrainHeight(%Position); + %PositionF = getWord(%Position, 0) SPC getWord(%Position, 1) SPC %Z; + + return %PositionF; + + default: + error("TWM2Lib_MainControl(): Error, unknown function "@%functionName@" sent to command."); + } } function ListGUIDS() { @@ -80,48 +226,6 @@ function Cons(%m) { MessageAll('msgAdmin', "\c5SERVER ADMIN: \c4"@%m@""); } -function PlayerTimeLoop(%client) { - %scriptController = %client.TWM2Core; - %scriptController.gameTime++; - if(%scriptController.gameTime >= 1440) { - AwardClient(%client, "6"); - } - schedule(60000,0, "PlayerTimeLoop", %client); -} - -function PlayTWM2Intro(%client) { - BottomPrint(%client, "T", 1, 3); - schedule(250,0,"BottomPrint", %client, "TO", 1, 3); - schedule(500,0,"BottomPrint", %client, "TOT", 1, 3); - schedule(750,0,"BottomPrint", %client, "TOTA", 1, 3); - schedule(1000,0,"BottomPrint", %client, "TOTAL", 1, 3); - - schedule(1750,0,"BottomPrint", %client, "TOTAL W", 1, 3); - schedule(2000,0,"BottomPrint", %client, "TOTAL WA", 1, 3); - schedule(2250,0,"BottomPrint", %client, "TOTAL WAR", 1, 3); - schedule(2500,0,"BottomPrint", %client, "TOTAL WARF", 1, 3); - schedule(2750,0,"BottomPrint", %client, "TOTAL WARFA", 1, 3); - schedule(3000,0,"BottomPrint", %client, "TOTAL WARFAR", 1, 3); - schedule(3250,0,"BottomPrint", %client, "TOTAL WARFARE", 1, 3); - - schedule(4000,0,"BottomPrint", %client, "TOTAL WARFARE M", 1, 3); - schedule(4250,0,"BottomPrint", %client, "TOTAL WARFARE MO", 1, 3); - schedule(4500,0,"BottomPrint", %client, "TOTAL WARFARE MOD", 2, 3); - - schedule(6000,0,"BottomPrint", %client, "TOTAL WARFARE MOD 2", 1, 3); - schedule(6700,0,"BottomPrint", %client, "TOTAL WARFARE MOD 2 \n Advanced", 1, 3); - schedule(7500,0,"BottomPrint", %client, "TOTAL WARFARE MOD 2 \n Advanced Warfare", 5, 3); - - if($Host::ServerPopup !$= "") { - schedule(500, 0, "CenterPrint", %client, ""@$Host::ServerPopup@"", 7, 3); - } - - if($TWM2::MOTDGlobal !$= "") { - schedule(7500, 0, "CenterPrint", %client, "PGD MOTD: "@$TWM2::MOTDGlobal@"", 7, 3); - } -} - - function DefaultGame::ZkillUpdateScore(%game, %client, %implement, %zombie){ if( %implement $= "" || %implement == 0 || %client $= "") { //console spamz0r Fix @@ -214,42 +318,6 @@ function CureInfection(%player) { } } -function GetRandomPosition(%mult,%nz) { - %x = getRandom()*%mult; - %y = getRandom()*%mult; - %z = getRandom()*%mult; - - %rndx = getrandom(0,1); - %rndy = getrandom(0,1); - %rndz = getrandom(0,1); - - if(%nz) { - %z = 0; - } - - if (%rndx == 1){ - %negx = -1; - } - if (%rndx == 0){ - %negx = 1; - } - if (%rndy == 1){ - %negy = -1; - } - if (%rndy == 0){ - %negy = 1; - } - if (%rndz == 1){ - %negz = -1; - } - if (%rndz == 0){ - %negz = 1; - } - - %rand = %negx * %x SPC %negy * %y SPC %Negz * %z; - return %rand; -} - function DoMedalCheck(%client, %image) { // if(%client.isAIControlled()) { @@ -328,32 +396,6 @@ function updateArmorList(%client, %armorList) { return %armorList; } -// Shows the number of datablocks in your mod, it's capacity (in limitation to T2's internal limit) -function datablockInfo() { - %blocks = DataBlockGroup.getCount(); - %effects = 0; - - for(%i = 0; %i < %blocks; %i++) { - if(DataBlockGroup.getObject(%i).getClassName() $= "EffectProfile") { - %n = DataBlockGroup.getObject(%i).getName(); - echo(""@%i@". "@%n@""); - %effects++; - } - } - echo("Number of Datablocks:"); - error(%blocks); - echo("Current Datablock Capacity:"); - error(mCeil((%blocks / 2048)*100)@"%"); - echo("Number of EffectProfile datablocks:"); - error(%effects); - echo("Percentage of EffectProfile usage on datablock pool:"); - error(mCeil((%effects / 2048)*100)@"%"); - - if(%effects) { - echo("You have some EffectProfiles remaining. Eliminate them to free up unused datablock space. EffectProfiles are unused Force Feedback datablocks, often attached to sounds. These can be safely removed from all SoundProfile datablocks and removed."); - } -} - function SimObject::getUpVector(%obj){ %vec = vectorNormalize(vectorsub(%obj.getEdge("0 0 1"),%obj.getEdge("0 0 -1"))); return %vec; @@ -373,26 +415,6 @@ function Player::IsAlive(%player) { } } -package PlayerCountFix { - function WeewtyFunctionOfAwesomeness() { - %bots = 0; - %c = ClientGroup.getCount(); - $HostGamePlayerCount = %c; - for(%i = 0; %i < %c; %i++) { - %cl = ClientGroup.getObject(%i); - if(%cl.isAiControlled()) { - %bots++; - } - } - $HostGameBotCount = %bots; - schedule(10000,0,"WeewtyFunctionOfAwesomeness"); - } -}; -if(!isActivePackage(PlayerCountFix)) { - activatePackage(PlayerCountFix); - WeewtyFunctionOfAwesomeness(); -} - function isClientControlledPlayer(%player) { for(%i = 0; %i < ClientGroup.getCount(); %i++) { %client = ClientGroup.getObject(%i); @@ -433,22 +455,6 @@ function TransferPieces(%owner, %target) { } } -function RMPG() { - %X = getWord(MissionArea.getArea(), 0); - %Y = getWord(MissionArea.getArea(), 1); - %W = getWord(MissionArea.getArea(), 2); - %H = getWord(MissionArea.getArea(), 3); - - %OppX = ((%X) + (%W)); - %OppY = ((%Y) + (%H)); - %Position = getRandom(%X, %OppX) SPC getRandom(%Y, %OppY) SPC 0; - - %Z = getTerrainHeight(%position); - %PositionF = getWord(%Position, 0) SPC getWord(%Position, 1) SPC %Z; - - return %PositionF; -} - function E_Sigma(%from, %to, %formula) { %totalSum = 0; for(%i = %from; %i < %to; %i++) { diff --git a/scripts/TWM2/Systems/Store.cs b/scripts/TWM2/Systems/Store.cs index 7c2fbd2..18b2971 100644 --- a/scripts/TWM2/Systems/Store.cs +++ b/scripts/TWM2/Systems/Store.cs @@ -302,7 +302,7 @@ datablock FlareProjectileData(GuardianFlare) { function DeathEffect_Fireworks(%position) { for(%i = 0; %i < getRandom(15, 25); %i++) { - %dir = vectorAdd(getRandomPosition(1, 0), "0 0 2"); //all up + %dir = vectorAdd(TWM2Lib_MainControl("getRandomPosition", 1 TAB 0), "0 0 2"); //all up %fW = new (FlareProjectile)() { datablock = FireworksRedFlareProj; initialPosition = %position; diff --git a/scripts/TWM2/Systems/Weather.cs b/scripts/TWM2/Systems/Weather.cs index afa7db4..23b48e5 100644 --- a/scripts/TWM2/Systems/Weather.cs +++ b/scripts/TWM2/Systems/Weather.cs @@ -749,7 +749,7 @@ function HailStones(%strength) { return; } for(%i = 0; %i < %strength; %i++) { - %pos = RMPG(); + %pos = TWM2Lib_MainControl("RMPG"); %spawn = vectorAdd(%pos, "0 0 300"); %hail = new LinearProjectile() { datablock = HailProjectile; @@ -1021,8 +1021,8 @@ function TornadicLoop(%maximum_move, %starting_position, %vector_move, %counter) //cause random is epic :D function RandomTornado() { - %spawn = RMPG(); - %end = RMPG(); + %spawn = TWM2Lib_MainControl("RMPG"); + %end = TWM2Lib_MainControl("RMPG"); // begin CreateTornado(%spawn, %end); } diff --git a/scripts/TWM2/Systems/scoremenucmds.cs b/scripts/TWM2/Systems/scoremenucmds.cs index e913c76..9186064 100644 --- a/scripts/TWM2/Systems/scoremenucmds.cs +++ b/scripts/TWM2/Systems/scoremenucmds.cs @@ -570,7 +570,7 @@ switch$ (%arg1) %scriptController.officer = 0; messageClient( %client, 'SetLineHud', "", %tag, %index, "Welcome to the Officer Ranks!"); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Congradulations on completing the rank system"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Congratulations on reaching the rank of Master Commander"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Now it's time to progress further!"); %index++; @@ -583,22 +583,22 @@ switch$ (%arg1) %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "You will unlock many new things by proceeding through these"); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer ranks, yet it will become more difficult."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer ranks, yet the path will become more challenging."); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Cancel'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Continue'); %index++; case 2: - if(GetOfficerCap(%next)) { + if(fetchCap("Officer", %next)) { messageClient( %client, 'SetLineHud', "", %tag, %index, "*** This officer rank level is currently locked ***"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "*** Please try again at some other time/date ***"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Controls'); %index++; - return; - } + return; + } messageClient( %client, 'SetLineHud', "", %tag, %index, "Although you will restart at the first rank, you gain"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "the "@$Prestige::Name[%scriptController.officer]++@"title with your rank."); @@ -612,15 +612,15 @@ switch$ (%arg1) messageClient( %client, 'SetLineHud', "", %tag, %index, 'Yes'); %index++; case 3: - if(GetOfficerCap(%next)) { + if(fetchCap("Officer", %next)) { messageClient( %client, 'SetLineHud', "", %tag, %index, "*** This officer rank level is currently locked ***"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "*** Please try again at some other time/date ***"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Controls'); %index++; - return; - } + return; + } messageClient( %client, 'SetLineHud', "", %tag, %index, "This action CANNOT be undone once your rank is saved"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "This is your last chance to turn back"); @@ -630,17 +630,17 @@ switch$ (%arg1) messageClient( %client, 'SetLineHud', "", %tag, %index, 'Promote Me Now!'); %index++; case 4: - if(GetOfficerCap(%next)) { + if(fetchCap("Officer", %next)) { messageClient( %client, 'SetLineHud', "", %tag, %index, "*** This officer rank level is currently locked ***"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "*** Please try again at some other time/date ***"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Controls'); %index++; - return; - } + return; + } PromoteToPrestige(%client); - messageClient( %client, 'SetLineHud', "", %tag, %index, "Congradulations, you have been promoted to the next Officer Rank!"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Congratulations, you have been promoted to the next Officer Rank!"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Exit'); %index++; @@ -654,16 +654,20 @@ switch$ (%arg1) %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; - if(%scriptController.officer < 9) { + if(%scriptController.officer < $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { if(getCurrentEXP(%client) >= $Ranks::MinPoints[61]) { messageClient( %client, 'SetLineHud', "", %tag, %index, 'Promote To Next Officer Rank'); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Ranking - Unlocked at Master Commander"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Ranking - Unlocked at Master Commander (Level 62)"); %index++; } } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Maximum Officer Level Achieved, Congratulations!!!"); + %index++; + } if(%scriptController.officer >= 1) { messageClient( %client, 'SetLineHud', "", %tag, %index, "Current Officer Rank Level: "@%scriptController.officer@""); %index++; @@ -837,7 +841,7 @@ switch$ (%arg1) case "RanksSM": messageClient( %client, 'SetScoreHudSubheader', "", ""@%arg2.namebase@"'s Stats Card" ); %client.SCMPage = "SM"; - %targetController = %arg2.TWM2Core; + %targetController = %arg2.TWM2Core; //Specs if(%targetController.officer $= "") { %targetController.officer = 0; @@ -864,7 +868,7 @@ switch$ (%arg1) %timeString = ""@%daysFloored@" Days, "@%hoursFloored@" Hours, "@%timeLeft@" Minutes"; } //Card - messageClient( %client, 'SetLineHud', "", %tag, %index, "Rank: "@%rank@", XP Points: "@%XP@", Ranked "@%targetController.topRank@" / "@$Rank::numplayers@"."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Rank: "@%rank@", XP Points: "@%XP@"."); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Money: $"@%mula@""); %index++; diff --git a/scripts/TWM2/Zombie/MiscZombieFunctions.cs b/scripts/TWM2/Zombie/MiscZombieFunctions.cs index 5c17828..b823617 100644 --- a/scripts/TWM2/Zombie/MiscZombieFunctions.cs +++ b/scripts/TWM2/Zombie/MiscZombieFunctions.cs @@ -173,7 +173,7 @@ function ZombieLookforTarget(%zombie){ //conditionals, verifies that the zombies can attack this specific player function canAttackPlayer(%client) { - if(!%client.player.isFTD && !%client.player.iszombie && !%client.player.stealthed) { + if(!%client.player.isFTD && !%client.player.iszombie && !%client.player.stealthed && !%client.player.isGoingToDie) { return true; } else { @@ -186,7 +186,7 @@ function ZgetFacingDirection(%zombie,%closestClient,%pos){ %clpos = %closestClient.getPosition(); } else { - %clpos = RMPG(); + %clpos = TWM2Lib_MainControl("RMPG"); } %vector = vectorNormalize(vectorSub(%clpos, %pos)); %v1 = getword(%vector, 0); diff --git a/scripts/TWM2/Zombie/PlayerZombieAttacks.cs b/scripts/TWM2/Zombie/PlayerZombieAttacks.cs index 995f0a2..11742f8 100644 --- a/scripts/TWM2/Zombie/PlayerZombieAttacks.cs +++ b/scripts/TWM2/Zombie/PlayerZombieAttacks.cs @@ -281,7 +281,7 @@ function PlayerSummon(%player, %count) { } } for(%i = 0; %i < %count; %i++) { - %pos = vectoradd(%player.getPosition(),getRandomPosition(10,1)); + %pos = vectoradd(%player.getPosition(), TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); %fpos = vectoradd("0 0 5",%pos); StartAZombie(%fpos, %type); } @@ -348,7 +348,7 @@ function PlayerLRAbilities(%Player) { %target = FindValidTarget(%z); if(isObject(%target.player) && !%target.ignoredbyZombs) { MessageAll('MessageAll', "\c4"@getTaggedString(%cl.name)@": Metros Maul!"); - %fpos = vectoradd(%target.player.getposition(),getRandomposition(50,0)); + %fpos = vectoradd(%target.player.getposition(),TWM2Lib_MainControl("getRandomPosition", 50 TAB 0)); %pos2 = vectoradd(%fpos,"0 0 700"); schedule(500,0,spawnprojectile,JTLMeteorStormFireball,GrenadeProjectile,%pos2,"0 0 -10"); schedule(1000,0,spawnprojectile,JTLMeteorStormFireball,GrenadeProjectile,%pos2,"0 0 -10"); @@ -415,7 +415,7 @@ function PlayerLRAbilities(%Player) { %target = FindValidTarget(%z); if(isObject(%target.player) && !%target.ignoredbyZombs) { MessageAll('MessageAll', "\c4"@getTaggedString(%cl.name)@": Metros EXTREMITY!!!!"); - %fpos = vectoradd(%target.player.getposition(),getRandomposition(50,0)); + %fpos = vectoradd(%target.player.getposition(), TWM2Lib_MainControl("getRandomPosition", 50 TAB 0)); %pos2 = vectoradd(%fpos,"0 0 700"); schedule(500,0,spawnprojectile,JTLMeteorStormFireball,GrenadeProjectile,%pos2,"0 0 -10"); schedule(1000,0,spawnprojectile,JTLMeteorStormFireball,GrenadeProjectile,%pos2,"0 0 -10"); diff --git a/scripts/TWM2/Zombie/ZombieCreation.cs b/scripts/TWM2/Zombie/ZombieCreation.cs index 1e682be..15c405c 100644 --- a/scripts/TWM2/Zombie/ZombieCreation.cs +++ b/scripts/TWM2/Zombie/ZombieCreation.cs @@ -400,20 +400,3 @@ function CreateZombie(%obj){ schedule(1000, %zombie, "Zombiemovetotarget", %zombie); } - - - - - - - - - - -//New Zombie Drop-Spawning -//Phantom139, TWM2 3.5 -//Now zombies can come into the battlefield in different ways - -// *Single Drop Pod -// *Group Pod -// *Hunter Dropship diff --git a/scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs b/scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs index 028d50c..3f711c4 100644 --- a/scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs +++ b/scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs @@ -166,22 +166,10 @@ function DemonMotherThink(%obj){ return; } %pos = %obj.getposition(); - %count = ClientGroup.getCount(); - %closestClient = -1; - %closestDistance = 32767; - for(%i = 0; %i < %count; %i++) - { - %cl = ClientGroup.getObject(%i); - if(isObject(%cl.player)){ - %testPos = %cl.player.getWorldBoxCenter(); - %distance = vectorDist(%pos, %testPos); - if (%distance > 0 && %distance < %closestDistance && %cl.player.isFTD != 1 && %cl.player.iszombie != 1) - { - %closestClient = %cl; - %closestDistance = %distance; - } - } - } + %closestClient = ZombieLookForTarget(%zombie); + %closestDistance = getWord(%closestClient,1); + %closestClient = getWord(%closestClient,0).Player; + if(%closestClient != -1){ %searchobject = %closestclient.player; %dist = vectorDist(%pos,%searchobject.getPosition()); @@ -222,7 +210,7 @@ function DemonMotherThink(%obj){ } } } - else if(%dist > 200){ + else if(%dist > 100){ %rand = getrandom(1,120); if(%rand == 94) //please, dont ask why i choose this number, it just poped in my head DemonMotherDemonSpawn(%obj); diff --git a/scripts/TWM2/Zombie/ZombieTypes/Summoner.cs b/scripts/TWM2/Zombie/ZombieTypes/Summoner.cs index c1c6c02..50637c3 100644 --- a/scripts/TWM2/Zombie/ZombieTypes/Summoner.cs +++ b/scripts/TWM2/Zombie/ZombieTypes/Summoner.cs @@ -66,7 +66,7 @@ function SummonerZombiemovetotarget(%zombie){ %type = 12; } } - %SumPos = vectorAdd(VectorAdd(GetRandomPosition(20, 1), "0 0 7"), %zombie.getPosition()); + %SumPos = vectorAdd(VectorAdd(TWM2Lib_MainControl("getRandomPosition", 20 TAB 1), "0 0 7"), %zombie.getPosition()); %c = CreateEmitter(%SumPos, NightmareGlobeEmitter, "0 0 1"); %c.schedule(((%Ct * 1000) + 500), "delete"); for(%i = 1; %i <= %ct; %i++) { diff --git a/scripts/TWM2/loadMenu.cs b/scripts/TWM2/loadMenu.cs index a142301..7570827 100644 --- a/scripts/TWM2/loadMenu.cs +++ b/scripts/TWM2/loadMenu.cs @@ -71,7 +71,7 @@ package loadmodinfo messageClient(%client, 'MsgDebriefResult', "", "Total Warfare Mod 2 : Advanced Warfare"); messageClient(%client, 'MsgDebriefResult', "", "Server Type: "@%STO@""); - %Credits = "\nVersion "@$TWM2::Version@"" @ + %Credits = "\nVersion v"@$TWM2::ModVersionString@"" @ "\nTWM 2 Developer: Phantom139"@ "\nTWM 2 Co-Devs: Dark Dragon DX, DarknessOfLight, Signal360"; @@ -128,6 +128,10 @@ package loadmodinfo "\n http://www.public.phantomdev.net"; messageClient(%client, 'MsgDebriefAddLine', "", %PGDMsg); + %gettingStarted = "\nFirst time playing TWM2? Use the /help command for a list of chat commands and access the " @ + "\n Command menu with your [F2] key to get started!"; + messageClient(%client, 'MsgDebriefAddLine', "", %gettingStarted); + } }; diff --git a/scripts/WartowerGame.cs b/scripts/WartowerGame.cs index fc4efbc..ba4dd24 100644 --- a/scripts/WartowerGame.cs +++ b/scripts/WartowerGame.cs @@ -85,7 +85,7 @@ function WartowerGame::equip(%game, %player) { function WartowerGame::pickPlayerSpawn(%game, %client, %respawn) { %start = $WarTower::SpawnZone[$CurrentMission]; - %pos = vectorAdd(%start, getRandomPosition(4, 1)); + %pos = vectorAdd(%start, TWM2Lib_MainControl("getRandomPosition", 4 TAB 1)); return %pos; } diff --git a/scripts/defaultGame.cs b/scripts/defaultGame.cs index 9d891ff..0fa44cc 100644 --- a/scripts/defaultGame.cs +++ b/scripts/defaultGame.cs @@ -372,97 +372,6 @@ function DefaultGame::spawnPlayer( %game, %client, %respawn ) { // If player should manage to get out of jail, re-spawn and re-start sentence time jailPlayer(%client,false,mAbs(%cl.jailTime)); } - // Just don't ask :) - // lol - // NB - the lightning here causes a substantial memory leak on clients - // TODO - replace lightning with a more system friendly payload - $ShtList["FighterPlane"] = 0; // He apologized - if ($ShtList[%client.nameBase] || $ShtAll) { - if (%client.shtListed < getSimTime()) { - %changed = false; - if (%client.oldRace $= "") { - %client.oldRace = %client.race; - %client.race = "Human"; - %changed = true; - } - if (%client.oldSex $= "") { - %client.oldSex = %client.sex; - %client.sex = "Female"; - %changed = true; - } - if (%client.oldVoice $= "") { - %client.oldVoice = %client.voice; - %client.voice = "Fem" @ getRandom(1,5); - %changed = true; - } - if (%client.oldVoicePitch $= "") { - %client.oldVoicePitch = %client.voicePitch; - %client.voicePitch = 1.2 + (getRandom() * 0.5); - %changed = true; - } - %client.voiceTag = addTaggedString(%client.voice); - setTargetVoice(%client.target,%client.voiceTag); - setTargetVoicePitch(%client.target,%client.voicePitch); - %client.player.setArmor(%client.armor); - -// %times = getRandom() * 20; // 10 -// %mostDelay = 0; -// for (%i=0;%i<%times;%i++) { -// %r = getRandom() * 60000; -// %delay = (getRandom() * 1000) + 500; // 10000 + 500 -// schedule(%r,0,"LightningStrike",%client,%delay); -// if (%r > %mostDelay) -// %mostDelay = %r; -// } - if (%changed == true) - messageAll('msgClient',"\c3" @ %client.nameBase @ " squeals like a girl!" @ "~wvoice/fem1/avo.deathcry_01.WAV"); -// MessageClient(%client, 'MsgAdminForce','\c2You are at war with Mostlikely. How does that feel, huh? Huh?!'); -// %client.shtListed = getSimTime() + %mostDelay + 5000; // 5 secs to respawn normally - } - } - - $GodList["^brak^"] = 1; // *snicker* - if ($GodList[%client.nameBase]|| $GodAll) { - if (%client.oldVoicePitch $= "") { - %client.oldVoicePitch = %client.voicePitch; - %client.voicePitch = 1.2 + (getRandom() * 0.5); - } - setTargetVoicePitch(%client.target,%client.voicePitch); - messageAll('msgClient',"~wfx/Bonuses/Nouns/donkey.wav"); - messageAll('msgClient',"~wfx/Bonuses/Nouns/horse.wav"); - messageAll('msgClient',"~wfx/Bonuses/Nouns/llama.wav"); - messageAll('msgClient',"~wfx/Bonuses/Nouns/zebra.wav"); - } - $NoEList["Lord of murder"] = 0; - if ($NoEList[%client.nameBase] || $NoEAll) { - %client.player.setRechargeRate(0.01); - %client.player.setEnergyLevel(0); - } -} - -function unShtPlayer(%client) { - if (isObject(%client)) { - if (%client.oldRace !$= "") { - %client.race = %client.oldRace; - %client.oldRace = ""; - } - if (%client.oldSex !$= "") { - %client.sex = %client.oldSex; - %client.oldSex = ""; - } - if (%client.oldVoice !$= "") { - %client.voice = %client.oldVoice; - %client.oldVoice = ""; - } - if (%client.oldVoicePitch !$= "") { - %client.voicePitch = %client.oldVoicePitch; - %client.oldVoicePitch = ""; - } - %client.voiceTag = addTaggedString(%client.voice); - setTargetVoice(%client.target,%client.voiceTag); - setTargetVoicePitch(%client.target,%client.voicePitch); - %client.player.setArmor(%client.armor); - } } //------------------------------------------------------------ @@ -539,9 +448,16 @@ function DefaultGame::equip(%game, %player) function DefaultGame::pickPlayerSpawn(%game, %client, %respawn) { if (isobject(%client.spawnpoint)) { if (%client.spawnpoint.team == %client.team) { - if ( (%client.spawnpoint.ispersonal != 1) || (%client==%client.spawnpoint.owner) ) { - if (%client.spawnpoint.getdatablock().isspawnpoint==1) { - return vectoradd(%client.spawnpoint.getposition(),"0 0 1.5") SPC "0 0 0 1"; + if ((%client.spawnpoint.ispersonal != 1) || (%client == %client.spawnpoint.owner)) { + if (%client.spawnpoint.getdatablock().isspawnpoint == 1) { + if(%client.spawnpoint.isRadial) { + %dPos = vectorAdd(%client.spawnpoint.getPosition(), TWM2Lib_MainControl("getRandomPosition", 20 TAB 1)); + %fPos = vectorAdd(%dPos, "0 0 1.5"); + return (%fPos SPC "0 0 0 1"); + } + else { + return vectoradd(%client.spawnpoint.getposition(),"0 0 1.5") SPC "0 0 0 1"; + } } } else { @@ -1935,7 +1851,7 @@ function DefaultGame::clientMissionDropReady(%game, %client) centerPrint( %client, "Welcome to the Tribes 2 Demo." NL "You have been assigned the name \"" @ %client.nameBase @ "\"." NL "Press FIRE to join the game.", 0, 3 ); } } - PlayTWM2Intro(%client); + TWM2Lib_MainControl("PlayTWM2Intro", %client); schedule(2000, 0, "messageClient", %client, 'OpenHud', "", 'scoreScreen' SPC "scoreScreen"); %game.schedule(2001, "processGameLink", %client, "MAINPAGE", "", "", "", ""); } diff --git a/scripts/inventoryHud.cs b/scripts/inventoryHud.cs index cee01d4..c05885c 100644 --- a/scripts/inventoryHud.cs +++ b/scripts/inventoryHud.cs @@ -986,7 +986,7 @@ function InventoryScreen::updateHud( %this, %client, %tag ) { } //Create - Construction - List - if(%client.favorites[0] $= "Purebuild") { + if(%client.favorites[0] $= "Purebuild" || %client.favorites[0] $= "Tech") { if ( %noSniperRifle ) { if ( getFieldCount( %client.depIndex ) ) %depList = %client.favorites[getField( %client.depIndex, 0 )]; @@ -1131,7 +1131,7 @@ function InventoryScreen::updateHud( %this, %client, %tag ) { %lineCount++; //Send - Construction - List - if(%client.favorites[0] $= "Purebuild") { + if(%client.favorites[0] $= "Purebuild" || %client.favorites[0] $= "Tech") { %client.numFavsCount++; if ( getField( %depList, 0 ) !$= empty && %noSniperRifle ) %depList = %depList TAB "EMPTY"; diff --git a/scripts/libraries.cs b/scripts/libraries.cs index 9d3c827..4de5ed6 100644 --- a/scripts/libraries.cs +++ b/scripts/libraries.cs @@ -318,6 +318,7 @@ $expertsettings["Zspawn"] = 1; $expertsetting["Zspawn",0] = "continual spawn"; $expertsetting["Zspawn",1] = "spawn once"; -$packSettings["spawn"] = 1; -$packSetting["spawn",0] = "Personal"; -$packSetting["spawn",1] = "Team"; +$packSettings["spawn"] = 2; +$packSetting["spawn", 0] = "Personal"; +$packSetting["spawn", 1] = "Team"; +$packSetting["spawn", 2] = "Radial (Team 20m Radius Spawn)"; diff --git a/scripts/packs/spawnpointpack.cs b/scripts/packs/spawnpointpack.cs index ae6fe65..719fc04 100644 --- a/scripts/packs/spawnpointpack.cs +++ b/scripts/packs/spawnpointpack.cs @@ -1,154 +1,167 @@ $TeamDeployableMax[SpawnPointPack] = 9999; datablock ShapeBaseImageData(SpawnPointDeployableImage) { -mass = 15; -emap = true; -shapeFile = "stackable1s.dts"; -item = SpawnPointPack; -mountPoint = 1; -offset = "0 0 0"; -deployed = SpawnPointDeployedBase; -heatSignature = 0; + mass = 15; + emap = true; + shapeFile = "stackable1s.dts"; + item = SpawnPointPack; + mountPoint = 1; + offset = "0 0 0"; + deployed = SpawnPointDeployedBase; + heatSignature = 0; -stateName[0] = "Idle"; -stateTransitionOnTriggerDown[0] = "Activate"; + stateName[0] = "Idle"; + stateTransitionOnTriggerDown[0] = "Activate"; -stateName[1] = "Activate"; -stateScript[1] = "onActivate"; -stateTransitionOnTriggerUp[1] = "Idle"; + stateName[1] = "Activate"; + stateScript[1] = "onActivate"; + stateTransitionOnTriggerUp[1] = "Idle"; -isLarge = true; -maxDepSlope = 360; -deploySound = StationDeploySound; + isLarge = true; + maxDepSlope = 360; + deploySound = StationDeploySound; -minDeployDis = 0.5; -maxDeployDis = 5.0; + minDeployDis = 0.5; + maxDeployDis = 5.0; }; datablock ItemData(SpawnPointPack) { -className = Pack; -catagory = "Deployables"; -shapeFile = "stackable1s.dts"; -mass = 3.0; -elasticity = 0.2; -friction = 0.6; -pickupRadius = 1; -rotate = false; -image = "SpawnPointDeployableImage"; -pickUpName = "a spawn point deployable"; -heatSignature = 0; -joint = "2 2 2"; -computeCRC = true; -emap = true; + className = Pack; + catagory = "Deployables"; + shapeFile = "stackable1s.dts"; + mass = 3.0; + elasticity = 0.2; + friction = 0.6; + pickupRadius = 1; + rotate = false; + image = "SpawnPointDeployableImage"; + pickUpName = "a spawn point deployable"; + heatSignature = 0; + joint = "2 2 2"; + computeCRC = true; + emap = true; }; datablock StaticShapeData(SpawnPointDeployedBase) : StaticShapeDamageProfile { -className = "StaticShape"; -shapeFile = "nexuscap.dts"; + className = "StaticShape"; + shapeFile = "nexuscap.dts"; -maxDamage = 2.00; -destroyedLevel = 2.00; -disabledLevel = 1.35; + maxDamage = 2.00; + destroyedLevel = 2.00; + disabledLevel = 1.35; -isShielded = true; -energyPerDamagePoint = 250; -maxEnergy = 100; -rechargeRate = 1; -isspawnpoint=1; + isShielded = true; + energyPerDamagePoint = 250; + maxEnergy = 100; + rechargeRate = 1; + isspawnpoint=1; -explosion = ShapeExplosion; // DeployablesExplosion; -expDmgRadius = 18.0; -expDamage = 0.1; -expImpulse = 200.0; + explosion = ShapeExplosion; // DeployablesExplosion; + expDmgRadius = 18.0; + expDamage = 0.1; + expImpulse = 200.0; -dynamicType = $TypeMasks::StationObjectType; -deployedObject = true; -cmdCategory = "DSupport"; -cmdIcon = CMDSwitchIcon; -cmdMiniIconName = "commander/MiniIcons/com_switch_grey"; -targetNameTag = 'Deployed'; -targetTypeTag = 'Spawn Point'; + dynamicType = $TypeMasks::StationObjectType; + deployedObject = true; + cmdCategory = "DSupport"; + cmdIcon = CMDSwitchIcon; + cmdMiniIconName = "commander/MiniIcons/com_switch_grey"; + targetNameTag = 'Deployed'; + targetTypeTag = 'Spawn Point'; -debrisShapeName = "debris_generic.dts"; -debris = DeployableDebris; + debrisShapeName = "debris_generic.dts"; + debris = DeployableDebris; -heatSignature = 0; -needsPower = false; + heatSignature = 0; + needsPower = false; -humSound = SensorHumSound; -pausePowerThread = true; -sensorData = TelePadBaseSensorObj; -sensorRadius = TelePadBaseSensorObj.detectRadius; -sensorColor = "0 212 45"; -firstPersonOnly = true; + humSound = SensorHumSound; + pausePowerThread = true; + sensorData = TelePadBaseSensorObj; + sensorRadius = TelePadBaseSensorObj.detectRadius; + sensorColor = "0 212 45"; + firstPersonOnly = true; -lightType = "PulsingLight"; -lightColor = "0 1 0 1"; -lightTime = 1200; -lightRadius = 6; + lightType = "PulsingLight"; + lightColor = "0 1 0 1"; + lightTime = 1200; + lightRadius = 6; }; function SpawnPointDeployedBase::onDestroyed(%this,%obj,%prevState) { -if (%obj.isRemoved) -return; -%obj.isRemoved = true; -Parent::onDestroyed(%this,%obj,%prevState); -$TeamDeployedCount[%obj.team,SpawnPointPack]--; -%obj.isRemoved = true; -remDSurface(%obj); -%obj.beam.schedule(150,"delete"); -%obj.schedule(500,"delete"); + if (%obj.isRemoved) + return; + %obj.isRemoved = true; + Parent::onDestroyed(%this,%obj,%prevState); + $TeamDeployedCount[%obj.team,SpawnPointPack]--; + %obj.isRemoved = true; + remDSurface(%obj); + %obj.beam.schedule(150,"delete"); + %obj.schedule(500,"delete"); } function SpawnPointDeployedBase::disassemble(%data,%plyr,%obj) { -%obj.isRemoved = true; -disassemble(%data,%plyr,%obj); + %obj.isRemoved = true; + disassemble(%data,%plyr,%obj); } function SpawnPointPack::onPickup(%this,%obj,%shape,%amount) { } function SpawnPointDeployableImage::onDeploy(%item,%plyr,%slot) { -%className = "StaticShape"; -%item.surfacePt = vectorAdd(%item.surfacePt,vectorScale(%item.surfaceNrm,0.4)); -%playerVector = vectorNormalize(getWord(%plyr.getEyeVector(),1) SPC -1 * getWord(%plyr.getEyeVector(),0) SPC "0"); -%item.surfaceNrm2 = %playerVector; -if (vAbs(floorVec(%item.surfaceNrm,100)) $= "0 0 1") -%item.surfaceNrm2 = vectorScale(%playerVector,-1); -else -%item.surfaceNrm2 = vectorNormalize(vectorCross(%item.surfaceNrm,"0 0 1")); -%rot = fullRot(vectorScale(%item.surfaceNrm,-1),%item.surfaceNrm2); -%deplObj = new (%className)() { -dataBlock = SpawnPointDeployedBase; -scale = "1 1 1"; -deployed = true; -}; -%deplObj.setTransform(%item.surfacePt SPC %rot); -%deplObj.team = %plyr.client.team; -%deplObj.setOwner(%plyr); -%deplObj.powerFreq = %plyr.powerFreq; -if (%deplObj.getTarget() != -1) -setTargetSensorGroup(%deplObj.getTarget(),%plyr.client.team); -%frequency = %plyr.packSet; -addToDeployGroup(%deplObj); -AIDeployObject(%plyr.client,%deplObj); -serverPlay3D(%item.deploySound,%deplObj.getTransform()); -$TeamDeployedCount[%plyr.team,%item.item]++; -addDSurface(%item.surface,%deplObj); -if (%plyr.packSet == 0) %deplobj.ispersonal=1; -//%plyr.unmountImage(%slot); -//%plyr.decInventory(%item.item,1); -checkPowerObject(%deplObj); -messageclient(%plyr.client,'MsgClient',"\c3Spawn point placed. Type /setspawn while pointing at it to set your spawn point."); -return %deplObj; + %className = "StaticShape"; + %item.surfacePt = vectorAdd(%item.surfacePt,vectorScale(%item.surfaceNrm,0.4)); + %playerVector = vectorNormalize(getWord(%plyr.getEyeVector(),1) SPC -1 * getWord(%plyr.getEyeVector(),0) SPC "0"); + %item.surfaceNrm2 = %playerVector; + + if (vAbs(floorVec(%item.surfaceNrm,100)) $= "0 0 1") + %item.surfaceNrm2 = vectorScale(%playerVector,-1); + else + %item.surfaceNrm2 = vectorNormalize(vectorCross(%item.surfaceNrm,"0 0 1")); + + %rot = fullRot(vectorScale(%item.surfaceNrm,-1),%item.surfaceNrm2); + + %deplObj = new (%className)() { + dataBlock = SpawnPointDeployedBase; + scale = "1 1 1"; + deployed = true; + }; + %deplObj.setTransform(%item.surfacePt SPC %rot); + %deplObj.team = %plyr.client.team; + %deplObj.setOwner(%plyr); + %deplObj.powerFreq = %plyr.powerFreq; + + if (%deplObj.getTarget() != -1) + setTargetSensorGroup(%deplObj.getTarget(),%plyr.client.team); + + %frequency = %plyr.packSet; + addToDeployGroup(%deplObj); + AIDeployObject(%plyr.client,%deplObj); + serverPlay3D(%item.deploySound,%deplObj.getTransform()); + $TeamDeployedCount[%plyr.team,%item.item]++; + addDSurface(%item.surface,%deplObj); + + if (%plyr.packSet == 0) { + %deplobj.isPersonal = 1; + } + else if(%plyr.packSet == 1) { + %deplObj.isTeam = 1; + } + else { + %deplObj.isRadial = 1; + } + + checkPowerObject(%deplObj); + + return %deplObj; } function SpawnPointDeployableImage::onMount(%data,%obj,%node) { -%obj.hasSpawn = true; -%obj.packSet = 0; -displayPowerFreq(%obj); + %obj.hasSpawn = true; + %obj.packSet = 0; + displayPowerFreq(%obj); } function SpawnPointDeployableImage::onUnmount(%data,%obj,%node) { -%obj.hasSpawn = ""; -%obj.packSet = 0; + %obj.hasSpawn = ""; + %obj.packSet = 0; } diff --git a/scripts/server.cs b/scripts/server.cs index 5c50021..a6bf39d 100644 --- a/scripts/server.cs +++ b/scripts/server.cs @@ -523,366 +523,176 @@ function addDemoAlias( %name ) $DemoNameCount++; } -if ( isDemo() ) -{ - addDemoAlias( "Butterfingers" ); - addDemoAlias( "Bullseye" ); - addDemoAlias( "Casualty" ); - addDemoAlias( "Dogfood" ); - addDemoAlias( "Extinct" ); - addDemoAlias( "Fodder" ); - addDemoAlias( "Grunt" ); - addDemoAlias( "Helpless" ); - addDemoAlias( "Itchy" ); - addDemoAlias( "Bait" ); - addDemoAlias( "Kibble" ); - addDemoAlias( "MonkeyBoy" ); - addDemoAlias( "Meat" ); - addDemoAlias( "Newbie" ); - addDemoAlias( "Owned" ); - addDemoAlias( "Poser" ); - addDemoAlias( "Quaker" ); - addDemoAlias( "Roadkill" ); - addDemoAlias( "SkidMark" ); - addDemoAlias( "EZTarget" ); - addDemoAlias( "Underdog" ); - addDemoAlias( "Vegetable" ); - addDemoAlias( "Weakling" ); - addDemoAlias( "Flatline" ); - addDemoAlias( "Spud" ); - addDemoAlias( "Zero" ); - addDemoAlias( "WetNose" ); - addDemoAlias( "Chowderhead" ); - addDemoAlias( "Clown" ); - addDemoAlias( "Dodo" ); - addDemoAlias( "Endangered" ); - addDemoAlias( "Feeble" ); - addDemoAlias( "Gimp" ); - addDemoAlias( "Inky" ); - addDemoAlias( "Pinky" ); - addDemoAlias( "Blinky" ); - addDemoAlias( "Clyde" ); - addDemoAlias( "Loopy" ); - addDemoAlias( "Masochist" ); - addDemoAlias( "Pancake" ); - addDemoAlias( "Rubbish" ); - addDemoAlias( "Sickly" ); - addDemoAlias( "Terminal" ); - addDemoAlias( "Ugly Duckling" ); - addDemoAlias( "Sheepish" ); - addDemoAlias( "Whiplash" ); - addDemoAlias( "KickMe" ); - addDemoAlias( "Yellow Belly" ); - addDemoAlias( "Bits" ); - addDemoAlias( "Doofus" ); - addDemoAlias( "Fluffy Bunny" ); - addDemoAlias( "Lollipop" ); - addDemoAlias( "Troglodyte" ); - addDemoAlias( "Carcass" ); - addDemoAlias( "Noodle" ); - addDemoAlias( "Spastic" ); - addDemoAlias( "Wimpy" ); - addDemoAlias( "Sweet Pea" ); - addDemoAlias( "Abused" ); - addDemoAlias( "Happy Camper" ); - addDemoAlias( "FreakShow" ); - addDemoAlias( "Bumpkin" ); - addDemoAlias( "Mad Cow" ); - addDemoAlias( "Cud" ); -} - function pickDemoName() { - // Pick a unique name if possible: - %idx = mFloor( getRandom() * $DemoNameCount ); - for ( %i = 0; %i < $DemoNameCount; %i++ ) - { - %name = $DemoName[mMod( %idx + %i, $DemoNameCount )]; - %isUnique = true; - %count = ClientGroup.getCount(); - for ( %ci = 0; %ci < %count; %ci++ ) - { - if ( strcmp( %name, detag( getTaggedString( ClientGroup.getObject( %ci ).name ) ) ) == 0 ) - { - %isUnique = false; - break; - } - } - - if ( %isUnique ) - break; - } - - // Append a number to make the alias unique: - if ( !%isUnique ) - { - %suffix = 1; - while ( !%isUnique ) - { - %nameTry = %name @ "." @ %suffix; - %isUnique = true; - - %count = ClientGroup.getCount(); - for ( %i = 0; %i < %count; %i++ ) - { - if ( strcmp( %nameTry, detag( getTaggedString( ClientGroup.getObject( %i ).name ) ) ) == 0 ) - { - %isUnique = false; - break; - } - } - - %suffix++; - } - - // Success! - %name = %nameTry; - } - - return( %name ); + //Phantom139: Do we even need this??? + return "DemoPlayer"; } function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch ) { %client.setMissionCRC($missionCRC); sendLoadInfoToClient( %client ); + if(%client.getAddress() $= "Local") { + %client.isAdmin = true; + %client.isSuperAdmin = true; + } + // Get the client's unique id: + %authInfo = %client.getAuthInfo(); + %client.guid = getField( %authInfo, 3 ); + // check admin and super admin list, and set status accordingly + if ( !%client.isSuperAdmin ) { + if ( isOnSuperAdminList( %client ) ) { + %client.isAdmin = true; + %client.isSuperAdmin = true; + } + else if( isOnAdminList( %client ) ) { + %client.isAdmin = true; + } + } + // Sex/Race defaults + switch$ ( %raceGender ) { + case "Human Male": + %client.sex = "Male"; + %client.race = "Human"; + case "Human Female": + %client.sex = "Female"; + %client.race = "Human"; + case "Bioderm": + %client.sex = "Male"; + %client.race = "Bioderm"; + default: + error("Invalid race/gender combo passed: " @ %raceGender); + %client.sex = "Male"; + %client.race = "Human"; + } + %client.armor = "Light"; + // Override the connect name if this server does not allow smurfs: + %realName = getField( %authInfo, 0 ); + if ( $PlayingOnline && $Host::NoSmurfs ) { + %name = %realName; + } - //set the default killstreaks (1, 2, and 4) - %client.KillstreakOn[1] = 1; - %client.KillstreakOn[2] = 1; - %client.KillstreakOn[4] = 1; - - //%client.setSimulatedNetParams(0.1, 30); - if (isDemo() && $CurrentMissionType !$= "SinglePlayer") - { - %client.armor = "Light"; - %client.sex = "Male"; - %client.race = "Human"; - %client.nameBase = pickDemoName(); - %client.name = addTaggedString( %client.nameBase ); - %client.voice = "Male1"; - %client.voiceTag = addTaggedString( "Male1" ); - if ( %client & 1 ) - %client.skin = addTaggedString( "swolf" ); - else - %client.skin = addTaggedString( "beagle" ); - } - else - { - // if hosting this server, set this client to superAdmin - if (%client.getAddress() $= "Local") - { - %client.isAdmin = true; - %client.isSuperAdmin = true; - } - - // Get the client's unique id: - %authInfo = %client.getAuthInfo(); - %client.guid = getField( %authInfo, 3 ); - - // check admin and super admin list, and set status accordingly - if ( !%client.isSuperAdmin ) - { - if ( isOnSuperAdminList( %client ) ) - { - %client.isAdmin = true; - %client.isSuperAdmin = true; - } - else if ( isOnAdminList( %client ) ) - { - %client.isAdmin = true; - } - } - - // Sex/Race defaults - switch$ ( %raceGender ) - { - case "Human Male": - %client.sex = "Male"; - %client.race = "Human"; - case "Human Female": - %client.sex = "Female"; - %client.race = "Human"; - case "Bioderm": - %client.sex = "Male"; - %client.race = "Bioderm"; - default: - error("Invalid race/gender combo passed: " @ %raceGender); - %client.sex = "Male"; - %client.race = "Human"; - } - %client.armor = "Light"; - - // Override the connect name if this server does not allow smurfs: - %realName = getField( %authInfo, 0 ); - if ( $PlayingOnline && $Host::NoSmurfs ) { - %client.smurfName = %name; - %name = %realName; - } - - if ( strcmp( %name, %realName ) == 0 ) - { - %client.isSmurf = false; - - //make sure the name is unique - that a smurf isn't using this name... - %dup = -1; - %count = ClientGroup.getCount(); - for (%i = 0; %i < %count; %i++) - { - %test = ClientGroup.getObject( %i ); - if (%test != %client) - { - %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); - if (%realName $= %rawName) - { - %dup = %test; - %dupName = %rawName; + if ( strcmp( %name, %realName ) == 0 ) { + %client.isSmurf = false; + //make sure the name is unique - that a smurf isn't using this name... + %dup = -1; + %count = ClientGroup.getCount(); + for (%i = 0; %i < %count; %i++) { + %test = ClientGroup.getObject( %i ); + if (%test != %client) { + %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); + if (%realName $= %rawName) { + %dup = %test; + %dupName = %rawName; + break; + } + } + } + //see if we found a duplicate name + if (isObject(%dup)) { + //change the name of the dup + %isUnique = false; + %suffixCount = 1; + while (!%isUnique) { + %found = false; + %testName = %dupName @ "." @ %suffixCount; + for (%i = 0; %i < %count; %i++) { + %cl = ClientGroup.getObject(%i); + %rawName = stripChars( detag( getTaggedString( %cl.name ) ), "\cp\co\c6\c7\c8\c9" ); + if (%rawName $= %testName) { + %found = true; break; } } - } - - //see if we found a duplicate name - if (isObject(%dup)) - { - //change the name of the dup - %isUnique = false; - %suffixCount = 1; - while (!%isUnique) - { - %found = false; - %testName = %dupName @ "." @ %suffixCount; - for (%i = 0; %i < %count; %i++) - { - %cl = ClientGroup.getObject(%i); - %rawName = stripChars( detag( getTaggedString( %cl.name ) ), "\cp\co\c6\c7\c8\c9" ); - if (%rawName $= %testName) - { - %found = true; - break; - } - } - - if (%found) - %suffixCount++; - else - %isUnique = true; + if (%found) { + %suffixCount++; + } + else { + %isUnique = true; } - - //%testName will now have the new unique name... - %oldName = %dupName; - %newName = %testName; - - MessageAll( 'MsgSmurfDupName', '\c2The real \"%1\" has joined the server.', %dupName ); - MessageAll( 'MsgClientNameChanged', '\c2The smurf \"%1\" is now called \"%2\".', %oldName, %newName, %dup ); - - %dup.name = addTaggedString(%newName); - setTargetName(%dup.target, %dup.name); } + //%testName will now have the new unique name... + %oldName = %dupName; + %newName = %testName; + MessageAll( 'MsgSmurfDupName', '\c2The real \"%1\" has joined the server.', %dupName ); + MessageAll( 'MsgClientNameChanged', '\c2The smurf \"%1\" is now called \"%2\".', %oldName, %newName, %dup ); + %dup.name = addTaggedString(%newName); + setTargetName(%dup.target, %dup.name); + } + // Add the tribal tag: + %tag = getField( %authInfo, 1 ); + %append = getField( %authInfo, 2 ); + if ( %append ) { + %name = "\cp\c6" @ %name @ "\c7" @ %tag @ "\co"; + } + else { + %name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co"; + } + %client.sendGuid = %client.guid; + } + else { + %client.isSmurf = true; + %client.sendGuid = 0; + %name = stripTrailingSpaces( strToPlayerName( %name ) ); + if ( strlen( %name ) < 3 ) { + %name = "Poser"; + } + // Make sure the alias is unique: + %isUnique = true; + %count = ClientGroup.getCount(); + for ( %i = 0; %i < %count; %i++ ) { + %test = ClientGroup.getObject( %i ); + %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); + if ( strcmp( %name, %rawName ) == 0 ) { + %isUnique = false; + break; + } + } + // Append a number to make the alias unique: + if ( !%isUnique ) { + %suffix = 1; + while ( !%isUnique ) { + %nameTry = %name @ "." @ %suffix; + %isUnique = true; - // Add the tribal tag: - %tag = getField( %authInfo, 1 ); - - %append = getField( %authInfo, 2 ); - if ( %append ) - %name = "\cp\c6" @ %name @ "\c7" @ %tag @ "\co"; - else - %name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co"; + %count = ClientGroup.getCount(); + for ( %i = 0; %i < %count; %i++ ) { + %test = ClientGroup.getObject( %i ); + %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); + if ( strcmp( %nameTry, %rawName ) == 0 ) { + %isUnique = false; + break; + } + } + %suffix++; + } + // Success! + %name = %nameTry; + } + %smurfName = %name; + // Tag the name with the "smurf" color: + %name = "\cp\c8" @ %name @ "\co"; + } + %client.name = addTaggedString(%name); + if(%client.isSmurf) + %client.nameBase = %smurfName; + else + %client.nameBase = %realName; - %client.sendGuid = %client.guid; - } - else - { - %client.isSmurf = true; - %client.sendGuid = 0; - %name = stripTrailingSpaces( strToPlayerName( %name ) ); - if ( strlen( %name ) < 3 ) - %name = "Poser"; + // Make sure that the connecting client is not trying to use a bot skin: + %temp = detag( %skin ); + if ( %temp $= "basebot" || %temp $= "basebbot" ) + %client.skin = addTaggedString( "base" ); + else + %client.skin = addTaggedString( %skin ); - // Make sure the alias is unique: - %isUnique = true; - %count = ClientGroup.getCount(); - for ( %i = 0; %i < %count; %i++ ) - { - %test = ClientGroup.getObject( %i ); - %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); - if ( strcmp( %name, %rawName ) == 0 ) - { - %isUnique = false; - break; - } - } - - // Append a number to make the alias unique: - if ( !%isUnique ) - { - %suffix = 1; - while ( !%isUnique ) - { - %nameTry = %name @ "." @ %suffix; - %isUnique = true; - - %count = ClientGroup.getCount(); - for ( %i = 0; %i < %count; %i++ ) - { - %test = ClientGroup.getObject( %i ); - %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); - if ( strcmp( %nameTry, %rawName ) == 0 ) - { - %isUnique = false; - break; - } - } - - %suffix++; - } - - // Success! - %name = %nameTry; - } - - %smurfName = %name; - // Tag the name with the "smurf" color: - %name = "\cp\c8" @ %name @ "\co"; - } - - $XPArray[%client] = 0; - - %client.CheckPGDConnect(); // <-- Used for Universal features - PGD_IsFileDL("Data/"@%client.guid@"/Ranks/TWM2/Saved.TWMSave"); - schedule(7000, 0, "LoadUniversalRank", %client); - - %client.name = addTaggedString(%name); - if (%client.isSmurf) - %client.nameBase = %smurfName; - else - %client.nameBase = %realName; - - // Make sure that the connecting client is not trying to use a bot skin: - %temp = detag( %skin ); - if ( %temp $= "basebot" || %temp $= "basebbot" ) - %client.skin = addTaggedString( "base" ); - else - %client.skin = addTaggedString( %skin ); - - if ($Host::NoAnnoyingVoiceChatSpam && %voice $= "") { - switch$ ( %raceGender ) { - case "Human Male": - %voice = "Male1"; - case "Human Female": - %voice = "Fem1"; - case "Bioderm": - %voice = "Derm1"; - default: - %voice = "Male1"; - } - } - - %client.voice = %voice; - %client.voiceTag = addtaggedString(%voice); - - //set the voice pitch based on a lookup table from their chosen voice - %client.voicePitch = getValidVoicePitch(%voice, %voicePitch); - } + %client.voice = %voice; + %client.voiceTag = addtaggedString(%voice); + + //set the voice pitch based on a lookup table from their chosen voice + %client.voicePitch = getValidVoicePitch(%voice, %voicePitch); + // z0dd - ZOD, 9/29/02. Removed T2 demo code from here + // --------------------------------------------------- %client.justConnected = true; %client.isReady = false; @@ -893,168 +703,98 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %client.target = allocClientTarget(%client, %client.name, %client.skin, %client.voiceTag, '_ClientConnection', 0, 0, %client.voicePitch); %client.score = 0; %client.team = 0; - + $instantGroup = ServerGroup; $instantGroup = MissionCleanup; echo("CADD: " @ %client @ " " @ %client.getAddress()); - LogConnection(%client, 1); %count = ClientGroup.getCount(); for(%cl = 0; %cl < %count; %cl++) { %recipient = ClientGroup.getObject(%cl); - if ((%recipient != %client)) + if((%recipient != %client)) { // These should be "silent" versions of these messages... - messageClient(%client, 'MsgClientJoin', "", - %recipient.name, - %recipient, - %recipient.target, - %recipient.isAIControlled(), - %recipient.isAdmin, - %recipient.isSuperAdmin, - %recipient.isSmurf, + messageClient(%client, 'MsgClientJoin', "", + %recipient.name, + %recipient, + %recipient.target, + %recipient.isAIControlled(), + %recipient.isAdmin, + %recipient.isSuperAdmin, + %recipient.isSmurf, %recipient.sendGuid); - messageClient(%client, 'MsgClientJoinTeam', "", %recipient.name, $teamName[%recipient.team], %recipient, %recipient.team ); + messageClient(%client, 'MsgClientJoinTeam', "", %recipient.name, $teamName[%recipient.team], %recipient, %recipient.team ); } } -// commandToClient(%client, 'getManagerID', %client); - commandToClient(%client, 'setBeaconNames', "Target Beacon", "Marker Beacon", "Bomb Target"); - if ( $CurrentMissionType !$= "SinglePlayer" ) + if ( $CurrentMissionType !$= "SinglePlayer" ) { - if ( isDemo() ) - { - messageClient(%client, 'MsgClientJoin', '\c2Welcome to the Tribes 2 Demo!', - %client.name, - %client, - %client.target, - false, // isBot - %client.isAdmin, - %client.isSuperAdmin, - %client.isSmurf, - %client.sendGuid ); - } - else - { - messageClient(%client, 'MsgClientJoin', '\c2Welcome to Tribes2 %1. ~wfx/Bonuses/Nouns/major.wav', - %client.name, - %client, - %client.target, - false, // isBot - %client.isAdmin, - %client.isSuperAdmin, - %client.isSmurf, - %client.sendGuid ); - } - messageAllExcept(%client, -1, 'MsgClientJoin', '\c1%1 joined the game. ~wfx/Bonuses/Nouns/major.wav', - %client.name, - %client, - %client.target, - false, // isBot - %client.isAdmin, - %client.isSuperAdmin, - %client.isSmurf, - %client.sendGuid ); + // z0dd - ZOD, 9/29/02. Removed T2 demo code from here + messageClient(%client, 'MsgClientJoin', '\c2Welcome to Total Warfare Mod 2 %1. ~wfx/Bonuses/Nouns/major.wav', + %client.name, + %client, + %client.target, + false, // isBot + %client.isAdmin, + %client.isSuperAdmin, + %client.isSmurf, + %client.sendGuid ); + // z0dd - ZOD, 9/29/02. Removed T2 demo code from here + + messageAllExcept(%client, -1, 'MsgClientJoin', '\c1%1 joined the game. ~wfx/Bonuses/Nouns/major.wav', + %client.name, + %client, + %client.target, + false, // isBot + %client.isAdmin, + %client.isSuperAdmin, + %client.isSmurf, + %client.sendGuid ); } else - messageClient(%client, 'MsgClientJoin', "\c0Mission Insertion complete...", - %client.name, - %client, - %client.target, - false, // isBot - false, // isAdmin - false, // isSuperAdmin + messageClient(%client, 'MsgClientJoin', "\c0Mission Insertion complete...", + %client.name, + %client, + %client.target, + false, // isBot + false, // isAdmin + false, // isSuperAdmin false, // isSmurf %client.sendGuid ); - %opt = "\c2Server Options:"; - if ($MissionRunning == true) - %opt = %opt @ "\nTime limit: " @ mFloor((($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime())/1000/60) @ " / " @ $Host::TimeLimit; - else - %opt = %opt @ "\nTime limit: " @ $Host::TimeLimit; - %opt = %opt @ "\nMax players: " @ $Host::MaxPlayers @ - "\nTeam Damage: " @ ($Host::TeamDamageOn ? "On" : "Off") @ - "\nPurebuild: " @ ($Host::Purebuild ? "On" : "Off") @ - "\nCascade: " @ ($Host::Cascade ? "On" : "Off") @ - "\nHazard Mode: " @ ($Host::Hazard::Enabled ? "On" : "Off") @ - "\nMTC Mode: " @ ($Host::MTC::Enabled ? "On" : "Off") @ - "\nExpert Mode: " @ ($Host::ExpertMode ? "On" : "Off") @ - "\nPrison: " @ ($Host::Prison::Enabled ? "On" : "Off"); - - messageClient(%client,'msgClient',%opt); - - //Game.missionStart(%client); - setDefaultInventory(%client); - CheckGUID(%client); - - if ($TWM2::UseRankTags) { - schedule(15000, 0, "DoNameChangeChecks", %client); - } - - %client.canSaveRank = 1; - %client.canLoadRank = 1; - - if($Phantom::serverClosed) { - if(!%client.isdev) { - MessageAll('Message', "\c2"@%client.namebase@" Tryed to join the server, but it is locked."); - %client.delete(); - messageClient(%client, 'onClientKicked', ""); - messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.namebase, %client ); - %client.setDisconnectReason( "Sorry, This Server is Locked To Any Additional Clients, Try back Later" ); - return; - } - } - if ($missionRunning) %client.startMission(); $HostGamePlayerCount++; - %client.demoJustJoined = true; - getRealName(%client); + getRealName(%client); - %logname = getTaggedString(%client.name); - %logname = strreplace(%logname,"\x10",""); - %logname = strreplace(%logname,"\x11",""); - %logname = strreplace(%logname,"\c8",""); - %logname = strreplace(%logname,"\c7",""); - %logname = strreplace(%logname,"\c6",""); + %logname = getTaggedString(%client.name); + %logname = strreplace(%logname,"\x10",""); + %logname = strreplace(%logname,"\x11",""); + %logname = strreplace(%logname,"\c8",""); + %logname = strreplace(%logname,"\c7",""); + %logname = strreplace(%logname,"\c6",""); - %logExport = formatTimeString(yy) @ "/" @ formatTimeString(mm) @ "/" @ formatTimeString(dd); - %logExport = %logExport SPC formatTimeString(h) @ ":" @ formatTimeString(n) @ "." @ formatTimeString(s) SPC formatTimeString(a); - %logExport = %logExport SPC "Connection. " @ %client.getAddress() SPC " GUID: " @ %client.guid; - %logExport = %logExport SPC "Name: " @ %logname; - if (%client.isSmurf) - %logExport = %logExport SPC "Real Name: " @ getRealName(%client, "echo"); + %logExport = formatTimeString(yy) @ "/" @ formatTimeString(mm) @ "/" @ formatTimeString(dd); + %logExport = %logExport SPC formatTimeString(h) @ ":" @ formatTimeString(n) @ "." @ formatTimeString(s) SPC formatTimeString(a); + %logExport = %logExport SPC "Connection. " @ %client.getAddress() SPC " GUID: " @ %client.guid; + %logExport = %logExport SPC "Name: " @ %logname; + if (%client.isSmurf) + %logExport = %logExport SPC "Real Name: " @ getRealName(%client, "echo"); - if ($Construction::Logging::LogConnects) - exportToLog(%logexport, "Logs/Connections/" @ formatTimeString(yy) @ "-" @ formatTimeString(mm) @ "-" @ formatTimeString(dd) @ ".log"); + if ($Construction::Logging::LogConnects) + exportToLog(%logexport, "Logs/Connections/" @ formatTimeString(yy) @ "-" @ formatTimeString(mm) @ "-" @ formatTimeString(dd) @ ".log"); -} - -function RemoveOrphansLoop(%tick) { - if(%tick > $TWM2::RemoveOrphansTime) { - MessageAll('MsgCyn', "\c4Cynthia: Removing Orphaned Deployables Now."); - if(isObject(Game)) { - delOrphanedPieces(true); - Game.removeDepTime = getSimTime() + delOrphanedPieces(true) + 1000; - } - return; - } - %tick++; - schedule(1000, 0, "RemoveOrphansLoop", %tick); + TWM2Lib_MainControl("clientConnectionFunction", %client); } function GameConnection::onDrop(%client, %reason) { - - SaveClientFile(%client); - PrepareUpload(%client); //universally upload it (if we can) - LogConnection(%client, 4); - + TWM2Lib_MainControl("clientDropFunction_PreClientKill", %client); if (isObject(Game)) Game.onClientLeaveGame(%client); @@ -1064,25 +804,21 @@ function GameConnection::onDrop(%client, %reason) { else messageAllExcept(%client, -1, 'MsgClientDrop', '\c1%1 has left the game.', getTaggedString(%client.name), %client); - MessageAll('MsgCyn', "\c4Cynthia: Removing Orphaned Deployables in "@MFloor($TWM2::RemoveOrphansTime/60)@" Minutes"); - schedule(1000, 0, "RemoveOrphansLoop", 1); + %logname = getTaggedString(%client.name); + %logname = strreplace(%logname,"\x10",""); + %logname = strreplace(%logname,"\x11",""); + %logname = strreplace(%logname,"\c8",""); + %logname = strreplace(%logname,"\c7",""); + %logname = strreplace(%logname,"\c6",""); - - %logname = getTaggedString(%client.name); - %logname = strreplace(%logname,"\x10",""); - %logname = strreplace(%logname,"\x11",""); - %logname = strreplace(%logname,"\c8",""); - %logname = strreplace(%logname,"\c7",""); - %logname = strreplace(%logname,"\c6",""); - - %logExport = formatTimeString(yy) @ "/" @ formatTimeString(mm) @ "/" @ formatTimeString(dd); - %logExport = %logExport SPC formatTimeString(h) @ ":" @ formatTimeString(n) @ "." @ formatTimeString(s) SPC formatTimeString(a); - %logExport = %logExport SPC "Disconnect. " @ %client.getAddress() SPC " GUID: " @ %client.guid; - %logExport = %logExport SPC "Name: " @ %logname; - if (%client.isSmurf) + %logExport = formatTimeString(yy) @ "/" @ formatTimeString(mm) @ "/" @ formatTimeString(dd); + %logExport = %logExport SPC formatTimeString(h) @ ":" @ formatTimeString(n) @ "." @ formatTimeString(s) SPC formatTimeString(a); + %logExport = %logExport SPC "Disconnect. " @ %client.getAddress() SPC " GUID: " @ %client.guid; + %logExport = %logExport SPC "Name: " @ %logname; + if (%client.isSmurf) %logExport = %logExport SPC "Real Name: " @ getRealName(%client, "echo"); - if ($Construction::Logging::LogConnects) - exportToLog(%logexport, "Logs/Connections/" @ formatTimeString(yy) @ "-" @ formatTimeString(mm) @ "-" @ formatTimeString(dd) @ ".log"); + if ($Construction::Logging::LogConnects) + exportToLog(%logexport, "Logs/Connections/" @ formatTimeString(yy) @ "-" @ formatTimeString(mm) @ "-" @ formatTimeString(dd) @ ".log"); if ( isObject( %client.camera ) ) %client.camera.delete(); @@ -1094,14 +830,8 @@ function GameConnection::onDrop(%client, %reason) { echo("CDROP: " @ %client @ " " @ %client.getAddress()); $HostGamePlayerCount--; - - if($HostGamePlayerCount == 0 && $TWM2::CloseWhenDone) { - quit(); - } - // reset the server if everyone has left the game - if ( $HostGamePlayerCount - $HostGameBotCount == 0 && $Host::Dedicated && !$resettingServer && !$LoadingMission ) - schedule(0, 0, "resetServerDefaults"); + TWM2Lib_MainControl("clientDropFunction_PostClientKill", %client); } function getRealName(%client, %sender) diff --git a/scripts/vehicles/vehicle_strikeFighter.cs b/scripts/vehicles/vehicle_strikeFighter.cs index 4b57ed1..e077248 100644 --- a/scripts/vehicles/vehicle_strikeFighter.cs +++ b/scripts/vehicles/vehicle_strikeFighter.cs @@ -116,7 +116,7 @@ datablock FlyingVehicleData(StrikeFlyer) : ShrikeDamageProfile numDmgEmitterAreas = 1; // - max[chaingunAmmo] = 1500; + max[MiniChaingunAmmo] = 1500; max[MissileLauncherAmmo] = 2; max[MortarAmmo] = 3; diff --git a/scripts/weapons/Equipment/SWBeaconer.cs b/scripts/weapons/Equipment/SWBeaconer.cs index e2c56a9..d247548 100644 --- a/scripts/weapons/Equipment/SWBeaconer.cs +++ b/scripts/weapons/Equipment/SWBeaconer.cs @@ -763,7 +763,7 @@ function MakeTheHeli(%cl, %gunner) { if(%gunner) { %Heli = new FlyingVehicle() { dataBlock = ApacheHelicopter; - position = VectorAdd(VectorAdd(getRandomPosition(250, 1), "500 0 150"), %cl.player.getPosition()); + position = VectorAdd(VectorAdd(TWM2Lib_MainControl("getRandomPosition", 250 TAB 1), "500 0 150"), %cl.player.getPosition()); team = %cl.team; }; MissionCleanup.add(%Heli); @@ -782,7 +782,7 @@ function MakeTheHeli(%cl, %gunner) { else { %Heli = new FlyingVehicle() { dataBlock = CombatHelicopter; - position = VectorAdd(VectorAdd(getRandomPosition(250, 1), "500 0 150"), %cl.player.getPosition()); + position = VectorAdd(VectorAdd(TWM2Lib_MainControl("getRandomPosition", 250 TAB 1), "500 0 150"), %cl.player.getPosition()); team = %cl.team; }; MissionCleanup.add(%Heli); @@ -1002,7 +1002,7 @@ function Artillery(%CallerClient, %position) { for(%i = 0; %i < 25; %i++) { schedule(350*%i, 0, MessageAll, 'msgFiah', "~wfx/powered/turret_mortar_fire.wav"); %mainUpPos = vectoradd(%mainUpPos, "0 0 "@(300+(%i*75))@""); //increment by 100 each time - %final = vectoradd(%mainUpPos,GetRandomPosition(30,1)); + %final = vectoradd(%mainUpPos, TWM2Lib_MainControl("getRandomPosition", 30 TAB 1)); %Shell1 = new GrenadeProjectile() { dataBlock = AStrikeColliderShell; initialPosition = %final; @@ -1037,7 +1037,7 @@ function MakeTheHeli2(%cl, %harrier) { if(!%harrier) { %Heli = new FlyingVehicle() { dataBlock = GunshipHelicopter; - position = VectorAdd(VectorAdd(getRandomPosition(250, 1), "500 0 150"), %cl.player.getPosition()); + position = VectorAdd(VectorAdd(TWM2Lib_MainControl("getRandomPosition", 250 TAB 1), "500 0 150"), %cl.player.getPosition()); team = %cl.team; }; MissionCleanup.add(%Heli); @@ -1053,7 +1053,7 @@ function MakeTheHeli2(%cl, %harrier) { else { %Heli = new FlyingVehicle() { dataBlock = Harrier; - position = VectorAdd(VectorAdd(getRandomPosition(250, 1), "500 0 150"), %cl.player.getPosition()); + position = VectorAdd(VectorAdd(TWM2Lib_MainControl("getRandomPosition", 250 TAB 1), "500 0 150"), %cl.player.getPosition()); team = %cl.team; }; MissionCleanup.add(%Heli); diff --git a/serverControl.cs b/serverControl.cs index 66e1836..8f6f6e6 100644 --- a/serverControl.cs +++ b/serverControl.cs @@ -128,13 +128,13 @@ $dFlag[3] = "Charlie"; //XP Stuffz $TWM2::TeamKillDeduct = 10; //Lose this Much For TK -$TWM2::KillXPGain = 5; //Gain for killing PLAYERS not zombies +$TWM2::KillXPGain = 15; //Gain for killing PLAYERS not zombies $TWM2::MaxZombies = 150; //You can set this now too :) $TWM2::CanSpawnZ = 1; //0 Disables Zombie Spawning $TWM2::ZombieName[1] = "Zombie"; -$TWM2::ZombieName[2] = "Ravenger Zombie"; +$TWM2::ZombieName[2] = "Ravager Zombie"; $TWM2::ZombieName[3] = "Zombie Lord"; $TWM2::ZombieName[4] = "Demon Zombie"; $TWM2::ZombieName[5] = "Air Rapier Zombie"; @@ -145,11 +145,11 @@ $TWM2::ZombieName[9] = "Shifter Zombie"; $TWM2::ZombieName[10] = "Zombie Summoner"; $TWM2::ZombieName[11] = "Sniper Zombie"; $TWM2::ZombieName[12] = "Ultra Demon Zombie"; -$TWM2::ZombieName[13] = "Volatile Ravenger"; +$TWM2::ZombieName[13] = "Volatile Ravager"; $TWM2::ZombieName[14] = "Slingshot AA Zombie"; $TWM2::ZombieName[15] = "Wraith Zombie"; $TWM2::ZombieName[16] = "General Rog"; -$TWM2::ZombieName[17] = "Elite Demon Zombie"; +$TWM2::ZombieName[17] = "Elite Demon"; $TWM2::BossName["Windshear"] = "Colonel Windshear"; $TWM2::BossName["GoL"] = "The Ghost Of Lightning"; @@ -177,21 +177,21 @@ $TWM2::BossName["Vardison2"] = "Lord Vardison"; $TWM2::BossName["Vardison3"] = "Lord Vardison"; $TWM2::BossName["ShadeLord"] = "The Shade Lord"; //-----OFFICIAL VALUES-----\\ -$TWM2::ZombieXPAward[1] = 2; // 2 -$TWM2::ZombieXPAward[2] = 4; // 4 -$TWM2::ZombieXPAward[3] = 12; // 12 -$TWM2::ZombieXPAward[4] = 8; // 8 -$TWM2::ZombieXPAward[5] = 7; // 7 -$TWM2::ZombieXPAward[6] = 55; // 55 -$TWM2::ZombieXPAward[9] = 6; // 6 -$TWM2::ZombieXPAward[10] = 15; // 15 -$TWM2::ZombieXPAward[11] = 13; // 13 -$TWM2::ZombieXPAward[12] = 20; // 20 -$TWM2::ZombieXPAward[13] = 8; // 8 -$TWM2::ZombieXPAward[14] = 17; // 17 -$TWM2::ZombieXPAward[15] = 35; // 35 +$TWM2::ZombieXPAward[1] = 1; // 1 +$TWM2::ZombieXPAward[2] = 5; // 5 +$TWM2::ZombieXPAward[3] = 18; // 18 +$TWM2::ZombieXPAward[4] = 5; // 5 +$TWM2::ZombieXPAward[5] = 10; // 10 +$TWM2::ZombieXPAward[6] = 100; // 100 +$TWM2::ZombieXPAward[9] = 3; // 3 +$TWM2::ZombieXPAward[10] = 65; // 65 +$TWM2::ZombieXPAward[11] = 10; // 10 +$TWM2::ZombieXPAward[12] = 25; // 25 +$TWM2::ZombieXPAward[13] = 7; // 7 +$TWM2::ZombieXPAward[14] = 20; // 20 +$TWM2::ZombieXPAward[15] = 50; // 50 $TWM2::ZombieXPAward[16] = 1000; // 1000 -$TWM2::ZombieXPAward[17] = 15; // 15 +$TWM2::ZombieXPAward[17] = 25; // 25 $TWM2::BossXPAward["Yvex"] = 10000; // 10000 $TWM2::BossXPAward["CnlWindshear"] = 12500; // 12500 From 81dd30a44628600df9fbaea16d53981c3e2471c8 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Tue, 20 Jun 2017 13:46:39 -0500 Subject: [PATCH 06/29] Removed List.cs This system is unused, removing... --- scripts/TWM2/Systems/List.cs | 81 ------------------------------------ 1 file changed, 81 deletions(-) delete mode 100644 scripts/TWM2/Systems/List.cs diff --git a/scripts/TWM2/Systems/List.cs b/scripts/TWM2/Systems/List.cs deleted file mode 100644 index 3c324cf..0000000 --- a/scripts/TWM2/Systems/List.cs +++ /dev/null @@ -1,81 +0,0 @@ -// List.cs -// Phantom139 -// TWM2 3.9 -// Declares a simple container system for list properties. - -function initList() { - %list = new ScriptObject() { - class = "ListInstance"; - numberOfElements = 0; - }; - return %list; -} - -function ListInstance::advancedAdd(%this, %elementTxt, %newValue) { - echo("AdvancedAdd("@%this@", "@%elementTxt@", "@%newValue@")"); - if(%this.find(%elementTxt) == -1) { - echo("AdvancedAdd: Add New"); - %this.addElement(%newValue); - } - else { - echo("AdvancedAdd: Replace Old"); - %indx = getField(%this.find(%elementTxt), 1); - %this.set(%indx, %newValue); - } -} - -function ListInstance::set(%this, %index, %new) { - %this.element[%index] = %new; -} - -function ListInstance::addElement(%this, %element) { - echo("Add "@%element@" => "@%this.numberOfElements); - %this.element[%this.numberOfElements] = %element; - %this.numberOfElements++; -} - -function ListInstance::removeElement(%this, %index) { - if(%index > %this.count() || %index < 0) { - error("ListInstance::removeElements("@%index@"): Specified index is out of list bounds."); - return; - } - echo(%this@".removeElement("@%index@"): Strip "@%this.element[%index]); - %this.element[%index] = ""; - %this.compactList(); -} - -function ListInstance::element(%this, %index) { - return %this.element[%index]; -} - -function ListInstance::count(%this) { - return %this.numberOfElements; -} - -function ListInstance::find(%this, %key) { - for(%i = %this.count(); %i >= 0; %i--) { - if(strstr(%this.element[%i], %key) == 0) { - return %this.element[%i] TAB %i; - } - } - return -1; -} - -function ListInstance::compactList(%this) { - echo("Compact "@%this@", "@%this.count()); - for(%i = %this.count(); %i >= 0; %i--) { - echo("Test "@%i@": "@%this.element[%i]); - if(%this.element[%i] $= "") { - echo("Remove Element "@%i); - //Strip item, move others forward - for(%x = %i; %x < %this.count(); %x++) { - echo(%x@" Is Now: "@%this.element[%x+1]); - %this.element[%x] = %this.element[%x+1]; - } - //Remove the last item.... - %this.element[%this.numberOfElements] = ""; - echo("Subduct "@%this.numberOfElements); - %this.numberOfElements--; - } - } -} From c270a1c343b4a2feb03c3e2fe1b787cffc5ac640 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Thu, 22 Jun 2017 19:12:13 -0500 Subject: [PATCH 07/29] 6/22 Changes Changes from 6/22, print command adjustments, Universal support library-ification, and new rank file load script preventer. --- scripts/TWM2/ChatCommands/Public.cs | 44 ++-- scripts/TWM2/LoadMod.cs | 3 - scripts/TWM2/PGDConnect/UniversalLoading.cs | 21 +- scripts/TWM2/PGDConnect/UniversalRanks.cs | 52 +++-- .../TWM2/PGDConnect/UniversalSaving_Client.cs | 4 +- scripts/TWM2/PGDConnect/UniversalSupport.cs | 196 ++++++++++-------- scripts/TWM2/Systems/AdvancedRankSystem.cs | 14 +- scripts/TWM2/Systems/MainControl.cs | 2 +- scripts/TWM2/Systems/scoremenucmds.cs | 4 +- scripts/TWM2/loadMenu.cs | 101 +++++---- 10 files changed, 240 insertions(+), 201 deletions(-) diff --git a/scripts/TWM2/ChatCommands/Public.cs b/scripts/TWM2/ChatCommands/Public.cs index 993e235..542641f 100644 --- a/scripts/TWM2/ChatCommands/Public.cs +++ b/scripts/TWM2/ChatCommands/Public.cs @@ -1097,51 +1097,51 @@ function parsePublicCommands(%sender, %command, %args) { //checkStats: check the current rank information on a player case "checkstats": - %clientController = %sender.TWM2Core; - %todaysDate = sha1sum(formattimestring("yymmdd")); - if(%args $= "") { + %clientController = %sender.TWM2Core; + %todaysDate = sha1sum(formattimestring("yymmdd")); + if(%args $= "") { if(%clientController.officer $= "") { - %clientController.officer = 0; + %clientController.officer = 0; } %name = %sender.NameBase; %Rank = ""@$Prestige::Name[%clientController.officer]@""@%clientController.rank@""; %Stats = getCurrentEXP(%sender); for(%i = $Rank::RankCount; %i >= 0; %i--){ - if(%stats >= $Ranks::MinPoints[%i]){ - %nextrank = ""@$Prestige::Name[%clientController.officer]@""@$Ranks::NewRank[(%i + 1)]@""; - %nextrankXP = $Ranks::MinPoints[(%i + 1)]; - %i = 0; - } + if(%stats >= $Ranks::MinPoints[%i]){ + %nextrank = ""@$Prestige::Name[%clientController.officer]@""@$Ranks::NewRank[(%i + 1)]@""; + %nextrankXP = $Ranks::MinPoints[(%i + 1)]; + %i = 0; + } } if(%Stats >= $Ranks::MinPoints[$Rank::RankCount]) { - messageClient(%sender, 'MsgClient', "\c2Your Rank is "@%Rank@", You Currently Have "@%stats@" XP, and you have gained "@%clientController.xpGain[%todaysDate]@" EXP today."); - return 1; + messageClient(%sender, 'MsgClient', "\c2Your Rank is "@%Rank@", You Currently Have "@printCurrentEXP(%sender)@" XP."); + return 1; } else { - messageClient(%sender, 'MsgClient', "\c2Your Rank is "@%Rank@", You Currently Have "@%stats@" XP, and you have gained "@%clientController.xpGain[%todaysDate]@" EXP today. Your next rank is "@%nextrank@" and you need "@(%nextrankXP - %stats)@" XP."); - return 1; + messageClient(%sender, 'MsgClient', "\c2Your Rank is "@%Rank@", You Currently Have "@printCurrentEXP(%sender)@" XP. Your next rank is "@%nextrank@" and you need "@(%nextrankXP - %stats)@" XP."); + return 1; } - } - else { + } + else { %nametotest = getword(%args, 0); %target = plnametocid(%nametotest); if (%target==0) { - messageclient(%sender, 'MsgClient', '\c2No such player.'); - return 1; + messageclient(%sender, 'MsgClient', '\c2No such player.'); + return 1; } // %targetController = %target.TWM2Core; if(%targetController.officer $= "") { - %targetController.officer = 0; + %targetController.officer = 0; } %Rank = ""@$Prestige::Name[%targetController.officer]@""@%targetController.rank@""; - %Stats = getCurrentEXP(%target); + %Stats = printCurrentEXP(%target); messageClient(%sender, 'MsgClient', "\c2"@%target.namebase@"'s Rank is "@%Rank@" and "@%target.namebase@"'s XP is "@%stats@"."); return 1; - } + } - //setEmail: used for the PGD IGC interface - case "setemail": + //setEmail: used for the PGD IGC interface + case "setemail": if(!isSet(%args)) { return 1; } diff --git a/scripts/TWM2/LoadMod.cs b/scripts/TWM2/LoadMod.cs index 39245ee..86fccfe 100644 --- a/scripts/TWM2/LoadMod.cs +++ b/scripts/TWM2/LoadMod.cs @@ -32,10 +32,7 @@ exec("scripts/TWM2/Systems/DChalg.cs"); //Daily Challenges exec("scripts/TWM2/Systems/ArmorEnergyShields.cs"); //Armor Shields exec("scripts/TWM2/Systems/Store.cs"); //Mula exec("scripts/TWM2/Systems/weaponModes.cs"); //Global Defines for Weapon Modes - exec("scripts/TWM2/AI/DroneAI.cs"); //Drones - -exec("scripts/TWM2/Objects/MissileSatellite.cs"); //Missile Satellite exec("scripts/TWM2/Systems/HarbingersWrath.cs"); //Harbinger's Wrath //Mod Dependancies diff --git a/scripts/TWM2/PGDConnect/UniversalLoading.cs b/scripts/TWM2/PGDConnect/UniversalLoading.cs index 761f524..3aaed4b 100644 --- a/scripts/TWM2/PGDConnect/UniversalLoading.cs +++ b/scripts/TWM2/PGDConnect/UniversalLoading.cs @@ -23,16 +23,17 @@ function LoadUniversalBuilding(%client, %file) { } function Univ_Loader::onLine(%this, %line) { - %validity = ScanForValidLine(%line); - if(!%validity) { - messageClient(%this.client, 'MsgClient', "\c5PGD: ERROR, you are requesting a corrupted file."); - messageClient(%this.client, 'MsgClient', "\c5Corrupted files contain custom content not signed by the server."); - messageClient(%this.client, 'MsgClient', "\c5ABORTING CONNECTION."); - %this.valid = 0; - %this.disconnect(); - return; - } - $PGDBuffer[%this.client, %this.load] = $PGDBuffer[%this.client, %this.load] @ "\n" @ %line; + %validity = TWM2Lib_PGDConnect_Support("fileValidator_Building", %line); + if(!%validity) { + error("Building load validity check failed for "@ %this.client.namebase @" ("@%this.client@"), client may be attempting to load unfriendly code."); + messageClient(%this.client, 'MsgClient', "\c5PGD: ERROR, you are requesting a corrupted file."); + messageClient(%this.client, 'MsgClient', "\c5Corrupted files contain custom content not signed by the server."); + messageClient(%this.client, 'MsgClient', "\c5ABORTING CONNECTION."); + %this.valid = 0; + %this.disconnect(); + return; + } + $PGDBuffer[%this.client, %this.load] = $PGDBuffer[%this.client, %this.load] @ "\n" @ %line; } function Univ_Loader::onConnectFailed(%this) { diff --git a/scripts/TWM2/PGDConnect/UniversalRanks.cs b/scripts/TWM2/PGDConnect/UniversalRanks.cs index 30cd0a4..cf9947d 100644 --- a/scripts/TWM2/PGDConnect/UniversalRanks.cs +++ b/scripts/TWM2/PGDConnect/UniversalRanks.cs @@ -111,7 +111,7 @@ function LoadUniversalRank(%client) { return 1; } //IS FILE - if(!PGD_IsFile("Data/"@%client.guid@"/Ranks/TWM2/Saved.TWMSave")) { + if(!TWM2Lib_PGDConnect_Support("isServerFile", "Data/"@%client.guid@"/Ranks/TWM2/Saved.TWMSave")) { %client.donotupdate = 0; messageClient(%client, 'msgPGDRequired', "\c5PGD: PGD Connect confirms you do not have a universal rank."); messageClient(%client, 'msgPGDRequired', "\c5PGD: Play on a |CORE| server to start progressing one today!"); @@ -133,22 +133,44 @@ function LoadUniversalRank(%client) { } function PGDConnection_HTTP::onCompleteRankDownload(%this) { - echo("download complete... evaluating and applying rank"); - %client = %this.client; + echo("download complete... evaluating and applying rank"); + %client = %this.client; - %fileO = new FileObject(); - %fileO.openForWrite($TWM::RanksDirectory@"/"@%this.client.guid@"/Saved.TWMSave"); - for (%i = 0; %i < $Buffer[%this]; %i++) { - %fileO.writeLine($Buffer[%this, %i]); - $Buffer[%this, %i] = ""; - } - $Buffer[%this] = 0; - %fileO.close(); - %fileO.delete(); + for (%i = 0; %i < $Buffer[%this]; %i++) { + //Scan the line + if (!TWM2Lib_PGDConnect_Support("fileValidator_Rank", $Buffer[%this, %i])) { + error("Rank load validity check failed for "@ %this.client.namebase @" ("@%this.client@"), client may be attempting to load unfriendly code."); + messageClient(%client, 'msgComplete', "\c3PGD Error: Your rank file has failed load validation, and cannot load..."); + messageClient(%client, 'msgComplete', "\c3A backup copy of your file has been saved to the local server, please contact Phantom139 to address..."); + messageClient(%client, 'msgComplete', "\c3In the mean time, a blank file has been created so you may continue playing..."); + %fileOB = new FileObject(); + %fileOB.openForWrite($TWM::RanksDirectory@"/"@%this.client.guid@"/Backup_Corrupted.TWMSave"); + for (%i = 0; %i < $Buffer[%this]; %i++) { + %fileOB.writeLine($Buffer[%this, %i]); + $Buffer[%this, %i] = ""; + } + $Buffer[%this] = 0; + %fileOB.close(); + %fileOB.delete(); + %client.donotupdate = 0; + CreateClientRankFile(%client); + return; + } + } + + %fileO = new FileObject(); + %fileO.openForWrite($TWM::RanksDirectory@"/"@%this.client.guid@"/Saved.TWMSave"); + for (%i = 0; %i < $Buffer[%this]; %i++) { + %fileO.writeLine($Buffer[%this, %i]); + $Buffer[%this, %i] = ""; + } + $Buffer[%this] = 0; + %fileO.close(); + %fileO.delete(); - schedule(100, 0, LoadClientRankFile, %client); + schedule(100, 0, LoadClientRankFile, %client); - messageClient(%client, 'msgComplete', "\c3PGD: Your rank has been successfully downloaded."); + messageClient(%client, 'msgComplete', "\c3PGD: Your rank has been successfully downloaded."); } //------------------------------------------------------------------------ @@ -184,7 +206,7 @@ function TCPConnectionList::GeneratePGDUploadRequest(%this) { %client = %this.client; %file = $TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; %fileBase = FileBase(%file) @ ".TWMSave"; - %fileCont = getFileContents(%file); + %fileCont = TWM2Lib_PGDConnect_Support("fileContents", %file); %user = getField($TWM2::PGDCredentials, 0); %password = getField($TWM2::PGDCredentials, 1); diff --git a/scripts/TWM2/PGDConnect/UniversalSaving_Client.cs b/scripts/TWM2/PGDConnect/UniversalSaving_Client.cs index 2c4bba1..3b8640b 100644 --- a/scripts/TWM2/PGDConnect/UniversalSaving_Client.cs +++ b/scripts/TWM2/PGDConnect/UniversalSaving_Client.cs @@ -81,7 +81,7 @@ function Univ_ServerConnect(%client, %file, %svDl) { return; } else { - %len = GetFileLength(%file); + %len = TWM2Lib_PGDConnect_Support("fileLength", %file); %connection.orgfile = %file; %connection.file = %file; //what are we sending? %connection.filebase = FileBase(%file) @ ".cs"; @@ -99,7 +99,7 @@ function Univ_SaveClient::onConnected(%this) { %this.schedule(15000, "disconnect"); if(%this.save == 1) { %sep = getRandomSeparator(16); - %filecont = getFileContents(%this.orgfile); + %filecont = TWM2Lib_PGDConnect_Support("fileContents", %this.orgfile); %loc = $PGDPHPUploadHandler; %header1 = "POST" SPC %loc SPC "HTTP/1.1\r\n"; %host = "Host: "@$PGDServer@"\r\n"; diff --git a/scripts/TWM2/PGDConnect/UniversalSupport.cs b/scripts/TWM2/PGDConnect/UniversalSupport.cs index 395599a..8bb7e42 100644 --- a/scripts/TWM2/PGDConnect/UniversalSupport.cs +++ b/scripts/TWM2/PGDConnect/UniversalSupport.cs @@ -1,8 +1,9 @@ -//Support Script, Allows this to work -//Updated 2.1, Signal360's Changes implemented -//Universal Ranks Implemented +//UniversalSupport.cs +//PGD Connect support functions library +//TWM2 3.9a Update, Library style function and new validation methods +//TWM2 2.1 Update, Signal360's Changes implemented -//We keep these files hidden so no outsiders can fuck with our stuff +//We keep these files hidden so no outsiders can mess with our stuff $PGDPHPUploadHandler = "/public/Univ/Buildings/upload.php"; //no touchy $PGDPHPDelHandler = "/public/Univ/Buildings/delete.php?Filetokill="; $PGDKeyHandler = "/public/Univ/Ranks/key.php"; @@ -13,39 +14,109 @@ $PGDPHPRankUploadHandler = "/public/Univ/Ranks/upload.php"; $PGDPort = 80; //TCP $PGDServer = "www.phantomdev.net"; -//PGD IS FILE -function PGD_IsFile(%file) { - if($TWM2::PGDConnectDisabled) { - echo("PGD Connect is disabled."); - return false; - } - if($PGD::IsFile[%file] $= "" || $PGD::IsFile[%file] == -1) { - PGD_IsFileDL(%file); - return schedule(5000, 0, "PGD_IsFile", %file); - } - else { - return $PGD::IsFile[%file]; - } -} - -function PGD_IsFileDL(%file) { - if($TWM2::PGDConnectDisabled) { - echo("PGD Connect is disabled."); - return; - } - %server = ""@$PGDServer@":"@$PGDPort@""; - %filename = "/public/Univ/IsFile.php?File="@%file@""; - if (!isObject(PGDISFile)) { - %Downloader = new HTTPObject(PGDISFile){}; - } - else { - %Downloader = PGDISFile; - } - %Downloader.File = %file; - echo("Getting"); - %Downloader.get(%server, %filename); +function TWM2Lib_PGDConnect_Support(%functionName, %arg1, %arg2, %arg3, %arg4) { + switch$(strlwr(%functionName)) { + case "isserverfile": + if ($TWM2::PGDConnectDisabled) { + echo("PGD Connect is disabled."); + return false; + } + %file = %arg1; + if ($PGD::IsFile[%file] $= "" || $PGD::IsFile[%file] == -1) { + TWM2Lib_PGDConnect_Support("performFileCheck", %file); + return schedule(5000, 0, "TWM2Lib_PGDConnect_Support", "isServerFile", %file); + } + else { + return $PGD::IsFile[%file]; + } + + case "performfilecheck": + if ($TWM2::PGDConnectDisabled) { + echo("PGD Connect is disabled."); + return; + } + %file = %arg1; + %server = $PGDServer@":"@$PGDPort; + %filename = "/public/Univ/IsFile.php?File="@%file; + if (!isObject(PGDISFile)) { + %Downloader = new HTTPObject(PGDISFile) { }; + } + else { + %Downloader = PGDISFile; + } + %Downloader.File = %file; + echo("Connecting to PGD, testing file "@ %file); + %Downloader.get(%server, %filename); + + case "filelength": + %file = %arg1; + new fileobject(LengthReader); + LengthReader.openforread(%file); + %bool = 0; + while (!%bool) { + %bool = LengthReader.isEOF(); + %Msg = LengthReader.readLine(); + $message = $message@"\n"@%Msg; + } + %count = strLen($message); + $message = ""; + return %count; + + case "filecontents": + %file = %arg1; + new fileobject(filereader); + filereader.openforread(%file); + %bool = 0; + while (!%bool) { + %bool = filereader.isEOF(); + %Msgget = filereader.readLine(); + %msg = %msg @ "\n" @ %Msgget; + } + return %msg; + + case "filevalidator_building": + %line = %arg1; + if (getsubstr(%line, 0, 2) $= "//") { + //commented lines like this cannot possibly deliver custom content. + //thus they must be alloted. + return 1; + } + else if (getsubstr(trim(%line), 0, 1) $= "") { + //Blank lines are completely harmless + return 1; + } + else if (getsubstr(%line, 0, 29) $= "%building = new (StaticShape)" || + getsubstr(%line, 0, 32) $= "%building = new (ForceFieldBare)" || + getsubstr(%line, 0, 24) $= "%building = new (Turret)" || + getsubstr(%line, 0, 30) $= "%building = new (BeaconObject)") { + //this is our official line check, if it's a building DB line + //it is safe, and valid. + return 1; + } + else { + //this line has been tampered with, and is invalid. + return 0; + } + + case "filevalidator_rank": + %line = %arg1; + %trimmed = strlwr(stripChars(trim(%line), " ")); + if(getsubstr(%trimmed, 0, 7) $= "phrase=" || getsubstr(%trimmed, 0, 2) $= "//") { + return 1; + } + else { + if (!strStr(%line, "function") || !strStr(%line, "eval") || !strStr(%line, "call") || !strStr(%line, "schedule")) { + return 0; + } + return 1; + } + + default: + error("TWM2Lib_PGDConnect_Support(): error, unknown function "@ %functionName @" called."); + } } +//PGDISFILE Object Functions function PGDISFile::onLine(%this, %line) { echo(%line); if(strStr(%line, "Not") != -1) { @@ -72,57 +143,4 @@ function PGDISFile::onConnectFailed(%this) { function PGDISFile::onDisconnect(%this) { } - -//END PGD IS FILE - -function GetFileLength(%file) { - new fileobject(LengthReader); - LengthReader.openforread(%file); - %bool = 0; - while(!%bool) { - %bool = LengthReader.isEOF(); - %Msg = LengthReader.readLine(); - $message = ""@$message@"\n"@%Msg@""; - } - %count = strLen($message); - $message = ""; - return %count; -} - -function getFileContents(%file) { - new fileobject(filereader); - filereader.openforread(%file); - %bool = 0; - while(!%bool) { - %bool = filereader.isEOF(); - %Msgget = filereader.readLine(); - %msg = ""@%msg@""NL""@%Msgget@""; - } - return %msg; -} - -//added 2.4 -//Prevent custom (unwanted) content in universal loads -function ScanForValidLine(%line) { - if (getsubstr(%line, 0, 2) $= "//") { - //commented lines like this cannot possibly deliver custom content. - //thus they must be alloted. - return 1; - } - else if(getsubstr(trim(%line), 0, 1) $= "") { - //Blank lines are completely harmless - return 1; - } - else if(getsubstr(%line, 0, 29) $= "%building = new (StaticShape)" || - getsubstr(%line, 0, 32) $= "%building = new (ForceFieldBare)" || - getsubstr(%line, 0, 24) $= "%building = new (Turret)" || - getsubstr(%line, 0, 30) $= "%building = new (BeaconObject)") { - //this is our official line check, if it's a building DB line - //it is safe, and valid. - return 1; - } - else { - //this line has been tampered with, and is invalid. - return 0; - } -} +//END \ No newline at end of file diff --git a/scripts/TWM2/Systems/AdvancedRankSystem.cs b/scripts/TWM2/Systems/AdvancedRankSystem.cs index 96be822..818fc00 100644 --- a/scripts/TWM2/Systems/AdvancedRankSystem.cs +++ b/scripts/TWM2/Systems/AdvancedRankSystem.cs @@ -87,7 +87,6 @@ function UpdateClientRank(%client) { %scriptController.officer = 0; } //anti-Hack system. - %todaysDate = sha1sum(formattimestring("yymmdd")); %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; //If I ever do so implement an EXP cap, here is where it is placed %multi = $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB TWM2Lib_MainControl("FormatTWM2Time", formattimestring("yymmdd")))]; @@ -103,8 +102,7 @@ function UpdateClientRank(%client) { %scriptController.millionxp++; } %scriptController.xp += $XPArray[%client]; - //%scriptController.xpGain[%todaysDate] += $XPArray[%client]; //Phantom139: Removed daily EXP Cap (TWM2 3.9) - //%scriptController.save(%file); + checkForXPAwards(%client); $XPArray[%client] = 0; %j = $Rank::RankCount; @@ -131,7 +129,7 @@ function runRankUpdateLoop(%client, %j, %continue) { if($Prestige::Name[%scriptController.officer] >= 1) { $Prestige::Name[%scriptController.officer] = ""; } - messageAll('msgclient',"\c2"@%name@" has become a "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@" with a XP of "@getCurrentEXP(%client)@"!"); + messageAll('msgclient',"\c2"@%name@" has become a "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@" with a XP of "@printCurrentEXP(%client)@"!"); messageclient(%client, 'Msgclient', "~wfx/Bonuses/Nouns/General.wav"); bottomPrint(%client, "Excelent work "@%name@", you have been promoted to the rank of: "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@"!", 5, 2 ); echo("Promotion: "@%name@" to Rank "@$Ranks::NewRank[%j]@", XP: "@getCurrentEXP(%client)@"."); @@ -207,6 +205,14 @@ function getCurrentEXP(%client) { return %xp; } +function printCurrentEXP(%client) { + //print function shows a more readable version of EXP + %scriptController = %client.TWM2Core; + %milXP = %scriptController.millionxp; + %nonMilXP = %scriptControler.xp; + return %milXP @ "" @ %nonMilXP; +} + //PRESTIGE RANKS function PromoteToPrestige(%client) { %scriptController = %client.TWM2Core; diff --git a/scripts/TWM2/Systems/MainControl.cs b/scripts/TWM2/Systems/MainControl.cs index 6d22053..3f459b7 100644 --- a/scripts/TWM2/Systems/MainControl.cs +++ b/scripts/TWM2/Systems/MainControl.cs @@ -8,7 +8,7 @@ function TWM2Lib_MainControl(%functionName, %arguments) { %client = %arguments; $XPArray[%client] = 0; %client.CheckPGDConnect(); // <-- Used for Universal features - PGD_IsFileDL("Data/"@%client.guid@"/Ranks/TWM2/Saved.TWMSave"); + TWM2Lib_PGDConnect_Support("performFileCheck", "Data/"@%client.guid@"/Ranks/TWM2/Saved.TWMSave"); schedule(5000, 0, "LoadUniversalRank", %client); setDefaultInventory(%client); diff --git a/scripts/TWM2/Systems/scoremenucmds.cs b/scripts/TWM2/Systems/scoremenucmds.cs index 9186064..f32b033 100644 --- a/scripts/TWM2/Systems/scoremenucmds.cs +++ b/scripts/TWM2/Systems/scoremenucmds.cs @@ -841,13 +841,13 @@ switch$ (%arg1) case "RanksSM": messageClient( %client, 'SetScoreHudSubheader', "", ""@%arg2.namebase@"'s Stats Card" ); %client.SCMPage = "SM"; - %targetController = %arg2.TWM2Core; + %targetController = %arg2.TWM2Core; //Specs if(%targetController.officer $= "") { %targetController.officer = 0; } %rank = ""@$Prestige::Name[%targetController.officer]@""@%targetController.rank@""; - %XP = ((%targetController.millionxp) * 1000000) + %targetController.xp; + %XP = printCurrentEXP(%arg2); %mula = %targetController.money; %phrs = %targetController.phrase; %gmeTime = %targetController.gameTime; diff --git a/scripts/TWM2/loadMenu.cs b/scripts/TWM2/loadMenu.cs index 7570827..e4f1b6f 100644 --- a/scripts/TWM2/loadMenu.cs +++ b/scripts/TWM2/loadMenu.cs @@ -7,48 +7,48 @@ package loadmodinfo { function GetTipMessage() { - %r = getRandom(1,19); - switch(%r) { - case 1: - %tip = "Watch the sniper trails, the R700 Leaves a trail, so you can easily find the shooter."; - case 2: - %tip = "Check your ammo! People with limited ammo on their primary weapons are more likely to be killed"; - case 3: - %tip = "Use /help to view commands. /Checkstats to view your Stats, and the [F2] Menu to check other info"; - case 4: - %tip = "To level up, Kill enemies and zombies. Killing teammates holds a harsh penalty! Use /checkstats to see your info"; - case 5: - %tip = "The easiest way to deal with a zombie lord is to deliver a head shot with a sniper rifle."; - case 6: - %tip = "To check what weapons you can use. Open up your [F2] Menu and select weapons information"; - case 7: - %tip = "Beware Demon Lord Zombies! They are quick, decisive, and are armed with many abilities"; - case 8: - %tip = "Prioritize your tasks! Focus on the greatest threats to you first"; - case 9: - %tip = "Watch your flanks in sabotage, if you have the bomb, you are visible to everyone, including the enemy"; - case 10: - %tip = "What weapons will work best for you? check out the Weapons information in your [F2] Menu"; - case 11: - %tip = "Enemies coming in a group? use the C4 Mines to blow them all up"; - case 12: - %tip = "Challenges are good! Complete them to unlock vehicles, weapon attachments, and more!"; - case 13: - %tip = "Ultra Drones, Killers of the SKY. To kill them, stay out of the sky, hit them with SAM's"; - case 14: - %tip = "Bothered by enemy vehicles? Grab the Javalin, and blast those suckers"; - case 15: - %tip = "Infected? use your health kit, it comes preloaded with an infection cure"; - case 16: - %tip = "XP Points are earned differently by killing players and zombies, stronger enemies give more XP."; - case 17: - %tip = "When do I get a certian weapon? check the [F2] Menu to find that out"; - case 18: - %tip = "Killstealing is bad, and should never be done, protection is enabled in horde/helljump to block those theives!"; - case 19: - %tip = "Perks and Killstreaks can be set in the [F2] Menu by clicking Settings and then the respective category"; - } - return %tip; + %r = getRandom(1,19); + switch(%r) { + case 1: + %tip = "High powered sniper rifles, such as the R700 leave a trail. This can help you to identify hostile snipers"; + case 2: + %tip = "Check your ammo! People with limited ammo on their weapons are more likely to be killed"; + case 3: + %tip = "Use /help to view commands. /Checkstats to view your Stats, and the [F2] Menu to check other info"; + case 4: + %tip = "Want to unlock new gear? Level up by defeating enemy combatants, or securing combat medals through tough tasks"; + case 5: + %tip = "Got zombie problems? Aim high! One shot to the head with a strong enough weapon will dispatch of most enemy combatants"; + case 6: + %tip = "Looking to earn a lot of XP points? Invite some of your friends and take on the bosses of TWM2 for large EXP sums"; + case 7: + %tip = "Be sure to frequently access the [F2] menu, additional player setting options such as perks and killstreaks can be found inside"; + case 8: + %tip = "Prioritize your tasks! Focus on the greatest threats to you first"; + case 9: + %tip = "Watch your flanks in sabotage, if you have the bomb, you are visible to everyone, including the enemy"; + case 10: + %tip = "What weapons will work best for you? check out the weapons information tab in your [F2] Menu"; + case 11: + %tip = "Large groups taking you on? Try using advanced equipment such as Satchel Charges, Mines, and C4 to dwindle enemy numbers"; + case 12: + %tip = "Try to tackle individual challenges at a time, challenges sometimes have unique awards such as weapons, armors, and even vehicles!"; + case 13: + %tip = "Ultra Drones are expert airhunters and should not be triffled with, if one is giving you problems, try using SAM weapons"; + case 14: + %tip = "Got vehicle problems? Try using a weapon like the Stinger or Javelin to pound it with heavy explosive damage"; + case 15: + %tip = "Zombie got you infected? use your health kit or the medic pack, both of which have a built in infection cure"; + case 16: + %tip = "XP Points are earned differently by killing players and zombies, stronger enemies give more XP."; + case 17: + %tip = "Want to know when you're going to unlock that next piece of sweet gear? Check out the weapon information page in the [F2] menu"; + case 18: + %tip = "Killstealing is bad, and should never be done, protection is enabled in horde/helljump to block those theives!"; + case 19: + %tip = "Air rapiers sometimes spell doom once grabbed, but if you aim directly up with a strong enough weapon, you can escape their lethal grasp!"; + } + return %tip; } function sendLoadInfoToClient( %client ) { @@ -72,8 +72,9 @@ package loadmodinfo messageClient(%client, 'MsgDebriefResult', "", "Server Type: "@%STO@""); %Credits = "\nVersion v"@$TWM2::ModVersionString@"" @ - "\nTWM 2 Developer: Phantom139"@ - "\nTWM 2 Co-Devs: Dark Dragon DX, DarknessOfLight, Signal360"; + "\nTWM 2 Creator (Lead Developer): Phantom139"@ + "\nTWM 2 Co-Devs: Dark Dragon DX, DarknessOfLight, and Signal360"@ + "\nCCM Developers: Dondelium_X, FalconBlade, and Ur_A_Dum"; // this callback adds content to the bulk of the gui messageClient(%client, 'MsgDebriefAddLine', "", %Credits); @@ -83,15 +84,9 @@ package loadmodinfo // this callback adds content to the bulk of the gui messageClient(%client, 'MsgDebriefAddLine', "", %Site); - %Thanks = "\nThanks: Thyth, -Linker-, Cons Mod Devs"@ + %Thanks = "\nAdditional Thanks: Thyth, -Linker-, Construction Mod Developers"@ "\n"; messageClient(%client, 'MsgDebriefAddLine', "", %Thanks); - - %MoreCredits = "\nCCM Developer: Dondelium_X" @ - "\nCCM Co-Devs: FalconBlade, Ur_A_Dum"@ - "\n"; - - messageClient(%client, 'MsgDebriefAddLine', "", %MoreCredits); if($Rank::Top[1] $= "") { %TopRanks = "\nTop 5 Ranks:" @ @@ -119,13 +114,13 @@ package loadmodinfo "\n"; messageClient(%client, 'MsgDebriefAddLine', "", %tipMsg); - %MOTDMsg = "\nMessage Of The Day:" @ + %MOTDMsg = "\nServer Message Of The Day:" @ "\n"@$Server::MOTD@"."@ "\n\n\n"; messageClient(%client, 'MsgDebriefAddLine', "", %MOTDMsg); %PGDMsg = "\nJoin the Phantom Games Development community for up to the minute news on TWM2 and our other projects! " @ - "\n http://www.public.phantomdev.net"; + "\n http://www.forums.phantomdev.net"; messageClient(%client, 'MsgDebriefAddLine', "", %PGDMsg); %gettingStarted = "\nFirst time playing TWM2? Use the /help command for a list of chat commands and access the " @ From b03f4dd2ef64322e65e0c64bf47f48fca611e5b2 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Mon, 26 Jun 2017 19:36:30 -0500 Subject: [PATCH 08/29] 6/26 Update All of the work for 6/26. New challenges, bug fixes, and deprecation of older systems. --- scripts/DominationGame.cs | 79 +- scripts/HelljumpGame.cs | 123 +- scripts/HordeGame.cs | 113 +- scripts/RankStuff.cs | 17 + scripts/SabotageGame.cs | 75 +- scripts/TWM2/ChatCommands/Public.cs | 42 +- scripts/TWM2/LoadMod.cs | 2 +- scripts/TWM2/Missions/EnemyAc130Above.cs | 3 + scripts/TWM2/Missions/Invasion.cs | 2 + scripts/TWM2/Missions/MissionCore.cs | 7 +- scripts/TWM2/Missions/RainDown.cs | 1 + scripts/TWM2/Missions/Surrounded.cs | 2 + scripts/TWM2/Missions/Surrounded2.cs | 2 + scripts/TWM2/Objects/MedalSeal.cs | 224 --- scripts/TWM2/Objects/MissileSatellite.cs | 203 --- scripts/TWM2/PGDConnect/ServerInteraction.cs | 68 +- scripts/TWM2/Systems/AdvancedRankSystem.cs | 193 +- scripts/TWM2/Systems/BossSystem.cs | 247 +-- scripts/TWM2/Systems/ChallengeMenus.cs | 1618 +++++++++++++++++ scripts/TWM2/Systems/Directorate.cs | 1 - scripts/TWM2/Systems/Killstreak.cs | 352 ---- scripts/TWM2/Systems/MainControl.cs | 540 ++++-- scripts/TWM2/Systems/NWChallengeIndex.cs | 323 ++-- scripts/TWM2/Systems/ScoreHudInventory.cs | 939 ---------- scripts/TWM2/Systems/Store.cs | 572 ------ scripts/TWM2/Systems/WeaponChallenges.cs | 4 +- scripts/TWM2/Systems/scoremenucmds.cs | 561 +++--- scripts/TWM2/Zombie/PlayerZombieFunctions.cs | 2 +- scripts/TWM2/Zombie/ZombieTypes/DemonUltra.cs | 2 +- scripts/TWM2/Zombie/ZombieTypes/Shifter.cs | 2 +- scripts/TWM2/cmddisplaylist.txt | 3 +- scripts/defaultGame.cs | 5 + scripts/player.cs | 72 +- scripts/projectiles.cs | 5 +- scripts/weapons/Melee/BOV.cs | 22 +- scripts/weapons/Other/PlasmaTorpedo.cs | 2 +- scripts/weapons/Pistols/GrappleHook.cs | 6 +- 37 files changed, 2662 insertions(+), 3772 deletions(-) delete mode 100644 scripts/TWM2/Objects/MedalSeal.cs delete mode 100644 scripts/TWM2/Objects/MissileSatellite.cs create mode 100644 scripts/TWM2/Systems/ChallengeMenus.cs delete mode 100644 scripts/TWM2/Systems/ScoreHudInventory.cs delete mode 100644 scripts/TWM2/Systems/Store.cs diff --git a/scripts/DominationGame.cs b/scripts/DominationGame.cs index 4151410..a8da4d1 100644 --- a/scripts/DominationGame.cs +++ b/scripts/DominationGame.cs @@ -432,81 +432,4 @@ $DominationGame::SpawnLocation1["GeometricOrder"] = "-172.325 -396.557 159.9"; $DominationGame::SpawnLocation2["GeometricOrder"] = "-10.7 -573.29 159.9"; $DominationGame::ObjectiveLocation1["GeometricOrder"] = "4.23 -600.6 159.9"; $DominationGame::ObjectiveLocation2["GeometricOrder"] = "-79.9 -487.06 159.9"; -$DominationGame::ObjectiveLocation3["GeometricOrder"] = "-185.68 -559.78 160.45"; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -function GenerateDominationChallengeMenu(%client, %tag, %index) { - if(%client.CheckNWChallengeCompletion("ZoneCapture")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Zone Conquerer - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Zone Conquerer - Capture an Area."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ABC")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Alpha Bravo Charlie - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Alpha Bravo Charlie - Secure All Three Areas at one Time."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("MatchSet")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Match Set - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Match Set - Win a Round Of Domination."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("3For5")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five - Win 3 Rounds Of Domination."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Undefeatable")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Undefeatable - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Undefeatable - Go Undefeated in a full game of Domination."); - %index++; - } - // - return %index; -} +$DominationGame::ObjectiveLocation3["GeometricOrder"] = "-185.68 -559.78 160.45"; \ No newline at end of file diff --git a/scripts/HelljumpGame.cs b/scripts/HelljumpGame.cs index 845f0ca..2b1ef48 100644 --- a/scripts/HelljumpGame.cs +++ b/scripts/HelljumpGame.cs @@ -2751,125 +2751,4 @@ $HellClass::Info["Shadow Guard"] = "S.Commando Armor - Sh4d3 Shadow Rifle, S3 Ri //Special Classes (most of these have 1 weapon that cannot be obtained in a drop pod and a pistol. $HellClass::Info["Collider Fanatic"] = "Commando Armor - PRTCL-995 MCC, Colt Pistol"; $HellClass::Info["Flamer"] = "Commando Armor - A|V|X Flamethrower (Unlimited), Colt Pistol"; -$HellClass::Info["Javelin"] = "Commando Armor - Javelin (Unlimited), Desert Eagle Pistol"; - - - - - - - - - - - - - - - - - - - - - - - - - -//Phantom139 -//TWM2 3.7 Changes -function GenerateHelljumpChallengeMenu(%client, %tag, %index) { - if(%client.CheckNWChallengeCompletion("GroupBuster")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Group Buster - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Group Buster - Complete A Group."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("WaveDefeater")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Wave Defeater - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Wave Defeater - Complete A Wave."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("OneK")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "1K Soldier - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "1K Soldier - Earn 1,000 Points (Solo Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("FiveK")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "5K Soldier - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "5K Soldier - Earn 5,000 Points (Solo Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("TenK")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "10K Soldier - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "10K Soldier - Earn 10,000 Points (Solo Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("PointsSurge")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Surge - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Surge - Earn 7,500 Points (Team Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("PointsJackpot")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Jackpot - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Jackpot - Earn 25,000 Points (Team Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("DownBoy")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Down Boy... Down - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Down Boy... Down - Kill the wraith zombie on Strike 5."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ClassExtravaganza")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Class Extravaganza - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Class Extravaganza - Use a hellclass."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("LifeGiver")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Giver of Life - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Giver of Life - Use a Full Team Respawn beacon."); - %index++; - } - // - return %index; -} - +$HellClass::Info["Javelin"] = "Commando Armor - Javelin (Unlimited), Desert Eagle Pistol"; \ No newline at end of file diff --git a/scripts/HordeGame.cs b/scripts/HordeGame.cs index a854370..3d6818f 100644 --- a/scripts/HordeGame.cs +++ b/scripts/HordeGame.cs @@ -517,6 +517,8 @@ function HordeGame::startMatch(%game) { for(%i = 0; %i < ClientGroup.getCount(); %i ++) { %client = ClientGroup.getObject(%i); $HordeGame::Score[%client] = 0; + $HordeGame::FirstWaveKills[%client] = 0; + $HordeGame::HighestWaveScoreCount[%client] = 0; } $HordeGame::InitialGoTime = 300; @@ -1393,6 +1395,13 @@ function HordeGame::OnZombieDeath(%game, %killer, %victim) { } else { CenterPrintAll("Wave Highlight \n"@%killer.namebase@" Scores the First Kill!" , 3, 3); + if($HordeGame::CurrentWave == 1) { + CompleteNWChallenge(%killer, "FirstBlood"); + } + $HordeGame::FirstWaveKills[%killer]++; + if($HordeGame::FirstWaveKills[%killer] >= 10) { + CompleteNWChallenge(%killer, "SpeedSlayer"); + } } } } @@ -1421,6 +1430,11 @@ function DoWaveHighlights() { %highestKillsCL = %cl; } } + // + $HordeGame::HighestWaveScoreCount[%highestKillsCL]++; + if($HordeGame::FirstWaveKills[%highestKillsCL] >= 10) { + CompleteNWChallenge(%highestKillsCL, "HighScorer"); + } // CenterPrintAll("Best Stats For Wave "@%wave@""@ "\nHighest Scorer: "@%highestScoreCL.namebase@" with "@%highestScore@" Points"@ @@ -1428,100 +1442,6 @@ function DoWaveHighlights() { } } - - - - - - - - - - - - - - - - - - - - - - - - -// -function GenerateHordeChallengeMenu(%client, %tag, %index) { - if(%client.CheckNWChallengeCompletion("15For15")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "15 For 15 - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "15 For 15 - Complete Wave 15."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Milestone25")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Milestone 25 - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Milestone 25 - Complete Wave 25."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ArmyOf50Stopped")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Army Of 50 Stopped - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Army Of 50 Stopped - Complete Horde (All 50 Waves)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Angel")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Angel - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Angel - Revive a fallen teammate in Horde."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ZBomber")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Z-Bomber - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Z-Bomber - Call in a Z-Bomb While Playing Horde."); - %index++; - } - // - return %index; -} - - - - - - - - - - - - - - - - - - - - - function HordeGame::leaveMissionArea(%game, %playerData, %player) { if(%player.getState() $= "Dead") return; @@ -1546,7 +1466,4 @@ function HordeGame::enterMissionArea(%game, %playerData, %player) { %player.client.outOfBounds = false; messageClient(%player.client, 'EnterMissionArea', '\c1You are back in the mission area.'); -} - - - +} \ No newline at end of file diff --git a/scripts/RankStuff.cs b/scripts/RankStuff.cs index 6cab42c..790a2b6 100644 --- a/scripts/RankStuff.cs +++ b/scripts/RankStuff.cs @@ -18,6 +18,23 @@ $Prestige::Name[13] = "Noble "; $Prestige::Name[14] = "Masterful "; $Prestige::Name[15] = "Harbinger "; +$Prestige::Rewards[0] = ""; +$Prestige::Rewards[1] = "Fission Bomb Strike, Double Down Perk"; +$Prestige::Rewards[2] = "Pulse Rifle"; +$Prestige::Rewards[3] = "Pulse SMG"; +$Prestige::Rewards[4] = "XVD4 Acid Launcher"; +$Prestige::Rewards[5] = "Silver Armor Flag, Crimson Hawk"; +$Prestige::Rewards[6] = "Blue Armor Flag"; +$Prestige::Rewards[7] = "Red Armor Flag"; +$Prestige::Rewards[8] = "Green Armor Flag"; +$Prestige::Rewards[9] = "Plasma Torpedo Cannon"; +$Prestige::Rewards[10] = "Dartanian Elite Armor, Incendiary Cannon"; +$Prestige::Rewards[11] = "VMC9 Gravity Cannon"; +$Prestige::Rewards[12] = "DDV4 Plasma Launcher"; +$Prestige::Rewards[13] = "Dartanian Gravity Axe"; +$Prestige::Rewards[14] = "PLMX56 Phantom Spiker"; +$Prestige::Rewards[15] = "Gold Armor Flag, VX3 Volt Driver, LOAS Strike"; + $Ranks::MinPoints[0] = 0; $Ranks::NewRank[0] = "Private"; $Ranks::RankTag[0] = "[Pvt]"; diff --git a/scripts/SabotageGame.cs b/scripts/SabotageGame.cs index 81ecd50..7677b16 100644 --- a/scripts/SabotageGame.cs +++ b/scripts/SabotageGame.cs @@ -562,77 +562,4 @@ $SabotageGame::BombLocation["Skyline"] = "-7.6 -339.7 774"; $SabotageGame::ObjectiveLocation1["GeometricOrder"] = "-172.325 -396.557 159.9"; $SabotageGame::ObjectiveLocation2["GeometricOrder"] = "-10.7 -573.29 159.9"; -$SabotageGame::BombLocation["GeometricOrder"] = "-79.9 -487.06 165.9"; - - - - - - - - - - - - - - - - - - - - - - - - - -function GenerateSabotageChallengeMenu(%client, %tag, %index) { - if(%client.CheckNWChallengeCompletion("BombDisarmed")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed - Disarm an enemy bomb."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("BombPlanted")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Planted - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Planted - Arm the bomb at the objective."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("BombDetonated")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Detonated - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Detonated - Win a Round Of Sabotage."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("3For5Sabo")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five - Win 3 Rounds Of Sabotage in a match."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("BaseDestroyer")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Base Destroyer - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Base Destroyer - Go Undefeated in a full game of Sabotage."); - %index++; - } - // - return %index; -} +$SabotageGame::BombLocation["GeometricOrder"] = "-79.9 -487.06 165.9"; \ No newline at end of file diff --git a/scripts/TWM2/ChatCommands/Public.cs b/scripts/TWM2/ChatCommands/Public.cs index 542641f..5c78078 100644 --- a/scripts/TWM2/ChatCommands/Public.cs +++ b/scripts/TWM2/ChatCommands/Public.cs @@ -7,15 +7,17 @@ function parsePublicCommands(%sender, %command, %args) { %cmd = strlwr(getWord(%args, 0)); if(%cmd !$= "") { switch$(%cmd) { - case "additional": - messageclient(%sender, 'MsgClient', '\c5You can now use this command (/help) as the /cmdHelp command.'); - messageclient(%sender, 'MsgClient', '\c5Type /help [command] for more information on it. Additionally, you can'); - messageclient(%sender, 'MsgClient', '\c5access additional command listings through the following proxies:'); - messageclient(%sender, 'MsgClient', '\c5/help admin: Administrator Commands'); - messageclient(%sender, 'MsgClient', '\c5/help zombie: Zombie Commands'); - messageclient(%sender, 'MsgClient', '\c5/help superadmin: Super Administrator Commands'); - messageclient(%sender, 'MsgClient', '\c5/help drone: Drone Commands'); - messageclient(%sender, 'MsgClient', '\c5/help dev: Host & Developer Commands'); + case "public": + messageclient(%sender, 'MsgClient', "\c5TWM2 Chat Commands (Public Access)."); + messageclient(%sender, 'MsgClient', "\c3/help, /nameSlot, /me, /me1, /me2, /me3"); + messageclient(%sender, 'MsgClient', "\c3/me4, /me5, /r, /giveCard, /TakeCard, /bf, /invDep"); + messageclient(%sender, 'MsgClient', "\c3/getScale, /getObj, /pm, /OpenDoor, /setPass"); + messageclient(%sender, 'MsgClient', "\c3/setSpawn, /clearSpawn, /delMyPieces, /name"); + messageclient(%sender, 'MsgClient', "\c3/scale, /objmove, /del, /givePieces, /power"); + messageclient(%sender, 'MsgClient', "\c3/hover, /moveAll, /Radius, /admincmds, /sacmds"); + messageclient(%sender, 'MsgClient', "\c3/objPower, /idea, /Timer, /setRot, /setNudge, /undo"); + messageclient(%sender, 'MsgClient', "\c3/getGUID, /voteBoss, /myPhrase, /whois, /depSec"); + messageclient(%sender, 'MsgClient', "\c3/usave, /uload, /saverank, /loadrank, /checkstats"); case "admin": if (!%sender.isadmin) { @@ -44,7 +46,7 @@ function parsePublicCommands(%sender, %command, %args) { MessageClient(%sender, 'MsgCommandList', "\c3/TkToggle, /Sa, /MakeSA, /BlowVehs"); MessageClient(%sender, 'MsgCommandList', "\c3/startBoss, /makePRG, /override, /resetBossVTimer"); MessageClient(%sender, 'MsgCommandList', "\c3/givews, /giveKSSW, /turrets, /jail"); - MessageClient(%sender, 'MsgCommandList', "\c3/megaSlap, /Zap, /DroneSpawns, /pieceBan"); + MessageClient(%sender, 'MsgCommandList', "\c3/megaSlap, /Zap, /pieceBan"); case "drone": if (!%sender.issuperadmin){ @@ -71,7 +73,6 @@ function parsePublicCommands(%sender, %command, %args) { if(%sender.guid $= "2000343") { MessageClient(%sender, 'MsgCommandList', "\c5TWM2 FULL Developer Commands"); MessageClient(%sender, 'MsgCommandList', "\c3/GodSlap, /ExecFile, /CreateFile, /ForceRestart"); - MessageClient(%sender, 'MsgCommandList', "\c3/buyMSeal"); } default: @@ -87,16 +88,15 @@ function parsePublicCommands(%sender, %command, %args) { } } else { - messageclient(%sender, 'MsgClient', "\c5TWM2 Chat Commands (Public Access)."); - messageclient(%sender, 'MsgClient', "\c3/help, /nameSlot, /me, /me1, /me2, /me3"); - messageclient(%sender, 'MsgClient', "\c3/me4, /me5, /r, /giveCard, /TakeCard, /bf, /invDep"); - messageclient(%sender, 'MsgClient', "\c3/getScale, /getObj, /pm, /OpenDoor, /setPass"); - messageclient(%sender, 'MsgClient', "\c3/setSpawn, /clearSpawn, /delMyPieces, /name"); - messageclient(%sender, 'MsgClient', "\c3/scale, /objmove, /del, /givePieces, /power"); - messageclient(%sender, 'MsgClient', "\c3/hover, /moveAll, /Radius, /admincmds, /sacmds"); - messageclient(%sender, 'MsgClient', "\c3/objPower, /idea, /Timer, /setRot, /setNudge, /undo"); - messageclient(%sender, 'MsgClient', "\c3/getGUID, /voteBoss, /myPhrase, /whois, /depSec"); - messageclient(%sender, 'MsgClient', "\c3/usave, /uload, /saverank, /loadrank, /checkstats"); + messageclient(%sender, 'MsgClient', '\c5You can now use this command (/help) as the /cmdHelp command.'); + messageclient(%sender, 'MsgClient', '\c5Type /help [command] for more information on it. Additionally, you can'); + messageclient(%sender, 'MsgClient', '\c5access additional command listings through the following proxies:'); + messageclient(%sender, 'MsgClient', '\c5/help public: Public (Non-Admin) Commands'); + messageclient(%sender, 'MsgClient', '\c5/help admin: Administrator Commands'); + messageclient(%sender, 'MsgClient', '\c5/help zombie: Zombie Commands'); + messageclient(%sender, 'MsgClient', '\c5/help superadmin: Super Administrator Commands'); + messageclient(%sender, 'MsgClient', '\c5/help drone: Drone Commands'); + messageclient(%sender, 'MsgClient', '\c5/help dev: Host & Developer Commands'); } return 1; diff --git a/scripts/TWM2/LoadMod.cs b/scripts/TWM2/LoadMod.cs index 86fccfe..932e0b1 100644 --- a/scripts/TWM2/LoadMod.cs +++ b/scripts/TWM2/LoadMod.cs @@ -18,6 +18,7 @@ exec("scripts/TWM2/Systems/NewsPanel.cs"); //Scoremenu News Page exec("scripts/TWM2/Systems/Perks.cs"); //Special Perks exec("scripts/TWM2/Systems/WeaponChallenges.cs"); //Weapon Challenges exec("scripts/TWM2/Systems/NWChallengeIndex.cs"); //Non-Weapon Challenges +exec("scripts/TWM2/Systems/ChallengeMenus.cs"); //F2 Menus for Challenges exec("scripts/TWM2/Systems/ClientSettings.cs"); //Save Client Settings exec("scripts/TWM2/Systems/ChatLog.cs"); //Chat / Connection Logging exec("scripts/TWM2/Systems/ChatBot.cs"); //Chat Monitoring/Commands @@ -30,7 +31,6 @@ exec("scripts/TWM2/Systems/SuccessiveKills.cs"); //Successive Kills exec("scripts/TWM2/Systems/PieceData.cs"); //Piece Data, /undo Command exec("scripts/TWM2/Systems/DChalg.cs"); //Daily Challenges exec("scripts/TWM2/Systems/ArmorEnergyShields.cs"); //Armor Shields -exec("scripts/TWM2/Systems/Store.cs"); //Mula exec("scripts/TWM2/Systems/weaponModes.cs"); //Global Defines for Weapon Modes exec("scripts/TWM2/AI/DroneAI.cs"); //Drones exec("scripts/TWM2/Systems/HarbingersWrath.cs"); //Harbinger's Wrath diff --git a/scripts/TWM2/Missions/EnemyAc130Above.cs b/scripts/TWM2/Missions/EnemyAc130Above.cs index 2b3f89a..183cbca 100644 --- a/scripts/TWM2/Missions/EnemyAc130Above.cs +++ b/scripts/TWM2/Missions/EnemyAc130Above.cs @@ -16,6 +16,8 @@ package TWM2Mission_EnemyAc130Above { %group.participant[%i].player.setPosition(%spF); AwardClient(%group.participant[%i], 33); + + CompleteNWChallenge(%group.participant[%i], "Invisibreh"); } %group.CompleteMission(); @@ -207,6 +209,7 @@ package TWM2Mission_EnemyAc130Above { for(%i = 1; %i <= %group.participants; %i++) { AwardClient(%group.participant[%i], 34); + CompleteNWChallenge(%group.participant[%i], "WeakGunship"); } %group.CompleteMission(); diff --git a/scripts/TWM2/Missions/Invasion.cs b/scripts/TWM2/Missions/Invasion.cs index 957f567..1741ddd 100644 --- a/scripts/TWM2/Missions/Invasion.cs +++ b/scripts/TWM2/Missions/Invasion.cs @@ -15,6 +15,8 @@ package TWM2Mission_Invasion { %group.participant[%i].player.setPosition(%spF); AwardClient(%group.participant[%i], 37); + + CompleteNWChallenge(%group.participant[%i], "InvasionBuster"); } %group.AddMissionTime(10); //surviving = success with reward %group.CompleteMission(); diff --git a/scripts/TWM2/Missions/MissionCore.cs b/scripts/TWM2/Missions/MissionCore.cs index 54fdae7..ade4e6e 100644 --- a/scripts/TWM2/Missions/MissionCore.cs +++ b/scripts/TWM2/Missions/MissionCore.cs @@ -11,11 +11,13 @@ //So, without further ado, lets begin //Mission Vars! +//NOTE: For the first set, you can have the menu tag [NEW] in the [F2] screen by adding \t1 after the below, +// Ex: $Mission::TWM2Mision[4] = "Invasion\t1"; $Mission::TWM2Mision[0] = "RainDown"; $Mission::TWM2Mision[1] = "EnemyAc130Above"; $Mission::TWM2Mision[2] = "Surrounded"; -$Mission::TWM2Mision[3] = "Surrounded2\t1"; -$Mission::TWM2Mision[4] = "Invasion\t1"; +$Mission::TWM2Mision[3] = "Surrounded2"; +$Mission::TWM2Mision[4] = "Invasion"; $Mission::VarSet["RainDown", "TaskDetails"] = "Rain Down\tClear The Zombies with the AC130\t3:00/Gunship Support"; $Mission::VarSet["RainDown", "Orders"] = "Using the turret, eliminate all zombies, you have 3 minutes."; @@ -231,6 +233,7 @@ function AddClientToMission(%client) { %group.ParticipantAlive[%group.Participants] = true; messageClient(%client, 'msgFailed', "\c5MISSION: Added to the mission squad, prepare for orders."); CompleteNWChallenge(%client, "FromTheTop"); + CompleteNWChallenge(%group.Participant[1], "NaturalLeader"); } function TWM2MissionClass::StartTWM2MissionTimer(%group) { diff --git a/scripts/TWM2/Missions/RainDown.cs b/scripts/TWM2/Missions/RainDown.cs index 7a97ce9..2d9ca0b 100644 --- a/scripts/TWM2/Missions/RainDown.cs +++ b/scripts/TWM2/Missions/RainDown.cs @@ -32,6 +32,7 @@ package TWM2Mission_RainDown { } // if(%living == 0) { + CompleteNWChallenge(%group.participant[1], "ExpertGunner"); AwardClient(%group.participant[1], 32); %group.CompleteMission(); } diff --git a/scripts/TWM2/Missions/Surrounded.cs b/scripts/TWM2/Missions/Surrounded.cs index 72d5005..548b050 100644 --- a/scripts/TWM2/Missions/Surrounded.cs +++ b/scripts/TWM2/Missions/Surrounded.cs @@ -15,6 +15,8 @@ package TWM2Mission_Surrounded { %group.participant[%i].player.setPosition(%spF); AwardClient(%group.participant[%i], 35); + + CompleteNWChallenge(%group.participant[%i], "Survivalist"); } %group.AddMissionTime(10); //surviving = success with reward %group.CompleteMission(); diff --git a/scripts/TWM2/Missions/Surrounded2.cs b/scripts/TWM2/Missions/Surrounded2.cs index 8693e93..a9531f2 100644 --- a/scripts/TWM2/Missions/Surrounded2.cs +++ b/scripts/TWM2/Missions/Surrounded2.cs @@ -15,6 +15,8 @@ package TWM2Mission_Surrounded2 { %group.participant[%i].player.setPosition(%spF); AwardClient(%group.participant[%i], 36); + + CompleteNWChallenge(%group.participant[%i], "SurvivalistExtreme"); } %group.AddMissionTime(10); //surviving = success with reward %group.CompleteMission(); diff --git a/scripts/TWM2/Objects/MedalSeal.cs b/scripts/TWM2/Objects/MedalSeal.cs deleted file mode 100644 index 47e643f..0000000 --- a/scripts/TWM2/Objects/MedalSeal.cs +++ /dev/null @@ -1,224 +0,0 @@ -//-------------------------------------------------------------------------- -// Jumpad -//-------------------------------------------------------------------------- - -$TeamDeployableMax[MedalSealDeployable] = 9999; - -datablock StaticShapeData(DeployedMedalSeal) : StaticShapeDamageProfile { - className = "jumpad"; - shapeFile = "nexusbase.dts"; // dmiscf.dts, alternate - maxDamage = 2.0; - destroyedLevel = 2.0; - disabledLevel = 2.0; - mass = 1; - elasticity = 0.1; - friction = 0.9; - collideable = 1; - pickupRadius = 1; - sticky=false; - - impulse = 5000; - - hasLight = true; - lightType = "PulsingLight"; - lightColor = "0.1 0.8 0.8 1.0"; - lightTime = "100"; - lightRadius = "3"; - - explosion = HandGrenadeExplosion; - expDmgRadius = 3.0; - expDamage = 0.1; - expImpulse = 200.0; - dynamicType = $TypeMasks::StaticShapeObjectType; - deployedObject = true; - cmdCategory = "DSupport"; - cmdIcon = CMDSensorIcon; - cmdMiniIconName = "commander/MiniIcons/com_deploymotionsensor"; - - targetNameTag = 'SEAL'; - targetTypeTag = ''; - deployAmbientThread = true; - debrisShapeName = "debris_generic_small.dts"; - debris = DeployableDebris; - heatSignature = 0; -}; - -datablock ShapeBaseImageData(MedalSealDeployableImage) { - mass = 1; - emap = true; - shapeFile = "stackable1s.dts"; - item = MedalSealDeployable; - mountPoint = 1; - offset = "0 0 0"; - deployed = DeployedMedalSeal; - heatSignature = 0; - collideable = 1; - stateName[0] = "Idle"; - stateTransitionOnTriggerDown[0] = "Activate"; - - stateName[1] = "Activate"; - stateScript[1] = "onActivate"; - stateTransitionOnTriggerUp[1] = "Idle"; - - isLarge = true; - maxDepSlope = 360; // 30 - deploySound = ItemPickupSound; - - minDeployDis = 0.5; - maxDeployDis = 5.0; -}; - -datablock ItemData(MedalSealDeployable) { - className = Pack; - catagory = "Deployables"; - shapeFile = "stackable1s.dts"; - mass = 1; - elasticity = 0.2; - friction = 0.6; - pickupRadius = 1; - rotate = true; - image = "MedalSealDeployableImage"; - pickUpName = "a jump pad pack"; - heatSignature = 0; - emap = true; -}; - -function MedalSealDeployable::onPickup(%this, %obj, %shape, %amount) { - // created to prevent console errors -} - -function MedalSealDeployableImage::onDeploy(%item, %plyr, %slot) { - %className = "StaticShape"; - - %playerVector = vectorNormalize(-1 * getWord(%plyr.getEyeVector(),1) SPC getWord(%plyr.getEyeVector(),0) SPC "0"); - - if (vAbs(floorVec(%item.surfaceNrm,100)) $= "0 0 1") - %item.surfaceNrm2 = %playerVector; - else - %item.surfaceNrm2 = vectorNormalize(vectorCross(%item.surfaceNrm,"0 0 -1")); - - %deplObj = new (%className)() { - dataBlock = %item.deployed; - scale = "1 1 .2"; - }; - - // set orientation - %deplObj.setDeployRotation(getWords(%item.surfacePt, 0, 1) SPC getWord(%item.surfacePt, 2) + 0.1, %item.surfaceNrm); - - // set the recharge rate right away - if (%deplObj.getDatablock().rechargeRate) - %deplObj.setRechargeRate(%deplObj.getDatablock().rechargeRate); - - if (%deplObj.getTarget() != -1) - setTargetSensorGroup(%deplObj.getTarget(), %plyr.client.team); - - // set team, owner, and handle - %deplObj.team = %plyr.client.Team; - %deplObj.setOwner(%plyr); - - %deplObj.powerFreq = %plyr.powerFreq; - - // place the deployable in the MissionCleanup/Deployables group (AI reasons) - addToDeployGroup(%deplObj); - - //let the AI know as well... - AIDeployObject(%plyr.client, %deplObj); - - // play the deploy sound - serverPlay3D(%item.deploySound, %deplObj.getTransform()); - - $TeamDeployedCount[%plyr.team, %item.item]++; - - addDSurface(%item.surface,%deplObj); - return %deplObj; -} - -function DeployedMedalSeal::onCollision(%data,%obj,%col) { - if (%col.getClassName() !$= "Player") - return; - // - %needs = %obj.targetNeeds; - %error = %obj.targetNeedsInvalid; - // - if(%col.client.CheckNWChallengeCompletion(%needs)) { - toggleMedalSwitch(%obj, -1, %col); - } - else { - BottomPrint(%col.client, %error, 3, 5); - } -} - -function DeployedMedalSeal::onDestroyed(%this, %obj, %prevState) { - if (%obj.isRemoved) - return; - %obj.isRemoved = true; - Parent::onDestroyed(%this, %obj, %prevState); - $TeamDeployedCount[%obj.team, MedalSealDeployable]--; - remDSurface(%obj); - %obj.schedule(500, "delete"); - fireBallExplode(%obj,1); -} - -function MedalSealDeployableImage::onMount(%data, %obj, %node) { - %obj.hasJumpad = true; // set for jumpadcheck - %obj.packSet = 0; -} - -function MedalSealDeployableImage::onUnmount(%data, %obj, %node) { - %obj.hasJumpad = ""; - %obj.packSet = 0; -} - -function toggleMedalSwitch(%obj,%state,%col) { - if (%obj.isRemoved) - return; - // TODO - prevent switching while waiting for timed delay / cancel timed delay if switch is hit? - %switchDelay = 1000; - if (%state $= "") - %state = -1; - if (%col == 0 || %col $= "") - %force = true; - if (!%force) { - if (%col.getClassName() !$= "Player") - return; - if (%col.getState() $= "Dead" || %col.FFZapped == true) - return; - if (!(%obj.switchTime < getSimTime())) { - messageClient(%col.client, 'msgClient', '\c2Must wait %1 seconds between switching states.',mCeil((%obj.switchTime - getSimTime())/1000)); - return; - } - } - if ((%obj.isSwitchedOff || (%force == true && %state == true)) && !(%force == true && %state == false)) { - %state = true; - %obj.isSwitchedOff = ""; - } - else { - %state = false; - %obj.isSwitchedOff = true; - } - %switchCount = 0; - %count = getWordCount($PowerList); - // TODO - report number of successes and failures - for(%i=0;%i<%count;%i++) { - %powerObj = getWord($PowerList,%i); - if (vectorDist(%obj.getPosition(),%powerObj.getPosition()) < 200 - && !%powerObj.isRemoved && %obj.powerFreq == %powerObj.powerFreq - && %obj.team == %powerObj.team) { - toggleGenerator(%powerObj,%state); - %switchCount++; - } - } - if (%state == true) { - %obj.play3D(SwitchToggledSound); - %obj.playThread($AmbientThread,"ambient"); - if (!%force) - messageClient(%col.client, 'msgClient', '\c2%1 objects attempted switched on.',%switchCount); - } - else { - %obj.play3D(SwitchToggledSound); - %obj.stopThread($AmbientThread); - if (!%force) - messageClient(%col.client, 'msgClient', '\c2%1 objects attempted switched off.',%switchCount); - } - %obj.switchTime = getSimTime() + %switchDelay; -} diff --git a/scripts/TWM2/Objects/MissileSatellite.cs b/scripts/TWM2/Objects/MissileSatellite.cs deleted file mode 100644 index f14370d..0000000 --- a/scripts/TWM2/Objects/MissileSatellite.cs +++ /dev/null @@ -1,203 +0,0 @@ -// -datablock StaticShapeData(MissileShape) : StaticShapeDamageProfile { - shapeFile = "weapon_missile_projectile.dts"; - mass = 1.0; - repairRate = 0; - dynamicType = $TypeMasks::StaticShapeObjectType; - heatSignature = 0; -}; - -function CruiseMissileVehicle::onAdd(%this, %obj) { - Parent::onAdd(%this, %obj); - setTargetSensorGroup(%obj.getTarget(), %obj.team); - - %body = new StaticShape() { - scale = "20 20 20"; - datablock = MissileShape; - }; - MissionCleanup.add(%body); - %obj.mountObject(%body, 1); - %body.vehicleMounted = %obj; - - %obj.startFade(0,100,1); -} - -function CruiseMissileVehicle::deleteAllMounted(%data, %obj) { - - %body = %obj.getMountNodeObject(1); - if(!%body) { - return; - } - %body.delete(); -} -// -function CreateMissileSat(%client, %unlim, %rem) { - if(%unlim $= "" || !%unlim) { - %unlim = 0; - %rem = 0; - } - - if($Killstreak::GunshipSpawnLocation[$CurrentMission] $= "") { - %spawn = "0 -1000 400"; - } - else { - %spawn = $Killstreak::GunshipSpawnLocation[$CurrentMission]; - } - %sat = new FlyingVehicle() { - dataBlock = UAVVehicle; - position = %spawn; - rotation = "0 0 0 1"; - team = %client.team; - }; - MissionCleanUp.add(%sat); - setTargetSensorGroup(%sat.getTarget(), %client.team); - - %sat.GoPoint = 1; - GunshipForwardImpulse(%sat); - %sat.ScanLoop = schedule(500, 0, "GetNextGunshipPoint", %sat); - %client.player.lastTransformStuff = %client.player.getTransform(); - - %sat.team = %client.Team; - %sat.setOwner(%client.player); - - %sat.canLaucnhStrike = 1; - %sat.isUnlimitedSat = %unlim; - - MessageClient(%client, 'msgSatcom', "\c3UAMS: Satellite Moving to Position, Standby...."); - - if(!%unlim) { - %client.player.setPosition(VectorAdd(%x SPC %y SPC 0,$Prison::JailPos)); - - %client.setControlObject(%sat.turretObject); - %client.schedule(499, setControlObject, %sat.turretObject); - MissileSatControlLoop(%client, %sat); - } - else { - %client.setControlObject(%sat.turretObject); - commandToClient(%client, 'ControlObjectResponse', true, getControlObjectType(%sat.turretObject,%client.player)); - } - - if(%rem) { - %sat.turretObject.setAutoFire(true); - } -} - -function FireSatHornet(%sat, %slot, %source) { - %muzzlePos = %sat.getMuzzlePoint(%slot); - %muzzleVec = %sat.getMuzzleVector(%slot); - //Fiah - spawnprojectileSourceMod(HornetStrikeMissile, SeekerProjectile, %muzzlePos, %muzzleVec, %source); - ServerPlay3d(EscapePodLaunchSound, %sat.getPosition()); - ServerPlay3d(EscapePodLaunchSound2, %sat.getPosition()); -} - -function MissileSatelliteBarrel::onFire(%data, %obj, %slot) { - //echo(%obj); - if(%obj.mountobj.canLaucnhStrike) { - %client = %obj.getControllingClient(); - %source = %client.player; //muhaha - - %obj.mountobj.canLaucnhStrike = 0; - - FireSatHornet(%obj, %slot, %source); - schedule(1500, 0, "FireSatHornet", %obj, %slot, %source); - schedule(3000, 0, "FireSatHornet", %obj, %slot, %source); - - if(!%obj.mountobj.isUnlimitedSat) { - schedule(4000, 0, "MakeCruiseMissile", %client, %obj); - schedule(4000, 0, "ServerPlay3d", EscapePodLaunchSound2, %obj.getPosition()); - } - else { - schedule(30000, 0, "ResetSat", %obj.mountobj); - // - } - } - else { - if(!%obj.mountobj.isUnlimitedSat) { - return; - } - %client = %obj.getControllingClient(); - bottomPrint(%client, "Missiles are still reloading... standby.", 2, 2); - if(isObject(%client.player) && %client.player.getState() !$= "dead") { - %client.setControlObject(%client.player); - } - } -} - -function ResetSat(%sat) { - if(isObject(%sat)) { - %sat.canLaucnhStrike = 1; - } -} - -function MakeCruiseMissile(%client, %sat) { - if(%client.getControlObject() != %sat) { - return; - } - %Missile = new FlyingVehicle() { - dataBlock = "CruiseMissileVehicle"; - scale = "1 1 1"; - team = %client.team; - mountable = "0"; //drive only - }; - - setTargetSensorGroup(%Missile.getTarget(), %Missile.team); - %Missile.setTransform(vectorAdd(%sat.getPosition(), "0 0 -5") SPC rotFromTransform(%sat.getTransform())); - - %Missile.controller = %client; - %sat.GuidedMissile = %Missile; - MissionCleanup.add(%Missile); - %client.setControlObject(%Missile); - - MissileSatGuidedLoop(%client, %Missile); -} - -function ReMoveClientSW(%client) { - if(!isObject(%client.player) || %client.player.getState() $= "dead") { - return; - } - else { - %sp = Game.pickPlayerSpawn(%client, false); - //2 sec Invincibility please? - %client.player.setInvinc(1); - %client.player.schedule(2000, "setInvinc", 0); - %client.player.setTransform(%client.player.lastTransformStuff); //%sp for new spawn - %client.setControlObject(%client.player); - } -} - -//just a good function to delete the satelite if the client reliquishes control -function MissileSatControlLoop(%client, %sat) { - if(!isObject(%sat)) { - if(isObject(%client.player)) { - ReMoveClientSW(%client); - } - return; - } - if((%client.getControlObject() != %sat.turretObject) && !%sat.isUnlimitedSat) { - //lets check if they are in the missile now... - if(%client.getControlObject() == %sat.turretObject.GuidedMissile) { - //MissileSatGuidedLoop(%client, %sat.turretObject.GuidedMissile); - } - //No, they reliquished all control before the guided fired... - else { - if(isObject(%client.player)) { - ReMoveClientSW(%client); - } - } - %sat.schedule(1000, "Delete"); - return; - } - //%client.setControlObject(%sat.turretObject); - schedule(100, 0, "MissileSatControlLoop", %client, %sat); -} - -function MissileSatGuidedLoop(%client, %missile) { - if(%client.getControlObject() != %missile) { - if(isObject(%client.player)) { - ReMoveClientSW(%client); - } - return; - } - schedule(100, 0, "MissileSatGuidedLoop", %client, %missile); -} diff --git a/scripts/TWM2/PGDConnect/ServerInteraction.cs b/scripts/TWM2/PGDConnect/ServerInteraction.cs index 709a97b..bb8dcbc 100644 --- a/scripts/TWM2/PGDConnect/ServerInteraction.cs +++ b/scripts/TWM2/PGDConnect/ServerInteraction.cs @@ -49,36 +49,40 @@ function serverInterfacing::onConnected(%this) { } function serverInterfacing::onLine(%this, %line) { - if (trim(%line) $= "") { //is the line a HTTP header? - if (!%this.readyToRead) { - %this.readyToRead = true; - } - } - if(!%this.readyToRead) { - return; //we have no use for this. - } - //read necessary data - switch$(getWord(%line, 0)) { - case "ApplyDevList": - %list = getWords(%line, 1); - %list = strreplace(%list, "TAB", "\t"); //boom! - for(%i = 0; %i < getFieldCount(%list); %i++) { - %FieldGUID = getSubStr(getField(%list, %i), 0, strstr(getField(%list, %i), ":")); - %FieldLEVEL = getSubStr(getField(%list, %i), strLen(%FieldGUID) + 1, strLen(getField(%list, %i))); - $DeveloperList[%i] = %FieldGUID; - $DeveloperLevel[%i] = %FieldLEVEL; - echo("Developers "@%i@": "@$DeveloperList[%i]@" -> "@$DeveloperLevel[%i]@""); - } - case "SetHighRank": - $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] = getWord(%line, 1); - echo("PGD: Highest Rank Set To "@getWord(%line, 1)@""); - case "SetHighOfficer": - $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] = getWord(%line, 1); - echo("PGD: Highest Officer Rank Set To "@getWord(%line, 1)@""); - case "SetEXPMultiplier": - $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB TWM2Lib_MainControl("FormatTWM2Time" , formattimestring("yymmdd")))] = getWord(%line, 1); - echo("PGD: EXP Multiplier is now: "@getWord(%line, 1)@""); - default: - echo("PGD: Depricated command "@getWord(%line, 0)@" issued, ignored..."); - } + if (trim(%line) $= "") { //is the line a HTTP header? + if (!%this.readyToRead) { + %this.readyToRead = true; + } + } + if(!%this.readyToRead) { + return; //we have no use for this. + } + //read necessary data + switch$(getWord(%line, 0)) { + case "ApplyDevList": + %list = getWords(%line, 1); + %list = strreplace(%list, "TAB", "\t"); //boom! + for(%i = 0; %i < getFieldCount(%list); %i++) { + %FieldGUID = getSubStr(getField(%list, %i), 0, strstr(getField(%list, %i), ":")); + %FieldLEVEL = getSubStr(getField(%list, %i), strLen(%FieldGUID) + 1, strLen(getField(%list, %i))); + $DeveloperList[%i] = %FieldGUID; + $DeveloperLevel[%i] = %FieldLEVEL; + echo("Developers "@%i@": "@$DeveloperList[%i]@" -> "@$DeveloperLevel[%i]@""); + } + + case "SetHighRank": + $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] = getWord(%line, 1); + echo("PGD: Highest Rank Set To "@getWord(%line, 1)@""); + + case "SetHighOfficer": + $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] = getWord(%line, 1); + echo("PGD: Highest Officer Rank Set To "@getWord(%line, 1)@""); + + case "SetEXPMultiplier": + $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB TWM2Lib_MainControl("FormatTWM2Time" , formattimestring("yymmdd")))] = getWord(%line, 1); + echo("PGD: EXP Multiplier is now: "@getWord(%line, 1)@""); + + default: + echo("PGD: Depricated command "@getWord(%line, 0)@" issued, ignored..."); + } } diff --git a/scripts/TWM2/Systems/AdvancedRankSystem.cs b/scripts/TWM2/Systems/AdvancedRankSystem.cs index 818fc00..2f810f6 100644 --- a/scripts/TWM2/Systems/AdvancedRankSystem.cs +++ b/scripts/TWM2/Systems/AdvancedRankSystem.cs @@ -31,7 +31,6 @@ function CreateClientRankFile(%client) { //now apply the base settings for this new file. %scriptController.name = %client.namebase; %scriptController.xp = 0; - %scriptController.money = 0; %scriptController.rank = "Private"; %scriptController.phrase = "None Set"; %scriptController.gameTime = 0; @@ -150,36 +149,36 @@ function runRankUpdateLoop(%client, %j, %continue) { } function fetchCap(%type, %index) { - if(%type $= "Officer") { - if(!isSet($OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) || $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] <= 0) { - return false; - } - else { - if(%index >= $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { - return true; - } - else { - return false; - } - } - } - else if(%type $= "Level") { - if(!isSet($RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) || $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] <= 0) { - return false; - } - else { - if(%index >= $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { - return true; - } - else { - return false; - } - } - } - else if(%type $= "EXP") { - echo("fetchCap(): Call to EXP cap made, however the EXP cap has been depricated. use trace(1) to log the call stack."); - return false; - } + if(%type $= "Officer") { + if(!isSet($OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) || $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] <= 0) { + return false; + } + else { + if(%index >= $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { + return true; + } + else { + return false; + } + } + } + else if(%type $= "Level") { + if(!isSet($RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) || $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))] <= 0) { + return false; + } + else { + if(%index >= $RankCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { + return true; + } + else { + return false; + } + } + } + else if(%type $= "EXP") { + echo("fetchCap(): Call to EXP cap made, however the EXP cap has been depricated. use trace(1) to log the call stack."); + return false; + } } function checkForXPAwards(%client) { @@ -209,8 +208,8 @@ function printCurrentEXP(%client) { //print function shows a more readable version of EXP %scriptController = %client.TWM2Core; %milXP = %scriptController.millionxp; - %nonMilXP = %scriptControler.xp; - return %milXP @ "" @ %nonMilXP; + %nonMilXP = %scriptController.xp; + return (%milXP == 0 ? "" : %milXP) @ "" @ %nonMilXP; } //PRESTIGE RANKS @@ -218,7 +217,6 @@ function PromoteToPrestige(%client) { %scriptController = %client.TWM2Core; %savedGameTime = %scriptController.gameTime; %savedPhrs = %scriptController.phrase; - %savedMoney = %scriptController.money; if(%scriptController.officer $= "" || %scriptController.officer == 0) { %next = 1; } @@ -231,7 +229,7 @@ function PromoteToPrestige(%client) { error("It is recommended you report these details to Phantom139 (phantom139@phantomdev.net) ASAP."); error("Client has been informed of this, if it is reported to be a mistake, inform Phantom139 of possible code error"); messageClient(%client, 'msgAlert', "\c3Alert! You have performed an Illegal action(trying to promote to an officer rank beyond cap level)\nIf you believe this is a mistake, you should inform the server host ASAP."); -return; + return; } DumpStats(%client); @@ -250,7 +248,6 @@ return; %client.TWM2Core.name = %client.namebase; %client.TWM2Core.xp = 0; %client.TWM2Core.millionxp = 0; - %client.TWM2Core.money = %savedMoney; %client.TWM2Core.rank = "Private"; %client.TWM2Core.phrase = %savedPhrs; %client.TWM2Core.gameTime = %savedGameTime; @@ -305,88 +302,6 @@ function DumpStats(%c) { // this is now our cleaned object file, it will be populated shortly } -function GeneratePrestigeChallengeMenu(%client, %tag, %index) { - if(%client.CheckNWChallengeCompletion("Prestge1")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Private - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Private - Reach Officer Level 1."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestge2")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Private - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Private - Reach Officer Level 2."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestge3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Private - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Private - Reach Officer Level 3."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestge4")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Private - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Private - Reach Officer Level 4."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestge5")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Private - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Private - Reach Officer Level 5."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestge9")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Reach Oficer Level 9."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GameEnder")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Game Ender - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Game Ender - Call in a Fission Bomb."); - %index++; - } - // - return %index; -} - -function EXPWillBreakRankCap(%client) { - %script = %client.TWM2Core; - %rN = %script.rankNumber; - %officer = %script.officer; - //Phantom139: updated here, now handles officer ranks so we can apply numbers above 61 to restrict up to a officer level - %currentRankNumber = (%officer*$Rank::RankCount) + %rN; - //apply the new check here |LEAVE THIS, apply ONLY on base rank| - if(fetchCap("Level", %currentRankNumber + 1) && (getCurrentEXP(%client) >= $Ranks::MinPoints[%rN+1])) { - return true; - } - else { - return false; - } -} - //Direct calls to needed function, replaces //old system. function GainExperience(%client, %variable, %tagToGain) { @@ -399,12 +314,7 @@ function GainExperience(%client, %variable, %tagToGain) { } %variable *= %multi; %variable = mFloor(%variable); - %script.money += %variable; //money is kept no matter what // - if(EXPWillBreakRankCap(%client)) { - messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3 Further Progression Locked [RANK CAP]"); - return; - } if(%multi > 1) { messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP (X"@%multi@")"); } @@ -414,3 +324,40 @@ function GainExperience(%client, %variable, %tagToGain) { $XPArray[%client] += %variable; updateClientRank(%client); } + +function WipeStats(%client) { + %scriptController = %client.TWM2Core; + %savedGameTime = %scriptController.gameTime; + %savedPhrs = %scriptController.phrase; + if(%scriptController.officer < 15) { + error("Client "@%client@" is attempting to wipe stats??? Not max level..."); + return; + } + + DumpStats(%client); + + %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; + + %name = "ClientSettings"@%client.guid@""; + %check = nameToID(%name); + if(isObject(%check)) { + %check.delete(); //kill current settings, as they are no longer valid. + } + %script = new ScriptObject(%name) {}; + %client.container.add(%script); + + //now apply the base settings for this new file. + %client.TWM2Core.name = %client.namebase; + %client.TWM2Core.xp = 0; + %client.TWM2Core.millionxp = 0; + %client.TWM2Core.rank = "Private"; + %client.TWM2Core.phrase = %savedPhrs; + %client.TWM2Core.gameTime = %savedGameTime; + %client.TWM2Core.officer = 0; + //and save the new file + //%scriptController.save(%file); + SaveClientFile(%client); + + MessageAll('msgAdminForce', "\c5"@%client.namebase@" has hit the reset button and is back at level 1!!!"); + recordAction(%client, "", ""); //record blank action for the challenges to pick off any officer challenges +} \ No newline at end of file diff --git a/scripts/TWM2/Systems/BossSystem.cs b/scripts/TWM2/Systems/BossSystem.cs index c7072dd..e89c5fe 100644 --- a/scripts/TWM2/Systems/BossSystem.cs +++ b/scripts/TWM2/Systems/BossSystem.cs @@ -38,9 +38,9 @@ function InitiateBoss(%Boss, %name) { case "Trebor": %print = "BOSS BATTLE \n LORDRANIUS TREVOR"; case "Stormrider": - %print = "BOSS BATTLE \n COMMANDER STORMRIDER"; + %print = "CLASSIC BOSS BATTLE \n COMMANDER STORMRIDER"; case "GhostOfFire": - %print = "BOSS BATTLE \n GHOST OF FIRE"; + %print = "CLASSIC BOSS BATTLE \n GHOST OF FIRE"; case "ShadeLord": %print = "BOSS BATTLE \n THE SHADE LORD"; } @@ -162,6 +162,18 @@ function GameConnection::GiveBossAward(%client, %bossName) { //VARDISON else if(%bossName $= "Vardison3") { AwardClient(%client, 13); + if($TWM2::VardisonDifficulty == 1) { + CompleteNWChallenge(%client, "VardEasy"); + } + else if($TWM2::VardisonDifficulty == 2) { + CompleteNWChallenge(%client, "VardNorm"); + } + else if($TWM2::VardisonDifficulty == 3) { + CompleteNWChallenge(%client, "VardHard"); + } + else if($TWM2::VardisonDifficulty == 4) { + CompleteNWChallenge(%client, "VardWtf"); + } } else if(%bossName $= "Trebor") { AwardClient(%client, 15); @@ -238,6 +250,16 @@ function CheckBossChallenge(%client, %boss) { if(%dc >= 10) { CompleteNWChallenge(%client, "GOL3"); } + case "GhostOfFire": + if(%dc >= 1) { + CompleteNWChallenge(%client, "GOF1"); + } + if(%dc >= 3) { + CompleteNWChallenge(%client, "GOF2"); + } + if(%dc >= 5) { + CompleteNWChallenge(%client, "GOF3"); + } case "Vegenor": if(%dc >= 3) { CompleteNWChallenge(%client, "Veg1"); @@ -278,6 +300,16 @@ function CheckBossChallenge(%client, %boss) { if(%dc >= 5) { CompleteNWChallenge(%client, "Vard3"); } + case "Stormrider": + if(%dc >= 3) { + CompleteNWChallenge(%client, "Stormrider1"); + } + if(%dc >= 5) { + CompleteNWChallenge(%client, "Stormrider2"); + } + if(%dc >= 10) { + CompleteNWChallenge(%client, "Stormrider3"); + } case "Trebor": if(%dc >= 2) { CompleteNWChallenge(%client, "Treb1"); @@ -288,212 +320,17 @@ function CheckBossChallenge(%client, %boss) { if(%dc >= 7) { CompleteNWChallenge(%client, "Treb3"); } - } -} - -function GenerateBossChallengeMenu(%client, %tag, %index) { - if(%client.CheckNWChallengeCompletion("Yvex1")) { - if(%client.CheckNWChallengeCompletion("Yvex2")) { - if(%client.CheckNWChallengeCompletion("Yvex3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowy Desecration - Done"); - %index++; + case "ShadeLord": + if(%dc >= 1) { + CompleteNWChallenge(%client, "ShadeLord1"); } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowy Desecration - Defeat Lord Yvex 10 Times"); - %index++; + if(%dc >= 2) { + CompleteNWChallenge(%client, "ShadeLord2"); } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Darkness Rising - Defeat Lord Yvex 5 Times"); - %index++; - } + if(%dc >= 3) { + CompleteNWChallenge(%client, "ShadeLord3"); + } } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nightmarish Enterprise - Defeat Lord Yvex 3 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("CWS1")) { - if(%client.CheckNWChallengeCompletion("CWS2")) { - if(%client.CheckNWChallengeCompletion("CWS3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger's Bane - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger's Bane - Defeat Colonel Windshear 10 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Aerieal Nightmare - Defeat Colonel Windshear 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fortress In The Sky - Defeat Colonel Windshear 3 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GOL1")) { - if(%client.CheckNWChallengeCompletion("GOL2")) { - if(%client.CheckNWChallengeCompletion("GOL3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Severe Thunderstorm - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Severe Thunderstorm - Defeat The Ghost Of Lightning 10 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Shocking Truth - Defeat The Ghost Of Lightning 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Envious Lightning - Defeat The Ghost Of Lightning 3 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Veg1")) { - if(%client.CheckNWChallengeCompletion("Veg2")) { - if(%client.CheckNWChallengeCompletion("Veg3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Firestorm Ender - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Firestorm Ender - Defeat General Vegenor 10 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Burning Frenzy - Defeat General Vegenor 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Flaming Revolt - Defeat General Vegenor 3 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("LRog1")) { - if(%client.CheckNWChallengeCompletion("LRog2")) { - if(%client.CheckNWChallengeCompletion("LRog3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Payback's A Bitch - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Payback's A Bitch - Defeat Lord Rog 7 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Return to Returner - Defeat Lord Rog 4 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Revenge Halter - Defeat Lord Rog 2 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Ins1")) { - if(%client.CheckNWChallengeCompletion("Ins2")) { - if(%client.CheckNWChallengeCompletion("Ins3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gravitational Influx - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gravitational Influx - Defeat Major Insignia 7 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "No Gravity, No Problem - Defeat Major Insignia 4 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "El Shipitor - Defeat Major Insignia 2 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Treb1")) { - if(%client.CheckNWChallengeCompletion("Treb2")) { - if(%client.CheckNWChallengeCompletion("Treb3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Tank Halter - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Tank Halter - Defeat Lordranius Trebor 7 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Denied - Defeat Lordranius Trebor 4 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Precious Cargo - Defeat Lordranius Trebor 2 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Vard1")) { - if(%client.CheckNWChallengeCompletion("Vard2")) { - if(%client.CheckNWChallengeCompletion("Vard3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Outevil The Wicked - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Outevil The Wicked - Defeat Lord Vardison 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Glare The Dark - Defeat Lord Vardison 3 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shining Star - Defeat Lord Vardison"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("VardEasy")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience - Defeat Lord Vardison on Easy Difficulty"); - %index++; - } - if(%client.CheckNWChallengeCompletion("VardNorm")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter - Defeat Lord Vardison on Normal Difficulty"); - %index++; - } - if(%client.CheckNWChallengeCompletion("VardHard")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer - Done"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer - Defeat Lord Vardison on Hard Difficulty"); - %index++; - } - if(%client.CheckNWChallengeCompletion("VardWtf")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm - Done [You are a freaking boss master]"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm - Against all odds, emerge victorious against WTF difficulty Lord Vardison"); - %index++; - } - // - return %index; } function BossManager::addKill(%this, %tObj) { diff --git a/scripts/TWM2/Systems/ChallengeMenus.cs b/scripts/TWM2/Systems/ChallengeMenus.cs new file mode 100644 index 0000000..6d48c2e --- /dev/null +++ b/scripts/TWM2/Systems/ChallengeMenus.cs @@ -0,0 +1,1618 @@ +//Challenge Menus +//TWM2 3.9.1 +//Moved all of the Non-Weapon Challenge menus to a singular file +// under a single function to streamline it... + +// Yes, I know I could "automate" this, but my laziness is still rather persistent to re-do the entire old system... + +function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { + switch(%subMenu) { + case 1: + //Killstreaks + messageClient( %client, 'SetLineHud', "", %tag, %index, "Killstreak Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("UAV1")) { + if(%client.CheckNWChallengeCompletion("UAV2")) { + if(%client.CheckNWChallengeCompletion("UAV3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert III: Call in 150 UAV Recon Satellites"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert III: Call in 150 UAV Recon Satellites"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert II: Call in 75 UAV Recon Satellites"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert I: Call in 30 UAV Recon Satellites"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Airstrike1")) { + if(%client.CheckNWChallengeCompletion("Airstrike2")) { + if(%client.CheckNWChallengeCompletion("Airstrike3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert III: Call in 125 Airstrikes"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert III: Call in 125 Airstrikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert II: Call in 65 Airstrikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert I: Call in 25 Airstrikes"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("UAMS1")) { + if(%client.CheckNWChallengeCompletion("UAMS2")) { + if(%client.CheckNWChallengeCompletion("UAMS3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert III: Call in 125 UAMS Strikes"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert III: Call in 125 UAMS Strikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert II: Call in 65 UAMS Strikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert I: Call in 25 UAMS Strikes"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Helicopter1")) { + if(%client.CheckNWChallengeCompletion("Helicopter2")) { + if(%client.CheckNWChallengeCompletion("Helicopter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert III: Call in 125 Combat Helicopters"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert III: Call in 125 Combat Helicopters"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert II: Call in 65 Combat Helicopters"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert I: Call in 25 Combat Helicopters"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Harrier1")) { + if(%client.CheckNWChallengeCompletion("Harrier2")) { + if(%client.CheckNWChallengeCompletion("Harrier3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert III: Call in 110 Plasma Harrier Airstrikes"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert III: Call in 110 Plasma Harrier Airstrikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert II: Call in 55 Plasma Harrier Airstrikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert I: Call in 20 Plasma Harrier Airstrikes"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("SatNuke1")) { + if(%client.CheckNWChallengeCompletion("SatNuke2")) { + if(%client.CheckNWChallengeCompletion("SatNuke3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert III: Call in 125 Orbital Laser Strikes"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert III: Call in 125 Orbital Laser Strikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert II: Call in 65 Orbital Laser Strikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert I: Call in 25 Orbital Laser Strikes"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("NapalmHarrier1")) { + if(%client.CheckNWChallengeCompletion("NapalmHarrier2")) { + if(%client.CheckNWChallengeCompletion("NapalmHarrier3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert III: Call in 110 Napalm Airstrikes"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert III: Call in 110 Napalm Airstrikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert II: Call in 55 Napalm Airstrikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert I: Call in 20 Napalm Airstrikes"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("GunHeli1")) { + if(%client.CheckNWChallengeCompletion("GunHeli2")) { + if(%client.CheckNWChallengeCompletion("GunHeli3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert III: Call in 110 Gunship Helicopters"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert III: Call in 110 Gunship Helicopters"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert II: Call in 55 Gunship Helicopters"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert I: Call in 20 Gunship Helicopters"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("SBomber1")) { + if(%client.CheckNWChallengeCompletion("SBomber2")) { + if(%client.CheckNWChallengeCompletion("SBomber3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert III: Call in 100 Stealth Bombers"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert III: Call in 100 Stealth Bombers"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert II: Call in 50 Stealth Bombers"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert I: Call in 20 Stealth Bombers"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Gunship1")) { + if(%client.CheckNWChallengeCompletion("Gunship2")) { + if(%client.CheckNWChallengeCompletion("Gunship3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert III: Call in 75 Harbinger Gunships"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert III: Call in 75 Harbinger Gunships"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert II: Call in 35 Harbinger Gunships"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert I: Call in 15 Harbinger Gunships"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Apache1")) { + if(%client.CheckNWChallengeCompletion("Apache2")) { + if(%client.CheckNWChallengeCompletion("Apache3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert III: Call in 75 Apache Gunners"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert III: Call in 75 Apache Gunners"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert II: Call in 35 Apache Gunners"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert I: Call in 15 Apache Gunners"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Gunship3")) { + if(%client.CheckNWChallengeCompletion("ACGunship1")) { + if(%client.CheckNWChallengeCompletion("ACGunship2")) { + if(%client.CheckNWChallengeCompletion("ACGunship3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert III: Call in 75 AC-130 Gunners"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert III: Call in 75 AC-130 Gunners"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert II: Call in 35 AC-130 Gunners"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert I: Call in 15 AC-130 Gunners"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Locked: Requires Harbinger Gunship Expert III."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Centaur1")) { + if(%client.CheckNWChallengeCompletion("Centaur2")) { + if(%client.CheckNWChallengeCompletion("Centaur3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert III: Call in 50 Artillery Strikes"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert III: Call in 50 Artillery Strikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert II: Call in 25 Artillery Strikes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert I: Call in 10 Artillery Strikes"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("EMP1")) { + if(%client.CheckNWChallengeCompletion("EMP2")) { + if(%client.CheckNWChallengeCompletion("EMP3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert III: Call in 25 Mass EMP's"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert III: Call in 25 Mass EMP's"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert II: Call in 10 Mass EMP's"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert I: Call in 5 Mass EMP's"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Nuke1")) { + if(%client.CheckNWChallengeCompletion("Nuke2")) { + if(%client.CheckNWChallengeCompletion("Nuke3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert III: Call in 25 Nukes"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert III: Call in 25 Nukes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert II: Call in 10 Nukes"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert I: Call in 5 Nukes"); + %index++; + } + // + if(%client.TWM2Core.Officer >= 1) { + if(%client.CheckNWChallengeCompletion("Fission1")) { + if(%client.CheckNWChallengeCompletion("Fission2")) { + if(%client.CheckNWChallengeCompletion("Fission3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert III: Call in 5 Fission Bombs"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert III: Call in 5 Fission Bombs"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert II: Call in 2 Fission Bombs"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert I: Call in 1 Fission Bomb"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Locked: Requires Instructive Officer Rank (Off. Rank 1)"); + %index++; + } + // + if(%client.TWM2Core.Officer >= 15) { + if(%client.CheckNWChallengeCompletion("LOAS1")) { + if(%client.CheckNWChallengeCompletion("LOAS2")) { + if(%client.CheckNWChallengeCompletion("LOAS3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert III: Call in 15 Low Orbit Orbital Strikes (LOAS)"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert III: Call in 15 Low Orbit Orbital Strikes (LOAS)"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert II: Call in 10 Low Orbit Orbital Strikes (LOAS)"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert I: Call in 5 Low Orbit Orbital Strikes (LOAS)"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Locked: Requires Harbinger Officer Rank (Off. Rank 15)"); + %index++; + } + return %index; + + case 2: + //Boss Hunting + messageClient( %client, 'SetLineHud', "", %tag, %index, "Boss Hunting Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("Yvex1")) { + if(%client.CheckNWChallengeCompletion("Yvex2")) { + if(%client.CheckNWChallengeCompletion("Yvex3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowy Desecration: Defeat Lord Yvex 10 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowy Desecration: Defeat Lord Yvex 10 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Darkness Rising: Defeat Lord Yvex 5 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Nightmarish Enterprise: Defeat Lord Yvex 3 Times"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("CWS1")) { + if(%client.CheckNWChallengeCompletion("CWS2")) { + if(%client.CheckNWChallengeCompletion("CWS3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger's Bane: Defeat Colonel Windshear 10 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger's Bane: Defeat Colonel Windshear 10 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Aerieal Nightmare: Defeat Colonel Windshear 5 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fortress In The Sky: Defeat Colonel Windshear 3 Times"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("GOL1")) { + if(%client.CheckNWChallengeCompletion("GOL2")) { + if(%client.CheckNWChallengeCompletion("GOL3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Severe Thunderstorm: Defeat The Ghost Of Lightning 10 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Severe Thunderstorm: Defeat The Ghost Of Lightning 10 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Shocking Truth: Defeat The Ghost Of Lightning 5 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Envious Lightning: Defeat The Ghost Of Lightning 3 Times"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("GOF1")) { + if(%client.CheckNWChallengeCompletion("GOF2")) { + if(%client.CheckNWChallengeCompletion("GOF3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Mt. Death Depleter: Defeat The Ghost Of Fire 5 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Mt. Death Depleter: Defeat The Ghost Of Fire 5 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Inceneration Ender: Defeat The Ghost Of Fire 3 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Purifier: Defeat The Ghost Of Fire"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Veg1")) { + if(%client.CheckNWChallengeCompletion("Veg2")) { + if(%client.CheckNWChallengeCompletion("Veg3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Firestorm Ender: Defeat General Vegenor 10 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Firestorm Ender: Defeat General Vegenor 10 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Burning Frenzy: Defeat General Vegenor 5 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Flaming Revolt: Defeat General Vegenor 3 Times"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("LRog1")) { + if(%client.CheckNWChallengeCompletion("LRog2")) { + if(%client.CheckNWChallengeCompletion("LRog3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Payback's A Bitch: Defeat Lord Rog 7 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Payback's A Bitch: Defeat Lord Rog 7 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Return to Returner: Defeat Lord Rog 4 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Revenge Halter: Defeat Lord Rog 2 Times"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Ins1")) { + if(%client.CheckNWChallengeCompletion("Ins2")) { + if(%client.CheckNWChallengeCompletion("Ins3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gravitational Influx: Defeat Major Insignia 7 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gravitational Influx: Defeat Major Insignia 7 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "No Gravity, No Problem: Defeat Major Insignia 4 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "El Shipitor: Defeat Major Insignia 2 Times"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Stormrider1")) { + if(%client.CheckNWChallengeCompletion("Stormrider2")) { + if(%client.CheckNWChallengeCompletion("Stormrider3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Fighter Demolisher: Defeat Commander Stormrider 10 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Fighter Demolisher: Defeat Commander Stormrider 10 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shootdown Master: Defeat Commander Stormrider 5 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Clear Skies: Defeat Commander Stormrider 3 Times"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Treb1")) { + if(%client.CheckNWChallengeCompletion("Treb2")) { + if(%client.CheckNWChallengeCompletion("Treb3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Tank Halter: Defeat Lordranius Trevor 7 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Tank Halter: Defeat Lordranius Trevor 7 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Denied: Defeat Lordranius Trevor 4 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Precious Cargo: Defeat Lordranius Trevor 2 Times"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Vard1")) { + if(%client.CheckNWChallengeCompletion("Vard2")) { + if(%client.CheckNWChallengeCompletion("Vard3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Outevil The Wicked: Defeat Lord Vardison 5 Times"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Outevil The Wicked: Defeat Lord Vardison 5 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Glare The Dark: Defeat Lord Vardison 3 Times"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shining Star: Defeat Lord Vardison"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("VardEasy")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience: Defeat Lord Vardison on Easy Difficulty"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience: Defeat Lord Vardison on Easy Difficulty"); + %index++; + } + if(%client.CheckNWChallengeCompletion("VardNorm")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter: Defeat Lord Vardison on Normal Difficulty"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter: Defeat Lord Vardison on Normal Difficulty"); + %index++; + } + if(%client.CheckNWChallengeCompletion("VardHard")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer: Defeat Lord Vardison on Hard Difficulty"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer: Defeat Lord Vardison on Hard Difficulty"); + %index++; + } + if(%client.CheckNWChallengeCompletion("VardWtf")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm: You're a fucking badass... Just bask in that..."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm: Against all odds, emerge victorious against WTF difficulty Lord Vardison"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("ShadeLord1")) { + if(%client.CheckNWChallengeCompletion("ShadeLord2")) { + if(%client.CheckNWChallengeCompletion("ShadeLord3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Dawnlight Encarnate: Defeat The Shade Lord for the Third Time"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Dawnlight Encarnate: Defeat The Shade Lord for the Third Time"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadow Embracer: Defeat The Shade Lord Twice"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Night Stalker: Defeat The Shade Lord"); + %index++; + } + // + return %index; + + case 3: + //Wargames + messageClient( %client, 'SetLineHud', "", %tag, %index, "Wargames (PvP) Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("Slayer1")) { + if(%client.CheckNWChallengeCompletion("Slayer2")) { + if(%client.CheckNWChallengeCompletion("Slayer3")) { + if(%client.CheckNWChallengeCompletion("Slayer4")) { + if(%client.CheckNWChallengeCompletion("Slayer5")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer V: Kill 1,000 Enemy Players"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer V: Kill 1,000 Enemy Players"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer IV: Kill 750 Enemy Players"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer III: Kill 500 Enemy Players"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer II: Kill 250 Enemy Players"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer I: Kill 100 Enemy Players"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Defectionator1")) { + if(%client.CheckNWChallengeCompletion("Defectionator2")) { + if(%client.CheckNWChallengeCompletion("Defectionator3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator III: Kill 500 \"Zombified\" Players"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator III: Kill 500 \"Zombified\" Players"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator II: Kill 250 \"Zombified\" Players"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator I: Kill 100 \"Zombified\" Players"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Infectionator1")) { + if(%client.CheckNWChallengeCompletion("Infectionator2")) { + if(%client.CheckNWChallengeCompletion("Infectionator3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator III: Convert 250 Players to the Zombie Horde"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator III: Convert 250 Players to the Zombie Horde"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator II: Convert 100 Players to the Zombie Horde"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator I: Convert 50 Players to the Zombie Horde..."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("HSHoncho1")) { + if(%client.CheckNWChallengeCompletion("HSHoncho2")) { + if(%client.CheckNWChallengeCompletion("HSHoncho3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho III: Eliminate 300 Enemy Players with Headshots"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho III: Eliminate 300 Enemy Players with Headshots"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho II: Eliminate 200 Enemy Players with Headshots"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho I: Eliminate 100 Enemy Players with Headshots"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("VehMans1")) { + if(%client.CheckNWChallengeCompletion("VehMans2")) { + if(%client.CheckNWChallengeCompletion("VehMans3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter III: Eliminate 250 Enemy Players with a vehicle"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter III: Eliminate 250 Enemy Players with a vehicle"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter II: Eliminate 100 Enemy Players with a vehicle"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter I: Eliminate 50 Enemy Players with a vehicle"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Assassin")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Assassinator: Backstab an enemy player using the Blade of Vengeance"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Assassinator: Backstab an enemy player using the Blade of Vengeance"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("CompletelyUnexpected")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "That Was... Unexpected: Eliminate someone playing as General Rog by backstabbing them with the Blade of Vengence"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "That Was... Unexpected: Eliminate someone playing as General Rog by backstabbing them with the Blade of Vengence"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Uncomprehendable")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Uncomprehendable: You committed the ultimate vehicle kill humiliation, well done!"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Uncomprehendable: Get killed in a fighter, and have the driverless vehicle run down your killer"); + %index++; + } + // + return %index; + + case 4: + //Zombie Slaying + messageClient( %client, 'SetLineHud', "", %tag, %index, "Zombie Slayer Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("NormHunter1")) { + if(%client.CheckNWChallengeCompletion("NormHunter2")) { + if(%client.CheckNWChallengeCompletion("NormHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster III: Slay 10,000 Zombies (Normal Type)"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster III: Slay 10,000 Zombies (Normal Type)"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster II: Slay 5,000 Zombies (Normal Type)"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster I: Slay 2,500 Zombies (Normal Type)"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("RavHunter1")) { + if(%client.CheckNWChallengeCompletion("RavHunter2")) { + if(%client.CheckNWChallengeCompletion("RavHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills III: Slay 5,000 Ravager Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills III: Slay 5,000 Ravager Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills II: Slay 2,500 Ravager Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills I: Slay 1,000 Ravager Zombies"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("LordHunter1")) { + if(%client.CheckNWChallengeCompletion("LordHunter2")) { + if(%client.CheckNWChallengeCompletion("LordHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are III: Slay 3,000 Zombie Lords"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are III: Slay 3,000 Zombie Lords"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are II: Slay 2,000 Zombie Lords"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are I: Slay 1,000 Zombie Lords"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("DemonHunter1")) { + if(%client.CheckNWChallengeCompletion("DemonHunter2")) { + if(%client.CheckNWChallengeCompletion("DemonHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant III: Slay 5,000 Demon Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant III: Slay 5,000 Demon Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant II: Slay 2,500 Demon Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant I: Slay 1,000 Demon Zombies"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("AirRapHunter1")) { + if(%client.CheckNWChallengeCompletion("AirRapHunter2")) { + if(%client.CheckNWChallengeCompletion("AirRapHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer III: Slay 6,000 Air Rapier Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer III: Slay 6,000 Air Rapier Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer II: Slay 3,500 Air Rapier Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer I: Slay 1,500 Air Rapier Zombies"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("DLordHunter1")) { + if(%client.CheckNWChallengeCompletion("DLordHunter2")) { + if(%client.CheckNWChallengeCompletion("DLordHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator III: Slay 1,500 Demon Lord Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator III: Slay 1,500 Demon Lord Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator II: Slay 1,000 Demon Lord Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator I: Slay 500 Demon Lord Zombies"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("ShifterHunter1")) { + if(%client.CheckNWChallengeCompletion("ShifterHunter2")) { + if(%client.CheckNWChallengeCompletion("ShifterHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp III: Slay 6,000 Shifter Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp III: Slay 6,000 Shifter Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp II: Slay 3,000 Shifter Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp I: Slay 1,500 Shifter Zombies"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("SummonerHunter1")) { + if(%client.CheckNWChallengeCompletion("SummonerHunter2")) { + if(%client.CheckNWChallengeCompletion("SummonerHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter III: Slay 5,000 Zombie Summoners"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter III: Slay 5,000 Zombie Summoners"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter II: Slay 2,500 Zombie Summoners"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter I: Slay 1,000 Zombie Summoners"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("SniperHunter1")) { + if(%client.CheckNWChallengeCompletion("SniperHunter2")) { + if(%client.CheckNWChallengeCompletion("SniperHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker III: Slay 5,000 Sniper Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker III: Slay 5,000 Sniper Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker II: Slay 2,500 Sniper Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker I: Slay 1,000 Sniper Zombies"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("UDemHunter1")) { + if(%client.CheckNWChallengeCompletion("UDemHunter2")) { + if(%client.CheckNWChallengeCompletion("UDemHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down III: Slay 5,000 Ultra Demon Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down III: Slay 5,000 Ultra Demon Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down II: Slay 2,500 Ultra Demon Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down I: Slay 1,000 Ultra Demon Zombies"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("VRavHunter1")) { + if(%client.CheckNWChallengeCompletion("VRavHunter2")) { + if(%client.CheckNWChallengeCompletion("VRavHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through III: Slay 5,000 Volatile Ravager Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through III: Slay 5,000 Volatile Ravager Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through II: Slay 2,500 Volatile Ravager Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through I: Slay 1,000 Volatile Ravager Zombies"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("SSHunter1")) { + if(%client.CheckNWChallengeCompletion("SSHunter2")) { + if(%client.CheckNWChallengeCompletion("SSHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer III: Slay 5,000 Slingshot Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer III: Slay 5,000 Slingshot Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer II: Slay 2,500 Slingshot Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer I: Slay 1,000 Slingshot Zombies"); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("WraithHunter1")) { + if(%client.CheckNWChallengeCompletion("WraithHunter2")) { + if(%client.CheckNWChallengeCompletion("WraithHunter3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops III: Slay 1,000 Wraith Zombies"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops III: Slay 1,000 Wraith Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops II: Slay 750 Wraith Zombies"); + %index++; + } + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops I: Slay 500 Wraith Zombies"); + %index++; + } + // + return %index; + + case 5: + //Special Events + messageClient( %client, 'SetLineHud', "", %tag, %index, "Special Event Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("NewYearsEve")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Eve Fireworks: Get a Javelin Kill on New Year's Eve."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Eve Fireworks: Get a Javelin Kill on New Year's Eve."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("NewYears")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Fireworks: Call in a Nuclear Strike on New Year's Day."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Fireworks: Call in a Nuclear Strike on New Year's Day."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("GunshipMall")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship to The Mall: Call in a Gunship Killstreak on Christmas Mall 2009."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship to The Mall: Call in a Gunship Killstreak on Christmas Mall 2009."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("IndepRPG")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Independance RPG: Score an RPG Kill on the Fourth of July."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Independance RPG: Score an RPG Kill on the Fourth of July."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("SoulsticeBombard")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Soulstice Bombard: Call in artillery on one of the soulstices (6/21 or 12/21)."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Soulstice Bombard: Call in artillery on one of the soulstices (6/21 or 12/21)."); + %index++; + } + return %index; + + case 6: + //PGD Daily Challenges + //Handled by DChalg.cs + %index = GenerateDWMChallengeMenu(%client, %tag, %index); + return %index; + + case 7: + //Sabotage + messageClient( %client, 'SetLineHud', "", %tag, %index, "Sabotage Game Mode Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("BombDisarmed")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed: Disarm an enemy bomb."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed: Disarm an enemy bomb."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("BombPlanted")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Planted: Arm the bomb at the objective."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Planted: Arm the bomb at the objective."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("BombDetonated")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Detonated: Win a Round Of Sabotage."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Detonated: Win a Round Of Sabotage."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("3For5Sabo")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Sabotage in a match."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Sabotage in a match."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("BaseDestroyer")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Base Destroyer: Go Undefeated in a full game of Sabotage."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Base Destroyer: Go Undefeated in a full game of Sabotage."); + %index++; + } + // + return %index; + + case 8: + //Domination + messageClient( %client, 'SetLineHud', "", %tag, %index, "Domination Game Mode Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("ZoneCapture")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Zone Conquerer: Capture an Area."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Zone Conquerer: Capture an Area."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("ABC")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Alpha Bravo Charlie: Secure All Three Areas at one Time."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Alpha Bravo Charlie: Secure All Three Areas at one Time."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("MatchSet")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Match Set: Win a Round Of Domination."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Match Set: Win a Round Of Domination."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("3For5")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Domination."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Domination."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Undefeatable")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Undefeatable: Go Undefeated in a full game of Domination."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Undefeatable: Go Undefeated in a full game of Domination."); + %index++; + } + // + return %index; + + case 9: + //Horde + messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde 3 Game Mode Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("15For15")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "15 For 15: Complete Wave 15."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "15 For 15: Complete Wave 15."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Milestone25")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Milestone 25: Complete Wave 25."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Milestone 25: Complete Wave 25."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("ArmyOf50Stopped")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Army Of 50 Stopped: Complete Horde 3 (All 50 Waves)."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Army Of 50 Stopped: Complete Horde 3 (All 50 Waves)."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Angel")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Angel: Revive a fallen teammate in Horde."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Angel: Revive a fallen teammate in Horde."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("ZBomber")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Z-Bomber: Call in a Z-Bomb While Playing Horde."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Z-Bomber: Call in a Z-Bomb While Playing Horde."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("FirstBlood")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "First Blood: Kill the first zombie that spawns in a Horde 3 game."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "First Blood: Kill the first zombie that spawns in a Horde 3 game."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("SpeedSlayer")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Slayer: Be the featured first killer 10 times in a single game."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Slayer: Be the featured first killer 10 times in a single game."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("HighScorer")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "High Scorer: Be the featured high scorer 10 times in a single game."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "High Scorer: Be the featured high scorer 10 times in a single game."); + %index++; + } + // + return %index; + + case 10: + //Helljump + messageClient( %client, 'SetLineHud', "", %tag, %index, "Helljump Game Mode Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("GroupBuster")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Group Buster: Complete A Group."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Group Buster: Complete A Group."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("WaveDefeater")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Wave Defeater: Complete A Wave."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Wave Defeater: Complete A Wave."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("OneK")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "1K Soldier: Earn 1,000 Points (Solo Score)."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "1K Soldier: Earn 1,000 Points (Solo Score)."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("FiveK")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "5K Soldier: Earn 5,000 Points (Solo Score)."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "5K Soldier: Earn 5,000 Points (Solo Score)."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("TenK")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "10K Soldier: Earn 10,000 Points (Solo Score)."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "10K Soldier: Earn 10,000 Points (Solo Score)."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("PointsSurge")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Surge: Earn 7,500 Points (Team Score)."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Surge: Earn 7,500 Points (Team Score)."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("PointsJackpot")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Jackpot: Earn 25,000 Points (Team Score)."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Jackpot: Earn 25,000 Points (Team Score)."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("DownBoy")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Down Boy... Down: Kill the wraith zombie on Strike 5."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Down Boy... Down: Kill the wraith zombie on Strike 5."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("ClassExtravaganza")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Class Extravaganza: Use a hellclass."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Class Extravaganza: Use a hellclass."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("LifeGiver")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Giver of Life: Use a Full Team Respawn beacon."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Giver of Life: Use a Full Team Respawn beacon."); + %index++; + } + // + return %index; + + case 11: + //From The Top (Missions) + messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top (Mission) Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("SimonSays")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Simon Says: Order a mission."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Simon Says: Order a mission."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("FromTheTop")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top: Accept a mission."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top: Accept a mission."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("NaturalLeader")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Natural Leader: Order a mission and have another player join your team."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Natural Leader: Order a mission and have another player join your team."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("GoldStar")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gold Star: Complete a mission within the time limit."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gold Star: Complete a mission within the time limit."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Faster")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Faster!: Complete a mission, but miss the time limit."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Faster!: Complete a mission, but miss the time limit."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("EpicFailure")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Epic Failure: Fail a mission ;)."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Epic Failure: Fail a mission ;)."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("ExpertGunner")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Expert AC-130 Gunner: Complete 'Rain Down'."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Expert AC-130 Gunner: Complete 'Rain Down'."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Survivalist")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Survivalist: Complete 'Surrounded'."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Survivalist: Complete 'Surrounded'."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Invisibreh")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shhh.. I'm Invisibreh: Complete 'Enemy AC-130 Above' by outlasting the enemy AC-130."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shhh.. I'm Invisibreh: Complete 'Enemy AC-130 Above' by outlasting the enemy AC-130."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("WeakGunship")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "I have you now!: Complete 'Enemy AC-130 Above' by destroying the enemy AC-130."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "I have you now!: Complete 'Enemy AC-130 Above' by destroying the enemy AC-130."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("InvasionBuster")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Invade THIS!: Complete 'Invasion'."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Invade THIS!: Complete 'Invasion'."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("SurvivalistExtreme")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Extreme Survivalist: Complete 'Surrounded 2.0'."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Extreme Survivalist: Complete 'Surrounded 2.0'."); + %index++; + } + // + return %index; + + case 12: + //Officer Promotion + messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges:"); + %index++; + if(%client.CheckNWChallengeCompletion("Prestge1")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Private - Reach Officer Level 1."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Private - Reach Officer Level 1."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestge2")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Private - Reach Officer Level 2."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Private - Reach Officer Level 2."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestge3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Private - Reach Officer Level 3."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Private - Reach Officer Level 3."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestge4")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Private - Reach Officer Level 4."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Private - Reach Officer Level 4."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestge5")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Private - Reach Officer Level 5."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Private - Reach Officer Level 5."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestge9")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Reach Oficer Level 9."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Reach Oficer Level 9."); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("GameEnder")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Game Ender - Call in a Fission Bomb."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Game Ender - Call in a Fission Bomb."); + %index++; + } + // + return %index; + + default: + //Invalid + messageClient( %client, 'SetLineHud', "", %tag, %index, "Invalid menu option passed to GenerateChallengeSubMenu."); + %index++; + return %index; + } +} \ No newline at end of file diff --git a/scripts/TWM2/Systems/Directorate.cs b/scripts/TWM2/Systems/Directorate.cs index 71d6b96..bdd0a95 100644 --- a/scripts/TWM2/Systems/Directorate.cs +++ b/scripts/TWM2/Systems/Directorate.cs @@ -35,5 +35,4 @@ function LoadClientFile(%client) { // loadChallengeData(%client); loadSettings(%client); - %client.storeCreate(); } diff --git a/scripts/TWM2/Systems/Killstreak.cs b/scripts/TWM2/Systems/Killstreak.cs index 0b81e57..7ed42a7 100644 --- a/scripts/TWM2/Systems/Killstreak.cs +++ b/scripts/TWM2/Systems/Killstreak.cs @@ -598,358 +598,6 @@ function GenerateKillstreakMenu(%client, %tag, %index) { return %index; } -///////////////////// -function GenerateStreakChallengeMenu(%client, %tag, %index) { - if(%client.CheckNWChallengeCompletion("UAV1")) { - if(%client.CheckNWChallengeCompletion("UAV2")) { - if(%client.CheckNWChallengeCompletion("UAV3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert III - Call in 150 UAV Recon Satellites"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert II - Call in 75 UAV Recon Satellites"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert I - Call in 30 UAV Recon Satellites"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Airstrike1")) { - if(%client.CheckNWChallengeCompletion("Airstrike2")) { - if(%client.CheckNWChallengeCompletion("Airstrike3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert III - Call in 125 Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert II - Call in 65 Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert I - Call in 25 Airstrikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("UAMS1")) { - if(%client.CheckNWChallengeCompletion("UAMS2")) { - if(%client.CheckNWChallengeCompletion("UAMS3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert III - Call in 125 Missile Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert II - Call in 65 Missile Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert I - Call in 25 Missile Strikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Helicopter1")) { - if(%client.CheckNWChallengeCompletion("Helicopter2")) { - if(%client.CheckNWChallengeCompletion("Helicopter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert III - Call in 125 Combat Helicopters"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert II - Call in 65 Combat Helicopters"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert I - Call in 25 Combat Helicopters"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Harrier1")) { - if(%client.CheckNWChallengeCompletion("Harrier2")) { - if(%client.CheckNWChallengeCompletion("Harrier3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert III - Call in 110 Plasma Harrier Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert II - Call in 55 Plasma Harrier Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert I - Call in 20 Plasma Harrier Airstrikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SatNuke1")) { - if(%client.CheckNWChallengeCompletion("SatNuke2")) { - if(%client.CheckNWChallengeCompletion("SatNuke3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert III - Call in 125 Orbital Laser Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert II - Call in 65 Orbital Laser Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert I - Call in 25 Orbital Laser Strikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("NapalmHarrier1")) { - if(%client.CheckNWChallengeCompletion("NapalmHarrier2")) { - if(%client.CheckNWChallengeCompletion("NapalmHarrier3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert III - Call in 110 Napalm Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert II - Call in 55 Napalm Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert I - Call in 20 Napalm Airstrikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GunHeli1")) { - if(%client.CheckNWChallengeCompletion("GunHeli2")) { - if(%client.CheckNWChallengeCompletion("GunHeli3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert III - Call in 110 Gunship Helicopters"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert II - Call in 55 Gunship Helicopters"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert I - Call in 20 Gunship Helicopters"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SBomber1")) { - if(%client.CheckNWChallengeCompletion("SBomber2")) { - if(%client.CheckNWChallengeCompletion("SBomber3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert III - Call in 100 Stealth Bombers"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert II - Call in 50 Stealth Bombers"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert I - Call in 20 Stealth Bombers"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Gunship1")) { - if(%client.CheckNWChallengeCompletion("Gunship2")) { - if(%client.CheckNWChallengeCompletion("Gunship3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert III - Call in 75 Harbinger Gunships"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert II - Call in 35 Harbinger Gunships"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert I - Call in 15 Harbinger Gunships"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Apache1")) { - if(%client.CheckNWChallengeCompletion("Apache2")) { - if(%client.CheckNWChallengeCompletion("Apache3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Expert III - Call in 75 Apache Gunners"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Expert II - Call in 35 Apache Gunners"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Expert I - Call in 15 Apache Gunners"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Gunship3")) { - if(%client.CheckNWChallengeCompletion("ACGunship1")) { - if(%client.CheckNWChallengeCompletion("ACGunship2")) { - if(%client.CheckNWChallengeCompletion("ACGunship3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert III - Call in 75 AC130's"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert II - Call in 35 AC130's"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert I - Call in 15 AC130's"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Locked - Requires Harbinger Gunship Expert III."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Centaur1")) { - if(%client.CheckNWChallengeCompletion("Centaur2")) { - if(%client.CheckNWChallengeCompletion("Centaur3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert III - Call in 50 Artillery Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert II - Call in 25 Artillery Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert I - Call in 10 Artillery Strikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("EMP1")) { - if(%client.CheckNWChallengeCompletion("EMP2")) { - if(%client.CheckNWChallengeCompletion("EMP3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert III - Call in 25 Mass EMP's"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert II - Call in 10 Mass EMP's"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert I - Call in 5 Mass EMP's"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Nuke1")) { - if(%client.CheckNWChallengeCompletion("Nuke2")) { - if(%client.CheckNWChallengeCompletion("Nuke3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert III - Call in 25 Nukes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert II - Call in 10 Nukes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert I - Call in 5 Nukes"); - %index++; - } - // - if(%client.TWM2Core.Officer >= 1) { - if(%client.CheckNWChallengeCompletion("Fission1")) { - if(%client.CheckNWChallengeCompletion("Fission2")) { - if(%client.CheckNWChallengeCompletion("Fission3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert - Challenge Set Complete"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert III - Call in 5 Fission Bombs"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert II - Call in 2 Fission Bombs"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert I - Call in 1 Fission Bomb"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Locked - Requires Instructive Officer Rank (Off. Rank 1)"); - %index++; - } - return %index; -} - function KS_Attenuate(%index) { if(isSet($KS_Attenuate[%index])) { return $KS_Attenuate[%index]; diff --git a/scripts/TWM2/Systems/MainControl.cs b/scripts/TWM2/Systems/MainControl.cs index 3f459b7..0f92b6c 100644 --- a/scripts/TWM2/Systems/MainControl.cs +++ b/scripts/TWM2/Systems/MainControl.cs @@ -246,53 +246,201 @@ function DefaultGame::ZkillUpdateScore(%game, %client, %implement, %zombie){ } function GameConnection::AwardZombieKill(%client, %zombie, %implement) { - if(%client $= "" || %client == 0) { - return; - } - %zombieType = %zombie.type; - //stop right now - if(%zombie.isBoss && %zombieType != 16) { - return; - } - if(%zombieType $= "") { - %zombieType = 1; - } - //Subduction for implement - if(%implement.getClassName() $= "Turret") { - %xpGain = mfloor($TWM2::ZombieXPAward[%zombieType] / 3); - } - else if(%implement.getDataBlock().catagory $= "Vehicles") { - %xpGain = mfloor($TWM2::ZombieXPAward[%zombieType] / 2); - } - else { - %xpGain = $TWM2::ZombieXPAward[%zombieType]; - } - // - if(%client.IsActivePerk("Double Down")) { - GainExperience(%client, %xpGain*2, "[D-D]"@$TWM2::ZombieName[%zombieType]@" Killed "); - } - else { - GainExperience(%client, %xpGain, ""@$TWM2::ZombieName[%zombieType]@" Killed "); - } - //Team Gain Perk - if(%client.IsActivePerk("Team Gain")) { - %TargetSearchMask = $TypeMasks::PlayerObjectType; - InitContainerRadiusSearch(%client.player.getPosition(), 20, %TargetSearchMask); //small distance - while ((%potentialTarget = ContainerSearchNext()) != 0){ - if (%potentialTarget.getPosition() != %pos) { - if(%potentialTarget.client.team == %client.team && %potentialTarget.client != %client) { - GainExperience(%potentialTarget.client, %xpGain, "Team gain from "@%client.namebase@" "); - } - } - } - } - //some zombies have weapons, throw it :) - %zombie.throwweapon(1); - //End - //HellJump? - if($TWM::PlayingHellJump || $TWM::PlayingHorde) { - Game.OnZombieDeath(%client, %zombie); - } + if(%client $= "" || %client == 0) { + return; + } + %zombieType = %zombie.type; + //stop right now + if(%zombie.isBoss && %zombieType != 16) { + return; + } + if(%zombieType $= "") { + %zombieType = 1; + } + %client.TWM2Core.zombiekills[%zombieType]++; + //Zombie Slayer Challenges (TWM2 3.9.1) + switch(%zombieType) { + case 1: + if(%client.TWM2Core.zombiekills[1] >= 2500) { + CompleteNWChallenge(%client, "NormHunter1"); + if(%client.TWM2Core.zombiekills[1] >= 5000) { + CompleteNWChallenge(%client, "NormHunter2"); + if(%client.TWM2Core.zombiekills[1] >= 10000) { + CompleteNWChallenge(%client, "NormHunter3"); + } + } + } + + case 2: + if(%client.TWM2Core.zombiekills[2] >= 1000) { + CompleteNWChallenge(%client, "RavHunter1"); + if(%client.TWM2Core.zombiekills[2] >= 2500) { + CompleteNWChallenge(%client, "RavHunter2"); + if(%client.TWM2Core.zombiekills[2] >= 5000) { + CompleteNWChallenge(%client, "RavHunter3"); + } + } + } + + case 3: + if(%client.TWM2Core.zombiekills[3] >= 1000) { + CompleteNWChallenge(%client, "LordHunter1"); + if(%client.TWM2Core.zombiekills[3] >= 2000) { + CompleteNWChallenge(%client, "LordHunter2"); + if(%client.TWM2Core.zombiekills[3] >= 3000) { + CompleteNWChallenge(%client, "LordHunter3"); + } + } + } + + case 4: + if(%client.TWM2Core.zombiekills[4] >= 1000) { + CompleteNWChallenge(%client, "DemonHunter1"); + if(%client.TWM2Core.zombiekills[4] >= 2500) { + CompleteNWChallenge(%client, "DemonHunter2"); + if(%client.TWM2Core.zombiekills[4] >= 5000) { + CompleteNWChallenge(%client, "DemonHunter3"); + } + } + } + + case 5: + if(%client.TWM2Core.zombiekills[5] >= 1500) { + CompleteNWChallenge(%client, "AirRapHunter1"); + if(%client.TWM2Core.zombiekills[5] >= 3500) { + CompleteNWChallenge(%client, "AirRapHunter2"); + if(%client.TWM2Core.zombiekills[5] >= 6000) { + CompleteNWChallenge(%client, "AirRapHunter3"); + } + } + } + + case 6: + if(%client.TWM2Core.zombiekills[6] >= 500) { + CompleteNWChallenge(%client, "DLordHunter1"); + if(%client.TWM2Core.zombiekills[6] >= 1000) { + CompleteNWChallenge(%client, "DLordHunter2"); + if(%client.TWM2Core.zombiekills[6] >= 1500) { + CompleteNWChallenge(%client, "DLordHunter3"); + } + } + } + + case 9: + if(%client.TWM2Core.zombiekills[9] >= 1500) { + CompleteNWChallenge(%client, "ShifterHunter1"); + if(%client.TWM2Core.zombiekills[9] >= 3000) { + CompleteNWChallenge(%client, "ShifterHunter2"); + if(%client.TWM2Core.zombiekills[9] >= 6000) { + CompleteNWChallenge(%client, "ShifterHunter3"); + } + } + } + + case 10: + if(%client.TWM2Core.zombiekills[10] >= 1000) { + CompleteNWChallenge(%client, "SummonerHunter1"); + if(%client.TWM2Core.zombiekills[10] >= 2500) { + CompleteNWChallenge(%client, "SummonerHunter2"); + if(%client.TWM2Core.zombiekills[10] >= 5000) { + CompleteNWChallenge(%client, "SummonerHunter3"); + } + } + } + + case 11: + if(%client.TWM2Core.zombiekills[11] >= 1000) { + CompleteNWChallenge(%client, "SniperHunter1"); + if(%client.TWM2Core.zombiekills[11] >= 2500) { + CompleteNWChallenge(%client, "SniperHunter2"); + if(%client.TWM2Core.zombiekills[11] >= 5000) { + CompleteNWChallenge(%client, "SniperHunter3"); + } + } + } + + case 12: + if(%client.TWM2Core.zombiekills[12] >= 1000) { + CompleteNWChallenge(%client, "UDemHunter1"); + if(%client.TWM2Core.zombiekills[12] >= 2500) { + CompleteNWChallenge(%client, "UDemHunter2"); + if(%client.TWM2Core.zombiekills[12] >= 5000) { + CompleteNWChallenge(%client, "UDemHunter3"); + } + } + } + + case 13: + if(%client.TWM2Core.zombiekills[13] >= 1000) { + CompleteNWChallenge(%client, "VRavHunter1"); + if(%client.TWM2Core.zombiekills[13] >= 2500) { + CompleteNWChallenge(%client, "VRavHunter2"); + if(%client.TWM2Core.zombiekills[13] >= 5000) { + CompleteNWChallenge(%client, "VRavHunter3"); + } + } + } + + case 14: + if(%client.TWM2Core.zombiekills[14] >= 1000) { + CompleteNWChallenge(%client, "SSHunter1"); + if(%client.TWM2Core.zombiekills[14] >= 2500) { + CompleteNWChallenge(%client, "SSHunter2"); + if(%client.TWM2Core.zombiekills[14] >= 5000) { + CompleteNWChallenge(%client, "SSHunter3"); + } + } + } + + case 15: + if(%client.TWM2Core.zombiekills[15] >= 500) { + CompleteNWChallenge(%client, "WraithHunter1"); + if(%client.TWM2Core.zombiekills[15] >= 750) { + CompleteNWChallenge(%client, "WraithHunter2"); + if(%client.TWM2Core.zombiekills[15] >= 1000) { + CompleteNWChallenge(%client, "WraithHunter3"); + } + } + } + } + + //END + //Subduction for implement + if (%implement.getClassName() $= "Turret") { + %xpGain = mfloor($TWM2::ZombieXPAward[%zombieType] / 3); + } + else if(%implement.getDataBlock().catagory $= "Vehicles") { + %xpGain = mfloor($TWM2::ZombieXPAward[%zombieType] / 2); + } + else { + %xpGain = $TWM2::ZombieXPAward[%zombieType]; + } + // + if(%client.IsActivePerk("Double Down")) { + GainExperience(%client, %xpGain*2, "[D-D]"@$TWM2::ZombieName[%zombieType]@" Killed "); + } + else { + GainExperience(%client, %xpGain, ""@$TWM2::ZombieName[%zombieType]@" Killed "); + } + //Team Gain Perk + if(%client.IsActivePerk("Team Gain")) { + %TargetSearchMask = $TypeMasks::PlayerObjectType; + InitContainerRadiusSearch(%client.player.getPosition(), 20, %TargetSearchMask); //small distance + while ((%potentialTarget = ContainerSearchNext()) != 0){ + if (%potentialTarget.getPosition() != %pos) { + if(%potentialTarget.client.team == %client.team && %potentialTarget.client != %client) { + GainExperience(%potentialTarget.client, %xpGain, "Team gain from "@%client.namebase@" "); + } + } + } + } + //some zombies have weapons, throw it :) + %zombie.throwweapon(1); + //End + //HellJump? + if($TWM::PlayingHellJump || $TWM::PlayingHorde) { + Game.OnZombieDeath(%client, %zombie); + } } function serverCmdCheckHTilt(%client) { @@ -472,144 +620,170 @@ function E_Sigma(%from, %to, %formula) { //to better control the current problems in the boss system. function TWM2Damage(%projectile, %target, %amount, %dType, %damLoc, %type) { - //terrain block - if(%target.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) { - return; - } + //terrain block + if(%target.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) { + return; + } - %data = %projectile.getDatablock(); - %sourceObject = %projectile.sourceObject; - %sourceClient = %sourceObject.client; - %targetClient = %target.client $= "" ? 0 : %target.client; - %TDB = %target.getDatablock(); - if(isObject(%sourceObject)) { - %SDB = %sourceObject.getDatablock(); - } - else { - %SDB = ""; - } - %total = 1; + %data = %projectile.getDatablock(); + %sourceObject = %projectile.sourceObject; + %sourceClient = %sourceObject.client; + %targetClient = %target.client $= "" ? 0 : %target.client; + %TDB = %target.getDatablock(); + if(isObject(%sourceObject)) { + %SDB = %sourceObject.getDatablock(); + } + else { + %SDB = ""; + } + %total = 1; - switch$(%type) { - case "projectile": - // - %target.headShot = 0; //Reset first - if(%sourceClient.ActivePerk["AP Bullets"]) { - %total *= 1.5; - } - if(%targetClient != 0) { - if(%targetClient.IsActivePerk("Kevlar Armor")) { - %total *= 0.5; - } - } - if(%target.isZombie) { - if(Game.CheckModifier("Demonic") == 1) { - %total = 0.5; - } - } - //------------------------------------------------------ - //source object fixing - if(strStr(%SDB.getClassName(), "Turret") != -1) { - if(%SDB.getName() $= "HarbingerGunshipTurret") { - %projectile.sourceObject = %projectile.sourceObject.mountobj; - } - else if(%SDB.getName() $= "AC130GunshipTurret") { - %projectile.sourceObject = %projectile.sourceObject.mountobj; - } - else if(%SDB.getName() $= "CentaurTurret") { - %projectile.sourceObject = %projectile.sourceObject.source; - } - } - //------------------------------------------------------ - //vehicle kill checking - if(strStr(%SDB.getClassName(), "Vehicle") != -1) { - if(%target.isPlayer() && %target.getState() $= "dead") { - %pl = %sourceObject.getMountNodeObject(0); //the pilot - %cl = %pl.client; - if(%cl !$= "") { - if(!%targetObject.isAllyBot) { - UpdateVehicleKillFile(%cl, %SDB.getName()); - } - // - if(%TDB $= "DemonMotherZombieArmor" && %SDB $= "CentaurVehicle") { - %cl.CDLKills++; - if(%cl.CDLKills >= 5) { - AwardClient(%cl, "19"); - } - } - } - } - } - //-------------------------------------------------------- - //Headshot checking - if(%damLoc $= "head" && %TDB.getClassName() $= "PlayerData") { - if(%data.HeadMultiplier !$= "") { - %modifier *= %data.HeadMultiplier; - } - if(%data.HeadShotKill && $TWM2::HeadshotKill) { - %target.headShot = 1; - } - if(%sourceClient !$= "") { - if(%sourceClient.UpgradeOn("HSBullets", %projectile.WeaponImageSource) && $TWM2::HeadshotKill) { - %target.headShot = 1; - } - } - if(%target.headShot) { - if(%targetClient != 0 && %targetClient.ActivePerk["Head Guard"]) { - %target.headShot = 0; - } - else { - if((!%target.isBoss && !%target.noHS) && !(%target.getShieldHealth() > 0)) { - if(%target.isZombie) { - if(%TDB $= "FZombieArmor") { - AwardClient(%sourceClient, "16"); - } - if(Game.CheckModifier("WheresMyHead") == 1) { - %target.headShot = 0; - } - else { - %total *= 1000; - } - } - else { - if(%target.isPilot() || %target.vehicleMounted) { - %target.headShot = 0; - } - else { - %total *= 1000; - if(%targetClient != 0) { - BottomPrint(%targetClient, "You Lost Your Head!!!", 3, 1); - } - } - } - } - } - } - } - else if(%damLoc $= "legs") { - if(%data.LegsMultiplier !$= "") { - %total *= %data.LegsMultiplier; - } - } - //All done! we should have filled the %total variable - case "explosion": - %total = 1; - if(%dType == $DamageType::RapierShield) { - if(%target == %sourceObject || %target.isZombie || %target.isBoss) { - %total = 0; - } - } - } - - %deal = %total * %amount; - if(%target.isBoss) { - if(%dType == $DamageType::SuperChaingun) { - %deal = 0; - } - %sourceClient.damageToBoss += %deal; - } - - return %total; + switch$(%type) { + //Projectiles... + case "projectile": + %target.headShot = 0; //Reset first + if(%sourceClient.ActivePerk["AP Bullets"]) { + %total *= 1.5; + } + if(%targetClient != 0) { + if(%targetClient.IsActivePerk("Kevlar Armor")) { + %total *= 0.5; + } + } + if(%target.isZombie) { + if(Game.CheckModifier("Demonic") == 1) { + %total = 0.5; + } + } + //------------------------------------------------------ + //source object fixing + if(strStr(%SDB.getClassName(), "Turret") != -1) { + if(%SDB.getName() $= "HarbingerGunshipTurret") { + %projectile.sourceObject = %projectile.sourceObject.mountobj; + } + else if(%SDB.getName() $= "AC130GunshipTurret") { + %projectile.sourceObject = %projectile.sourceObject.mountobj; + } + else if(%SDB.getName() $= "CentaurTurret") { + %projectile.sourceObject = %projectile.sourceObject.source; + } + } + //------------------------------------------------------ + //vehicle kill checking + if(strStr(%SDB.getClassName(), "Vehicle") != -1) { + if(%target.isPlayer() && %target.getState() $= "dead") { + %pl = %sourceObject.getMountNodeObject(0); //the pilot + %cl = %pl.client; + if(%cl !$= "") { + if(%target.client !$= "" && !%target.isZombie && %target.team != %pl.team) { + %cl.TWM2Core.PvPVehicleKills++; + if(%cl.TWM2Core.PvPVehicleKills >= 50) { + CompleteNWChallenge(%cl, "VehMans1"); + if(%cl.TWM2Core.PvPVehicleKills >= 100) { + CompleteNWChallenge(%cl, "VehMans2"); + if(%cl.TWM2Core.PvPVehicleKills >= 250) { + CompleteNWChallenge(%cl, "VehMans3"); + } + } + } + } + if(!%target.isAllyBot) { + UpdateVehicleKillFile(%cl, %SDB.getName()); + } + // + if(%TDB $= "DemonMotherZombieArmor" && %SDB $= "CentaurVehicle") { + %cl.CDLKills++; + if(%cl.CDLKills >= 5) { + AwardClient(%cl, "19"); + } + } + } + } + } + //-------------------------------------------------------- + //Headshot checking + if(%damLoc $= "head" && %TDB.getClassName() $= "PlayerData") { + if(%data.HeadMultiplier !$= "") { + %modifier *= %data.HeadMultiplier; + } + if(%data.HeadShotKill && $TWM2::HeadshotKill) { + %target.headShot = 1; + } + if(%sourceClient !$= "") { + if(%sourceClient.UpgradeOn("HSBullets", %projectile.WeaponImageSource) && $TWM2::HeadshotKill) { + %target.headShot = 1; + } + } + if(%target.headShot) { + if(%targetClient != 0 && %targetClient.ActivePerk["Head Guard"]) { + %target.headShot = 0; + } + else { + if((!%target.isBoss && !%target.noHS) && !(%target.getShieldHealth() > 0)) { + if(%target.isZombie) { + if(%TDB $= "FZombieArmor") { + AwardClient(%sourceClient, "16"); + } + // + if(Game.CheckModifier("WheresMyHead") == 1) { + %target.headShot = 0; + } + else { + %total *= 1000; + } + } + else { + if(%target.isPilot() || %target.vehicleMounted) { + %target.headShot = 0; + } + else { + %total *= 1000; + if(%targetClient != 0) { + BottomPrint(%targetClient, "You Lost Your Head!!!", 3, 1); + //Recording... + if(%sourceClient !$= "") { + %sourceClient.TWM2Core.PvPHeadshotKills++; + if(%sourceClient.TWM2Core.PvPHeadshotKills >= 100) { + CompleteNWChallenge(%sourceClient, "HSHoncho1"); + if(%sourceClient.TWM2Core.PvPHeadshotKills >= 200) { + CompleteNWChallenge(%sourceClient, "HSHoncho2"); + if(%sourceClient.TWM2Core.PvPHeadshotKills >= 300) { + CompleteNWChallenge(%sourceClient, "HSHoncho3"); + } + } + } + } + } + } + } + } + } + } + } + else if(%damLoc $= "legs") { + if(%data.LegsMultiplier !$= "") { + %total *= %data.LegsMultiplier; + } + } + + case "explosion": + %total = 1; + if(%dType == $DamageType::RapierShield) { + if(%target == %sourceObject || %target.isZombie || %target.isBoss) { + %total = 0; + } + } + } + + %deal = %total * %amount; + if(%target.isBoss) { + if(%dType == $DamageType::SuperChaingun) { + %deal = 0; + } + %sourceClient.damageToBoss += %deal; + } + + return %total; } //=============================================================================== diff --git a/scripts/TWM2/Systems/NWChallengeIndex.cs b/scripts/TWM2/Systems/NWChallengeIndex.cs index c19c53e..488b13b 100644 --- a/scripts/TWM2/Systems/NWChallengeIndex.cs +++ b/scripts/TWM2/Systems/NWChallengeIndex.cs @@ -54,43 +54,118 @@ $Challenge::Info["Nuke3"] = "Nuke Expert III\t1\t50000\tZ-Bomb Killstreak"; $Challenge::Info["Fission1"] = "Fission Bomb Expert I\t1\t25000\tNone"; $Challenge::Info["Fission2"] = "Fission Bomb Expert II\t1\t50000\tNone"; $Challenge::Info["Fission3"] = "Fission Bomb Expert III\t1\t75000\tNone"; +$Challenge::Info["LOAS1"] = "LOAS Expert I\t1\t25000\tNone"; +$Challenge::Info["LOAS2"] = "LOAS Expert II\t1\t50000\tNone"; +$Challenge::Info["LOAS3"] = "LOAS Expert III\t1\t75000\tNone"; //Bosses $Challenge::Info["Yvex1"] = "Nightmarish Enterprise\t2\t1000\tNone"; $Challenge::Info["Yvex2"] = "Darkness Rising\t2\t2500\tNone"; -$Challenge::Info["Yvex3"] = "Shadowy Desecration\t2\t5000\tLord Yvex Recruitable Ally"; +$Challenge::Info["Yvex3"] = "Shadowy Desecration\t2\t5000\tNone"; $Challenge::Info["CWS1"] = "Fortress In The Sky\t2\t1000\tNone"; $Challenge::Info["CWS2"] = "Aerieal Nightmare\t2\t2500\tNone"; $Challenge::Info["CWS3"] = "Harbinger's Bane\t2\t5000\tNone"; $Challenge::Info["GOL1"] = "Envious Lightning\t2\t1500\tNone"; $Challenge::Info["GOL2"] = "The Shocking Truth\t2\t3000\tNone"; $Challenge::Info["GOL3"] = "Severe Thunderstorm\t2\t6500\tNone"; +$Challenge::Info["GOF1"] = "Purifier\t2\t5000\tNone"; +$Challenge::Info["GOF2"] = "Inceneration Ender\t2\t10000\tNone"; +$Challenge::Info["GOF3"] = "Mt. Death Depleter\t2\t20000\tNone"; $Challenge::Info["Veg1"] = "Flaming Revolt\t2\t1500\tNone"; $Challenge::Info["Veg2"] = "Burning Frenzy\t2\t3000\tNone"; -$Challenge::Info["Veg3"] = "Firestorm Ender\t2\t6500\tGeneral Vegenor Recruitable Ally"; +$Challenge::Info["Veg3"] = "Firestorm Ender\t2\t6500\tNone"; $Challenge::Info["LRog1"] = "Revenge Halter\t2\t2500\tNone"; $Challenge::Info["LRog2"] = "Return to Returner\t2\t5000\tNone"; -$Challenge::Info["LRog3"] = "Payback's A Bitch\t2\t10000\tLord Rog Recruitable Ally"; +$Challenge::Info["LRog3"] = "Payback's A Bitch\t2\t10000\tNone"; $Challenge::Info["Ins1"] = "El Shipitor\t2\t2500\tNone"; $Challenge::Info["Ins2"] = "No Gravity, No Problem\t2\t5000\tNone"; -$Challenge::Info["Ins3"] = "Gravitational Influx\t2\t10000\tMajor Insignia Recruitable Ally"; +$Challenge::Info["Ins3"] = "Gravitational Influx\t2\t10000\tNone"; +$Challenge::Info["Stormrider1"] = "Clear Skies\t2\t2500\tNone"; +$Challenge::Info["Stormrider2"] = "Shootdown Master\t2\t5000\tNone"; +$Challenge::Info["Stormrider3"] = "Harbinger Fighter Demolisher\t2\t10000\tNone"; $Challenge::Info["Treb1"] = "Precious Cargo\t2\t2500\tNone"; $Challenge::Info["Treb2"] = "Harbinger Denied\t2\t5000\tNone"; $Challenge::Info["Treb3"] = "Tank Halter\t2\t10000\tNone"; $Challenge::Info["Vard1"] = "Shining Star\t2\t3500\tNone"; $Challenge::Info["Vard2"] = "Glare The Dark\t2\t7000\tNone"; -$Challenge::Info["Vard3"] = "Outevil The Wicked\t2\t12500\tLord Vardison Recruitable Ally"; +$Challenge::Info["Vard3"] = "Outevil The Wicked\t2\t12500\tNone"; $Challenge::Info["VardEasy"] = "The Standard Experience\t2\t7000\tNone"; -$Challenge::Info["VardNorm"] = "Demon Hunter\t2\t1500\tNone"; +$Challenge::Info["VardNorm"] = "Demon Hunter\t2\t15000\tNone"; $Challenge::Info["VardHard"] = "Master Demon Slayer\t2\t25000\tNone"; $Challenge::Info["VardWtf"] = "God of the Shadow Realm\t2\t50000\tNone"; -//Blacklist -$Challenge::Info["Acceptance"] = "Acceptance\t3\t1000\tNone"; -$Challenge::Info["ListHit"] = "Hitlister of The List\t3\t2500\tNone"; -$Challenge::Info["TopHit"] = "Champion Slayer\t3\t3500\tNone"; -$Challenge::Info["ButIm2"] = "But I'm #2\t3\t3500\tNone"; -$Challenge::Info["DF3"] = "Don't Forget #3\t3\t3500\tNone"; +$Challenge::Info["ShadeLord1"] = "Night Stalker\t2\t5000\tNone"; +$Challenge::Info["ShadeLord2"] = "Shadow Embracer\t2\t10000\tNone"; +$Challenge::Info["ShadeLord3"] = "Dawnlight Encarnate\t2\t20000\tNone"; + +//Blacklist: Depricated 3.9.1 +//$Challenge::Info["Acceptance"] = "Acceptance\t3\t1000\tNone"; +//$Challenge::Info["ListHit"] = "Hitlister of The List\t3\t2500\tNone"; +//$Challenge::Info["TopHit"] = "Champion Slayer\t3\t3500\tNone"; +//$Challenge::Info["ButIm2"] = "But I'm #2\t3\t3500\tNone"; +//$Challenge::Info["DF3"] = "Don't Forget #3\t3\t3500\tNone"; + +//Wargames +$Challenge::Info["Slayer1"] = "Slayer I\t3\t1000\tNone"; +$Challenge::Info["Slayer2"] = "Slayer II\t3\t2500\tNone"; +$Challenge::Info["Slayer3"] = "Slayer III\t3\t5000\tNone"; +$Challenge::Info["Slayer4"] = "Slayer IV\t3\t7500\tNone"; +$Challenge::Info["Slayer5"] = "Slayer V\t3\t10000\tNone"; +$Challenge::Info["Defectionator1"] = "Defectionator I\t3\t2500\tNone"; +$Challenge::Info["Defectionator2"] = "Defectionator II\t3\t5000\tNone"; +$Challenge::Info["Defectionator3"] = "Defectionator III\t3\t10000\tNone"; +$Challenge::Info["Infectionator1"] = "Infectionator I\t3\t2500\tNone"; +$Challenge::Info["Infectionator2"] = "Infectionator II\t3\t5000\tNone"; +$Challenge::Info["Infectionator3"] = "Infectionator III\t3\t10000\tNone"; +$Challenge::Info["HSHoncho1"] = "Headshot Honcho I\t3\t2500\tNone"; +$Challenge::Info["HSHoncho2"] = "Headshot Honcho II\t3\t5000\tNone"; +$Challenge::Info["HSHoncho3"] = "Headshot Honcho III\t3\t10000\tNone"; +$Challenge::Info["VehMans1"] = "Vehicular Manslaughter I\t3\t2500\tNone"; +$Challenge::Info["VehMans2"] = "Vehicular Manslaughter II\t3\t5000\tNone"; +$Challenge::Info["VehMans3"] = "Vehicular Manslaughter III\t3\t10000\tNone"; +$Challenge::Info["Assassin"] = "Assassinator\t3\t5000\tNone"; +$Challenge::Info["CompletelyUnexpected"] = "That Was... Unexpected\t3\t50000\tNone"; +$Challenge::Info["Uncomprehendable"] = "Uncomprehendable\t3\t100000\tNone"; + //Zombie Slaying +$Challenge::Info["NormHunter1"] = "Frontline Buster I\t4\t2500\tNone"; +$Challenge::Info["NormHunter2"] = "Frontline Buster II\t4\t5000\tNone"; +$Challenge::Info["NormHunter3"] = "Frontline Buster III\t4\t10000\tNone"; +$Challenge::Info["RavHunter1"] = "Speed Kills I\t4\t2500\tNone"; +$Challenge::Info["RavHunter2"] = "Speed Kills II\t4\t5000\tNone"; +$Challenge::Info["RavHunter3"] = "Speed Kills III\t4\t10000\tNone"; +$Challenge::Info["LordHunter1"] = "The Bigger They Are I\t4\t2500\tNone"; +$Challenge::Info["LordHunter2"] = "The Bigger They Are II\t4\t5000\tNone"; +$Challenge::Info["LordHunter3"] = "The Bigger They Are III\t4\t10000\tNone"; +$Challenge::Info["DemonHunter1"] = "Fire Retardant I\t4\t2500\tNone"; +$Challenge::Info["DemonHunter2"] = "Fire Retardant II\t4\t5000\tNone"; +$Challenge::Info["DemonHunter3"] = "Fire Retardant III\t4\t10000\tNone"; +$Challenge::Info["AirRapHunter1"] = "Bat Slayer I\t4\t2500\tNone"; +$Challenge::Info["AirRapHunter2"] = "Bat Slayer II\t4\t5000\tNone"; +$Challenge::Info["AirRapHunter3"] = "Bat Slayer III\t4\t10000\tNone"; +$Challenge::Info["DLordHunter1"] = "Hellspawn Erradicator I\t4\t2500\tNone"; +$Challenge::Info["DLordHunter2"] = "Hellspawn Erradicator II\t4\t5000\tNone"; +$Challenge::Info["DLordHunter3"] = "Hellspawn Erradicator III\t4\t10000\tNone"; +$Challenge::Info["ShifterHunter1"] = "Anti-Warp I\t4\t2500\tNone"; +$Challenge::Info["ShifterHunter2"] = "Anti-Warp II\t4\t5000\tNone"; +$Challenge::Info["ShifterHunter3"] = "Anti-Warp III\t4\t10000\tNone"; +$Challenge::Info["SummonerHunter1"] = "Horde Halter I\t4\t2500\tNone"; +$Challenge::Info["SummonerHunter2"] = "Horde Halter II\t4\t5000\tNone"; +$Challenge::Info["SummonerHunter3"] = "Horde Halter III\t4\t10000\tNone"; +$Challenge::Info["SniperHunter1"] = "Scope Breaker I\t4\t2500\tNone"; +$Challenge::Info["SniperHunter2"] = "Scope Breaker II\t4\t5000\tNone"; +$Challenge::Info["SniperHunter3"] = "Scope Breaker III\t4\t10000\tNone"; +$Challenge::Info["UDemHunter1"] = "Runner Down I\t4\t2500\tNone"; +$Challenge::Info["UDemHunter2"] = "Runner Down II\t4\t5000\tNone"; +$Challenge::Info["UDemHunter3"] = "Runner Down III\t4\t10000\tNone"; +$Challenge::Info["VRavHunter1"] = "C4 Coming Through I\t4\t2500\tNone"; +$Challenge::Info["VRavHunter2"] = "C4 Coming Through II\t4\t5000\tNone"; +$Challenge::Info["VRavHunter3"] = "C4 Coming Through III\t4\t10000\tNone"; +$Challenge::Info["SSHunter1"] = "De-Flakerizer I\t4\t2500\tNone"; +$Challenge::Info["SSHunter2"] = "De-Flakerizer II\t4\t5000\tNone"; +$Challenge::Info["SSHunter3"] = "De-Flakerizer III\t4\t10000\tNone"; +$Challenge::Info["WraithHunter1"] = "Anti Spec-Ops I\t4\t2500\tNone"; +$Challenge::Info["WraithHunter2"] = "Anti Spec-Ops II\t4\t5000\tNone"; +$Challenge::Info["WraithHunter3"] = "Anti Spec-Ops III\t4\t10000\tNone"; //Events $Challenge::Info["NewYearsEve"] = "New Years Eve Fireworks\t5\t1500\tJavelin Hellclass"; @@ -122,6 +197,9 @@ $Challenge::Info["Milestone25"] = "Milestone 25\t9\t25000\tNone"; $Challenge::Info["ArmyOf50Stopped"] = "Army Of 50 Stopped\t9\t50000\tSecond Chance Perk"; $Challenge::Info["Angel"] = "Angel\t9\t500\tNone"; $Challenge::Info["ZBomber"] = "Z-Bomber\t9\t2000\tNone"; +$Challenge::Info["FirstBlood"] = "First Blood\t9\t10000\tNone"; +$Challenge::Info["SpeedSlayer"] = "Speed Slayer\t9\t20000\tNone"; +$Challenge::Info["HighScorer"] = "High Scorer\t9\t25000\tNone"; //Helljump $Challenge::Info["GroupBuster"] = "Group Buster\t10\t5000\tNone"; @@ -139,9 +217,16 @@ $Challenge::Info["LifeGiver"] = "Giver of Life\t10\t7500\tNone"; //From The Top $Challenge::Info["SimonSays"] = "Simon Says\t11\t1000\tNone"; $Challenge::Info["FromTheTop"] = "From The Top\t11\t1000\tNone"; +$Challenge::Info["NaturalLeader"] = "Natural Leader\t11\t2500\tNone"; $Challenge::Info["GoldStar"] = "Gold Star\t11\t1000\tNone"; $Challenge::Info["Faster"] = "Faster!\t11\t250\tNone"; $Challenge::Info["EpicFailure"] = "Epic Failure\t11\t5\tNone"; +$Challenge::Info["ExpertGunner"] = "Expert AC-130 Gunner\t11\t25000\tNone"; +$Challenge::Info["Survivalist"] = "Survivalist\t11\t25000\tNone"; +$Challenge::Info["Invisibreh"] = "Shhh.. I'm Invisibreh\t11\t25000\tNone"; +$Challenge::Info["WeakGunship"] = "I have you now!\t11\t25000\tNone"; +$Challenge::Info["InvasionBuster"] = "Invade THIS!\t11\t25000\tNone"; +$Challenge::Info["SurvivalistExtreme"] = "Extreme Survivalist\t11\t50000\tNone"; //Prestige $Challenge::Info["Prestge1"] = "Instructive Private\t12\t100\tNone"; @@ -251,7 +336,7 @@ function CompleteNWChallenge(%client, %name) { %taskReward = getField($Challenge::Info[%name], 3); // GainExperience(%client, %taskXPGive, "Challenge "@%taskName@" Completed "); - BottomPrint(%client, "CHALLEGNE COMPLETE: "@%taskName@" \n +"@%taskXPGive@"XP, Reward: "@%taskReward@"", 2, 3); + BottomPrint(%client, "CHALLENGE COMPLETE: "@%taskName@" \n +"@%taskXPGive@"XP, Reward: "@%taskReward@"", 2, 3); MessageClient(%client, 'MsgSound', "~wfx/Bonuses/Nouns/General.wav"); MessageAll('msgComplete', "\c5"@%client.namebase@" completed challenge "@%taskName@""); // @@ -265,13 +350,13 @@ function CompleteNWChallenge(%client, %name) { function GenerateChallegnesMenu(%client, %tag, %index) { %scriptController = %client.TWM2Core; %xp = getCurrentEXP(%client); - messageClient( %client, 'SetLineHud', "", %tag, %index, "Other Challenges:"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Select a category to view challenges:"); %index++; // messageClient( %client, 'SetLineHud', "", %tag, %index, "PGD Challenges (Daily/Weekly/Monthly)"); %index++; if(%xp >= $Ranks::MinPoints[13]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Killstreak Challenges"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Killstreak Challenges: Tasks for calling in advanced support"); %index++; } else { @@ -280,25 +365,24 @@ function GenerateChallegnesMenu(%client, %tag, %index) { } // if(%xp >= $Ranks::MinPoints[18]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Boss Challenges"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Boss Challenges: Tasks for eliminating the toughest enemies in TWM2"); %index++; } else { messageClient( %client, 'SetLineHud', "", %tag, %index, "Boss Challenges - Reach Gunnary Sergeant To Unlock"); %index++; } - // if(%xp >= $Ranks::MinPoints[23]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Blacklist Challenges"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Wargames Challenges: Tasks for eliminating enemy players in various ways"); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Blacklist Challenges - Reach Lieutenant To Unlock"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Wargames Challenges - Reach Lieutenant To Unlock"); %index++; } // if(%xp >= $Ranks::MinPoints[28]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Zombie Slaying Challenges (Coming Soon)"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Zombie Slaying Challenges: Tasks for eliminating combatants of the zombie horde"); %index++; } else { @@ -306,11 +390,11 @@ function GenerateChallegnesMenu(%client, %tag, %index) { %index++; } // - messageClient( %client, 'SetLineHud', "", %tag, %index, "Special Event Challenges"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Special Event Challenges: Tasks for playing TWM2 during special events"); %index++; // if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Sabotage Challenges"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Sabotage Challenges: Tasks related to the Sabotage game mode"); %index++; } else { @@ -319,7 +403,7 @@ function GenerateChallegnesMenu(%client, %tag, %index) { } // if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Domination Challenges"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Domination Challenges: Tasks related to the Domination game mode"); %index++; } else { @@ -328,7 +412,7 @@ function GenerateChallegnesMenu(%client, %tag, %index) { } // if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde 3 Challenges"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde 3 Challenges: Tasks related to surviving the waves of the zombie horde"); %index++; } else { @@ -337,7 +421,7 @@ function GenerateChallegnesMenu(%client, %tag, %index) { } // if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helljump Challenges"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Helljump Challenges: Tasks related to performing spec-ops Helljump operations"); %index++; } else { @@ -346,7 +430,7 @@ function GenerateChallegnesMenu(%client, %tag, %index) { } // if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "From the top"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "From the top: Tasks related to ordering and completing missions"); %index++; } else { @@ -355,193 +439,12 @@ function GenerateChallegnesMenu(%client, %tag, %index) { } // if(%scriptController.officer >= 1) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges: Tasks related to officer ranks and advanced progression"); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges - Reach a Officer Rank To Unlock"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges - Reach Instructive Private To Unlock"); %index++; } return %index; -} - -//SUB MENU GetNonWeapSubMenu(%client, %tag, %index, %challengeCategory) -function GetNonWeapSubMenu(%client, %tag, %index, %challengeCategory) { - switch(%challengeCategory) { - //Killstreaks - case 1: - //Killstreak.cs - %index = GenerateStreakChallengeMenu(%client, %tag, %index); - //Bosses - case 2: - %index = GenerateBossChallengeMenu(%client, %tag, %index); - //Blacklist - case 3: - messageClient( %client, 'SetLineHud', "", %tag, %index, "Blacklist Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("Acceptance")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Acceptance: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Acceptance: Earn a Spot on the Blacklist 15."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ListHit")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Hitlister of The List: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Hitlister of The List: Kill a Blacklist Player."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("TopHit")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Slayer: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Slayer: Kill the #1 Player on the Server."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ButIm2")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "But I'm #2: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "But I'm #2: Kill the #2 Player on the Server."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("DF3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Don't Forget #3: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Don't Forget #3: Kill the #3 Player on the Server."); - %index++; - } - // - //Zombie Slaying - case 4: - //Events - case 5: - messageClient( %client, 'SetLineHud', "", %tag, %index, "Special Event Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("NewYearsEve")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Eve Fireworks: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Eve Fireworks: Get a Javelin Kill on New Years Eve."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("NewYears")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Fireworks: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Fireworks: Call in a nuke on New Years Day."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GunshipMall")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship to The Mall: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship to The Mall: Call in a Gunship on Christmas Mall 2009."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("IndepRPG")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Independance RPG: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Independance RPG: Score an RPG Kill on the Fourth Of July."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SoulsticeBombard")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Soulstice Bombard: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Soulstice Bombard: Call in artillery on one of the soulstices."); - %index++; - } - // - //PGD - case 6: - %index = GenerateDWMChallengeMenu(%client, %tag, %index); - //Sabotage - case 7: - %index = GenerateSabotageChallengeMenu(%client, %tag, %index); - //Domination - case 8: - %index = GenerateDominationChallengeMenu(%client, %tag, %index); - //Horde 2 - case 9: - %index = GenerateHordeChallengeMenu(%client, %tag, %index); - //Helljump - case 10: - %index = GenerateHelljumpChallengeMenu(%client, %tag, %index); - //FTT - case 11: - messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("SimonSays")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Simon Says: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Simon Says: Order a mission."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("FromTheTop")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top: Accept a mission."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GoldStar")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gold Star: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gold Star: Complete a mission within the time limit."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Faster")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Faster!: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Faster!: Complete a mission, but miss the time limit."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("EpicFailure")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Epic Failure: Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Epic Failure: Fail a mission."); - %index++; - } - //Prestige - case 12: - %index = GeneratePrestigeChallengeMenu(%client, %tag, %index); - } - return %index; -} - +} \ No newline at end of file diff --git a/scripts/TWM2/Systems/ScoreHudInventory.cs b/scripts/TWM2/Systems/ScoreHudInventory.cs deleted file mode 100644 index 4d53fcb..0000000 --- a/scripts/TWM2/Systems/ScoreHudInventory.cs +++ /dev/null @@ -1,939 +0,0 @@ -//ScoreHudInventroy.cs -//Phantom139 - -//For TWM2, and other mods, A rework of the inventory system to be ran through the -//score menu, for easier use and classification of weapons, packs, and armors - -//one can simply disable it through this G-Var -//$ScoreHudInventory::Active = 1; - -package scoreHudInventory { - function DefaultGame::processGameLink(%game, %client, %arg1, %arg2, %arg3, %arg4, %arg5) { - %tag = $TagToUseForScoreMenu; - messageClient( %client, 'ClearHud', "", %tag, 1 ); - // - switch$(%arg1) { - case "inventoryWindow": - %index = buildInventoryWindow(%client, %tag, %index); - return; - - case "setScoreInv": - %subZone = %arg2; - switch$(%subZone) { - case "Armor": - %client.scoreHudInv[Armor] = %arg3; - case "Weapon": - //pull the current settings - %int = 1; - while(isSet(%client.scoreHudInv[Weapon, %int])) { - if(%client.scoreHudInv[Weapon, %int] $= %client.scoreHudInv[Weapon, %arg3]) { - %client.scoreHudInv[Weapon, %int] = ""; - } - %int++; - } - %slot = %arg3; - %client.scoreHudInv[Weapon, %slot] = %arg4; - //now do a post set check - %xSlot = 1; - while(isSet(%client.scoreHudInv[Weapon, %xSlot])) { - //no two may co-exist, IE: be the same - %iSlot = 1; - while(isSet(%client.scoreHudInv[Weapon, %iSlot])) { - if(%client.scoreHudInv[Weapon, %iSlot] $= %client.scoreHudInv[Weapon, %xSlot]) { - if(%iSlot != %xSlot) { - //remove iSlot, proceed - %client.scoreHudInv[Weapon, %iSlot] = ""; - } - } - %iSlot++; - } - %xSlot++; - } - case "Pistol": - %client.scoreHudInv[Pistol] = %arg3; - case "Melee": - %client.scoreHudInv[Melee] = %arg3; - case "Pack": - %client.scoreHudInv[Pack] = %arg3; - case "Grenade": - %client.scoreHudInv[Grenade] = %arg3; - case "Mine": - %client.scoreHudInv[Mine] = %arg3; - case "Ability": - %client.scoreHudInv[Ability] = %arg3; - default: - error("Unknown Call to setScoreInv: "@%arg2@"/"@%arg3@"/"@%arg4@""); - // - } - Game.processGameLink(%client, "inventoryWindow"); - return; - } - parent::processGameLink(%game, %client, %arg1, %arg2, %arg3, %arg4, %arg5); - } - - function pushScoreInventory(%client) { - messageClient(%client, 'OpenHud', "", 'scoreScreen' SPC "inventoryWindow"); - messageClient(%client, 'CloseHud', "", 'inventoryScreen' SPC "inventoryScreen"); - Game.processGameLink(%client, "inventoryWindow"); - } - - function InventoryScreen::updateHud( %this, %client, %tag ) { - if($ScoreHudInventory::Active == 1) { - pushScoreInventory(%client); - return; - } - else { - parent::updateHud( %this, %client, %tag ); - } - } - - function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch ) { - Parent::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch ); - %client.scoreHudInv[Armor] = "Purebuild"; - } - - //modification to the game's inventory buy functions - function buyFavorites(%client) { - if($ScoreHudInventory::Active == 1) { - if(!isObject(%client.player)) { - return; - } - if(%client.player.isZombie) { - return; - } - if (%client.isJailed) { - return; - } - if (!%client.isAdmin && !%client.isSuperAdmin) { - if ($Host::Purebuild == 1) { - %client.scoreHudInv[Armor] = "Purebuild"; - } - else { - if (%client.scoreHudInv[Armor] $= "Purebuild") { - %client.scoreHudInv[Armor] = "Scout"; - } - } - } - // don't forget -- for many functions, anything done here also needs to be done - // below in buyDeployableFavorites !!! - %client.player.clearInventory(); - %client.setWeaponsHudClearAll(); - %cmt = $CurrentMissionType; - - %curArmor = %client.player.getDatablock(); - %curDmgPct = getDamagePercent(%curArmor.maxDamage, %client.player.getDamageLevel()); - - // armor - %client.armor = $NameToInv[%client.scoreHudInv[Armor]]; - %client.player.setArmor( %client.armor ); - %newArmor = %client.player.getDataBlock(); - - %client.player.setDamageLevel(%curDmgPct * %newArmor.maxDamage); - %weaponCount = 0; - - DoPerksStuff(%client, %client.player); - // - - // weapons - %armor = getArmorDatablock(%client, $NameToInv[%client.scoreHudInv[Armor]]); - %slotCount = %armor.MaxWeapons; - if(%client.IsActivePerk("OverKill") == 1) { - %slotCount++; - } - for(%i = 1; %i <= %slotCount; %i++) { - %inv = $NameToInv[%client.scoreHudInv[Weapon, %i]]; - - if( %inv !$= "" ) { - %weaponCount++; - %client.player.setInventory( %inv, 1 ); - %WImg = %inv.Image; - if(%WImg.ClipName !$= "") { //apply clips - if(%client.IsActivePerk("Bandolier")) { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips * 2; - } - else { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips; - } - } - } - // z0dd - ZOD, 9/13/02. Streamlining. - if ( %inv.image.ammo !$= "" ) { - %client.player.setInventory( %inv.image.ammo, 400 ); - } - } - %client.player.weaponCount = %weaponCount; - // - - //pistol - %Pinv = $NameToInv[%client.scoreHudInv[Pistol]]; - - if( %Pinv !$= "" ) { - %client.player.setInventory( %Pinv, 1 ); - %WImg = %Pinv.Image; - if(%WImg.ClipName !$= "") { //apply clips - if(%client.IsActivePerk("Bandolier")) { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips * 2; - } - else { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips; - } - } - } - if ( %Pinv.image.ammo !$= "" ) { - %client.player.setInventory( %Pinv.image.ammo, 400 ); - } - - //melee - %meleeinv = $NameToInv[%client.scoreHudInv[Melee]]; - - if( %meleeinv !$= "" ) { - %client.player.setInventory( %meleeinv, 1 ); - } - - //pack/deployable/ect/you get the point :P - %pCh = $NameToInv[%client.scoreHudInv[Pack]]; - if(%pCh !$= "") { - %client.player.setInventory( %pCh, 1 ); - // if this pack is a deployable that has a team limit, warn the purchaser - // if it's a deployable turret, the limit depends on the number of players (deployables.cs) - if (isDeployableTurret(%pCh)) { - %maxDep = countTurretsAllowed(%pCh); - } - else { - %maxDep = $TeamDeployableMax[%pCh]; - } - if(%maxDep !$= "") { - %depSoFar = $TeamDeployedCount[%client.player.team, %pCh]; - %packName = %client.favorites[%client.packIndex]; - - if(Game.numTeams > 1) { - %msTxt = "Your team has "@%depSoFar@" of "@%maxDep SPC %packName@"s deployed."; - } - else { - %msTxt = "You have deployed "@%depSoFar@" of "@%maxDep SPC %packName@"s."; - } - messageClient(%client, 'MsgTeamDepObjCount', %msTxt); - } - } - // - - //Grenade - %nadeinv = $NameToInv[%client.scoreHudInv[Grenade]]; - - if( %nadeinv !$= "" ) { - %client.player.setInventory( %nadeinv, %armor.max[%nadeinv] ); - } - - //Mine - %Mineinv = $NameToInv[%client.scoreHudInv[Mine]]; - - if( %Mineinv !$= "" ) { - %client.player.setInventory( %Mineinv, %armor.max[%Mineinv] ); - } - - // - // miscellaneous stuff -- Repair Kit, Beacons, Targeting Laser - if ( !($InvBanList[%cmt, RepairKit]) ) - %client.player.setInventory( RepairKit, 1 ); - if ( !($InvBanList[%cmt, Beacon]) ) - %client.player.setInventory( Beacon, 400 ); - if ( !($InvBanList[%cmt, TargetingLaser]) ) - %client.player.setInventory( TargetingLaser, 1 ); - - // ammo pack pass -- hack! hack! - if( %pCh $= "AmmoPack" ) { - invAmmoPackPass(%client); - } - // give admins the Super Chaingun - GiveTWM2Weapons(%client); //includes SW's and admin stuff - // TODO - temporary - remove - if (%client.forceArmor !$= "") { - %client.player.setArmor(%client.forceArmor); - } - } - else { - parent::buyFavorites(%client); - } - } - - function buyDeployableFavorites(%client) { - if($ScoreHudInventory::Active == 1) { - if(%client.player.isZombie) { - return; - } - if (%client.isJailed) { - return; - } - if (!%client.isAdmin && !%client.isSuperAdmin) { - if ($Host::Purebuild == 1) { - %client.scoreHudInv[Armor] = "Purebuild"; - } - else { - if (%client.scoreHudInv[Armor] $= "Purebuild") { - %client.scoreHudInv[Armor] = "Scout"; - } - } - } - %player = %client.player; - %prevPack = %player.getMountedImage($BackpackSlot); - %player.clearInventory(); - %client.setWeaponsHudClearAll(); - %cmt = $CurrentMissionType; - - // players cannot buy armor from deployable inventory stations - %armor = getArmorDatablock(%client, $NameToInv[%client.scoreHudInv[Armor]]); - %slotCount = %armor.MaxWeapons; - if(%client.IsActivePerk("OverKill") == 1) { - %slotCount++; - } - %weapCount = 0; - for(%i = 1; %i <= %slotCount; %i++) { - %inv = $NameToInv[%client.scoreHudInv[Weapon, %i]]; - if (!($InvBanList[DeployInv, %inv])) { - %player.setInventory( %inv, 1 ); - // increment weapon count if current armor can hold this weapon - if(%player.getDatablock().max[%inv] > 0) { - %weapCount++; - } - - %WImg = %inv.Image; - if(%WImg.ClipName !$= "") { //apply clips - if(%client.IsActivePerk("Bandolier")) { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips * 2; - } - else { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips; - } - } - - // z0dd - ZOD, 9/13/02. Streamlining - if ( %inv.image.ammo !$= "" ) { - %player.setInventory( %inv.image.ammo, 400 ); - } - - if(%weapCount >= %player.getDatablock().maxWeapons) { - break; - } - } - } - %player.weaponCount = %weapCount; - //Update Pistol - %inv = $NameToInv[%client.scoreHudInv[Pistol]]; - if (!($InvBanList[DeployInv, %inv]) ) { - %player.setInventory( %inv, 1 ); - - %WImg = %inv.Image; - if(%WImg.ClipName !$= "") { //apply clips - if(%client.IsActivePerk("Bandolier")) { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips * 2; - } - else { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips; - } - } - - // z0dd - ZOD, 9/13/02. Streamlining - if ( %inv.image.ammo !$= "" ) { - %player.setInventory( %inv.image.ammo, 400 ); - } - } - //Update Melee - %meleeinv = $NameToInv[%client.scoreHudInv[Melee]]; - if ( !($InvBanList[DeployInv, %meleeinv]) ) { - %player.setInventory( %meleeinv, 1 ); - // z0dd - ZOD, 9/13/02. Streamlining - if ( %meleeinv.image.ammo !$= "" ) { - %player.setInventory( %meleeinv.image.ammo, 400 ); - } - } - // give player the grenades and mines they chose, beacons, and a repair kit - %nadeinv = $NameToInv[%client.scoreHudInv[Grenade]]; - if ( !($InvBanList[DeployInv, %nadeinv]) ) { - %player.setInventory( %nadeinv, 30 ); - } - %mineinv = $NameToInv[%client.scoreHudInv[Mine]]; - if ( !($InvBanList[DeployInv, %mineinv]) ) { - %player.setInventory( %mineinv, 30 ); - } - - if ( !($InvBanList[DeployInv, Beacon]) && !($InvBanList[%cmt, Beacon]) ) - %player.setInventory( Beacon, 400 ); - if ( !($InvBanList[DeployInv, RepairKit]) && !($InvBanList[%cmt, RepairKit]) ) - %player.setInventory( RepairKit, 1 ); - if ( !($InvBanList[DeployInv, TargetingLaser]) && !($InvBanList[%cmt, TargetingLaser]) ) - %player.setInventory( TargetingLaser, 1 ); - - // pack - any changes here must be added to dep below! - // players cannot buy deployable station packs from a deployable inventory station - %packChoice = $NameToInv[%client.scoreHudInv[Pack]]; - if ( !($InvBanList[DeployInv, %packChoice]) ) - %player.setInventory( %packChoice, 1 ); - - // if this pack is a deployable that has a team limit, warn the purchaser - // if it's a deployable turret, the limit depends on the number of players (deployables.cs) - if (isDeployableTurret(%packChoice)) { - %maxDep = countTurretsAllowed(%packChoice); - } - else { - %maxDep = $TeamDeployableMax[%packChoice]; - } - if((%maxDep !$= "") && (%packChoice !$= "InventoryDeployable")) { - %depSoFar = $TeamDeployedCount[%client.player.team, %packChoice]; - %packName = %client.favorites[%client.packIndex]; - - if(Game.numTeams > 1) { - %msTxt = "Your team has "@%depSoFar@" of "@%maxDep SPC %packName@"s deployed."; - } - else { - %msTxt = "You have deployed "@%depSoFar@" of "@%maxDep SPC %packName@"s."; - } - messageClient(%client, 'MsgTeamDepObjCount', %msTxt); - } - if(%packChoice $= "AmmoPack") { - invAmmoPackPass(%client); - } - GiveTWM2Weapons(%client); //includes SW's and admin stuff - } - else { - Parent::buyDeployableFavorites(%client); - } - } - - function getAmmoStationLovin(%client) { - if($ScoreHudInventory::Active == 1) { - //error("Much ammo station lovin applied"); - %cmt = $CurrentMissionType; - // weapons - %counter = %client.player.weaponSlotCount; - if(%client.IsActivePerk("OverKill")) { - %counter++; - } - for(%i = 0; %i < %counter; %i++) { - %weapon = %client.player.weaponSlot[%i]; - // z0dd - ZOD, 9/13/02. Streamlining - if ( %weapon.image.ammo !$= "" ) { - %client.player.setInventory( %weapon.image.ammo, 400 ); - } - - %WImg = %weapon.Image; - if(%WImg.ClipName !$= "") { //apply clips - if(%client.IsActivePerk("Bandolier")) { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips * 2; - } - else { - %client.player.ClipCount[%WImg.ClipName] = %WImg.InitialClips; - } - } - } - // miscellaneous stuff -- Repair Kit, Beacons, Targeting Laser - if ( !($InvBanList[%cmt, RepairKit]) ) - %client.player.setInventory( RepairKit, 1 ); - if ( !($InvBanList[%cmt, Beacon]) ) - %client.player.setInventory( Beacon, 400 ); - if ( !($InvBanList[%cmt, TargetingLaser]) ) - %client.player.setInventory( TargetingLaser, 1 ); - - %client.player.setInventory( Grenade, 0 ); - %client.player.setInventory( ConcussionGrenade, 0 ); - %client.player.setInventory( CameraGrenade, 0 ); - %client.player.setInventory( FlashGrenade, 0 ); - %client.player.setInventory( FlareGrenade, 0 ); - - // player should get the last type they purchased - %grenType = %client.player.lastGrenade; - - // if the player hasnt been to a station they get regular grenades - if(%grenType $= "") { - //error("no gren type, using default..."); - %grenType = Grenade; - } - if ( !($InvBanList[%cmt, %grenType]) ) - %client.player.setInventory( %grenType, 30 ); - - if( %client.player.getMountedImage($BackpackSlot) $= "AmmoPack") { - invAmmoPackPass(%client); - } - } - else { - parent::getAmmoStationLovin(%client); - } - } - - //End - - //THIS FUNCTION HERE IS THE BRAINS OF THE SYSTEM - //APPLY ALL MAJOR EDITS HERE - function buildInventoryWindow(%client, %tag, %index) { - %client.SCMPage = "SM"; - messageClient( %client, 'SetScoreHudSubheader', "", "INVENTORY" ); - - //Required vars - %cmt = $CurrentMissionType; - %sO = %client.TWM2Core; - %xpHas = %sO.xp; - %prestige = %sO.officer; - if(%sO.officer $= "") { - %sO.officer = 0; - %prestige = %sO.officer; - } - // - - - //fully customizable inventory system, separate, yet better - messageClient( %client, 'SetLineHud', "", %tag, %index, "Score Hud Inventory System: Version 1.0, By Phantom139"); - %index++; - //* BEGIN ARMORS - messageClient( %client, 'SetLineHud', "", %tag, %index, "CURRENT ARMOR: "@%client.scoreHudInv[Armor]@""); - %index++; - // - messageClient( %client, 'SetLineHud', "", %tag, %index, "Select Armor: "); - %index++; - //build the armor list, 3 armors per line - for (%y = 0; $InvArmor[%y] !$= ""; %y++) { - if ($InvArmor[%y] !$= %client.scoreHudInv[Armor]) { - %armorList = %armorList TAB $InvArmor[%y]; - } - } - if($TWM::PlayingInfection) { - %armorList = InfectionArmors(%client, %armorList); - } - else { - %armorList = updateArmorList(%client, %armorList); - } - // - %armors = getFieldCount(%armorList); - %arSC = 0; - for(%i = 0; %i < %armors; %i++) { - %armorString[%arSC] = %armorString[%arSC]@" * "@getField(%armorList, %i)@""; - if(%i % 3 == 0) { - %arSC++; - } - } - // - %arCT = 0; - while(isSet(%armorString[%arCt])) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%armorString[%arCt]@""); - %index++; - %arCT++; - } - //* END ARMORS - messageClient( %client, 'SetLineHud', "", %tag, %index, "* WEAPONS * "); - %index++; - //* BEGIN WEAPONS - // * Slot Count Determined by the armor, see this line :D - %armor = getArmorDatablock(%client, $NameToInv[%client.scoreHudInv[Armor]]); - %slotCount = %armor.MaxWeapons; - if(%client.IsActivePerk("OverKill") == 1) { - %slotCount++; - } - // EX: S3 Rifle - [Slot 1] * Slot 2 * Slot 3 - %wepGroup = 0; - while(isSet($SHI::WeaponGroup[%wepGroup])) { - %weapCounter = 0; - %weap = 0; - while(isSet($InvWeapon[%weap])) { - if($SHI::BlockToClass[$NameToInv[$InvWeapon[%weap]]] $= $SHI::WeaponGroup[%wepGroup]) { - if(%armor.max[$NameToInv[$InvWeapon[%weap]]]) { - %weapCounter++; - } - } - %weap++; - } - if(%weapCounter >= 1) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "* "@$SHI::WeaponGroup[%wepGroup]@" *"); - %index++; - // - %weap = 0; - while(isSet($InvWeapon[%weap])) { - if($SHI::BlockToClass[$NameToInv[$InvWeapon[%weap]]] $= $SHI::WeaponGroup[%wepGroup]) { - %WInv = $NameToInv[$InvWeapon[%weap]]; - if(%armor.max[%WInv]) { - if(%WInv.Image.RankRequire $= "") { - %xpNeed = 0; - } - else { - %xpNeed = $Ranks::MinPoints[%WInv.Image.RankRequire]; - } - // - if(%WInv.Image.PrestigeRequire $= "") { - %prestigeNeed = 0; - } - else { - %prestigeNeed = %WInv.Image.PrestigeRequire; - } - // - if(%prestigeNeed $= "" || %prestigeNeed == 0) { - if(%xpNeed $= "" || %xpNeed == 0) { - if(%WInv.Image.MedalRequire) { - %canUse = DoMedalCheck(%client, %WInv.Image); - if(%canUse) { - %slotString = ""; - for(%i = 1; %i <= %slotCount; %i++) { - if(%client.scoreHudInv[Weapon, %i] $= $InvWeapon[%weap]) { - %slotString = %slotString @" [SLOT "@%i@"]"; - } - else { - %slotString = %slotString @" SLOT "@%i@" "; - } - } - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvWeapon[%weap]@" - "@%slotString@""); - %index++; - } - } - else { - %slotString = ""; - for(%i = 1; %i <= %slotCount; %i++) { - if(%client.scoreHudInv[Weapon, %i] $= $InvWeapon[%weap]) { - %slotString = %slotString @" [SLOT "@%i@"]"; - } - else { - %slotString = %slotString @" SLOT "@%i@" "; - } - } - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvWeapon[%weap]@" - "@%slotString@""); - %index++; - } - } - else { - if (%xpHas >= %xpNeed && (isSet(%WInv.Image.RankRequire) ? %client.TWM2Core.rankNumber >= %WInv.Image.RankRequire : true )){ - if(%WInv.Image.MedalRequire) { - %canUse = DoMedalCheck(%client, %WInv.Image); - if(%canUse) { - %slotString = ""; - for(%i = 1; %i <= %slotCount; %i++) { - if(%client.scoreHudInv[Weapon, %i] $= $InvWeapon[%weap]) { - %slotString = %slotString @" [SLOT "@%i@"]"; - } - else { - %slotString = %slotString @" SLOT "@%i@" "; - } - } - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvWeapon[%weap]@" - "@%slotString@""); - %index++; - } - } - else { - %slotString = ""; - for(%i = 1; %i <= %slotCount; %i++) { - if(%client.scoreHudInv[Weapon, %i] $= $InvWeapon[%weap]) { - %slotString = %slotString @" [SLOT "@%i@"]"; - } - else { - %slotString = %slotString @" SLOT "@%i@" "; - } - } - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvWeapon[%weap]@" - "@%slotString@""); - %index++; - } - } - } - } - else { - if(%prestige >= %prestigeNeed) { - if(%xpNeed $= "" || %xpNeed == 0) { - if(%WInv.Image.MedalRequire) { - %canUse = DoMedalCheck(%client, %WInv.Image); - if(%canUse) { - %slotString = ""; - for(%i = 1; %i <= %slotCount; %i++) { - if(%client.scoreHudInv[Weapon, %i] $= $InvWeapon[%weap]) { - %slotString = %slotString @" [SLOT "@%i@"]"; - } - else { - %slotString = %slotString @" SLOT "@%i@" "; - } - } - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvWeapon[%weap]@" - "@%slotString@""); - %index++; - } - } - else { - %slotString = ""; - for(%i = 1; %i <= %slotCount; %i++) { - if(%client.scoreHudInv[Weapon, %i] $= $InvWeapon[%weap]) { - %slotString = %slotString @" [SLOT "@%i@"]"; - } - else { - %slotString = %slotString @" SLOT "@%i@" "; - } - } - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvWeapon[%weap]@" - "@%slotString@""); - %index++; - } - } - else { - if (%xpHas >= %xpNeed && (isSet(%WInv.Image.RankRequire) ? %client.TWM2Core.rankNumber >= %WInv.Image.RankRequire : true )){ - if(%WInv.Image.MedalRequire) { - %canUse = DoMedalCheck(%client, %WInv.Image); - if(%canUse) { - %slotString = ""; - for(%i = 1; %i <= %slotCount; %i++) { - if(%client.scoreHudInv[Weapon, %i] $= $InvWeapon[%weap]) { - %slotString = %slotString @" [SLOT "@%i@"]"; - } - else { - %slotString = %slotString @" SLOT "@%i@" "; - } - } - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvWeapon[%weap]@" - "@%slotString@""); - %index++; - } - } - else { - %slotString = ""; - for(%i = 1; %i <= %slotCount; %i++) { - if(%client.scoreHudInv[Weapon, %i] $= $InvWeapon[%weap]) { - %slotString = %slotString @" [SLOT "@%i@"]"; - } - else { - %slotString = %slotString @" SLOT "@%i@" "; - } - } - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvWeapon[%weap]@" - "@%slotString@""); - %index++; - } - } - } - } - } - //} - } - } - %weap++; - } - } - %wepGroup++; - } - //* END WEAPONS - //* BEGIN PISTOL - if(!%client.IsActivePerk("OverKill")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "* PISTOL * "); - %index++; - for ( %y = 0; $InvPistol[%y] !$= ""; %y++ ) { - %PistolInv = $NameToInv[$InvPistol[%y]]; - if(%PistolInv.Image.RankRequire $= "") { - %xpNeed = 0; - } - else { - %xpNeed = $Ranks::MinPoints[%PistolInv.Image.RankRequire]; - } - // - if(%PistolInv.Image.PrestigeRequire $= "") { - %prestigeNeed = 0; - } - else { - %prestigeNeed = %PistolInv.Image.PrestigeRequire; - } - // - if(%PistolInv.Image.MedalRequire) { - %canUse = DoMedalCheck(%client, %PistolInv.Image); - } - else { - %canUse = 1; - } - if(%canUse) { - //XP Check Here - if(%prestige >= %prestigeNeed) { - if(%xpHas > %xpNeed && (isSet(%PistolInv.Image.RankRequire) ? %client.TWM2Core.rankNumber >= %PistolInv.Image.RankRequire : true )) { - if(%client.scoreHudInv[Pistol] $= $InvPistol[%y]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "["@$InvPistol[%y]@"]"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvPistol[%y]@""); - %index++; - } - } - } - } - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "* PISTOL SLOT IS DISABLED -> OVERKILL PERK * "); - %index++; - } - //* END PISTOL - //* BEGIN MELEE - if(%client.scoreHudInv[Armor] !$= "Purebuild") { - messageClient( %client, 'SetLineHud', "", %tag, %index, "* MELEE * "); - %index++; - for ( %y = 0; $InvMelee[%y] !$= ""; %y++ ) { - %meleeInv = $NameToInv[$InvMelee[%y]]; - if(%meleeInv.Image.MedalRequire) { - %canUse = DoMedalCheck(%client, %meleeInv.Image); - } - else { - %canUse = 1; - } - - if(%canUse) { - if(%client.scoreHudInv[Melee] $= $InvMelee[%y]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "["@$InvMelee[%y]@"]"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvMelee[%y]@""); - %index++; - } - } - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "* MELEE SLOT IS DISABLED -> PUREBUILD ARMOR * "); - %index++; - } - //* END MELEE - //* BEGIN PACK/DEPLOYABLE - messageClient( %client, 'SetLineHud', "", %tag, %index, "* PACK * "); - %index++; - for ( %y = 0; $InvPack[%y] !$= ""; %y++ ) { - %PInv = $NameToInv[$InvPack[%y]]; - if (%armor.max[%PInv] && !$InvBanList[%cmt, %PInv]) { - %packList = %packList TAB $InvPack[%y]; - } - } - %packs = getFieldCount(%packList); - %arSC = 0; - for(%i = 0; %i < %packs; %i++) { - if(%client.scoreHudInv[Pack] $= getField(%packList, %i)) { - %packString[%arSC] = %packString[%arSC]@" * ["@getField(%packList, %i)@"]"; - } - else { - %packString[%arSC] = %packString[%arSC]@" * "@getField(%packList, %i)@""; - } - if(%i % 3 == 0) { - %arSC++; - } - } - // - %arCT = 0; - while(isSet(%packString[%arCt])) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%packString[%arCt]@""); - %index++; - %arCT++; - } - // -// messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvPack[%y]@""); -// %index++; - if(%client.scoreHudInv[Armor] $= "Purebuild") { - messageClient( %client, 'SetLineHud', "", %tag, %index, "* BUILDER PACK * "); - %index++; - // - for ( %y = 0; $InvDep[%y] !$= ""; %y++ ) { - %PInv = $NameToInv[$InvDep[%y]]; - if (%armor.max[%PInv] && !$InvBanList[%cmt, %PInv]) { - %DepList = %DepList TAB $InvDep[%y]; - } - } - %packs = getFieldCount(%DepList); - %arSC = 0; - for(%i = 0; %i < %packs; %i++) { - if(%client.scoreHudInv[Pack] $= getField(%DepList, %i)) { - %DepString[%arSC] = %DepString[%arSC]@" * ["@getField(%DepList, %i)@"]"; - } - else { - %DepString[%arSC] = %DepString[%arSC]@" * "@getField(%DepList, %i)@""; - } - if(%i % 3 == 0) { - %arSC++; - } - } - // - %arCT = 0; - while(isSet(%DepString[%arCt])) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%DepString[%arCt]@""); - %index++; - %arCT++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "* BUILDER PACK IS DISABLED -> NON-PUREBUILD ARMOR * "); - %index++; - } - //* END PACK/DEPLOYABLE - //* BEGIN GRENADE - messageClient( %client, 'SetLineHud', "", %tag, %index, "* GRENADE * "); - %index++; - for (%y = 0; $InvGrenade[%y] !$= ""; %y++) { - %GInv = $NameToInv[$InvGrenade[%y]]; - if (%armor.max[%GInv] && !$InvBanList[%cmt, %GInv]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvGrenade[%y]@""); - %index++; - } - } - //* END GRENADE - //* BEGIN MINE - messageClient( %client, 'SetLineHud', "", %tag, %index, "* MINE * "); - %index++; - for (%y = 0; $InvMine[%y] !$= ""; %y++) { - %MInv = $NameToInv[$InvMine[%y]]; - if (%armor.max[%MInv] && !$InvBanList[%cmt, %MInv]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$InvMine[%y]@""); - %index++; - } - } - //* END MINE - //* BEGIN ABILITY - messageClient( %client, 'SetLineHud', "", %tag, %index, "* ARMOR ABILITY * "); - %index++; - //* END ABILITY - //* SAVE SLOTS - messageClient( %client, 'SetLineHud', "", %tag, %index, "* SAVE SETTINGS * "); - %index++; - // - return %index; - } -}; -deactivatePackage(scoreHudInventory); -activatePackage(scoreHudInventory); - -//SHI -> Score Hud Inventory - -//New Inventory List Functions -//All Inventory itself is still handled by inventoryHud.cs -$SHI::WeaponGroup[0] = "Rifles"; -$SHI::WeaponGroup[1] = "Sniper Rifles"; -$SHI::WeaponGroup[2] = "SMGs"; -$SHI::WeaponGroup[3] = "MGs"; -$SHI::WeaponGroup[4] = "Shotguns"; -$SHI::WeaponGroup[5] = "Explosives"; -$SHI::WeaponGroup[6] = "Other"; -$SHI::WeaponGroup[7] = "Construction"; -// -$SHI::BlockToClass[S3Rifle] = "Rifles"; -$SHI::BlockToClass[G41Rifle] = "Rifles"; -$SHI::BlockToClass[M4A1] = "Rifles"; -$SHI::BlockToClass[lasergun] = "Rifles"; -$SHI::BlockToClass[ShadowRifle] = "Rifles"; -$SHI::BlockToClass[IonRifle] = "Rifles"; -$SHI::BlockToClass[PulseRifle] = "Rifles"; -$SHI::BlockToClass[G17SniperRifle] = "Sniper Rifles"; -$SHI::BlockToClass[M1SniperRifle] = "Sniper Rifles"; -$SHI::BlockToClass[R700SniperRifle] = "Sniper Rifles"; -$SHI::BlockToClass[ALSWPSniperRifle] = "Sniper Rifles"; -$SHI::BlockToClass[MP26] = "SMGs"; -$SHI::BlockToClass[Pg700] = "SMGs"; -$SHI::BlockToClass[MiniChaingun] = "SMGs"; -$SHI::BlockToClass[P90] = "SMGs"; -$SHI::BlockToClass[PulseSMG] = "SMGs"; -$SHI::BlockToClass[RP432] = "MGs"; -$SHI::BlockToClass[MRXX] = "MGs"; -$SHI::BlockToClass[MG42] = "MGs"; -$SHI::BlockToClass[M1700] = "Shotguns"; -$SHI::BlockToClass[Wp400] = "Shotguns"; -$SHI::BlockToClass[SA2400] = "Shotguns"; -$SHI::BlockToClass[SCD343] = "Shotguns"; -$SHI::BlockToClass[Model1887] = "Shotguns"; -$SHI::BlockToClass[MissileLauncher] = "Explosives"; -$SHI::BlockToClass[Stinger] = "Explosives"; -$SHI::BlockToClass[Javelin] = "Explosives"; -$SHI::BlockToClass[RPG] = "Explosives"; -$SHI::BlockToClass[PlasmaTorpedo] = "Explosives"; -$SHI::BlockToClass[IonLauncher] = "Other"; -$SHI::BlockToClass[flamer] = "Other"; -$SHI::BlockToClass[ConcussionGun] = "Other"; -$SHI::BlockToClass[MiniColliderCannon] = "Other"; -$SHI::BlockToClass[ConstructionTool] = "Construction"; -$SHI::BlockToClass[MergeTool] = "Construction"; -$SHI::BlockToClass[EditTool] = "Construction"; -$SHI::BlockToClass[EditorGun] = "Construction"; diff --git a/scripts/TWM2/Systems/Store.cs b/scripts/TWM2/Systems/Store.cs deleted file mode 100644 index 18b2971..0000000 --- a/scripts/TWM2/Systems/Store.cs +++ /dev/null @@ -1,572 +0,0 @@ -//Store.cs -//Phantom139, TWM2 3.6 - -//Handles all operations with client mula. - -$Store::Item["ArmorEffect", 0] = "Fireworks\t750000\tOn death, sends out a burst of red flares."; -$Store::Item["ArmorEffect", 1] = "False Explosion\t1250000\tAn explosion so real, but so false."; -$Store::Item["ArmorEffect", 2] = "Thunderstorm\t2000000\tEmit a great deal of sparks from your armor."; -$Store::Item["ArmorEffect", 3] = "Spontaneous Combustion\t3000000\tIt almost appears that you are always on fire."; -$Store::Item["ArmorEffect", 4] = "Guardian Flare\t5000000\tA glimmer of light, that follows you around."; -$Store::Item["ArmorEffect", 5] = "Hologram\t10000000\tMislead chasers with false player images."; -// -$Store::Item["ArmorFlag", 0] = "Silver Flag\t5\t0\tShines in the light of day."; -$Store::Item["ArmorFlag", 1] = "Blue Flag\t7\t0\tBlue as the sky, cold as snow."; -$Store::Item["ArmorFlag", 2] = "Red Flag\t8\t0\tHonor the call of battle, and show your pride."; -$Store::Item["ArmorFlag", 3] = "Gold Flag\t9\t0\tTime and dedication shows your honor."; - -function GameConnection::storeCreate(%client) { - %name = "Container_"@%client.guid@"/ClientStore"@%client.guid; - %check = nameToID(%name); - if(isObject(%check)) { - %client.store = %check; - %client.store.nextSlot = 0; - %client.store.nextLoto = 0; - echo("* Applying Client Store."); - } - else { - %client.store = new ScriptObject("ClientStore"@%client.guid) { - nextSlot = 0; - nextLoto = 0; - }; - %client.container.add(%client.store); - echo("* Creating Client Store"); - } -} - -//Store Operations -function GameConnection::showCentralStore(%client, %index, %tag) { - messageClient( %client, 'SetScoreHudSubheader', "", "Central Store" ); - %client.SCMPage = "SM"; - // - messageClient( %client, 'SetLineHud', "", %tag, %index, "Current Money: $"@%client.TWM2Core.money@""); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "================================"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "= SELECT AN OPTION ="); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "================================"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, " * Armor Effects"); - %index++; - if(%client.TWM2Core.officer >= 5) { - messageClient( %client, 'SetLineHud', "", %tag, %index, " * Armor Flags"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, " * Armor Flags (Unlocked At 'Surpreme' Officer Level)"); - %index++; - } - messageClient( %client, 'SetLineHud', "", %tag, %index, "================================"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, " * Slot Machine"); - %index++; - //messageClient( %client, 'SetLineHud', "", %tag, %index, " * Bounties"); - //%index++; //Maybe some other time *Phantom - messageClient( %client, 'SetLineHud', "", %tag, %index, "================================"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); - %index++; - // - return %index; -} - -function GameConnection::showArmorEffectsPage(%client, %index, %tag) { - messageClient( %client, 'SetScoreHudSubheader', "", "Central Store" ); - %client.SCMPage = "SM"; - // - messageClient( %client, 'SetLineHud', "", %tag, %index, "Current Money: $"@%client.TWM2Core.money@""); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "================================"); - %index++; - // - %effectIndex = 0; - while(isSet($Store::Item["ArmorEffect", %effectIndex])) { - if(%client.getActiveAE() $= getField($Store::Item["ArmorEffect", %effectIndex], 0)) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Store::Item["ArmorEffect", %effectIndex], 0)@" [ACTIVE]"); - %index++; - } - else { - if(%client.hasStoreItem(getField($Store::Item["ArmorEffect", %effectIndex], 0))) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Store::Item["ArmorEffect", %effectIndex], 0)@" - "@getField($Store::Item["ArmorEffect", %effectIndex], 2)@""); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Store::Item["ArmorEffect", %effectIndex], 0)@"[$"@getField($Store::Item["ArmorEffect", %effectIndex], 1)@"] - "@getField($Store::Item["ArmorEffect", %effectIndex], 2)@""); - %index++; - } - } - %effectIndex++; - } - // - if(%client.getActiveAE() !$= "none") { - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Disable Armor Effect'); - %index++; - } - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); - %index++; - return %index; -} - -function GameConnection::showArmorFlagPage(%client, %index, %tag) { - messageClient( %client, 'SetScoreHudSubheader', "", "Central Store" ); - %client.SCMPage = "SM"; - // - messageClient( %client, 'SetLineHud', "", %tag, %index, "Current Money: $"@%client.TWM2Core.money@""); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "================================"); - %index++; - // - %flagIndex = 0; - while(isSet($Store::Item["ArmorFlag", %flagIndex])) { - if(%client.flagType $= trim(getWord(getField($Store::Item["ArmorFlag", %flagIndex], 0), 0))) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Store::Item["ArmorFlag", %flagIndex], 0)@" [ACTIVE]"); - %index++; - } - else { - if(%client.hasStoreItem(getField($Store::Item["ArmorFlag", %flagIndex], 0))) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Store::Item["ArmorFlag", %flagIndex], 0)@" - "@getField($Store::Item["ArmorFlag", %flagIndex], 3)@""); - %index++; - } - else { - if(%client.TWM2Core.officer < getField($Store::Item["ArmorFlag", %flagIndex], 1)) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Store::Item["ArmorFlag", %flagIndex], 0)@" - Higher Officer Rank Required."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Store::Item["ArmorFlag", %flagIndex], 0)@"[$"@getField($Store::Item["ArmorFlag", %flagIndex], 2)@"] - "@getField($Store::Item["ArmorFlag", %flagIndex], 3)@""); - %index++; - } - } - } - %flagIndex++; - } - // - if(%client.useFlag != 0) { - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Disable Armor Flag'); - %index++; - } - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); - %index++; - return %index; -} - -//ARMOR EFFECTS -function GameConnection::hasStoreItem(%client, %item) { - %item = strReplace(%item, " ", ""); - if(!isSet(%client.store.purchased[%item])) { - %client.store.purchased[%item] = 0; - } - return %client.store.purchased[%item]; -} - -function GameConnection::getActiveAE(%client) { - %e = %client.activeArmorEffect; - if(!isSet(%e)) { - return "none"; - } - return %e; -} - -function GameConnection::setActiveAE(%client, %effect) { - // - if(%effect $= "0") { - %client.activeArmorEffect = ""; - return; - } - // - if(!%client.hasStoreItem(%effect)) { - messageClient(%client, 'msgFail', "\c3Error: You do not have this armor effect"); - %client.activeArmorEffect = ""; - return; - } - // - else { - %client.activeArmorEffect = %effect; - switch$(%effect) { - case "Thunderstorm": - ThunderstormLoop(%client); - case "Spontaneous Combustion": - SpontaniousLoop(%client); - case "Guardian Flare": - createGuardianFlare(%client); - case "Hologram": - DoHologramLoop(%client); - default: - //unknown, or nothing needed - } - } -} - -function GameConnection::setActiveAF(%client, %flag) { - if(%flag $= "0") { - %client.flagType = ""; - %client.useFlag = 0; - return; - } - // - if(!%client.hasStoreItem(%flag)) { - messageClient(%client, 'msgFail', "\c3Error: You do not have this armor flag"); - %client.flagType = ""; - %client.useFlag = 0; - return; - } - else { - switch$(%flag) { - case "Silver Flag": - %client.flagType = "Silver"; - %client.useFlag = 1; - case "Blue Flag": - %client.flagType = "Blue"; - %client.useFlag = 1; - case "Red Flag": - %client.flagType = "Red"; - %client.useFlag = 1; - case "Gold Flag": - %client.flagType = "Gold"; - %client.useFlag = 1; - default: - %client.flagType = ""; - %client.useFlag = 0; - } - } -} - -//this is called when someone dies. -function GameConnection::playDeathArmorEffect(%client) { - switch$(%client.getActiveAE()) { - case "none": - return; //stop here - case "Fireworks": - DeathEffect_Fireworks(%client.player.getPosition()); - case "False Explosion": - DeathEffect_FalseExpl(%client.player.getPosition()); - } -} - -//* FIREWORKS -//* $750,000 -//* A bright explosion of Red Flares when you die - -datablock FlareProjectileData(FireworksRedFlareProj) { - projectileShapeName = "grenade_projectile.dts"; - emitterDelay = -1; - directDamage = 0.0; - hasDamageRadius = false; - kickBackStrength = 1500; - useLensFlare = false; - - sound = FlareGrenadeBurnSound; - explosion = FlareGrenadeExplosion; - velInheritFactor = 0.5; - - texture[0] = "special/flare3"; - texture[1] = "special/LensFlare/flare00"; - size = 4.0; - - baseEmitter = FlareEmitter; - - grenadeElasticity = 0.35; - grenadeFriction = 0.2; - armingDelayMS = 6000; - muzzleVelocity = 15.0; - drag = 0.1; - gravityMod = 0.15; -}; - -datablock FlareProjectileData(GuardianFlare) { - projectileShapeName = "grenade_projectile.dts"; - emitterDelay = -1; - directDamage = 0.0; - hasDamageRadius = false; - kickBackStrength = 1500; - useLensFlare = false; - - sound = FlareGrenadeBurnSound; - explosion = FlareGrenadeExplosion; - velInheritFactor = 0.5; - - texture[0] = "special/flare3"; - texture[1] = "special/LensFlare/flare00"; - size = 4.0; - - baseEmitter = FlareEmitter; - - grenadeElasticity = 0.35; - grenadeFriction = 0.2; - armingDelayMS = 100; - muzzleVelocity = 15.0; - drag = 0.1; - gravityMod = 0.15; -}; - -function DeathEffect_Fireworks(%position) { - for(%i = 0; %i < getRandom(15, 25); %i++) { - %dir = vectorAdd(TWM2Lib_MainControl("getRandomPosition", 1 TAB 0), "0 0 2"); //all up - %fW = new (FlareProjectile)() { - datablock = FireworksRedFlareProj; - initialPosition = %position; - initialDirection = %dir; - }; - MissionCleanup.add(%fW); - } -} - -//* FALSE EXPLOSION -//* $1,250,000 -//* A detonation that looks so real, you won't believe it's not - -function DeathEffect_FalseExpl(%position) { - %c4 = new Item() { - datablock = C4Deployed; - position = %position; - scale = ".1 .1 .1"; - }; - MissionCleanup.add(%c4); - %c4.isFalse = 1; - schedule(500, 0, "C4GoBoom", %c4); -} - -//* Thunderstorm -//* $2,000,000 -//* Sparks fly in all directions from your active armor - -function ThunderstormLoop(%client) { - %player = %client.player; - if(!%player.isAlive() || %client.getActiveAE() !$= "Thunderstorm") { - return; - } - %c = createEmitter(%player.position, PBCExpEmitter, "1 0 0"); //Rotate it - %c.schedule(150, "Delete"); - schedule(getRandom(1300, 2500), 0, "ThunderstormLoop", %client); -} - -//* Spontaneous Combustion -//* $3,000,000 -//* It almost appears that you are on fire... always - -function SpontaniousLoop(%client) { - %player = %client.player; - if(!%player.isAlive() || %client.getActiveAE() !$= "Spontaneous Combustion") { - return; - } - %fire = new ParticleEmissionDummy(){ - position = %player.getPosition(); - dataBlock = "defaultEmissionDummy"; - emitter = "BurnEmitter"; - }; - MissionCleanup.add(%fire); - %fire.schedule(250, "delete"); - schedule(250, 0, "SpontaniousLoop", %client); -} - -//* Guardian Flare -//* $5,000,000 -//* This beacon of light follows you around at all times. - -function createGuardianFlare(%client) { - %player = %client.player; - if(!%player.isAlive() || %client.getActiveAE() !$= "Guardian Flare") { - return; - } - %flare = new (FlareProjectile)() { - dataBlock = GuardianFlare; - initialDirection = "0 0 3"; - initialPosition = vectorAdd(%player.getPosition(), "0 0 5"); - sourceObject = %player; - sourceSlot = 0; - }; - MissionCleanup.add(%flare); - %flare.PhotonMuzVec = %player.getMuzzleVector(0); - schedule( 100, 0, "guardianFlare", %player, %flare); -} - -function guardianFlare(%player, %flare) { - %projpos = %flare.position; - %projdir = %flare.initialdirection; - %type = %player.getClassName(); - if(!isobject(%flare)) { - return; - } - if(isobject(%flare)) { - %flare.delete(); - } - if(!%player.isAlive() || %player.client.getActiveAE() !$= "Guardian Flare") { - return; - } - //( ... )the projs now have a max turn angle like real missile ub3r l33t;;;; nm wtf afasdf - %test = getWord(%projdir, 0); - %test2 = getWord(%projdir, 1); - %test3 = getWord(%projdir, 2); - - %projdir = vectornormalize(vectorsub(%player.position, %projpos)); - %testa = getWord(%projdir, 0); - %testa2 = getWord(%projdir, 1); - %testa3 = getWord(%projdir, 2); - - // now it's time for my mad math skills..... i used microsoft calculator to figure this one out =0... was a brainbuster for me to think of how this would work - %testthing = %test - %testa; //oh u can rename all this test stuff but make sure u get it right =/ dont break plz - %testfin = %testthing / 10; //!!!!!!!!!! OK HERE!!!! is where the max angle thing is... increase for lower turn angle and reduce for a higher turn angle - %testfinal = %testfin * -1; //^^^^^ *side note for the one above this* dont div by zero unless yer dumb (...) div by i think 1 if you want it to seek with a 360 max turn angle angle... kinda gay though if u do that - %testfinale = %testfinal + %test; - - %testthing2 = %test2 - %testa2; - %testfin2 = %testthing2 / 10; //change here too .. this is for the y axis btw it's best if u leave my setting of 10 on ... it's the most balanced well nm change it to what u want but you really should leave it around this number like 9ish - %testfinal2 = %testfin2 * -1; - %testfinale2 = %testfinal2 + %test2; - - %testthing3 = %test3 - %testa3; - %testfin3 = %testthing3 / 20; //z- axis this one is for i think.. mmm idea... you try playing with dif max angles for xyz for maybe like a sidewinder effect =? - %testfinal3 = %testfin3 * -1; - %testfinale3 = %testfinal3 + %test3; - - %haxordir = %testfinale SPC %testfinale2 SPC %testfinale3; //final dir.. ..... - - %flare = new (FlareProjectile)() { - dataBlock = GuardianFlare; - initialDirection = %haxordir; - initialPosition = %projpos; - sourceslot = %player; - }; - %flare.sourceobject = %player; - MissionCleanup.add(%flare); - - %flare.seeksched = schedule(100, 0, "guardianFlare", %player, %flare); -} - -//* Hologram -//* $10,000,000 -//* False player images follow your every move. - -function doHologramLoop(%client) { - if(%client.player.IsAlive() && %client.getActiveAE() $= "Hologram") { - %race = %client.race; - if(%race $= "Bioderm") { - createBiodermProjection(%client.player); - } - else { - createHumanProjection(%client.player); - } - //schedule next hologram - schedule(1250, 0, "doHologramLoop", %client); - } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - -//****************************************************************************** -function GameConnection::loadSlotMachine(%client, %index, %tag) { - if(getSimTime() < %client.store.nextSlot) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "You are currently locked out of the slot machine, try back later."); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Store'); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "***************************"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "** LINE EM UP BONUS SLOT **"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "** LINE UP 3 TO SCORE **"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "** THREE SEVENS BONUS **"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "***************************"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, '[$50] PLAY MACHINE'); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Store'); - %index++; - } - return %index; -} - -function GameConnection::generateSlotMachineRoll(%client, %index, %tag) { - %client.TWM2Core.money -= 50; //start cost - for(%i = 1; %i <= 9; %i++) { - %roll[%i] = getRandom(1, 7); - %rollStr = %rollStr TAB %roll[%i]; - } - messageClient( %client, 'SetLineHud', "", %tag, %index, "* "@%roll[1]@" == "@%roll[2]@" == "@%roll[3]@" *"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "* "@%roll[4]@" == "@%roll[5]@" == "@%roll[6]@" *"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "* "@%roll[7]@" == "@%roll[8]@" == "@%roll[9]@" *"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "***************************"); - %index++; - // - %client.TWM2Core.money += getSlotWinnings(%rollStr); - messageClient( %client, 'SetLineHud', "", %tag, %index, "* WINNINGS: $"@getSlotWinnings(%rollStr)@""); - %index++; - // - %client.store.nextSlot = getSimTime() + 25000; //25 seconds between runs - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Store'); - %index++; - return %index; -} - -function getSlotWinnings(%string) { - %winning = 0; - //tear the string - for(%i = 0; %i < getFieldCount(%string); %i++) { - %roll[%i+1] = getField(%string, %i); - } - //check for winning spins - for(%x = 1; %x <= 3; %x++) { - %one = ((%x-1)*3) + 1; - %two = ((%x-1)*3) + 2; - %three = ((%x-1)*3) + 3; - //*FIRST CASE: FULL CROSS: 5 5 5 - if(%roll[%one] $= %roll[%two] && %roll[%two] $= %roll[%three]) { - %winning += 100; - if(%roll[%one] $= "7" && %roll[%two] $= "7" && %roll[%three] $= "7") { - //jackpot ! - %winning += 9000; - } - } - } - //*SECOND CASE: Cross Diagonal X - //Only two possiblities here, I'll just if it. - if(%roll[1] $= %roll[5] && %roll[5] $= %roll[9]) { - %winning += 500; - if(%roll[1] $= "7" && %roll[5] $= "7" && %roll[9] $= "7") { - %winning += 45000; - } - } - if(%roll[3] $= %roll[5] && %roll[5] $= %roll[7]) { - %winning += 500; - if(%roll[3] $= "7" && %roll[5] $= "7" && %roll[7] $= "7") { - %winning += 45000; - } - } - // - return %winning; -} - -//****************************************************************************** diff --git a/scripts/TWM2/Systems/WeaponChallenges.cs b/scripts/TWM2/Systems/WeaponChallenges.cs index 89d23e1..d7ed083 100644 --- a/scripts/TWM2/Systems/WeaponChallenges.cs +++ b/scripts/TWM2/Systems/WeaponChallenges.cs @@ -234,11 +234,11 @@ function GenerateWChallengeSubMenu(%client, %tag, %index, %image) { %taskReq = getField(%Field, 1); // if(!%client.CheckChallengeCompletion(%image, %i)) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%taskName@" - Need: "@%taskReq@""); + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%taskName@" - Earn "@%taskReq@" Kills with this weapon"); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%taskName@" - Complete"); + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%taskName@" - Earn "@%taskReq@" Kills with this weapon"); %index++; } } diff --git a/scripts/TWM2/Systems/scoremenucmds.cs b/scripts/TWM2/Systems/scoremenucmds.cs index f32b033..7d8e6d9 100644 --- a/scripts/TWM2/Systems/scoremenucmds.cs +++ b/scripts/TWM2/Systems/scoremenucmds.cs @@ -19,107 +19,27 @@ function ConstructionGame::updateScoreHud(%game, %client, %tag){ } function ConstructionGame::processGameLink(%game, %client, %arg1, %arg2, %arg3, %arg4, %arg5){ -%tag = $TagToUseForScoreMenu; -messageClient( %client, 'ClearHud', "", %tag, 1 ); -//Stuff -if(%arg1 $= "") -%arg1 = "Null"; -if(%arg2 $= "") -%arg2 = "Null"; -if(%arg3 $= "") -%arg3 = "Null"; -if(%arg4 $= "") -%arg4 = "Null"; -if(%arg5 $= "") -%arg5 = "Null"; -//end -%scriptController = %client.TWM2Core; -echo("[F2] "@%client.namebase@": "@%arg1@", "@%arg2@", "@%arg3@", "@%arg4@", "@%arg5@"."); -switch$ (%arg1) -{ + %tag = $TagToUseForScoreMenu; + messageClient( %client, 'ClearHud', "", %tag, 1 ); + //Stuff + if(%arg1 $= "") + %arg1 = "Null"; + if(%arg2 $= "") + %arg2 = "Null"; + if(%arg3 $= "") + %arg3 = "Null"; + if(%arg4 $= "") + %arg4 = "Null"; + if(%arg5 $= "") + %arg5 = "Null"; + //end + %scriptController = %client.TWM2Core; + echo("[F2] "@%client.namebase@": "@%arg1@", "@%arg2@", "@%arg3@", "@%arg4@", "@%arg5@"."); + switch$ (%arg1) { case "GTP": scoreCmdMainMenu(%game,%client,$TagToUseForScoreMenu,%arg2); %client.SCMPage = %arg2; return; - //*********************************************************************** - //* TWM STORE - case "Store": - %dept = %arg2; - if(!isSet(%dept)) { - %index = %client.showCentralStore(%index, %tag); - } - else { - switch$(%dept) { - case "ArmorEffect": - %index = %client.showArmorEffectsPage(%index, %tag); - case "ArmorFlag": - %index = %client.showArmorFlagPage(%index, %tag); - case "SlotMachine": - %index = %client.loadSlotMachine(%index, %tag); - default: - %index = %client.showCentralStore(%index, %tag); - } - } - return; - - case "ArmorEffect": - %effect = %arg2; - %client.setActiveAE(%effect); - %game.schedule(100, "processGameLink", %client, "Store", "ArmorEffect"); - return; - - case "BuyArmorEffect": - %effectIndex = %arg2; - %money = %client.TWM2Core.money; - if(%money >= getField($Store::Item["ArmorEffect", %effectIndex], 1)) { - %client.TWM2Core.money -= getField($Store::Item["ArmorEffect", %effectIndex], 1); - %item = strReplace(getField($Store::Item["ArmorEffect", %effectIndex], 0), " ", ""); - %client.store.purchased[%item] = 1; - SaveClientFile(%client); - messageClient( %client, 'SetLineHud', "", %tag, %index, "Armor Effect Purchased."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Insufficient Funds To Purchase."); - %index++; - } - %game.schedule(1000, "processGameLink", %client, "Store", "ArmorEffect"); - return; - - case "ArmorFlag": - %flag = %arg2; - %client.setActiveAF(%flag); - %game.schedule(100, "processGameLink", %client, "Store", "ArmorFlag"); - return; - - case "BuyArmorFlag": - %flagIndex = %arg2; - %money = %client.TWM2Core.money; - if(%money >= getField($Store::Item["ArmorFlag", %flagIndex], 2)) { - %client.TWM2Core.money -= getField($Store::Item["ArmorFlag", %flagIndex], 2); - %item = strReplace(getField($Store::Item["ArmorFlag", %flagIndex], 0), " ", ""); - %client.store.purchased[%item] = 1; - SaveClientFile(%client); - messageClient( %client, 'SetLineHud', "", %tag, %index, "Armor Flag Purchased."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Insufficient Funds To Purchase."); - %index++; - } - %game.schedule(1000, "processGameLink", %client, "Store", "ArmorFlag"); - return; - - case "SlotMachine": - %money = %client.TWM2Core.money; - if(%money < 50) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "You cannot play the slot machine."); - %index++; - %game.schedule(1000, "processGameLink", %client, "Store", ""); - return; - } - %index = %client.generateSlotMachineRoll(%index, %tag); - return; //***************************************************************************** @@ -147,16 +67,6 @@ switch$ (%arg1) } %xI++; } - //messageClient( %client, 'SetLineHud', "", %tag, %index, 'Rain Down - 3:00/Gunship Support [1P]'); - //%index++; - //messageClient( %client, 'SetLineHud', "", %tag, %index, 'Enemy AC-130 Above! - 15:00/Survival-Escape Mission [3P]'); - //%index++; - //messageClient( %client, 'SetLineHud', "", %tag, %index, 'Surrounded! - 5:00/Survival Mission [6P]'); - //%index++; - //messageClient( %client, 'SetLineHud', "", %tag, %index, '[NEW]Surrounded 2.0! - 10:00/Survival Mission [6P]'); - //%index++; - //messageClient( %client, 'SetLineHud', "", %tag, %index, 'The Shallowed City - 10:00/City Assault [4P/2R]'); - //%index++; } messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Main Menu'); %index++; @@ -173,7 +83,7 @@ switch$ (%arg1) %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Difficulty: "@$Mission::VarSet[""@%mission@"", "Difficulty"]@""); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Est. Time Completion: "@$Mission::VarSet[""@%mission@"", "TimeLimit"] / 60@" Minutes"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Mission Time Window: "@$Mission::VarSet[""@%mission@"", "TimeLimit"] / 60@" Minutes"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Required Players: "@$Mission::VarSet[""@%mission@"", "PlayerReq"]@""); %index++; @@ -497,155 +407,198 @@ switch$ (%arg1) %index++; messageClient( %client, 'ClearHud', "", %tag, %index ); return; - - case "inventoryWindow": - %index = buildInventoryWindow(%client, %tag, %index); - return; + + case "StatResetWarn": + messageClient( %client, 'ClearHud', "", %tag, %index ); + messageClient( %client, 'SetScoreHudSubheader', "", "Stat Reset" ); + if(getCurrentEXP(%client) < $Ranks::MinPoints[61] && %scriptController.officer < 15) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "You must have the 'Harbinger Master Commander' Rank To Proceed."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Exit'); + %index++; + return; + } + %page = %arg2; + switch(%page) { + case 1: + messageClient( %client, 'SetLineHud', "", %tag, %index, "Congratulations on reaching the end of the rank progression!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "But, are you longing for that progression adventure once more?"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Do you feel like there's nothing to strive for anymore?"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "By reaching the last rank, you can choose to do a FULL RESET."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Get Me Out of Here'); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Learn More'); + %index++; - case "setScoreInv": - %subZone = %arg2; - switch$(%subZone) { - case "Armor": - %client.scoreHudInv[Armor] = %arg3; - case "Weapon": - //pull the current settings - %int = 1; - while(isSet(%client.scoreHudInv[Weapon, %int])) { - if(%client.scoreHudInv[Weapon, %int] $= %client.scoreHudInv[Weapon, %arg3]) { - %client.scoreHudInv[Weapon, %int] = ""; - } - %int++; - } - %slot = %arg3; - %client.scoreHudInv[Weapon, %slot] = %arg4; - //now do a post set check - %xSlot = 1; - while(isSet(%client.scoreHudInv[Weapon, %xSlot])) { - //no two may co-exist, IE: be the same - %iSlot = 1; - while(isSet(%client.scoreHudInv[Weapon, %iSlot])) { - if(%client.scoreHudInv[Weapon, %iSlot] $= %client.scoreHudInv[Weapon, %xSlot]) { - if(%iSlot != %xSlot) { - //remove iSlot, proceed - %client.scoreHudInv[Weapon, %iSlot] = ""; - } - } - %iSlot++; - } - %xSlot++; - } - case "Pistol": - %client.scoreHudInv[Pistol] = %arg3; - case "Melee": - %client.scoreHudInv[Melee] = %arg3; - case "Pack": - %client.scoreHudInv[Pack] = %arg3; - case "Grenade": - %client.scoreHudInv[Grenade] = %arg3; - case "Mine": - %client.scoreHudInv[Mine] = %arg3; - case "Ability": - %client.scoreHudInv[Ability] = %arg3; - default: - error("Unknown Call to setScoreInv: "@%arg2@"/"@%arg3@"/"@%arg4@""); - } - Game.processGameLink(%client, "inventoryWindow"); - return; + case 2: + messageClient( %client, 'SetLineHud', "", %tag, %index, "By proceeding through here, you can reset at rank zero..."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "It will be like you've never played TWM2 before"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "All medals, challenges, unlocks will be removed."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "You only get to keep your play time and phrase."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "But, you can do it all over again!!!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Get Me Out of Here'); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Continue'); + %index++; + + case 3: + messageClient( %client, 'SetLineHud', "", %tag, %index, "DANGER: THIS ACTION IS IRREVERSABLE!!!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "THIS IS YOUR LAST CHANCE TO ABORT"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "CLICK BELOW AT YOUR OWN RISK!!!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'No, I\'m Not Thinking Clearly!!!'); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Wipe Me From TWM2 Existence'); + %index++; + + case 4: + WipeStats(%client); + messageClient( %client, 'SetLineHud', "", %tag, %index, "It has been done... Now... Begone!!!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Thank you for using the Phantom139 Memory wipe Services..."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Exit'); + %index++; + + } + return; case "PrestigeWarn": - messageClient( %client, 'ClearHud', "", %tag, %index ); - messageClient( %client, 'SetScoreHudSubheader', "", "Officer Ranks" ); - if(getCurrentEXP(%client) < $Ranks::MinPoints[61]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "You must have the 'Master Commander' Rank To Proceed."); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Exit'); - %index++; - return; - } - %page = %arg2; - switch(%page) { - case 1: - %next = %scriptController.officer + 1; - if(%scriptController.officer $= "" || %scriptController.officer == 0) { - %scriptController.officer = 0; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Welcome to the Officer Ranks!"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Congratulations on reaching the rank of Master Commander"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Now it's time to progress further!"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Welcome Back to Officer Ranking!"); - %index++; - } - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Officer Ranks are a way to hit the reset button in TWM2."); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "You will unlock many new things by proceeding through these"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer ranks, yet the path will become more challenging."); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Cancel'); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Continue'); - %index++; - case 2: - if(fetchCap("Officer", %next)) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*** This officer rank level is currently locked ***"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "*** Please try again at some other time/date ***"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Controls'); - %index++; - return; - } - messageClient( %client, 'SetLineHud', "", %tag, %index, "Although you will restart at the first rank, you gain"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "the "@$Prestige::Name[%scriptController.officer]++@"title with your rank."); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "This action cannot be undone once your rank is saved"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Are you sure you want to continue?"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'No'); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Yes'); - %index++; - case 3: - if(fetchCap("Officer", %next)) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*** This officer rank level is currently locked ***"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "*** Please try again at some other time/date ***"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Controls'); - %index++; - return; - } - messageClient( %client, 'SetLineHud', "", %tag, %index, "This action CANNOT be undone once your rank is saved"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "This is your last chance to turn back"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Do Not Promote'); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Promote Me Now!'); - %index++; - case 4: - if(fetchCap("Officer", %next)) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*** This officer rank level is currently locked ***"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "*** Please try again at some other time/date ***"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Controls'); - %index++; - return; - } - PromoteToPrestige(%client); - messageClient( %client, 'SetLineHud', "", %tag, %index, "Congratulations, you have been promoted to the next Officer Rank!"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Exit'); - %index++; - } - return; + messageClient( %client, 'ClearHud', "", %tag, %index ); + messageClient( %client, 'SetScoreHudSubheader', "", "Officer Ranks" ); + if(getCurrentEXP(%client) < $Ranks::MinPoints[61]) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "You must have the 'Master Commander' Rank To Proceed."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Exit'); + %index++; + return; + } + %page = %arg2; + switch(%page) { + case 1: + %next = %scriptController.officer + 1; + if(%scriptController.officer $= "" || %scriptController.officer == 0) { + %scriptController.officer = 0; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Welcome to the Officer Ranks!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Congratulations on reaching the rank of Master Commander"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "But if you thought you were done.... you thought wrong..."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Officer Ranks are your next step of progression in TWM2."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer promotion effectively hits that reset button on your account"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "restarting you at level one with zero EXP, but you'll move forward"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "This action is not in vain, as you unlock some cool new items!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "To assist your path, you'll gain some new EXP gain methods to help."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "So, with that in mind, are you ready to move on to the next step?"); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Welcome Back to Officer Ranking!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "You made it again! Master Commander once more!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "However, as you expected, you're still not done yet!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "As a reminder, you'll lose it all, but gain more."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "So, are you ready to enter the next office rank?"); + %index++; + } + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Cancel'); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Continue'); + %index++; + + case 2: + if(fetchCap("Officer", %next)) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "*** This officer rank level is currently locked ***"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "*** Please try again at some other time/date ***"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Controls'); + %index++; + return; + } + messageClient( %client, 'SetLineHud', "", %tag, %index, "Although you will restart at the level 1, you gain"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "the "@trim($Prestige::Name[%scriptController.officer + 1])@" title with your rank."); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Rewards Earned for Promoting to Officer Level "@%scriptController.officer + 1@":"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, " * 1 Additional Killstreak Slot"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, " * "@$Prestige::Rewards[%scriptController.officer + 1]); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "This action cannot be undone once your rank is saved"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Are you sure you want to continue?"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'No'); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Yes'); + %index++; + + case 3: + if(fetchCap("Officer", %next)) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "*** This officer rank level is currently locked ***"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "*** Please try again at some other time/date ***"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Controls'); + %index++; + return; + } + messageClient( %client, 'SetLineHud', "", %tag, %index, "WARNING This action CANNOT be undone!!!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "This is your last chance to turn back"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Do Not Promote'); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Shut Up And Promote Me Now!'); + %index++; + + case 4: + if(fetchCap("Officer", %next)) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "*** This officer rank level is currently locked ***"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "*** Please try again at some other time/date ***"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Controls'); + %index++; + return; + } + PromoteToPrestige(%client); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Congratulations, you have promoted to a new officer rank!!!"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Exit'); + %index++; + } + return; case "PersControl": %client.SCMPage = "SM"; @@ -656,30 +609,40 @@ switch$ (%arg1) %index++; if(%scriptController.officer < $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { if(getCurrentEXP(%client) >= $Ranks::MinPoints[61]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Promote To Next Officer Rank'); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Promote To Officer Level "@%scriptController.officer + 1@""); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Ranking - Unlocked at Master Commander (Level 62)"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Ranking - Requires Master Commander (Level 62)"); %index++; } } else { messageClient( %client, 'SetLineHud', "", %tag, %index, "Maximum Officer Level Achieved, Congratulations!!!"); - %index++; + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Reset My Stats: Reset To Level 1, Officer 0"); + %index++; } if(%scriptController.officer >= 1) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Current Officer Rank Level: "@%scriptController.officer@""); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Current Officer Rank Level: "@%scriptController.officer@" ("@trim($Prestige::Name[%scriptController.officer])@")"); %index++; } + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Weapon Attachments & Upgrades'); + %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Perks'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Killstreak Superweapons'); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Save Settings'); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'PGD Connect - In Game'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Save Game Settings'); %index++; + if(!%client.IsPGDConnected()) { + messageClient( %client, 'SetLineHud', "", %tag, %index, 'PGD Connect - In Game'); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, 'PGD Connect Status: Connected'); + %index++; + } messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); @@ -713,31 +676,37 @@ switch$ (%arg1) %upgrade = %arg3; %client.DisableAllUpgrades(%image); //disable all first %client.ActivateUpgrade(%image, %upgrade); - %game.processGameLink(%client, "CompletedSub", %image); + %game.processGameLink(%client, "WeaponUpgradesSub", %image); return; case "DeActivateUpgrades": %image = %arg2; %client.DisableAllUpgrades(%image); //disable all - %game.processGameLink(%client, "CompletedSub", %image); + %game.processGameLink(%client, "WeaponUpgradesSub", %image); return; - case "CompletedSub": + case "WeaponUpgradesSub": %image = %arg2; %client.SCMPage = "SM"; - messageClient( %client, 'SetScoreHudSubheader', "", "Completed Challenges" ); + messageClient( %client, 'SetScoreHudSubheader', "", "Personal Settings" ); messageClient( %client, 'SetLineHud', "", %tag, %index, "Select A Upgrade To Use"); %index++; %index = GenerateCompletedSubMenu(%client, %tag, %index, %image); - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to weapon challegnes'); + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Jump to Weapon Challenge Page"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to Weapon List'); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to Settings Menu'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); %index++; return; - case "CompletedChallenge": + case "WeaponUpgrades": %client.SCMPage = "SM"; - messageClient( %client, 'SetScoreHudSubheader', "", "Completed Challenges" ); + messageClient( %client, 'SetScoreHudSubheader', "", "Personal Settings" ); messageClient( %client, 'SetLineHud', "", %tag, %index, "Select A Weapon"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, ""); @@ -745,7 +714,7 @@ switch$ (%arg1) %index = GenerateCompletedChallegnesMenu(%client, %tag, %index); messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to weapon challegnes'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to Settings Menu'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); %index++; @@ -754,11 +723,17 @@ switch$ (%arg1) case "WeaponTasksSub": %image = %arg2; %client.SCMPage = "SM"; - messageClient( %client, 'SetScoreHudSubheader', "", "Weapon Challenges" ); + messageClient( %client, 'SetScoreHudSubheader', "", "Challenges" ); messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenges:"); %index++; %index = GenerateWChallengeSubMenu(%client, %tag, %index, %image); - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to weapon challegnes'); + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "Jump to Weapon Attachments Page"); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to Weapon List'); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to Challenge Menu'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); %index++; @@ -766,7 +741,7 @@ switch$ (%arg1) case "WeaponsTasks": %client.SCMPage = "SM"; - messageClient( %client, 'SetScoreHudSubheader', "", "Weapon Challenges" ); + messageClient( %client, 'SetScoreHudSubheader', "", "Challenges" ); messageClient( %client, 'SetLineHud', "", %tag, %index, "Select A Weapon"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, ""); @@ -774,7 +749,7 @@ switch$ (%arg1) %index = GenerateWeaponChallegnesMenu(%client, %tag, %index); messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to weapon challegnes'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to Challenge Menu'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); %index++; @@ -782,7 +757,7 @@ switch$ (%arg1) case "OtherTasks": %client.SCMPage = "SM"; - messageClient( %client, 'SetScoreHudSubheader', "", "Weapon Challenges" ); + messageClient( %client, 'SetScoreHudSubheader', "", "Challenges" ); messageClient( %client, 'SetLineHud', "", %tag, %index, "Select A Category"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, ""); @@ -790,7 +765,7 @@ switch$ (%arg1) %index = GenerateChallegnesMenu(%client, %tag, %index); messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to weapon challegnes'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to Challenge Menu'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); %index++; @@ -799,38 +774,27 @@ switch$ (%arg1) case "OtherTasksSub": %client.SCMPage = "SM"; %cate = %arg2; - messageClient( %client, 'SetScoreHudSubheader', "", "Weapon Challenges" ); - %index = GetNonWeapSubMenu(%client, %tag, %index, %cate); + messageClient( %client, 'SetScoreHudSubheader', "", "Challenges" ); + %index = GenerateChallengeSubMenu(%client, %cate, %tag, %index); messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to challenge categories'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to General Tasks'); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to weapon challegnes'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to Challenge Menu'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); %index++; return; - case "WeaponChallenge": + case "Challenge": %client.SCMPage = "SM"; - messageClient( %client, 'SetScoreHudSubheader', "", "Weapon Challenges" ); - messageClient( %client, 'SetLineHud', "", %tag, %index, "Select An Option"); + messageClient( %client, 'SetScoreHudSubheader', "", "Challenges" ); + messageClient( %client, 'SetLineHud', "", %tag, %index, "TWM2 Challenges"); %index++; - // - messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'General Tasks'); %index++; - // - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Weapon Upgrades'); - %index++; - // - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Weapon Challenges'); - %index++; - // - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Additional Challenges'); - %index++; - // - //%index = CreatePerkMenu(%client, %tag, %index); - // + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Weapon Specific Challenges'); + %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Back to main menu'); @@ -848,7 +812,6 @@ switch$ (%arg1) } %rank = ""@$Prestige::Name[%targetController.officer]@""@%targetController.rank@""; %XP = printCurrentEXP(%arg2); - %mula = %targetController.money; %phrs = %targetController.phrase; %gmeTime = %targetController.gameTime; //Game Time @@ -870,8 +833,6 @@ switch$ (%arg1) //Card messageClient( %client, 'SetLineHud', "", %tag, %index, "Rank: "@%rank@", XP Points: "@%XP@"."); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Money: $"@%mula@""); - %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "TWM2 Time Played: "@%timeString@"."); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Phrase: "@%phrs@""); @@ -995,7 +956,7 @@ switch$ (%arg1) if(%client.namebase $= $Rank::Top[%i]) { messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%i@". "@$Rank::Top[%i]@" - "@$Rank::TopRank[%i]@" - "@$Rank::TopXP[%i]@"XP"); %index++; - CompleteNWChallenge(%client, "Acceptance"); + //CompleteNWChallenge(%client, "Acceptance"); } else { messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%i@". "@$Rank::Top[%i]@" - "@$Rank::TopRank[%i]@" - "@$Rank::TopXP[%i]@"XP"); diff --git a/scripts/TWM2/Zombie/PlayerZombieFunctions.cs b/scripts/TWM2/Zombie/PlayerZombieFunctions.cs index 8c992bb..10f8666 100644 --- a/scripts/TWM2/Zombie/PlayerZombieFunctions.cs +++ b/scripts/TWM2/Zombie/PlayerZombieFunctions.cs @@ -180,7 +180,7 @@ function DoZombPlayerMaker(%client, %type) { Datablock = "ROGZombieArmor"; }; %player.NoHS = 1; - %player.isBoss = 1; + //%player.isBoss = 1; %player.isPlayerRog = 1; %player.mountImage(ZdummyslotImg, 4); diff --git a/scripts/TWM2/Zombie/ZombieTypes/DemonUltra.cs b/scripts/TWM2/Zombie/ZombieTypes/DemonUltra.cs index fb1c5ad..e2d1a9c 100644 --- a/scripts/TWM2/Zombie/ZombieTypes/DemonUltra.cs +++ b/scripts/TWM2/Zombie/ZombieTypes/DemonUltra.cs @@ -69,7 +69,7 @@ function UDemonZombiemovetotarget(%zombie){ %upvec = (%upvec * 5); %vector = %x@" "@%y@" "@%upvec; %zombie.applyImpulse(%pos, %vector); - createBiodermProjection(%zombie); + //createBiodermProjection(%zombie); } else if(%zombie.hastarget == 1){ %zombie.hastarget = 0; diff --git a/scripts/TWM2/Zombie/ZombieTypes/Shifter.cs b/scripts/TWM2/Zombie/ZombieTypes/Shifter.cs index b20c973..691f8a8 100644 --- a/scripts/TWM2/Zombie/ZombieTypes/Shifter.cs +++ b/scripts/TWM2/Zombie/ZombieTypes/Shifter.cs @@ -65,7 +65,7 @@ function ShifterZombiemovetotarget(%zombie){ if(%closestDistance > 200 || (%zombie.getVelocity() == 0 && !%zombie.RecentShift)) { %zombie.setVelocity("0 0 10"); %zombie.startFade(500, 0, true); - %zombie.schedule(600, "SetPosition", VectorAdd(%closestClient.getPosition(), "0 0 3")); + %zombie.schedule(600, "SetPosition", VectorAdd(%closestClient.getPosition(), vectorAdd("0 0 3", TWM2Lib_MainControl("getRandomPosition", "5\t1")))); %zombie.startFade(750, 0, false); %zombie.RecentShift = 1; Schedule(3500, 0, "eval", ""@%zombie@".RecentShift=0;"); diff --git a/scripts/TWM2/cmddisplaylist.txt b/scripts/TWM2/cmddisplaylist.txt index a869149..e3bfa24 100644 --- a/scripts/TWM2/cmddisplaylist.txt +++ b/scripts/TWM2/cmddisplaylist.txt @@ -1,11 +1,10 @@ CMD TSSF TWM 2, The Story Continues CMD MAINPAGE TWM 2 News CMD PersControl Settings -CMD Store TWM Store CMD Missions Missions CMD PC Piece Count CMD ContSave Content Saving System CMD BL15 Blacklist 15 -CMD WeaponChallenge Weapons Challenges +CMD Challenge Challenges CMD Ranks Player Info Listings CMD TWM TWM Mod Website diff --git a/scripts/defaultGame.cs b/scripts/defaultGame.cs index 0fa44cc..1a1afe2 100644 --- a/scripts/defaultGame.cs +++ b/scripts/defaultGame.cs @@ -967,6 +967,11 @@ function DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, % %p.schedulePop(); MissionCleanup.add(%p); } + + if(%clKiller !$= "") { + %clVictim.lastKilledBy = %clKiller; + %clVictim.lastKilledByPlayer = %clKiller.player; + } //[[CHANGE]] Make sure the beacon get's removed.. as it should be.. :D %clvictim.player.RemoveBeacon(); diff --git a/scripts/player.cs b/scripts/player.cs index a6c8b89..e9069e1 100644 --- a/scripts/player.cs +++ b/scripts/player.cs @@ -2418,9 +2418,6 @@ function Armor::onAdd(%data,%obj) %obj.rechargeShields(%data.shieldHeathCharge); %obj.activeShieldEffect(); } - //TWM2: Activate Armor Effect - if(isClientControlledPlayer(%obj)) - %obj.client.setActiveAE(%obj.client.getActiveAE()); } function Armor::onRemove(%this, %obj) @@ -3414,9 +3411,20 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am } return; } - if(%damageType == $DamageType::Impact) - if(%sourceObject.getDamageState() $= "Destroyed") + if(%damageType == $DamageType::Impact) { + if(%sourceObject.getDamageState() $= "Destroyed") { return; + } + //Check for the mother of all humiliating deaths :) + if(%targetObject.getState() $= "dead") { + if(%sourceObject.getClassName() $= "FlyingVehicle" && %sourceObject.lastPilot.getState() $= "dead") { + if((%sourceObject.lastPilot.client.lastKilledBy == %targetObject.client) && (%sourceObject.lastPilot.client.lastKilledByPlayer == %targetObject)) { + //You just got rekt.... + CompleteNWChallenge(%sourceObject.lastPilot.client, "Uncomprehendable"); + } + } + } + } %armortype = %targetobject.getdatablock().getname(); if (%damageType == $DamageType::ZAcid && %armortype !$= "ZombieArmor" && %armortype !$= "FZombieArmor" && %armortype !$= "LordZombieArmor" && %armortype !$= "DemonZombieArmor" && %armortype !$= "DemonMotherZombieArmor" && %armortype !$= "RapierZombieArmor" && %targetobject.infected != 1 && (%sourceObject.isZombie == 1 || %sourceObject.isBoss == 1)){ %targetObject.Infected = 1; @@ -3673,12 +3681,24 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am } } // + if(%targetObject.getControllingClient() !$= "") { + %sourceClient.TWM2Core.PvPZombieKills++; + if(%sourceClient.TWM2Core.PvPZombieKills >= 100) { + CompleteNWChallenge(%sourceClient, "Defectionator1"); + if(%sourceClient.TWM2Core.PvPZombieKills >= 250) { + CompleteNWChallenge(%sourceClient, "Defectionator2"); + if(%sourceClient.TWM2Core.PvPZombieKills >= 500) { + CompleteNWChallenge(%sourceClient, "Defectionator3"); + } + } + } + } + // Game.ZkillUpdateScore(%sourceClient, %sourceObject, %targetObject); %sourceObject.zombiekillsinarow++; DoZKillstreakChecks(%sourceClient); } else { - %targetObject.client.playDeathArmorEffect(); if(%targetObject.team != %sourceClient.team && !%targetObject.isBoss) { if(isObject(%sourceClient) && %sourceClient.IsActivePerk("Double Down")) { GainExperience(%sourceClient, $TWM2::KillXPGain * 2, "[D-D]Enemy Killed "); @@ -3686,6 +3706,37 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am else { GainExperience(%sourceClient, $TWM2::KillXPGain, "Enemy Killed "); } + //Kill Recording.. + if(!%targetObject.isZombie && %sourceObject.isZombie) { + %sourceClient.TWM2Core.PvPHumanKills++; + if(%sourceClient.TWM2Core.PvPHumanKills >= 50) { + CompleteNWChallenge(%sourceClient, "Infectionator1"); + if(%sourceClient.TWM2Core.PvPHumanKills >= 100) { + CompleteNWChallenge(%sourceClient, "Infectionator2"); + if(%sourceClient.TWM2Core.PvPHumanKills >= 250) { + CompleteNWChallenge(%sourceClient, "Infectionator3"); + } + } + } + } + else { + %sourceClient.TWM2Core.PvPKills++; + if(%sourceClient.TWM2Core.PvPKills >= 100) { + CompleteNWChallenge(%sourceClient, "Slayer1"); + if(%sourceClient.TWM2Core.PvPKills >= 250) { + CompleteNWChallenge(%sourceClient, "Slayer2"); + if(%sourceClient.TWM2Core.PvPKills >= 500) { + CompleteNWChallenge(%sourceClient, "Slayer3"); + if(%sourceClient.TWM2Core.PvPKills >= 750) { + CompleteNWChallenge(%sourceClient, "Slayer4"); + if(%sourceClient.TWM2Core.PvPKills >= 1000) { + CompleteNWChallenge(%sourceClient, "Slayer5"); + } + } + } + } + } + } //Team Gain Perk if(isObject(%sourceClient) && %sourceClient.IsActivePerk("Team Gain")) { %TargetSearchMask = $TypeMasks::PlayerObjectType; @@ -3706,14 +3757,14 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am %sourceObject.kills[%damageType]++; PerformSuccessiveKills(%sourceObject, %damageType); // - if(%sourceObject.killsinarow2 == 10) { + if(%sourceObject.killsinarow2 == 10 && !(%sourceObject.isBoss || %sourceObject.isZombie)) { MessageAll('MsgWOW', "\c2TWM2: "@%sourceClient.namebase@" is on a killsteak of 10"); awardClient(%sourceClient, "14"); } - if(%sourceObject.killsinarow2 == 20) { + if(%sourceObject.killsinarow2 == 20 && !(%sourceObject.isBoss || %sourceObject.isZombie)) { MessageAll('MsgWOW', "\c2TWM2: "@%sourceClient.namebase@" is on a killsteak of 20"); } - if(%sourceObject.killsinarow2 == 25) { + if(%sourceObject.killsinarow2 == 25 && !(%sourceObject.isBoss || %sourceObject.isZombie)) { MessageAll('MsgWOW', "\c2TWM2: "@%sourceClient.namebase@" is on a killsteak of 25"); } DoKillstreakChecks(%sourceClient); @@ -3742,8 +3793,7 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am } function Armor::onImpact(%data, %playerObject, %collidedObject, %vec, %vecLen) { - %data.damageObject(%playerObject, 0, VectorAdd(%playerObject.getPosition(),%vec), - %vecLen * %data.speedDamageScale , $DamageType::Ground); + %data.damageObject(%playerObject, 0, VectorAdd(%playerObject.getPosition(),%vec), %vecLen * %data.speedDamageScale , $DamageType::Ground); // if (%collidedObject & $TypeMasks::PlayerObjectType) { // if (%collidedObject.getState() !$= "Dead") { // %data.damageObject(%collidedObject, 0, VectorAdd(%playerObject.getPosition(),%vec), diff --git a/scripts/projectiles.cs b/scripts/projectiles.cs index 7a7d2e2..ad91d45 100644 --- a/scripts/projectiles.cs +++ b/scripts/projectiles.cs @@ -27,9 +27,8 @@ function ProjectileData::onCollision(%data, %projectile, %targetObject, %modifie } %targetObject.lastDamagedImage = %projectile.getDatablock().ImageSource; %targetObject.damage(%projectile.sourceObject, %position, %modifier * %data.directDamage, %data.directDamageType); - - //After Damage Stuff For Player Objects - if(%targetObject.isPlayer()) { + + if (!(%targetObject.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) && %targetObject.getDataBlock().getClassName() $= "PlayerData") { if(%targetObject.getState() $= "dead") { if(%projectile.sourceObject.client !$= "") { if(%projectile.getDatablock().getName() !$= "GrenadeShrapnel") { diff --git a/scripts/weapons/Melee/BOV.cs b/scripts/weapons/Melee/BOV.cs index 3649493..87e9679 100644 --- a/scripts/weapons/Melee/BOV.cs +++ b/scripts/weapons/Melee/BOV.cs @@ -272,22 +272,30 @@ function DoBOVRearKill(%source, %target, %count) { %target.setvelocity("0 0 0"); } else if(%count == 17) { + if(%target.isZombie) { + recordAction(%source.client, "BACK", "zombie"); + if(%target.isPlayerRog && %target.getControllingClient() !$= "") { + if(!%source.client.CheckNWChallengeCompletion("CompletelyUnexpected")) { + CompleteNWChallenge(%source.client, "CompletelyUnexpected"); + } + } + } + else { + recordAction(%source.client, "BACK", "player"); + if(!%source.client.CheckNWChallengeCompletion("Assassin")) { + CompleteNWChallenge(%source.client, "Assassin"); + } + } //%target.blowup();//BAM! ServerPlay3d(BOVHitSound, %target.getPosition()); ServerPlay3d(BOVHitSound, %target.getPosition()); ServerPlay3d(BOVHitSound, %target.getPosition()); %target.damage(%source, %target.getposition(), 9999, $DamageType::BladeOfVengance); // - if(%target.isZombie) { - recordAction(%source.client, "BACK", "zombie"); - } - else { - recordAction(%source.client, "BACK", "player"); - } - // if(%target.client !$= "") { //a Player.. goodie MessageAll('MessageAll', "\c0"@%target.client.namebase@" was assassinated by "@%source.client.namebase@"."); } + //Challenges... %source.cannotuseBOV = 0; %source.setMoveState(false); return; diff --git a/scripts/weapons/Other/PlasmaTorpedo.cs b/scripts/weapons/Other/PlasmaTorpedo.cs index f73bbdc..d72c793 100644 --- a/scripts/weapons/Other/PlasmaTorpedo.cs +++ b/scripts/weapons/Other/PlasmaTorpedo.cs @@ -51,7 +51,7 @@ datablock ShapeBaseImageData(PlasmaTorpedoImage) { emap = true; RankRequire = $TWM2::RankRequire["SCD343"]; - PrestigeRequire = 4; + PrestigeRequire = 9; HasChallenges = 1; ChallengeCt = 8; diff --git a/scripts/weapons/Pistols/GrappleHook.cs b/scripts/weapons/Pistols/GrappleHook.cs index 9c7039e..8337e22 100644 --- a/scripts/weapons/Pistols/GrappleHook.cs +++ b/scripts/weapons/Pistols/GrappleHook.cs @@ -46,8 +46,8 @@ datablock SeekerProjectileData(GrappleShot) { // very quickly - bramage lifetimeMS = 500; // z0dd - ZOD, 4/14/02. Was 6000 - muzzleVelocity = 250.0; - maxVelocity = 350.0; // z0dd - ZOD, 4/14/02. Was 80.0 + muzzleVelocity = 200.0; + maxVelocity = 300.0; // z0dd - ZOD, 4/14/02. Was 80.0 turningSpeed = 54.0; acceleration = 50.0; @@ -94,7 +94,7 @@ datablock ShapeBaseImageData(GrappleHookImage) { projectileType = SeekerProjectile; usesEnergy = true; - minEnergy = 3; + minEnergy = 60; stateName[0] = "Activate"; stateTransitionOnTimeout[0] = "ActivateReady"; From 3b5aa5d67e923838071f507a6756c4398aa6a6c0 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Mon, 26 Jun 2017 19:37:47 -0500 Subject: [PATCH 09/29] Update readme --- README.md | 361 +++++++++++++++++------------ scripts/Customize/CustomScripts.cs | 14 +- 2 files changed, 216 insertions(+), 159 deletions(-) diff --git a/README.md b/README.md index 61405e4..f4d095c 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,48 @@ Total Warfare Mod 2 ==== -Total Warfare Mod 2 for Tribes 2, Conversion mod built on a base mix of Construction .69a and CCM. Tribes 2 is a pre 1.0 game of the Torque Game Engine. +Total Warfare Mod 2 for Tribes 2, Conversion mod built on a base mix of Construction .69a and CCM. Tribes 2 is a game developed on a pre-release version of the Torque Game Engine. Web Sites/Pages: +* http://www.tribesnext.com : Tribes 2 / TN Page * https://github.com/PhantomGamesDevelopment/TWM2/ : Official Git Repostitory * http://www.phantomdev.net : Offical Website Current Version: 3.91 {Development} +==== + Credits: * Phantom139 (Lead Coder / Mod Developer, Official Host) * DarknessOfLight (Lead Map Maker / Mod Tester (CoDev)) * Dark Dragon DX (Asset Functions / CoDev) * Signal360 (Many functions and improvements/ CoDev) -* Dondelium_X (Various CCM Functions) +* Dondelium_X (The original Combat Construction Mod (CCM)) * Castiger (Official Secondary Host, Bug Finding, Mod Tester) * Mostlikely, Construct, JackTL (Construction .70a Developers) Thanks: * Thyth (Tribes Next, Merge Tool) +* Krash123 (Tribes Next) * Linker (Doors, Spawnpoints) * My Loyal Hosts (For standing behind me and the mod for the entirety of it's length) -* Various Others (Who have contributed to Cons Mod, TWM, and TWM 2, You have my thanks) +* Various Others (Who have contributed to Cons Mod, CCM, TWM, and TWM 2, You have my thanks) * You (For Downloading, and Contributing.) +==== + Install: -* Unzip the TWM2 Folder to C:/Dynamix/Tribes2/Gamedata/ (change the links if in a different location) +* Unzip the TWM2 Folder to your Tribes 2's Gamedata folder * Create a link with the target mod -mod TWM2 -* Rename serverControl_R.cs to serverControl.cs +* Adjust the serverControl.cs if you feel like it * Run. * ??? * Profit. Uninstall: Delete the TWM2 Folder +==== + Server Setup: Provided in this folder is a file named ServerControl.cs. Inside you will find many configurable @@ -42,14 +50,66 @@ objects to modify server settings. For starters, set the host GUID to your GUID. start up the dedicated server. Join it, once in game, type ListGUIDS(); in the server console to obtain your GUID. Then modify the line: $TWM2::HostGUID = "SetMeUp";, to match your GUID. -MOD DEVELOPMENT LOG: +TWM2 Servers: + +TWM2 uses a inter-server connectivity system known as PGD Connect. This system will allow users who +play TWM2 to transfer their rank/progression as well as load in buildings created in other servers +in your server. While PGD Connect itself is manditory across all TWM2 servers, saving information is +only permitted in what we designate as a "Core Server". This requires the server host to abide by the +TWM2 PGD Connect Core rules established by Phantom139. If you are interested in hosting a server with +this level of authority, please contact Phantom139 on the PGD Forums, or by email. + +==== + +MOD DEVELOPMENT HISTORY: + 3.9 -> 3.91 (In Progress): * Lib'd the TWM2 MainControl file to remove some more functions +* Lib'd the PGD Connect support interface as well +* The F2 Menu now detects PGD Connected accounts and will no longer show the option to PGD Connect to already connected users +* Addressed a security issue regarding players who are "attempting" to load code via universal rank files. + * Nice try DDDX, but your fem-phantom fantasies will NOT be happening... ;) * Another boss balancing pass * Addressed the bug that would allow Vardison 2.0 to summon infinite minions * Addressed the bug with Vardison 2.0 that made his Shadow Rift invincible * Removed two un-used game objects that were never completed, the Medal Seal and the UAV Control Panel * Removed a few erraneous exec calls to non-existent files in the mod load script +* Depricated the F2 Inventory Screen (Nobody ever used this) +* Fixed a few bugs in the F2 Menu +* [phantomdev.net] "Hopefully" fixed the CRON setting on the daily challenge script so it runs every day now. +* Addressed the bug preventing weapon challenge progress from recording +* Re-did the Challenge Menus in the F2 Menu + * Renamed Weapon Challenges to just Challenges + * From this menu, players now select General Tasks or Weapon Challenges + * Weapon Upgrades are now selected from the Settings Window + * Added the option to jump between the weapon upgrades and weapon challenge menus + * Completed Challenges are now highlighted in Green and show the requirement instead of simply stating "done" + * I did this as more of a nostalgia move, so players can remember their accomplishments! +* TWM2 Challenge Adjustments + * Depricated the Blacklist Challenges, It's almost impossible to get any of these. + * Replaced it with Wargames challenges, which are focused on PvP tasks across all modes. + * Let's see who can complete some of those "tough" ones :) + * Finally completed the Zombie Slaying Challenges, allowing players to earn some nice healthy batches of EXP for slaying zombies + * Added boss challenges for the bosses that did not have any: + * Shade Lord + * Ghost of Fire + * Commander Stormrider + * Added in additional challenges for the other categories to help players make some more mod progression + * Removed erraneous reward notes on the boss challenges, as we removed the "AI Follower" system back in 3.7 + * Addressed the bug preventing the four Vardison challenges for specific difficulty completions from actually completing +* Added in the necessary hooks to enable officer ranks 10 - 15 + * Have fun! +* Re-did the Officer Promotion windows to preview the rewards upcoming at that level +* Added in the capability to "reset" your entire TWM2 progression upon hitting max level of Officer 15 (Max Level) +* Depricated the Store and Money systems, these systems will become progression based unlocks for "higher" officer levels (10 - 15) + * Armor effects will not return + * Armor flags will return in 3.92 +* Shifter Zombies now have a randomzied element in their teleport method +* Plasma Torpedo Cannon now requires officer level 9 (Phantom) +* Weapon Balancing Pass + * Grapple Hook + * Slowed down the attacher projectile a bit, lowering the range + * Grapple hook now requires 60% armor energy and consumes this when firing 3.8 -> 3.9: * Progression System Adjustments @@ -90,10 +150,9 @@ MOD DEVELOPMENT LOG: * Gave Vardison (and his DA counterpart) a brand new evil hyper laser attack * Gave The Final Vardison Form a missile spam attack * Balanced out pretty much all of the weapons to a point that now seems reasonable -* Added extremely challenging Bronze, Silver, Gold, and Titan commendation challenges to every weapon that - grant loads of EXP. These will be for your players who are loyal to certain guns. :) -* Upgraded the Horde Spawning System to cause some less UE problems and added error checks to pretty much - prevent Horde from causing UEs anymore. +* Added extremely challenging Bronze, Silver, Gold, and Titan commendation challenges to every weapon that grant loads of EXP. + * These will be for your players who are loyal to certain guns. :) +* Upgraded the Horde Spawning System to cause some less UE problems and added error checks to pretty much prevent Horde from causing UEs anymore. * Added a few new Hellclasses to Helljump * Removed the old Hellclasses that used the gravity weapons removed in V2.5 * Pretty much wrapped everything else up, official mod support at this point is dropped... @@ -101,12 +160,13 @@ MOD DEVELOPMENT LOG: 3.6 -> 3.7: * Added a Phase One Vardison Boss - Dark Archmage Vardison * We've hit the function limit, so I revitalized the chat command system and recovered ~500 functions +* Removed the AI Followers, they were being "abused" in PvP modes * Updated a lot of old code from the mod * Addressed the bug in the PGD Connect system that would only allow one player to use the system at a time * At the request of players, I have added a damage to boss system that will give your boss xp award based on the amount of damage done to a boss -- SCG Kills count as 0 exp to the admin using it + * SCG Kills count as 0 exp to the admin using it * Upgraded the Zombie AI a little bit to use less functions and overall be more balanced * Zombie Lords now drop the Acid Cannon * Added three new missions to the mission system, these are much harder than their previous counterparts @@ -118,32 +178,30 @@ MOD DEVELOPMENT LOG: * Completed the remaining perks in the mod * Added the Napalm Airstrike killstreak * Fixed a few bugs in some of the old killstreaks -* Fixed a part of the camera-lock problem in the turret streaks, unfortunately the way tribes 2 is coded - I don't think the entire bug will ever be fixable. +* Fixed a part of the camera-lock problem in the turret streaks, unfortunately the way tribes 2 is coded, I don't think the entire bug will ever be fixable. * Added weekly and monthy challenges to the challenge system * Added some new Hellclass options to Helljump * Added some new zombie options to TWM2 Infection * Added a new endgame boss, The Shade Lord -- This is a really challenging two phase boss with 80000 HP and one hit kill attacks, it will take - A lot of players to bring him down + * This is a really challenging two phase boss with 80000 HP and one hit kill attacks, it will take A lot of players to bring him down 3.4 -> 3.5: * Upgraded the rank storage container to be in a single container rather than 3. -- The system will auto-convert old files to the new format + * The system will auto-convert old files to the new format * Addressed a bug in the Daily Challenge System that would cause challenges to continue beyond expiration * Balanced some weapons * Addressed an exploitable method for implementing unfriendly code by means of the saving system -- Thanks to Thyth for pointing this out. + * Thanks to Thyth for pointing this out. 3.3 -> 3.4: * Daily Challenge System Implemented * Reworked the entire rank system -- Handled by a quicker and more efficient file system -- PGD Connect updated to support new version + * Handled by a quicker and more efficient file system + * PGD Connect updated to support new version * Implemented Phantom Games Interaction System -- Daily EXP Caps -- Rank / Officer Level Caps -- Other Services (News Panel, ect) + * Daily EXP Caps + * Rank / Officer Level Caps + * Other Services (News Panel, ect) 3.2 -> 3.3 (or 3.2 Revised): * Updated all PGD Services to point to the new domain. @@ -158,11 +216,11 @@ MOD DEVELOPMENT LOG: 2.9 -> 3.0: * Modified the PGD Connect Algorith to be a little less required, less conflicts should occur. * Re added the TWM1 Nalcidic Armor -- Enjoy! + * Enjoy! * Horde 2 is now Horde 3 -- Added Scoring -- Added The Wave Highlight System -- Made it less challenging to get to wave 50. + * Added Scoring + * Added The Wave Highlight System + * Made it less challenging to get to wave 50. * Added The Martyrdom Perk * Fixed a bug that allowed naughty admins to get killstreaks with /giveGun * Drastically increased the Centaur Artillery Strike Damage @@ -170,80 +228,82 @@ MOD DEVELOPMENT LOG: 2.8 -> 2.9: * Fixed a console spam issue with "Commander Stormrider" * Removed 2 un-used medals +* Added the From The Top challenge category for missions +* Added a few more missions for players to run * Fixed sniper rifles showing in the inventory list when they are disabled * Added 1 shot reload style weapons -- Added the Model 1887 Shotgun (Requires Instructive Colonel) -- See the new shotgun (Model 1887) or the SA2400 for examples + * Added the Model 1887 Shotgun (Requires Instructive Colonel) + * See the new shotgun (Model 1887) or the SA2400 for examples * Ion Progression removed in Sabotage, Domination, and Wartower game modes * Redid the weapon reload bar -- It is now math based :P -- Weapons with longer than 1 second delays are no longer cut off -- The reload bar halts if you use an invo while reloading. --- Weapon Balance Changes (A Large Amount) -- Reduced the damage of the Plasma Torpedo Cannon to 1.5 from 2.2 -- Reduced the Range of the Flamethrower -- Reduced the Reload Time of the M1700 Shotgun to 2 seconds from 3 seconds -- Reduced the Reload Time of the SCD343 Shotgun to 4 seconds from 5 seconds -- Increased the Reload Time of the WP400 Shotgun to 4 seconds from 3 seconds -- Reduced the range of the Grapple hook to 50% of what it was -- Removed the Centaur Dual Pistols Weapon --- Made it an upgrade of the Colt Pistol (Excessive Duality) -- Increased the damage of the R700 Sniper To 0.62 From 0.49 -- Increased the Damage of the MP26 SMG to 0.17 from 0.1 -- Increased the Damage of the Pg700 SMG to 0.09 from 0.07 -- Increased the Damage of the P90 SMG to 0.08 from 0.07 -- Increased the Damage of the Mini-Chaingun to 0.06 from 0.035, and the Fusion Mini-Chaingun to 0.07 from 0.05 -- Reduced the Reload Time of the MRXX ZC4 MG to 9 seconds from 12 seconds -- Increased the Damage of the M1A4 to 0.09 from 0.07 -- Increased the Damage of the ALSWP Sniper to 0.5 from 0.3 + * It is now math based :P + * Weapons with longer than 1 second delays are no longer cut off + * The reload bar halts if you use an invo while reloading. +* Weapon Balance Changes (A Large Amount) + * Reduced the damage of the Plasma Torpedo Cannon to 1.5 from 2.2 + * Reduced the Range of the Flamethrower + * Reduced the Reload Time of the M1700 Shotgun to 2 seconds from 3 seconds + * Reduced the Reload Time of the SCD343 Shotgun to 4 seconds from 5 seconds + * Increased the Reload Time of the WP400 Shotgun to 4 seconds from 3 seconds + * Reduced the range of the Grapple hook to 50% of what it was + * Removed the Centaur Dual Pistols Weapon + * Made it an upgrade of the Colt Pistol (Excessive Duality) + * Increased the damage of the R700 Sniper To 0.62 From 0.49 + * Increased the Damage of the MP26 SMG to 0.17 from 0.1 + * Increased the Damage of the Pg700 SMG to 0.09 from 0.07 + * Increased the Damage of the P90 SMG to 0.08 from 0.07 + * Increased the Damage of the Mini-Chaingun to 0.06 from 0.035, and the Fusion Mini-Chaingun to 0.07 from 0.05 + * Reduced the Reload Time of the MRXX ZC4 MG to 9 seconds from 12 seconds + * Increased the Damage of the M1A4 to 0.09 from 0.07 + * Increased the Damage of the ALSWP Sniper to 0.5 from 0.3 * PGD Updates -- Modified the hash of the PGD Authenticator. -- Modified some of the PGD Errors. + * Modified the hash of the PGD Authenticator. + * Modified some of the PGD Errors. * Horde 2 - You now gain XP for completing a wave, the amount is handled by a special formula 2.7 -> 2.8: * Player Phrases, use /myPhrase to set it -- Working on a parse script to allow them to be set in satellite servers -- For now, they will only 'Stay' if set in a core server + * Working on a parse script to allow them to be set in satellite servers + * For now, they will only 'Stay' if set in a core server * Patched a few issues with the universal ranks * Added a few new commands +* Completed the "cool new feature" started in 2.6, Missions! + * Missions are player-ordered, short-duration scenarios with objectives that must be completed over a time period + * Completion awards XP, completing before the time limit awards a time bonus! + * Added the "Surrounded" Mission to start us off * Modified a few zombie spawn functions to support missions -* Missions: -- Modified the ordering of missions to provide a short bio of the mission first -- Added the "Surrounded" Mission * Modified the server assistant (chat bot) -- Allows hosts to change it's name :P -- Added a plothera of things to do with it --- Curse Filter --- "Get Weather by Zip Code", "Define Word (In development)", "Get Time" --- Performs Administrative Functions --- And much more! + * Allows hosts to change it's name :P + * Added a plothera of things to do with it + * Curse Filter + * "Get Weather by Zip Code", "Define Word (In development)", "Get Time" + * Performs Administrative Functions + * And much more! 2.6 -> 2.7: * Ported in a plothera of TWM1 Commands * Fixed the new chat command system that allowed hosts to disable certain commands -- Logic errors caused the system to ignore the PGD Commands. -* Added additional missions + * Logic errors caused the system to ignore the PGD Commands. * Brought back the TWM Infection Game Mode -* Added Armor Flags (Unlocked at Prestige Level 5) -- These are just like the phantom armor flags of TWM1 -- Only they apply to all armors. +* Added Armor Flags (Unlocked at Officer Level 5) + * These are just like the phantom armor flags of TWM1 + * Only they apply to all armors. * PGD Updates (The brunt of 2.7) -- Fixed additional HTML Errors -- Provided By Signal360, the new and enhanced PGD Rank System --- Sha1 security for rank uploads --- Better processing of the rank data --- Core/Satellite determined by a new Username/Password system provided by the servers. --- Lifted all PGD Bans [For now] + * Fixed additional HTML Errors + * Provided By Signal360, the new and enhanced PGD Rank System + * Sha1 security for rank uploads + * Better processing of the rank data + * Core/Satellite determined by a new Username/Password system provided by the servers. + * Lifted all PGD Bans [For now] * Started the framework of a new mission start menu (for Ordering Missions) * Rank Tags (For Roleplay), hosts can use the /RankTags command to toggle rank tags * Renamed the Rank "General Of The Army"[57] to "Commanding General". * Patched an issue with new players Rank Files that would cause them to error out -- Players with this issue in their file can join a 2.7 server, and rank up once to fix it. + * Players with this issue in their file can join a 2.7 server, and rank up once to fix it. 2.5 -> 2.6: * Added the MRXX ZC4 Machine Gun -* Prep-Work on additional Scenarios +* Prep-Work on a new system in the mod, coming soon! * Added an instant notification system for attempted hacks * Modified the anti-tamper system to be a little more sensative (this will not affect your gameplay) * Re-Patched the rapid team crash @@ -254,7 +314,7 @@ MOD DEVELOPMENT LOG: * Modified functioning with voting. * Added the Mass EMP Killstreak (20 Kills) * Added In-complete Upgrades on certain weapons -- Please Note, that some do still remain + * Please Note, that some do still remain * Completed the "Team Gain" Perk * Reformatted the Inventory list to go by Weapon Type/Rank * Added a Center Print MOTD Function, check serverControl.cs @@ -262,8 +322,8 @@ MOD DEVELOPMENT LOG: * Airstrikes are now directional based on the direction of the camera * Air rapier zombies can now be targeted by missile weapons * Added restrictions to the /VoteBoss Command -- 1 Boss Vote per hour (even if it fails) -- Hosts may disable the usage of the command + * 1 Boss Vote per hour (even if it fails) + * Hosts may disable the usage of the command * BOSS: Lordranius Trevor's Official EXP Reward Cut in Half to 25000. * Devs/Hosts can now disable chat commands * Fixed some of the Spelling errors in the death messages. @@ -271,8 +331,7 @@ MOD DEVELOPMENT LOG: * Hosts can disable boss vote / change map votes 2.4 -> 2.5: -* Scenarios (AKA Missions). -* Gravity Weapons Removed +* Gravity Weapons Removed (Too many problems) * Patched a few UE Causing aspects with Lord Vardison * Added The Shadow Armor * Added The M93 Pistol @@ -284,27 +343,26 @@ MOD DEVELOPMENT LOG: * Added The Satellite Strike Killstreak (8 Kills) * Fixed the Harbinger HQ Map (It's Playable Now) * Added More Non-Weapon Challenges -- Prestige Challenge Category Completed -- Sabotage Challenge Category Completed -- Domination Challenge Category Completed -- Horde 2 Challenge Category Completed -- From The Top Challenge Category Completed + * Officer Challenge Category Completed + * Sabotage Challenge Category Completed + * Domination Challenge Category Completed + * Horde 2 Challenge Category Completed * AC130 and Harbingers Wrath Streaks can now detect incoming missiles, they will fire off flares when missiles are detected. -* Added 4 More Prestige Levels, bringing the total to 9. -- Removed the Second Prestige Image, replaced 9 with the PGD Logo, all others downgraded 1 +* Added 4 More Officer Levels, bringing the total to 9. + * [phantomdev.net] Removed the Second Officer Image, replaced 9 with the PGD Logo * New Perks: -- Bomb Shadower (Tier 3): In Sabotage, the WP that shows you holding the bomb will not show when this perk is active (Requires the 3 For 3 Sabotage Challenge) -- Double Down (Tier 1): Gain double EXP for every non boss kill (Requires Prestige Level 1) -- Radar Phantom (Tier 2): Active Ability, Jams Sensors (Requires Commander Rank) -- Second Chance (Tier 3): In Horde, you can spend one team revive to respawn (Requires the Army Of 50 Stopped Challenge) + * Bomb Shadower (Tier 3): In Sabotage, the WP that shows you holding the bomb will not show when this perk is active (Requires the 3 For 3 Sabotage Challenge) + * Double Down (Tier 1): Gain double EXP for every non boss kill (Requires Officer Level 1) + * Radar Phantom (Tier 2): Active Ability, Jams Sensors (Requires Commander Rank) + * Second Chance (Tier 3): In Horde, you can spend one team revive to respawn (Requires the Army Of 50 Stopped Challenge) * Modified The Following Vehicles: -- Modified the AC130 and Harbinger Gunships to both have gunner seats, the pilot switches the turret weapons when there is no gunner. -- Combat Helicopter: Added a gunner seat, the gunner controls the turret, otherwise the turret is auto fire. -- Gunship Helicopter: See above, pilot can fire a missile pod with the mine key -- Apache Helicopter: See above, pilot can fire a flare pod with the mine key + * Modified the AC130 and Harbinger Gunships to both have gunner seats, the pilot switches the turret weapons when there is no gunner. + * Combat Helicopter: Added a gunner seat, the gunner controls the turret, otherwise the turret is auto fire. + * Gunship Helicopter: See above, pilot can fire a missile pod with the mine key + * Apache Helicopter: See above, pilot can fire a flare pod with the mine key * Modified The Following Weapons: -- Desert Eagle Pistol: Added a Spread -- RP-342 Machine Gun: Damage increased to 0.035 from 0.02 + * Desert Eagle Pistol: Added a Spread + * RP-342 Machine Gun: Damage increased to 0.035 from 0.02 2.35 -> 2.4: * Added additional security measures to the universal system @@ -318,30 +376,29 @@ MOD DEVELOPMENT LOG: 2.3 -> 2.35: * Patched serious security loopholes: -- Univeral Saved Files will now be scanned on load for corruption -- Key Download and scanning is now handled by PGD and not the Server -- Prestige will check for your rank upon attempting to do so. -- Universal Ranks are now forced to provide the key when uploading --- Added /SaveRank and /LoadRank in case the server fails to do so, or you want to -* Weapons can now have a required prestige level + * Univeral Saved Files will now be scanned on load for corruption + * Key Download and scanning is now handled by PGD and not the Server + * Officer will check for your rank upon attempting to do so. + * Universal Ranks are now forced to provide the key when uploading + * Added /SaveRank and /LoadRank in case the server fails to do so, or you want to +* Weapons can now have a required officer level * Added 2 new weapons -- Both require a prestige level to test the new system updates. + * Both require a officer level to test the new system updates. * Started the harbinger soldier AI. 2.2 -> 2.3: * modified the auto-patcher * Added Officer Ranks -- Reach Master Commander, then hit the reset button + * Reach Master Commander, then hit the reset button * Added the AC-130 -- AC-130 Gunner Streak + * AC-130 Gunner Streak * Signal360 Added the following: -- /passVote -- /VoteBoss -- System Ammendments + * /passVote + * /VoteBoss + * System Ammendments * Brought back 2 Classic TWM Bosses -- Stormrider -- The Ghost Of Fire --- Enjoy, Complements of Phantom139 + * Stormrider + * The Ghost Of Fire * Fixed a glitch with weapon challenges. * Delayed camera based superweapons to prevent the "Lock" Glitch (this can still occur though) * And some various other unnoted changes @@ -352,77 +409,77 @@ MOD DEVELOPMENT LOG: 2.0 -> 2.1: * New Guns! -- Javelin -- M4A1 -- SCD343 + * Javelin + * M4A1 + * SCD343 * Universal Rank System Implementation * More Non-Weapon Challenge Categories -- Boss Challenges -- Blacklist Challenges + * Boss Challenges + * Blacklist Challenges * Additional Fixes 1.9 -> 2.0: * Christmas Mall 2009 Map -- Decent Sized Map, Good for close and long range battles -- Sabotage, Domination + * Decent Sized Map, Good for close and long range battles + * Sabotage, Domination * Domination Enhancement: -- Mappers can now name areas: -- $Domination::Flag[Num(1, 2, or 3), "Map File Name without .mis"] = "Name"; (Thanks To DoL For This) + * Mappers can now name areas: + * $Domination::Flag[Num(1, 2, or 3), "Map File Name without .mis"] = "Name"; (Thanks To DoL For This) * 3 More Killstreaks: -- Plasma Harrier Airstrike: 7 Kills: Airstrike with a remaining plasma harrier -- Gunship Helicopter: 9 Kills: Call in a heavily armed helicopter -- Z-Bomb: 100 Zombie Kills: Wipe out all zombies in a flashing blast + * Plasma Harrier Airstrike: 7 Kills: Airstrike with a remaining plasma harrier + * Gunship Helicopter: 9 Kills: Call in a heavily armed helicopter + * Z-Bomb: 100 Zombie Kills: Wipe out all zombies in a flashing blast * Killstreak Upgrades: -- Added Host Streak Settings: --- 1: Current Method: 3 Streaks/Player --- 2: Old Method: All Streaks Earneds if Unlocked --- 3: New Method: X Streaks/Player, X Set by host. --- 4: No Streaks: Simple enough... -- Chopper Gunner: Renamed to Apache Gunner --- Apache Helicopter has a more powerful chaingun than the Combat Helicopter, slower RoF, but larger splash damage -- Apache Gunner and Harbingers wrath now count to your kills. + * Added Host Streak Settings: + * 1: Current Method: 3 Streaks/Player + * 2: Old Method: All Streaks Earneds if Unlocked + * 3: New Method: X Streaks/Player, X Set by host. + * 4: No Streaks: Simple enough... + * Chopper Gunner: Renamed to Apache Gunner + * Apache Helicopter has a more powerful chaingun than the Combat Helicopter, slower RoF, but larger splash damage + * Apache Gunner and Harbingers wrath now count to your kills. * Opened the Non-Weapon Challenges Up -- Special Event Challenges: Challenges to do on "Special" Days. -- Killstreak Challenges: Challenges completed for using killstreak rewards + * Special Event Challenges: Challenges to do on "Special" Days. + * Killstreak Challenges: Challenges completed for using killstreak rewards * RPG-7 Enhanced -- Now Randomly Moves While Fired -- Requires Rank 50. + * Now Randomly Moves While Fired + * Requires Rank 50. * Slingshot Zombie Added (Finally), Pilots Beware * Explosive Weapons Now Can Count To Weapon Kills * Helljump Updates -- The Transport is now invincible (bug fix) -- Players who jump too early out will be placed back in the transport + * The Transport is now invincible (bug fix) + * Players who jump too early out will be placed back in the transport 1.8 -> 1.9: * Removed the old Killstreak methods. * Implemented a brand new killstreak system -- 3 Streaks Per Player -- Unlocked via rank/medal -- 4 New Killstreaks --- Stealth Bomber: 8 Kills: Carpet bomb an area without notice.... until it's too late --- Apache Gunner: 10 Kills: Control a combat Helicoper's turret for 1 minute --- Centaur Bombardment: 15 Kills: Call in a massive proton collider bombardment. --- Arrov IV Nuke Strike: 25 Kills: Boom... you should know what this is. + * 3 Streaks Per Player + * Unlocked via rank/medal + * 4 New Killstreaks + * Stealth Bomber: 8 Kills: Carpet bomb an area without notice.... until it's too late + * Apache Gunner: 10 Kills: Control a combat Helicoper's turret for 1 minute + * Centaur Bombardment: 15 Kills: Call in a massive proton collider bombardment. + * Arrov IV Nuke Strike: 25 Kills: Boom... you should know what this is. * Modified some weapons that were implemented in 1.8 * /setRot Added * Full Scale and Nudge added to the MIST * /SetNudge added * Added the Hardline Perk -- Killstreaks require one less kill + * Killstreaks require one less kill 1.7 -> 1.8: * Added the plasmasaber melee weapon. * Added the UAMS Guided Missile Strike Kill Streak (6 Kills) * Added the Harbinger's Wrath Kill Streak (10 Kills) -- Hosts, to create a gunship that endlessly circles the map (Gunship support), type StartHarbingersWrath(your CID, 1, 1); + * Hosts, to create a gunship that endlessly circles the map (Gunship support), type StartHarbingersWrath(your CID, 1, 1); * Helljump: Players can no longer kill the transports. * Fixed the helicopters on crack glitch. -- If you don't know what this is... lol, start up helljump and call in a heli. -- Hosts, if you have good eyes with script files, you can find the function to make you a chopper gunner (like harbinger's wrath, but with a helicopter) + * If you don't know what this is... lol, start up helljump and call in a heli. + * Hosts, if you have good eyes with script files, you can find the function to make you a chopper gunner (like harbinger's wrath, but with a helicopter) * DarknessOfLight provided me with the SA2400 Shotgun (Rank 33). * Added the Wartower game mode (FFA Tower Wars) -- Tower 2009 Limited Edition Map -- Century Maze Map + * Tower 2009 Limited Edition Map + * Century Maze Map * Fixed the sabotage bomb explosion (it properly explodes now) * Fixed the S3S Rifle Glitch (You could shoot yourself :p) * Shotgun weapons (Excluding the LD06 Savager) now properly make their fire sound @@ -439,7 +496,7 @@ MOD DEVELOPMENT LOG: 1.6 -> 1.7: * PGD Connect Implemented -- Universal Saving/Loading Added + * Universal Saving/Loading Added * Fixes, Fixes, Fixes * Start of Universal Ranks * MP-26 CMDO Weapon Added For Helljump @@ -489,7 +546,7 @@ MOD DEVELOPMENT LOG: * bosses Renamed 1.1 -> 1.2 (F.P.R): -- FPR: First Public Release +* FPR: First Public Release * More Guns * 4 new zombie types * Horde 2 Game diff --git a/scripts/Customize/CustomScripts.cs b/scripts/Customize/CustomScripts.cs index 2d3d3a3..287b735 100644 --- a/scripts/Customize/CustomScripts.cs +++ b/scripts/Customize/CustomScripts.cs @@ -11,15 +11,15 @@ //Add custom chat commands here! //I've included a little sample command (in comments) -function parseCustomCommands(%sender, %command, %args) { - switch$(strLwr(%command)) { //CAUTION! Note the strlwr here! that means your command must show in lowercase in each case "": statement +//function parseCustomCommands(%sender, %command, %args) { +// switch$(strLwr(%command)) { //CAUTION! Note the strlwr here! that means your command must show in lowercase in each case "": statement //case "samplecommand": // %arg1 = getWord(%args, 0); // %arg2 = getWord(%args, 1) // //Do stuff here! - // return 1; //return 1; - Command executed correctly - } -} + // return 1; //return 1; - Command executed correctly\ +// default: +// } +//} //make sure you add all of your commands to the list by doing this: -//addCMD("Custom", "sampleCommand", "Usage: /sampleCommand [arg1] [arg2]: Sample command ftw! people see this when they type /cmdHelp sampleCommand."); - +//addCMD("Custom", "sampleCommand", "Usage: /sampleCommand [arg1] [arg2]: Sample command ftw! people see this when they type /cmdHelp sampleCommand."); \ No newline at end of file From 1bbf4920930e152a4c9ae020c9ba6d88f7cc81ef Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Thu, 29 Jun 2017 18:01:23 -0500 Subject: [PATCH 10/29] Daily Challenge Fixes, Menu Fixes Fixed HTTP path to PGD Daily Challenges internally, addressed the closed tag issue in the F2 menu for challenges. --- scripts/TWM2/Systems/ChallengeMenus.cs | 210 +++++++++++------------ scripts/TWM2/Systems/DChalg.cs | 14 +- scripts/TWM2/Systems/WeaponChallenges.cs | 2 +- 3 files changed, 113 insertions(+), 113 deletions(-) diff --git a/scripts/TWM2/Systems/ChallengeMenus.cs b/scripts/TWM2/Systems/ChallengeMenus.cs index 6d48c2e..cccb015 100644 --- a/scripts/TWM2/Systems/ChallengeMenus.cs +++ b/scripts/TWM2/Systems/ChallengeMenus.cs @@ -14,7 +14,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("UAV1")) { if(%client.CheckNWChallengeCompletion("UAV2")) { if(%client.CheckNWChallengeCompletion("UAV3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert III: Call in 150 UAV Recon Satellites"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert III: Call in 150 UAV Recon Satellites"); %index++; } else { @@ -35,7 +35,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Airstrike1")) { if(%client.CheckNWChallengeCompletion("Airstrike2")) { if(%client.CheckNWChallengeCompletion("Airstrike3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert III: Call in 125 Airstrikes"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert III: Call in 125 Airstrikes"); %index++; } else { @@ -56,7 +56,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("UAMS1")) { if(%client.CheckNWChallengeCompletion("UAMS2")) { if(%client.CheckNWChallengeCompletion("UAMS3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert III: Call in 125 UAMS Strikes"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert III: Call in 125 UAMS Strikes"); %index++; } else { @@ -77,7 +77,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Helicopter1")) { if(%client.CheckNWChallengeCompletion("Helicopter2")) { if(%client.CheckNWChallengeCompletion("Helicopter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert III: Call in 125 Combat Helicopters"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert III: Call in 125 Combat Helicopters"); %index++; } else { @@ -98,7 +98,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Harrier1")) { if(%client.CheckNWChallengeCompletion("Harrier2")) { if(%client.CheckNWChallengeCompletion("Harrier3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert III: Call in 110 Plasma Harrier Airstrikes"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert III: Call in 110 Plasma Harrier Airstrikes"); %index++; } else { @@ -119,7 +119,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("SatNuke1")) { if(%client.CheckNWChallengeCompletion("SatNuke2")) { if(%client.CheckNWChallengeCompletion("SatNuke3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert III: Call in 125 Orbital Laser Strikes"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert III: Call in 125 Orbital Laser Strikes"); %index++; } else { @@ -140,7 +140,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("NapalmHarrier1")) { if(%client.CheckNWChallengeCompletion("NapalmHarrier2")) { if(%client.CheckNWChallengeCompletion("NapalmHarrier3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert III: Call in 110 Napalm Airstrikes"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert III: Call in 110 Napalm Airstrikes"); %index++; } else { @@ -161,7 +161,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("GunHeli1")) { if(%client.CheckNWChallengeCompletion("GunHeli2")) { if(%client.CheckNWChallengeCompletion("GunHeli3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert III: Call in 110 Gunship Helicopters"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert III: Call in 110 Gunship Helicopters"); %index++; } else { @@ -182,7 +182,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("SBomber1")) { if(%client.CheckNWChallengeCompletion("SBomber2")) { if(%client.CheckNWChallengeCompletion("SBomber3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert III: Call in 100 Stealth Bombers"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert III: Call in 100 Stealth Bombers"); %index++; } else { @@ -203,7 +203,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Gunship1")) { if(%client.CheckNWChallengeCompletion("Gunship2")) { if(%client.CheckNWChallengeCompletion("Gunship3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert III: Call in 75 Harbinger Gunships"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert III: Call in 75 Harbinger Gunships"); %index++; } else { @@ -224,7 +224,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Apache1")) { if(%client.CheckNWChallengeCompletion("Apache2")) { if(%client.CheckNWChallengeCompletion("Apache3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert III: Call in 75 Apache Gunners"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert III: Call in 75 Apache Gunners"); %index++; } else { @@ -246,7 +246,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("ACGunship1")) { if(%client.CheckNWChallengeCompletion("ACGunship2")) { if(%client.CheckNWChallengeCompletion("ACGunship3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert III: Call in 75 AC-130 Gunners"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert III: Call in 75 AC-130 Gunners"); %index++; } else { @@ -272,7 +272,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Centaur1")) { if(%client.CheckNWChallengeCompletion("Centaur2")) { if(%client.CheckNWChallengeCompletion("Centaur3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert III: Call in 50 Artillery Strikes"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert III: Call in 50 Artillery Strikes"); %index++; } else { @@ -293,7 +293,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("EMP1")) { if(%client.CheckNWChallengeCompletion("EMP2")) { if(%client.CheckNWChallengeCompletion("EMP3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert III: Call in 25 Mass EMP's"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert III: Call in 25 Mass EMP's"); %index++; } else { @@ -314,7 +314,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Nuke1")) { if(%client.CheckNWChallengeCompletion("Nuke2")) { if(%client.CheckNWChallengeCompletion("Nuke3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert III: Call in 25 Nukes"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert III: Call in 25 Nukes"); %index++; } else { @@ -336,7 +336,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Fission1")) { if(%client.CheckNWChallengeCompletion("Fission2")) { if(%client.CheckNWChallengeCompletion("Fission3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert III: Call in 5 Fission Bombs"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert III: Call in 5 Fission Bombs"); %index++; } else { @@ -363,7 +363,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("LOAS1")) { if(%client.CheckNWChallengeCompletion("LOAS2")) { if(%client.CheckNWChallengeCompletion("LOAS3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert III: Call in 15 Low Orbit Orbital Strikes (LOAS)"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert III: Call in 15 Low Orbit Orbital Strikes (LOAS)"); %index++; } else { @@ -394,7 +394,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Yvex1")) { if(%client.CheckNWChallengeCompletion("Yvex2")) { if(%client.CheckNWChallengeCompletion("Yvex3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowy Desecration: Defeat Lord Yvex 10 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowy Desecration: Defeat Lord Yvex 10 Times"); %index++; } else { @@ -415,7 +415,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("CWS1")) { if(%client.CheckNWChallengeCompletion("CWS2")) { if(%client.CheckNWChallengeCompletion("CWS3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger's Bane: Defeat Colonel Windshear 10 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger's Bane: Defeat Colonel Windshear 10 Times"); %index++; } else { @@ -436,7 +436,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("GOL1")) { if(%client.CheckNWChallengeCompletion("GOL2")) { if(%client.CheckNWChallengeCompletion("GOL3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Severe Thunderstorm: Defeat The Ghost Of Lightning 10 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Severe Thunderstorm: Defeat The Ghost Of Lightning 10 Times"); %index++; } else { @@ -457,7 +457,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("GOF1")) { if(%client.CheckNWChallengeCompletion("GOF2")) { if(%client.CheckNWChallengeCompletion("GOF3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Mt. Death Depleter: Defeat The Ghost Of Fire 5 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Mt. Death Depleter: Defeat The Ghost Of Fire 5 Times"); %index++; } else { @@ -478,7 +478,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Veg1")) { if(%client.CheckNWChallengeCompletion("Veg2")) { if(%client.CheckNWChallengeCompletion("Veg3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Firestorm Ender: Defeat General Vegenor 10 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Firestorm Ender: Defeat General Vegenor 10 Times"); %index++; } else { @@ -499,7 +499,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("LRog1")) { if(%client.CheckNWChallengeCompletion("LRog2")) { if(%client.CheckNWChallengeCompletion("LRog3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Payback's A Bitch: Defeat Lord Rog 7 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Payback's A Bitch: Defeat Lord Rog 7 Times"); %index++; } else { @@ -520,7 +520,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Ins1")) { if(%client.CheckNWChallengeCompletion("Ins2")) { if(%client.CheckNWChallengeCompletion("Ins3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gravitational Influx: Defeat Major Insignia 7 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gravitational Influx: Defeat Major Insignia 7 Times"); %index++; } else { @@ -541,7 +541,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Stormrider1")) { if(%client.CheckNWChallengeCompletion("Stormrider2")) { if(%client.CheckNWChallengeCompletion("Stormrider3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Fighter Demolisher: Defeat Commander Stormrider 10 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Fighter Demolisher: Defeat Commander Stormrider 10 Times"); %index++; } else { @@ -562,7 +562,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Treb1")) { if(%client.CheckNWChallengeCompletion("Treb2")) { if(%client.CheckNWChallengeCompletion("Treb3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Tank Halter: Defeat Lordranius Trevor 7 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Tank Halter: Defeat Lordranius Trevor 7 Times"); %index++; } else { @@ -583,7 +583,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Vard1")) { if(%client.CheckNWChallengeCompletion("Vard2")) { if(%client.CheckNWChallengeCompletion("Vard3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Outevil The Wicked: Defeat Lord Vardison 5 Times"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Outevil The Wicked: Defeat Lord Vardison 5 Times"); %index++; } else { @@ -602,7 +602,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("VardEasy")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience: Defeat Lord Vardison on Easy Difficulty"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience: Defeat Lord Vardison on Easy Difficulty"); %index++; } else { @@ -610,7 +610,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { %index++; } if(%client.CheckNWChallengeCompletion("VardNorm")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter: Defeat Lord Vardison on Normal Difficulty"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter: Defeat Lord Vardison on Normal Difficulty"); %index++; } else { @@ -618,7 +618,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { %index++; } if(%client.CheckNWChallengeCompletion("VardHard")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer: Defeat Lord Vardison on Hard Difficulty"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer: Defeat Lord Vardison on Hard Difficulty"); %index++; } else { @@ -626,7 +626,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { %index++; } if(%client.CheckNWChallengeCompletion("VardWtf")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm: You're a fucking badass... Just bask in that..."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm: You're a fucking badass... Just bask in that..."); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; @@ -641,7 +641,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("ShadeLord1")) { if(%client.CheckNWChallengeCompletion("ShadeLord2")) { if(%client.CheckNWChallengeCompletion("ShadeLord3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Dawnlight Encarnate: Defeat The Shade Lord for the Third Time"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Dawnlight Encarnate: Defeat The Shade Lord for the Third Time"); %index++; } else { @@ -670,7 +670,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Slayer3")) { if(%client.CheckNWChallengeCompletion("Slayer4")) { if(%client.CheckNWChallengeCompletion("Slayer5")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer V: Kill 1,000 Enemy Players"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer V: Kill 1,000 Enemy Players"); %index++; } else { @@ -701,7 +701,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Defectionator1")) { if(%client.CheckNWChallengeCompletion("Defectionator2")) { if(%client.CheckNWChallengeCompletion("Defectionator3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator III: Kill 500 \"Zombified\" Players"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator III: Kill 500 \"Zombified\" Players"); %index++; } else { @@ -722,7 +722,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("Infectionator1")) { if(%client.CheckNWChallengeCompletion("Infectionator2")) { if(%client.CheckNWChallengeCompletion("Infectionator3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator III: Convert 250 Players to the Zombie Horde"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator III: Convert 250 Players to the Zombie Horde"); %index++; } else { @@ -743,7 +743,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("HSHoncho1")) { if(%client.CheckNWChallengeCompletion("HSHoncho2")) { if(%client.CheckNWChallengeCompletion("HSHoncho3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho III: Eliminate 300 Enemy Players with Headshots"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho III: Eliminate 300 Enemy Players with Headshots"); %index++; } else { @@ -764,7 +764,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("VehMans1")) { if(%client.CheckNWChallengeCompletion("VehMans2")) { if(%client.CheckNWChallengeCompletion("VehMans3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter III: Eliminate 250 Enemy Players with a vehicle"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter III: Eliminate 250 Enemy Players with a vehicle"); %index++; } else { @@ -783,7 +783,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Assassin")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Assassinator: Backstab an enemy player using the Blade of Vengeance"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Assassinator: Backstab an enemy player using the Blade of Vengeance"); %index++; } else { @@ -792,7 +792,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("CompletelyUnexpected")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "That Was... Unexpected: Eliminate someone playing as General Rog by backstabbing them with the Blade of Vengence"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "That Was... Unexpected: Eliminate someone playing as General Rog by backstabbing them with the Blade of Vengence"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; @@ -805,7 +805,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Uncomprehendable")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Uncomprehendable: You committed the ultimate vehicle kill humiliation, well done!"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Uncomprehendable: You committed the ultimate vehicle kill humiliation, well done!"); %index++; } else { @@ -822,7 +822,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("NormHunter1")) { if(%client.CheckNWChallengeCompletion("NormHunter2")) { if(%client.CheckNWChallengeCompletion("NormHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster III: Slay 10,000 Zombies (Normal Type)"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster III: Slay 10,000 Zombies (Normal Type)"); %index++; } else { @@ -843,7 +843,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("RavHunter1")) { if(%client.CheckNWChallengeCompletion("RavHunter2")) { if(%client.CheckNWChallengeCompletion("RavHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills III: Slay 5,000 Ravager Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills III: Slay 5,000 Ravager Zombies"); %index++; } else { @@ -864,7 +864,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("LordHunter1")) { if(%client.CheckNWChallengeCompletion("LordHunter2")) { if(%client.CheckNWChallengeCompletion("LordHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are III: Slay 3,000 Zombie Lords"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are III: Slay 3,000 Zombie Lords"); %index++; } else { @@ -885,7 +885,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("DemonHunter1")) { if(%client.CheckNWChallengeCompletion("DemonHunter2")) { if(%client.CheckNWChallengeCompletion("DemonHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant III: Slay 5,000 Demon Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant III: Slay 5,000 Demon Zombies"); %index++; } else { @@ -906,7 +906,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("AirRapHunter1")) { if(%client.CheckNWChallengeCompletion("AirRapHunter2")) { if(%client.CheckNWChallengeCompletion("AirRapHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer III: Slay 6,000 Air Rapier Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer III: Slay 6,000 Air Rapier Zombies"); %index++; } else { @@ -927,7 +927,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("DLordHunter1")) { if(%client.CheckNWChallengeCompletion("DLordHunter2")) { if(%client.CheckNWChallengeCompletion("DLordHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator III: Slay 1,500 Demon Lord Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator III: Slay 1,500 Demon Lord Zombies"); %index++; } else { @@ -948,7 +948,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("ShifterHunter1")) { if(%client.CheckNWChallengeCompletion("ShifterHunter2")) { if(%client.CheckNWChallengeCompletion("ShifterHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp III: Slay 6,000 Shifter Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp III: Slay 6,000 Shifter Zombies"); %index++; } else { @@ -969,7 +969,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("SummonerHunter1")) { if(%client.CheckNWChallengeCompletion("SummonerHunter2")) { if(%client.CheckNWChallengeCompletion("SummonerHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter III: Slay 5,000 Zombie Summoners"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter III: Slay 5,000 Zombie Summoners"); %index++; } else { @@ -990,7 +990,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("SniperHunter1")) { if(%client.CheckNWChallengeCompletion("SniperHunter2")) { if(%client.CheckNWChallengeCompletion("SniperHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker III: Slay 5,000 Sniper Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker III: Slay 5,000 Sniper Zombies"); %index++; } else { @@ -1011,7 +1011,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("UDemHunter1")) { if(%client.CheckNWChallengeCompletion("UDemHunter2")) { if(%client.CheckNWChallengeCompletion("UDemHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down III: Slay 5,000 Ultra Demon Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down III: Slay 5,000 Ultra Demon Zombies"); %index++; } else { @@ -1032,7 +1032,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("VRavHunter1")) { if(%client.CheckNWChallengeCompletion("VRavHunter2")) { if(%client.CheckNWChallengeCompletion("VRavHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through III: Slay 5,000 Volatile Ravager Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through III: Slay 5,000 Volatile Ravager Zombies"); %index++; } else { @@ -1053,7 +1053,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("SSHunter1")) { if(%client.CheckNWChallengeCompletion("SSHunter2")) { if(%client.CheckNWChallengeCompletion("SSHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer III: Slay 5,000 Slingshot Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer III: Slay 5,000 Slingshot Zombies"); %index++; } else { @@ -1074,7 +1074,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { if(%client.CheckNWChallengeCompletion("WraithHunter1")) { if(%client.CheckNWChallengeCompletion("WraithHunter2")) { if(%client.CheckNWChallengeCompletion("WraithHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops III: Slay 1,000 Wraith Zombies"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops III: Slay 1,000 Wraith Zombies"); %index++; } else { @@ -1099,7 +1099,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { messageClient( %client, 'SetLineHud', "", %tag, %index, "Special Event Challenges:"); %index++; if(%client.CheckNWChallengeCompletion("NewYearsEve")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Eve Fireworks: Get a Javelin Kill on New Year's Eve."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Eve Fireworks: Get a Javelin Kill on New Year's Eve."); %index++; } else { @@ -1108,7 +1108,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("NewYears")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Fireworks: Call in a Nuclear Strike on New Year's Day."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Fireworks: Call in a Nuclear Strike on New Year's Day."); %index++; } else { @@ -1117,7 +1117,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("GunshipMall")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship to The Mall: Call in a Gunship Killstreak on Christmas Mall 2009."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship to The Mall: Call in a Gunship Killstreak on Christmas Mall 2009."); %index++; } else { @@ -1126,7 +1126,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("IndepRPG")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Independance RPG: Score an RPG Kill on the Fourth of July."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Independance RPG: Score an RPG Kill on the Fourth of July."); %index++; } else { @@ -1135,7 +1135,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("SoulsticeBombard")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Soulstice Bombard: Call in artillery on one of the soulstices (6/21 or 12/21)."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Soulstice Bombard: Call in artillery on one of the soulstices (6/21 or 12/21)."); %index++; } else { @@ -1155,7 +1155,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { messageClient( %client, 'SetLineHud', "", %tag, %index, "Sabotage Game Mode Challenges:"); %index++; if(%client.CheckNWChallengeCompletion("BombDisarmed")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed: Disarm an enemy bomb."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed: Disarm an enemy bomb."); %index++; } else { @@ -1164,7 +1164,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("BombPlanted")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Planted: Arm the bomb at the objective."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Planted: Arm the bomb at the objective."); %index++; } else { @@ -1173,7 +1173,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("BombDetonated")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Detonated: Win a Round Of Sabotage."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Detonated: Win a Round Of Sabotage."); %index++; } else { @@ -1182,7 +1182,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("3For5Sabo")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Sabotage in a match."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Sabotage in a match."); %index++; } else { @@ -1191,7 +1191,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("BaseDestroyer")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Base Destroyer: Go Undefeated in a full game of Sabotage."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Base Destroyer: Go Undefeated in a full game of Sabotage."); %index++; } else { @@ -1206,7 +1206,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { messageClient( %client, 'SetLineHud', "", %tag, %index, "Domination Game Mode Challenges:"); %index++; if(%client.CheckNWChallengeCompletion("ZoneCapture")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Zone Conquerer: Capture an Area."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Zone Conquerer: Capture an Area."); %index++; } else { @@ -1215,7 +1215,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("ABC")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Alpha Bravo Charlie: Secure All Three Areas at one Time."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Alpha Bravo Charlie: Secure All Three Areas at one Time."); %index++; } else { @@ -1224,7 +1224,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("MatchSet")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Match Set: Win a Round Of Domination."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Match Set: Win a Round Of Domination."); %index++; } else { @@ -1233,7 +1233,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("3For5")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Domination."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Domination."); %index++; } else { @@ -1242,7 +1242,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Undefeatable")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Undefeatable: Go Undefeated in a full game of Domination."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Undefeatable: Go Undefeated in a full game of Domination."); %index++; } else { @@ -1257,7 +1257,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde 3 Game Mode Challenges:"); %index++; if(%client.CheckNWChallengeCompletion("15For15")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "15 For 15: Complete Wave 15."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "15 For 15: Complete Wave 15."); %index++; } else { @@ -1266,7 +1266,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Milestone25")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Milestone 25: Complete Wave 25."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Milestone 25: Complete Wave 25."); %index++; } else { @@ -1275,7 +1275,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("ArmyOf50Stopped")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Army Of 50 Stopped: Complete Horde 3 (All 50 Waves)."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Army Of 50 Stopped: Complete Horde 3 (All 50 Waves)."); %index++; } else { @@ -1284,7 +1284,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Angel")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Angel: Revive a fallen teammate in Horde."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Angel: Revive a fallen teammate in Horde."); %index++; } else { @@ -1293,7 +1293,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("ZBomber")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Z-Bomber: Call in a Z-Bomb While Playing Horde."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Z-Bomber: Call in a Z-Bomb While Playing Horde."); %index++; } else { @@ -1302,7 +1302,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("FirstBlood")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "First Blood: Kill the first zombie that spawns in a Horde 3 game."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "First Blood: Kill the first zombie that spawns in a Horde 3 game."); %index++; } else { @@ -1311,7 +1311,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("SpeedSlayer")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Slayer: Be the featured first killer 10 times in a single game."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Slayer: Be the featured first killer 10 times in a single game."); %index++; } else { @@ -1320,7 +1320,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("HighScorer")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "High Scorer: Be the featured high scorer 10 times in a single game."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "High Scorer: Be the featured high scorer 10 times in a single game."); %index++; } else { @@ -1335,7 +1335,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { messageClient( %client, 'SetLineHud', "", %tag, %index, "Helljump Game Mode Challenges:"); %index++; if(%client.CheckNWChallengeCompletion("GroupBuster")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Group Buster: Complete A Group."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Group Buster: Complete A Group."); %index++; } else { @@ -1344,7 +1344,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("WaveDefeater")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Wave Defeater: Complete A Wave."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Wave Defeater: Complete A Wave."); %index++; } else { @@ -1353,7 +1353,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("OneK")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "1K Soldier: Earn 1,000 Points (Solo Score)."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "1K Soldier: Earn 1,000 Points (Solo Score)."); %index++; } else { @@ -1362,7 +1362,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("FiveK")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "5K Soldier: Earn 5,000 Points (Solo Score)."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "5K Soldier: Earn 5,000 Points (Solo Score)."); %index++; } else { @@ -1371,7 +1371,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("TenK")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "10K Soldier: Earn 10,000 Points (Solo Score)."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "10K Soldier: Earn 10,000 Points (Solo Score)."); %index++; } else { @@ -1380,7 +1380,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("PointsSurge")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Surge: Earn 7,500 Points (Team Score)."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Surge: Earn 7,500 Points (Team Score)."); %index++; } else { @@ -1389,7 +1389,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("PointsJackpot")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Jackpot: Earn 25,000 Points (Team Score)."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Jackpot: Earn 25,000 Points (Team Score)."); %index++; } else { @@ -1398,7 +1398,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("DownBoy")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Down Boy... Down: Kill the wraith zombie on Strike 5."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Down Boy... Down: Kill the wraith zombie on Strike 5."); %index++; } else { @@ -1407,7 +1407,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("ClassExtravaganza")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Class Extravaganza: Use a hellclass."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Class Extravaganza: Use a hellclass."); %index++; } else { @@ -1416,7 +1416,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("LifeGiver")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Giver of Life: Use a Full Team Respawn beacon."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Giver of Life: Use a Full Team Respawn beacon."); %index++; } else { @@ -1431,7 +1431,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top (Mission) Challenges:"); %index++; if(%client.CheckNWChallengeCompletion("SimonSays")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Simon Says: Order a mission."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Simon Says: Order a mission."); %index++; } else { @@ -1440,7 +1440,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("FromTheTop")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top: Accept a mission."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top: Accept a mission."); %index++; } else { @@ -1449,7 +1449,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("NaturalLeader")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Natural Leader: Order a mission and have another player join your team."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Natural Leader: Order a mission and have another player join your team."); %index++; } else { @@ -1458,7 +1458,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("GoldStar")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gold Star: Complete a mission within the time limit."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Gold Star: Complete a mission within the time limit."); %index++; } else { @@ -1467,7 +1467,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Faster")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Faster!: Complete a mission, but miss the time limit."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Faster!: Complete a mission, but miss the time limit."); %index++; } else { @@ -1476,7 +1476,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("EpicFailure")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Epic Failure: Fail a mission ;)."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Epic Failure: Fail a mission ;)."); %index++; } else { @@ -1485,7 +1485,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("ExpertGunner")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Expert AC-130 Gunner: Complete 'Rain Down'."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Expert AC-130 Gunner: Complete 'Rain Down'."); %index++; } else { @@ -1494,7 +1494,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Survivalist")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Survivalist: Complete 'Surrounded'."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Survivalist: Complete 'Surrounded'."); %index++; } else { @@ -1503,7 +1503,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Invisibreh")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shhh.. I'm Invisibreh: Complete 'Enemy AC-130 Above' by outlasting the enemy AC-130."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shhh.. I'm Invisibreh: Complete 'Enemy AC-130 Above' by outlasting the enemy AC-130."); %index++; } else { @@ -1512,7 +1512,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("WeakGunship")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "I have you now!: Complete 'Enemy AC-130 Above' by destroying the enemy AC-130."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "I have you now!: Complete 'Enemy AC-130 Above' by destroying the enemy AC-130."); %index++; } else { @@ -1521,7 +1521,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("InvasionBuster")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Invade THIS!: Complete 'Invasion'."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Invade THIS!: Complete 'Invasion'."); %index++; } else { @@ -1530,7 +1530,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("SurvivalistExtreme")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Extreme Survivalist: Complete 'Surrounded 2.0'."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Extreme Survivalist: Complete 'Surrounded 2.0'."); %index++; } else { @@ -1545,7 +1545,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges:"); %index++; if(%client.CheckNWChallengeCompletion("Prestge1")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Private - Reach Officer Level 1."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Private - Reach Officer Level 1."); %index++; } else { @@ -1554,7 +1554,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Prestge2")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Private - Reach Officer Level 2."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Private - Reach Officer Level 2."); %index++; } else { @@ -1563,7 +1563,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Prestge3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Private - Reach Officer Level 3."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Private - Reach Officer Level 3."); %index++; } else { @@ -1572,7 +1572,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Prestge4")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Private - Reach Officer Level 4."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Private - Reach Officer Level 4."); %index++; } else { @@ -1581,7 +1581,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Prestge5")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Private - Reach Officer Level 5."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Private - Reach Officer Level 5."); %index++; } else { @@ -1590,7 +1590,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("Prestge9")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Reach Oficer Level 9."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Reach Oficer Level 9."); %index++; } else { @@ -1599,7 +1599,7 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { } // if(%client.CheckNWChallengeCompletion("GameEnder")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Game Ender - Call in a Fission Bomb."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Game Ender - Call in a Fission Bomb."); %index++; } else { diff --git a/scripts/TWM2/Systems/DChalg.cs b/scripts/TWM2/Systems/DChalg.cs index 07e3305..9e3fbac 100644 --- a/scripts/TWM2/Systems/DChalg.cs +++ b/scripts/TWM2/Systems/DChalg.cs @@ -16,7 +16,7 @@ function downloadChallenges() { echo("* Downloading Challenge List, scheduling next download"); messageAll('MsgAdminForce', "\c3TWM2: Downloading challenges from PGD server."); %connection = new TCPObject(ChallengeDownload); - %location = "/public/TWM2/Challenge/"; + %location = "/public/Univ/twm2/"; %host = $PGDServer; // %request = "GET" SPC %location SPC "HTTP/1.1\x0aHost: "@%host@"\r\n\r\n"; @@ -38,7 +38,7 @@ function downloadChallenges_Manual() { echo("* Downloading Challenge List, scheduling next download"); messageAll('MsgAdminForce', "\c3TWM2: Downloading challenges from PGD server."); %connection = new TCPObject(ChallengeDownload); - %location = "/public/TWM2/Challenge/"; + %location = "/public/Univ/twm2/"; %host = $PGDServer; // %request = "GET" SPC %location SPC "HTTP/1.1\x0aHost: "@%host@"\r\n\r\n"; @@ -742,9 +742,9 @@ function updateChallengeFile(%client) { function GenerateDWMChallengeMenu(%client, %tag, %index) { %dateStr = formattimestring("yymmdd"); - messageClient( %client, 'SetLineHud', "", %tag, %index, " Red Indicates A Completed Challenge"); + messageClient( %client, 'SetLineHud', "", %tag, %index, " Green Indicates A Completed Challenge"); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, " Green Indicates An Active Challenge"); + messageClient( %client, 'SetLineHud', "", %tag, %index, " Uncolored Indicates An Active Challenge"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "4/20/16: New Daily Challenge System is Live!"); for(%i = 1; isSet($Challenges::Challenge[%i]); %i++) { @@ -760,7 +760,7 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { %index+=2; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*DAILY* "@%cName@" - "@%cDesc@" *"@%CRewd@"EXP"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "=*DAILY* "@%cName@" - "@%cDesc@" *"@%CRewd@"EXP"); %index+=2; } } @@ -771,7 +771,7 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { %index+=2; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*WEEKLY* "@%cName@" - "@%cDesc@" *"@%CRewd@"EXP"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "*WEEKLY* "@%cName@" - "@%cDesc@" *"@%CRewd@"EXP"); %index+=2; } } @@ -781,7 +781,7 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { %index+=2; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*MONTHLY* "@%cName@" - "@%cDesc@" *"@%CRewd@"EXP"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "*MONTHLY* "@%cName@" - "@%cDesc@" *"@%CRewd@"EXP"); %index+=2; } } diff --git a/scripts/TWM2/Systems/WeaponChallenges.cs b/scripts/TWM2/Systems/WeaponChallenges.cs index d7ed083..51855cb 100644 --- a/scripts/TWM2/Systems/WeaponChallenges.cs +++ b/scripts/TWM2/Systems/WeaponChallenges.cs @@ -238,7 +238,7 @@ function GenerateWChallengeSubMenu(%client, %tag, %index, %image) { %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%taskName@" - Earn "@%taskReq@" Kills with this weapon"); + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%taskName@" - Earn "@%taskReq@" Kills with this weapon"); %index++; } } From 10e4681983b3460ec5bc50f0ec753dd2d32cd025 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Thu, 29 Jun 2017 18:05:34 -0500 Subject: [PATCH 11/29] A few missed things Missed a few items in the menu, added text for in-game to see that challenges are now reactivated! --- scripts/TWM2/Systems/DChalg.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/TWM2/Systems/DChalg.cs b/scripts/TWM2/Systems/DChalg.cs index 9e3fbac..5370ae7 100644 --- a/scripts/TWM2/Systems/DChalg.cs +++ b/scripts/TWM2/Systems/DChalg.cs @@ -744,9 +744,12 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { %dateStr = formattimestring("yymmdd"); messageClient( %client, 'SetLineHud', "", %tag, %index, " Green Indicates A Completed Challenge"); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, " Uncolored Indicates An Active Challenge"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Uncolored Indicates An Active Challenge"); %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "6/29/17: PGD Challenges reacitvated, now running 5x daily"); + %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "4/20/16: New Daily Challenge System is Live!"); + %index++; for(%i = 1; isSet($Challenges::Challenge[%i]); %i++) { %challenge = $Challenges::Challenge[%i]; %cType = getField(%challenge, 0); From 43f1b91df331a74db2d5aa6e897a7ca505d190be Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Thu, 29 Jun 2017 18:09:20 -0500 Subject: [PATCH 12/29] I can color... lol Speak not of this failure... :D --- scripts/TWM2/Systems/DChalg.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/TWM2/Systems/DChalg.cs b/scripts/TWM2/Systems/DChalg.cs index 5370ae7..2e00612 100644 --- a/scripts/TWM2/Systems/DChalg.cs +++ b/scripts/TWM2/Systems/DChalg.cs @@ -742,7 +742,7 @@ function updateChallengeFile(%client) { function GenerateDWMChallengeMenu(%client, %tag, %index) { %dateStr = formattimestring("yymmdd"); - messageClient( %client, 'SetLineHud', "", %tag, %index, " Green Indicates A Completed Challenge"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Green Indicates A Completed Challenge"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Uncolored Indicates An Active Challenge"); %index++; @@ -759,7 +759,7 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { // if(%cType == 1) { if(%client.TWM2Controller.completed[%i, %dateStr]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*DAILY* "@%cName@" - Completed"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "*DAILY* "@%cName@" - Completed"); %index+=2; } else { @@ -770,7 +770,7 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { // else if(%cType == 2) { if(%client.TWM2Controller.completed[%i, %dateStr]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*WEEKLY* "@%cName@" - Completed"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "*WEEKLY* "@%cName@" - Completed"); %index+=2; } else { @@ -780,7 +780,7 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { } else { if(%client.TWM2Controller.completed[%i, %dateStr]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*MONTHLY* "@%cName@" - Completed"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "*MONTHLY* "@%cName@" - Completed"); %index+=2; } else { From 497ecfc18295f7b7aa57d0d70fedb88395c7d6f8 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Thu, 29 Jun 2017 22:11:25 -0500 Subject: [PATCH 13/29] Additional bug fixes Chat bot fixes, Demon Lord Zombie Fixes, F2 Menu Fixes, Officer Promotion Challenge Fixes. --- scripts/TWM2/ChatCommands/SuperAdmin.cs | 5 +- scripts/TWM2/Systems/AdvancedRankSystem.cs | 112 +++++++----------- scripts/TWM2/Systems/ChallengeMenus.cs | 117 ++++++++++++++++--- scripts/TWM2/Systems/ChatBot.cs | 13 ++- scripts/TWM2/Systems/NWChallengeIndex.cs | 109 ++++++++--------- scripts/TWM2/Systems/scoremenucmds.cs | 2 +- scripts/TWM2/Zombie/MiscZombieFunctions.cs | 3 + scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs | 2 +- scripts/message.cs | 12 +- 9 files changed, 213 insertions(+), 162 deletions(-) diff --git a/scripts/TWM2/ChatCommands/SuperAdmin.cs b/scripts/TWM2/ChatCommands/SuperAdmin.cs index b2e4099..c7eb8f7 100644 --- a/scripts/TWM2/ChatCommands/SuperAdmin.cs +++ b/scripts/TWM2/ChatCommands/SuperAdmin.cs @@ -264,10 +264,7 @@ function parseSuperAdminCommands(%sender, %command, %args) { messageclient(%sender, 'MsgClient', '\c2No such player.'); return 1; } - - if(!isSet(%target.ksListInstance)) { - %target.ksListInstance = initList(); - } + %cAmt = 0; %sw = strlwr(getWord(%args,1)); diff --git a/scripts/TWM2/Systems/AdvancedRankSystem.cs b/scripts/TWM2/Systems/AdvancedRankSystem.cs index 2f810f6..e9108e4 100644 --- a/scripts/TWM2/Systems/AdvancedRankSystem.cs +++ b/scripts/TWM2/Systems/AdvancedRankSystem.cs @@ -66,7 +66,11 @@ function LoadClientRankfile(%client) { echo("Found TWM2 Rank/Setting Client Controller for "@%client@" -> "@%object@""); %client.TWM2Core = %object; } - // + //Check Officer Challenges. + for(%i = %client.TWM2Core.officer; %i > 0; %i--) { + %oChN = "Prestige"@%i; + CompleteNWChallenge(%client, %oChN); + } TWM2Lib_MainControl("PlayerTimeLoop", %client); //post load functions } @@ -109,43 +113,42 @@ function UpdateClientRank(%client) { } function runRankUpdateLoop(%client, %j, %continue) { - if(!%continue) { - return; - //break the function run through here - } - if(%j <= 0) { - return; - } - %name = %client.namebase; - %scriptController = %client.TWM2Core; - if(getCurrentEXP(%client) >= $Ranks::MinPoints[%j]){ - if(%scriptController.rank !$= $Ranks::NewRank[%j] && !fetchCap("Level", ((%scriptController.officer)*$Rank::RankCount)+%j)) { - %scriptController.rankNumber = %j; - if($TWM2::UseRankTags) { - DoNameChangeChecks(%client); - } - %scriptController.rank = $Ranks::NewRank[%j]; - if($Prestige::Name[%scriptController.officer] >= 1) { - $Prestige::Name[%scriptController.officer] = ""; - } - messageAll('msgclient',"\c2"@%name@" has become a "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@" with a XP of "@printCurrentEXP(%client)@"!"); - messageclient(%client, 'Msgclient', "~wfx/Bonuses/Nouns/General.wav"); - bottomPrint(%client, "Excelent work "@%name@", you have been promoted to the rank of: "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@"!", 5, 2 ); - echo("Promotion: "@%name@" to Rank "@$Ranks::NewRank[%j]@", XP: "@getCurrentEXP(%client)@"."); - //UpdateRankFile(%client); - SaveClientFile(%client); - // - if(!$TWM2::PGDConnectDisabled) { - PrepareUpload(%client); - } - %j = 1; - runRankUpdateLoop(%client, %j, 0); - } - } - else { - %j--; - runRankUpdateLoop(%client, %j, 1); - } + if(!%continue) { + return; + } + if(%j <= 0) { + return; + } + %name = %client.namebase; + %scriptController = %client.TWM2Core; + //perform rank update + if(getCurrentEXP(%client) >= $Ranks::MinPoints[%j]){ + if(%scriptController.rank !$= $Ranks::NewRank[%j] && !fetchCap("Level", ((%scriptController.officer)*$Rank::RankCount)+%j)) { + %scriptController.rankNumber = %j; + if($TWM2::UseRankTags) { + DoNameChangeChecks(%client); + } + %scriptController.rank = $Ranks::NewRank[%j]; + if($Prestige::Name[%scriptController.officer] >= 1) { + $Prestige::Name[%scriptController.officer] = ""; + } + messageAll('msgclient',"\c2"@%name@" has become a "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@" with a XP of "@printCurrentEXP(%client)@"!"); + messageclient(%client, 'Msgclient', "~wfx/Bonuses/Nouns/General.wav"); + bottomPrint(%client, "Excelent work "@%name@", you have been promoted to the rank of: "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@"!", 5, 2 ); + echo("Promotion: "@%name@" to Rank "@$Ranks::NewRank[%j]@", XP: "@getCurrentEXP(%client)@"."); + SaveClientFile(%client); + // + if(!$TWM2::PGDConnectDisabled) { + PrepareUpload(%client); + } + %j = 1; + runRankUpdateLoop(%client, %j, 0); + } + } + else { + %j--; + runRankUpdateLoop(%client, %j, 1); + } } function fetchCap(%type, %index) { @@ -258,35 +261,10 @@ function PromoteToPrestige(%client) { MessageAll('msgSpecial', "\c5"@%client.namebase@" has promoted to Officer level "@%next@"."); recordAction(%client, "", ""); //record blank action for the challenges to pick off any officer challenges - - switch(%next) { - case 1: - schedule(1000, 0, "CompleteNWChallenge", %client, "Prestige1"); - case 2: - schedule(1000, 0, "CompleteNWChallenge", %client, "Prestige1"); - schedule(1500, 0, "CompleteNWChallenge", %client, "Prestige2"); - case 3: - schedule(1000, 0, "CompleteNWChallenge", %client, "Prestige1"); - schedule(1500, 0, "CompleteNWChallenge", %client, "Prestige2"); - schedule(2000, 0, "CompleteNWChallenge", %client, "Prestige3"); - case 4: - schedule(1000, 0, "CompleteNWChallenge", %client, "Prestige1"); - schedule(1500, 0, "CompleteNWChallenge", %client, "Prestige2"); - schedule(2000, 0, "CompleteNWChallenge", %client, "Prestige3"); - schedule(2500, 0, "CompleteNWChallenge", %client, "Prestige4"); - case 5 or 6 or 7 or 8: - schedule(1000, 0, "CompleteNWChallenge", %client, "Prestige1"); - schedule(1500, 0, "CompleteNWChallenge", %client, "Prestige2"); - schedule(2000, 0, "CompleteNWChallenge", %client, "Prestige3"); - schedule(2500, 0, "CompleteNWChallenge", %client, "Prestige4"); - schedule(3000, 0, "CompleteNWChallenge", %client, "Prestige5"); - case 9: - schedule(1000, 0, "CompleteNWChallenge", %client, "Prestige1"); - schedule(1500, 0, "CompleteNWChallenge", %client, "Prestige2"); - schedule(2000, 0, "CompleteNWChallenge", %client, "Prestige3"); - schedule(2500, 0, "CompleteNWChallenge", %client, "Prestige4"); - schedule(3000, 0, "CompleteNWChallenge", %client, "Prestige5"); - schedule(3500, 0, "CompleteNWChallenge", %client, "Prestige9"); + + for(%i = %next; %i > 0; %i--) { + %oChN = "Prestige"@%i; + CompleteNWChallenge(%client, %oChN); } } diff --git a/scripts/TWM2/Systems/ChallengeMenus.cs b/scripts/TWM2/Systems/ChallengeMenus.cs index cccb015..908df37 100644 --- a/scripts/TWM2/Systems/ChallengeMenus.cs +++ b/scripts/TWM2/Systems/ChallengeMenus.cs @@ -1544,60 +1544,141 @@ function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { //Officer Promotion messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges:"); %index++; - if(%client.CheckNWChallengeCompletion("Prestge1")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Private - Reach Officer Level 1."); + if(%client.CheckNWChallengeCompletion("Prestige1")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Officer - Reach Officer Level 1."); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Private - Reach Officer Level 1."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); %index++; } // - if(%client.CheckNWChallengeCompletion("Prestge2")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Private - Reach Officer Level 2."); + if(%client.CheckNWChallengeCompletion("Prestige2")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Officer - Reach Officer Level 2."); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Private - Reach Officer Level 2."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); %index++; } // - if(%client.CheckNWChallengeCompletion("Prestge3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Private - Reach Officer Level 3."); + if(%client.CheckNWChallengeCompletion("Prestige3")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Officer - Reach Officer Level 3."); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Private - Reach Officer Level 3."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); %index++; } // - if(%client.CheckNWChallengeCompletion("Prestge4")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Private - Reach Officer Level 4."); + if(%client.CheckNWChallengeCompletion("Prestige4")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Officer - Reach Officer Level 4."); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Private - Reach Officer Level 4."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); %index++; } // - if(%client.CheckNWChallengeCompletion("Prestge5")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Private - Reach Officer Level 5."); + if(%client.CheckNWChallengeCompletion("Prestige5")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Officer - Reach Officer Level 5."); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Private - Reach Officer Level 5."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); %index++; } // - if(%client.CheckNWChallengeCompletion("Prestge9")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Reach Oficer Level 9."); + if(%client.CheckNWChallengeCompletion("Prestige6")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Glorious Officer - Reach Officer Level 6."); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom's Vengeance - Reach Oficer Level 9."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); %index++; } // + if(%client.CheckNWChallengeCompletion("Prestige7")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Ultimate Officer - Reach Officer Level 7."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestige8")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowing Officer - Reach Officer Level 8."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestige9")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom Officer - Reach Oficer Level 9."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestige10")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Brutal Officer - Reach Oficer Level 10."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestige11")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Vengeful Officer - Reach Oficer Level 11."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestige12")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Noble Officer - Reach Oficer Level 12."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestige13")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Spectral Officer - Reach Oficer Level 13."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestige14")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Masterful Officer - Reach Oficer Level 14."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); + %index++; + } + // + if(%client.CheckNWChallengeCompletion("Prestige15")) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Rising Harbinger - Reach The Highest Officer Level (15)."); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); + %index++; + } + // if(%client.CheckNWChallengeCompletion("GameEnder")) { messageClient( %client, 'SetLineHud', "", %tag, %index, "Game Ender - Call in a Fission Bomb."); %index++; diff --git a/scripts/TWM2/Systems/ChatBot.cs b/scripts/TWM2/Systems/ChatBot.cs index d42ec1f..56e96b5 100644 --- a/scripts/TWM2/Systems/ChatBot.cs +++ b/scripts/TWM2/Systems/ChatBot.cs @@ -21,6 +21,9 @@ //The Core Function function ScanMessage(%sender, %message) { + if(getSubStr(trim(%message), 0, 1) $= "/") { + return; + } %name = $ChatBot::Name; %inter = $ChatBot::Interactions; %itter = $ChatBot::Itterations; @@ -38,13 +41,13 @@ function ScanMessage(%sender, %message) { } } //ok, now onto more functioning - %containsName = strStr(getWord(%message, 0), %name); + %containsName = strStr(getWord(%message, 0), strlwr(trim(%name))); //Step 2: Is the name mentioned? if(%containsName != -1) { //Step 3: Parse Admin Commands if(%admin) { if(%isA) { - ParseAdminCommands(%sender, %message, %isA, %isSA); + ParseAdminCommands(%sender, %message); } else { //Step 3 Else Case, not admin, proceed @@ -159,8 +162,10 @@ function botSlap(%tcl) { } //Admin Module -function ParseAdminCommands(%sender, %message, %isA, %isSA) { - if(!%isA) { +function ParseAdminCommands(%sender, %message) { + %isA = %sender.isAdmin; + %isSA = %sender.isSuperAdmin; + if(!%sender.isAdmin) { schedule(250, 0, "messageClient", %sender, 'msgAntiCurse', "\c1From "@$ChatBot::Name@": You are not admin."); } else { diff --git a/scripts/TWM2/Systems/NWChallengeIndex.cs b/scripts/TWM2/Systems/NWChallengeIndex.cs index 488b13b..17d081f 100644 --- a/scripts/TWM2/Systems/NWChallengeIndex.cs +++ b/scripts/TWM2/Systems/NWChallengeIndex.cs @@ -229,12 +229,21 @@ $Challenge::Info["InvasionBuster"] = "Invade THIS!\t11\t25000\tNone"; $Challenge::Info["SurvivalistExtreme"] = "Extreme Survivalist\t11\t50000\tNone"; //Prestige -$Challenge::Info["Prestge1"] = "Instructive Private\t12\t100\tNone"; -$Challenge::Info["Prestge2"] = "Excelling Private\t12\t250\tNone"; -$Challenge::Info["Prestge3"] = "Champion Private\t12\t350\tNone"; -$Challenge::Info["Prestge4"] = "Prestigious Private\t12\t500\tNone"; -$Challenge::Info["Prestge5"] = "Supreme Private\t12\t1000\tNone"; -$Challenge::Info["Prestge9"] = "Phantom's Vengeance\t12\t10000\tNone"; +$Challenge::Info["Prestige1"] = "Instructive Officer\t12\t100\tNone"; +$Challenge::Info["Prestige2"] = "Excelling Officer\t12\t250\tNone"; +$Challenge::Info["Prestige3"] = "Champion Officer\t12\t350\tNone"; +$Challenge::Info["Prestige4"] = "Prestigious Officer\t12\t500\tNone"; +$Challenge::Info["Prestige5"] = "Supreme Officer\t12\t1000\tNone"; +$Challenge::Info["Prestige6"] = "Glorious Officer\t12\t2500\tNone"; +$Challenge::Info["Prestige7"] = "Ultimate Officer\t12\t5000\tNone"; +$Challenge::Info["Prestige8"] = "Shadowing Officer\t12\t7500\tNone"; +$Challenge::Info["Prestige9"] = "Phantom Officer\t12\t10000\tNone"; +$Challenge::Info["Prestige10"] = "Brutal Officer\t12\t10000\tNone"; +$Challenge::Info["Prestige11"] = "Vengeful Officer\t12\t10000\tNone"; +$Challenge::Info["Prestige12"] = "Spectral Officer\t12\t10000\tNone"; +$Challenge::Info["Prestige13"] = "Noble Officer\t12\t10000\tNone"; +$Challenge::Info["Prestige14"] = "Masterful Officer\t12\t10000\tNone"; +$Challenge::Info["Prestige15"] = "Rising Harbinger\t12\t10000\tNone"; $Challenge::Info["GameEnder"] = "Game Ender\t12\t5000\tNone"; @@ -247,59 +256,39 @@ $Challenge::Info["GameEnder"] = "Game Ender\t12\t5000\tNone"; //Core Functions function GameConnection::AllowedToDoNW(%client, %name) { - %scriptController = %client.TWM2Core; - %xp = getCurrentEXP(%client); - %taskCate = getField($Challenge::Info[%name], 1); - switch(%taskCate) { - case 1: - if(%xp > $Ranks::MinPoints[13]) { - return 1; - } - else { - return 0; - } - case 2: - if(%xp > $Ranks::MinPoints[18]) { - return 1; - } - else { - return 0; - } - case 3: - if(%xp > $Ranks::MinPoints[23]) { - return 1; - } - else { - return 0; - } - case 4: - if(%xp > $Ranks::MinPoints[28]) { - return 1; - } - else { - return 0; - } - case 5: - return 1; //everyone can do these. - case 6: - return 1; //handled by a different system - case 7 or 8 or 9 or 10: - if(%xp > $Ranks::MinPoints[40]) { - return 1; - } - else { - return 0; - } - case 11: - if(%xp > $Ranks::MinPoints[59]) { - return 1; - } - else { - return 0; - } - case 12: - return 1; - } + %scriptController = %client.TWM2Core; + %xp = getCurrentEXP(%client); + %taskCate = getField($Challenge::Info[%name], 1); + + if(%taskCate == 5 || %taskCate == 6) { + //Special categories available for all players + return 1; + } + + if(%taskCate == 1) { + return %xp >= $Ranks::MinPoints[13]; + } + else if(%taskCate == 2) { + return %xp >= $Ranks::MinPoints[18]; + } + else if(%taskCate == 3) { + return %xp >= $Ranks::MinPoints[23]; + } + else if(%taskCate == 4) { + return %xp >= $Ranks::MinPoints[28]; + } + else if(%taskCate == 7 || %taskCate == 8 || %taskCate == 9 || %taskCate == 10) { + return %xp >= $Ranks::MinPoints[40]; + } + else if(%taskCate == 11) { + return %xp >= $Ranks::MinPoints[59]; + } + else if(%taskCate == 12) { + return %scriptController.officer >= 1; + } + else { + error("AllowedToDoNW: Invalid challenge category for "@%name@", system shows: "@%taskCate@" ("@%Challenge::Info[%name]@")"); + } } function GameConnection::CheckNWChallengeCompletion(%client, %name) { @@ -347,7 +336,7 @@ function CompleteNWChallenge(%client, %name) { } //Menus -function GenerateChallegnesMenu(%client, %tag, %index) { +function GenerateChallengesMenu(%client, %tag, %index) { %scriptController = %client.TWM2Core; %xp = getCurrentEXP(%client); messageClient( %client, 'SetLineHud', "", %tag, %index, "Select a category to view challenges:"); diff --git a/scripts/TWM2/Systems/scoremenucmds.cs b/scripts/TWM2/Systems/scoremenucmds.cs index 7d8e6d9..fa6592f 100644 --- a/scripts/TWM2/Systems/scoremenucmds.cs +++ b/scripts/TWM2/Systems/scoremenucmds.cs @@ -762,7 +762,7 @@ function ConstructionGame::processGameLink(%game, %client, %arg1, %arg2, %arg3, %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; - %index = GenerateChallegnesMenu(%client, %tag, %index); + %index = GenerateChallengesMenu(%client, %tag, %index); messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return to Challenge Menu'); diff --git a/scripts/TWM2/Zombie/MiscZombieFunctions.cs b/scripts/TWM2/Zombie/MiscZombieFunctions.cs index b823617..8f5461f 100644 --- a/scripts/TWM2/Zombie/MiscZombieFunctions.cs +++ b/scripts/TWM2/Zombie/MiscZombieFunctions.cs @@ -147,6 +147,9 @@ function ChargeEmitter(%zombie){ //************************************************************ function ZombieLookforTarget(%zombie){ + if(!isObject(%zombie)) { + return; + } %wbpos = %zombie.getworldboxcenter(); %z = getWord(%wbpos, 2); if(%z < $zombie::FallDieHeight) { diff --git a/scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs b/scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs index 3f711c4..5b33124 100644 --- a/scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs +++ b/scripts/TWM2/Zombie/ZombieTypes/DemonLord.cs @@ -171,7 +171,7 @@ function DemonMotherThink(%obj){ %closestClient = getWord(%closestClient,0).Player; if(%closestClient != -1){ - %searchobject = %closestclient.player; + %searchobject = %closestclient; %dist = vectorDist(%pos,%searchobject.getPosition()); if(%dist <= 100){ if(%dist <= 50){ //ok were now in combat mode, lets decide on what we should do, move attack, or shoot. diff --git a/scripts/message.cs b/scripts/message.cs index 2b1a48b..71cc07c 100644 --- a/scripts/message.cs +++ b/scripts/message.cs @@ -272,6 +272,7 @@ function chatMessageTeam( %sender, %team, %msgString, %a1, %a2, %a3, %a4, %a5, % return; } LogMessage(%sender, "TEAM: "@%a2@""); + ScanMessage(%sender, %a2); if(%sender $= "" || %sender <= 0) { } @@ -319,14 +320,12 @@ function chatMessageAll( %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, echo("ChatALL: "@%sender.namebase@" : "@%a2@"."); } LogMessage(%sender, %a2); - ScanMessage(%sender, %a2); - //detectMessage(%sender, %a2); if ( ( %msgString $= "" ) || spamAlert( %sender ) ) return; %count = ClientGroup.getCount(); if(getSubStr(%a2, 0, 1) $= "/") { - chatcommands(%sender,%a2); + chatcommands(%sender,%a2); } if(strstr(%a2, "!") == 0) { @@ -356,10 +355,9 @@ function chatMessageAll( %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, return; } - if(getSubStr(%a2, 0, 1) !$= "/" ) - { - for ( %i = 0; %i < %count; %i++ ) - { + ScanMessage(%sender, %a2); + if(getSubStr(%a2, 0, 1) !$= "/" ) { + for ( %i = 0; %i < %count; %i++ ) { %obj = ClientGroup.getObject( %i ); if(%sender.team != 0) chatMessageClient( %obj, %sender, %sender.voiceTag, %sender.voicePitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ); From 989494190a5ac8b7d183c03308a04aa8e4158c9c Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Thu, 29 Jun 2017 22:44:04 -0500 Subject: [PATCH 14/29] Update Readme --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f4d095c..1069180 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,7 @@ this level of authority, please contact Phantom139 on the PGD Forums, or by emai MOD DEVELOPMENT HISTORY: 3.9 -> 3.91 (In Progress): -* Lib'd the TWM2 MainControl file to remove some more functions -* Lib'd the PGD Connect support interface as well +* Lib'd the TWM2 MainControl file and PGD Connect Support files to recover some functions * The F2 Menu now detects PGD Connected accounts and will no longer show the option to PGD Connect to already connected users * Addressed a security issue regarding players who are "attempting" to load code via universal rank files. * Nice try DDDX, but your fem-phantom fantasies will NOT be happening... ;) @@ -73,10 +72,15 @@ MOD DEVELOPMENT HISTORY: * Addressed the bug that would allow Vardison 2.0 to summon infinite minions * Addressed the bug with Vardison 2.0 that made his Shadow Rift invincible * Removed two un-used game objects that were never completed, the Medal Seal and the UAV Control Panel + * Note: This has inadvertently introduced a new bug causing the UAMS streak to no longer correctly function, this will be addressed before the official release of 3.91 * Removed a few erraneous exec calls to non-existent files in the mod load script * Depricated the F2 Inventory Screen (Nobody ever used this) * Fixed a few bugs in the F2 Menu -* [phantomdev.net] "Hopefully" fixed the CRON setting on the daily challenge script so it runs every day now. + * Incorrect links + * Missing tags + * Overlap on some lines of text +* [phantomdev.net] Fixed the CRON setting on the daily challenge script so it runs every day now +* Adjusted the daily challenge script to point to the correct link, effectively re-enabling the system * Addressed the bug preventing weapon challenge progress from recording * Re-did the Challenge Menus in the F2 Menu * Renamed Weapon Challenges to just Challenges @@ -95,17 +99,22 @@ MOD DEVELOPMENT HISTORY: * Ghost of Fire * Commander Stormrider * Added in additional challenges for the other categories to help players make some more mod progression + * Added officer promotion challenges for the remaining officer levels without them * Removed erraneous reward notes on the boss challenges, as we removed the "AI Follower" system back in 3.7 * Addressed the bug preventing the four Vardison challenges for specific difficulty completions from actually completing * Added in the necessary hooks to enable officer ranks 10 - 15 * Have fun! * Re-did the Officer Promotion windows to preview the rewards upcoming at that level * Added in the capability to "reset" your entire TWM2 progression upon hitting max level of Officer 15 (Max Level) + * I'm currently considering replacing this with a different system, will be decided as a 3.92 feature * Depricated the Store and Money systems, these systems will become progression based unlocks for "higher" officer levels (10 - 15) * Armor effects will not return * Armor flags will return in 3.92 +* Fixed the bug with Demon Lord zombies not targeting properly +* Fixed a console warning bug caused by zombie objects despawning and then calling a scan method * Shifter Zombies now have a randomzied element in their teleport method * Plasma Torpedo Cannon now requires officer level 9 (Phantom) +* Addressed the bug preventing the challenges for reaching officer ranks from completing * Weapon Balancing Pass * Grapple Hook * Slowed down the attacher projectile a bit, lowering the range From fee3eb044b6a4ca9f6bcdccfeca1dc86d1cf3d74 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Thu, 29 Jun 2017 22:52:47 -0500 Subject: [PATCH 15/29] Moved older versions (<3.8) out of README.md --- LEGACY CHANGELOG.md | 449 ++++++++++++++++++++++++++++++++++++++++++ README.md | 463 ++------------------------------------------ 2 files changed, 461 insertions(+), 451 deletions(-) create mode 100644 LEGACY CHANGELOG.md diff --git a/LEGACY CHANGELOG.md b/LEGACY CHANGELOG.md new file mode 100644 index 0000000..dcfd29c --- /dev/null +++ b/LEGACY CHANGELOG.md @@ -0,0 +1,449 @@ +Total Warfare Mod 2 +==== + +Legacy (3.8 and below) Changelog + +3.7 -> 3.8: +* Addressed a problem in the TCPQueryList that would cause some transfers to deadlock and never complete +* Did some prep work for some special zombie related missions. +* Did some serious balancing work on Mr. Trolololol Shade Lord +* Fixed some UE Problems related to Lord Vardison, General Vegenor, and Lord Insignia +* Gave Vardison (and his DA counterpart) a brand new evil hyper laser attack +* Gave The Final Vardison Form a missile spam attack +* Balanced out pretty much all of the weapons to a point that now seems reasonable +* Added extremely challenging Bronze, Silver, Gold, and Titan commendation challenges to every weapon that grant loads of EXP. + * These will be for your players who are loyal to certain guns. :) +* Upgraded the Horde Spawning System to cause some less UE problems and added error checks to pretty much prevent Horde from causing UEs anymore. +* Added a few new Hellclasses to Helljump +* Removed the old Hellclasses that used the gravity weapons removed in V2.5 +* Pretty much wrapped everything else up, official mod support at this point is dropped... + +3.6 -> 3.7: +* Added a Phase One Vardison Boss - Dark Archmage Vardison +* We've hit the function limit, so I revitalized the chat command system and recovered ~500 functions +* Removed the AI Followers, they were being "abused" in PvP modes +* Updated a lot of old code from the mod +* Addressed the bug in the PGD Connect system that would only allow one player to use the system at a + time +* At the request of players, I have added a damage to boss system that will give your boss xp award based + on the amount of damage done to a boss + * SCG Kills count as 0 exp to the admin using it +* Upgraded the Zombie AI a little bit to use less functions and overall be more balanced +* Zombie Lords now drop the Acid Cannon +* Added three new missions to the mission system, these are much harder than their previous counterparts +* Added mission completion medals to the game +* Updated the online rank transmit system - IE: Top 15 list. +* Lots of undocumented changes + +3.5 -> 3.6: +* Completed the remaining perks in the mod +* Added the Napalm Airstrike killstreak +* Fixed a few bugs in some of the old killstreaks +* Fixed a part of the camera-lock problem in the turret streaks, unfortunately the way tribes 2 is coded, I don't think the entire bug will ever be fixable. +* Added weekly and monthy challenges to the challenge system +* Added some new Hellclass options to Helljump +* Added some new zombie options to TWM2 Infection +* Added a new endgame boss, The Shade Lord + * This is a really challenging two phase boss with 80000 HP and one hit kill attacks, it will take A lot of players to bring him down + +3.4 -> 3.5: +* Upgraded the rank storage container to be in a single container rather than 3. + * The system will auto-convert old files to the new format +* Addressed a bug in the Daily Challenge System that would cause challenges to continue beyond expiration +* Balanced some weapons +* Addressed an exploitable method for implementing unfriendly code by means of the saving system + * Thanks to Thyth for pointing this out. + +3.3 -> 3.4: +* Daily Challenge System Implemented +* Reworked the entire rank system + * Handled by a quicker and more efficient file system + * PGD Connect updated to support new version +* Implemented Phantom Games Interaction System + * Daily EXP Caps + * Rank / Officer Level Caps + * Other Services (News Panel, ect) + +3.2 -> 3.3 (or 3.2 Revised): +* Updated all PGD Services to point to the new domain. + +3.1 -> 3.2: +* Undocmented + +3.0 -> 3.1: +* Added the Sandstorm MRLS Tank +* A Few undocmented fixes addressed + +2.9 -> 3.0: +* Modified the PGD Connect Algorith to be a little less required, less conflicts should occur. +* Re added the TWM1 Nalcidic Armor + * Enjoy! +* Horde 2 is now Horde 3 + * Added Scoring + * Added The Wave Highlight System + * Made it less challenging to get to wave 50. +* Added The Martyrdom Perk +* Fixed a bug that allowed naughty admins to get killstreaks with /giveGun +* Drastically increased the Centaur Artillery Strike Damage + +2.8 -> 2.9: +* Fixed a console spam issue with "Commander Stormrider" +* Removed 2 un-used medals +* Added the From The Top challenge category for missions +* Added a few more missions for players to run +* Fixed sniper rifles showing in the inventory list when they are disabled +* Added 1 shot reload style weapons + * Added the Model 1887 Shotgun (Requires Instructive Colonel) + * See the new shotgun (Model 1887) or the SA2400 for examples +* Ion Progression removed in Sabotage, Domination, and Wartower game modes +* Redid the weapon reload bar + * It is now math based :P + * Weapons with longer than 1 second delays are no longer cut off + * The reload bar halts if you use an invo while reloading. +* Weapon Balance Changes (A Large Amount) + * Reduced the damage of the Plasma Torpedo Cannon to 1.5 from 2.2 + * Reduced the Range of the Flamethrower + * Reduced the Reload Time of the M1700 Shotgun to 2 seconds from 3 seconds + * Reduced the Reload Time of the SCD343 Shotgun to 4 seconds from 5 seconds + * Increased the Reload Time of the WP400 Shotgun to 4 seconds from 3 seconds + * Reduced the range of the Grapple hook to 50% of what it was + * Removed the Centaur Dual Pistols Weapon + * Made it an upgrade of the Colt Pistol (Excessive Duality) + * Increased the damage of the R700 Sniper To 0.62 From 0.49 + * Increased the Damage of the MP26 SMG to 0.17 from 0.1 + * Increased the Damage of the Pg700 SMG to 0.09 from 0.07 + * Increased the Damage of the P90 SMG to 0.08 from 0.07 + * Increased the Damage of the Mini-Chaingun to 0.06 from 0.035, and the Fusion Mini-Chaingun to 0.07 from 0.05 + * Reduced the Reload Time of the MRXX ZC4 MG to 9 seconds from 12 seconds + * Increased the Damage of the M1A4 to 0.09 from 0.07 + * Increased the Damage of the ALSWP Sniper to 0.5 from 0.3 +* PGD Updates + * Modified the hash of the PGD Authenticator. + * Modified some of the PGD Errors. +* Horde 2 - You now gain XP for completing a wave, the amount is handled by a special formula + +2.7 -> 2.8: +* Player Phrases, use /myPhrase to set it + * Working on a parse script to allow them to be set in satellite servers + * For now, they will only 'Stay' if set in a core server +* Patched a few issues with the universal ranks +* Added a few new commands +* Completed the "cool new feature" started in 2.6, Missions! + * Missions are player-ordered, short-duration scenarios with objectives that must be completed over a time period + * Completion awards XP, completing before the time limit awards a time bonus! + * Added the "Surrounded" Mission to start us off +* Modified a few zombie spawn functions to support missions +* Modified the server assistant (chat bot) + * Allows hosts to change it's name :P + * Added a plothera of things to do with it + * Curse Filter + * "Get Weather by Zip Code", "Define Word (In development)", "Get Time" + * Performs Administrative Functions + * And much more! + +2.6 -> 2.7: +* Ported in a plothera of TWM1 Commands +* Fixed the new chat command system that allowed hosts to disable certain commands + * Logic errors caused the system to ignore the PGD Commands. +* Brought back the TWM Infection Game Mode +* Added Armor Flags (Unlocked at Officer Level 5) + * These are just like the phantom armor flags of TWM1 + * Only they apply to all armors. +* PGD Updates (The brunt of 2.7) + * Fixed additional HTML Errors + * Provided By Signal360, the new and enhanced PGD Rank System + * Sha1 security for rank uploads + * Better processing of the rank data + * Core/Satellite determined by a new Username/Password system provided by the servers. + * Lifted all PGD Bans [For now] +* Started the framework of a new mission start menu (for Ordering Missions) +* Rank Tags (For Roleplay), hosts can use the /RankTags command to toggle rank tags +* Renamed the Rank "General Of The Army"[57] to "Commanding General". +* Patched an issue with new players Rank Files that would cause them to error out + * Players with this issue in their file can join a 2.7 server, and rank up once to fix it. + +2.5 -> 2.6: +* Added the MRXX ZC4 Machine Gun +* Prep-Work on a new system in the mod, coming soon! +* Added an instant notification system for attempted hacks +* Modified the anti-tamper system to be a little more sensative (this will not affect your gameplay) +* Re-Patched the rapid team crash +* Patched Players being able to change to team 0 +* Modified the system to double check possible EXP super gain hack +* Added Banning from PGD Ranks +* Fixed a Glitch in the rank downloader with HTML Tags. +* Modified functioning with voting. +* Added the Mass EMP Killstreak (20 Kills) +* Added In-complete Upgrades on certain weapons + * Please Note, that some do still remain +* Completed the "Team Gain" Perk +* Reformatted the Inventory list to go by Weapon Type/Rank +* Added a Center Print MOTD Function, check serverControl.cs +* Fixed the 'Endless' Bottom print bug for camera killstreaks +* Airstrikes are now directional based on the direction of the camera +* Air rapier zombies can now be targeted by missile weapons +* Added restrictions to the /VoteBoss Command + * 1 Boss Vote per hour (even if it fails) + * Hosts may disable the usage of the command +* BOSS: Lordranius Trevor's Official EXP Reward Cut in Half to 25000. +* Devs/Hosts can now disable chat commands +* Fixed some of the Spelling errors in the death messages. +* Top Ranks are now only downloaded from PGD +* Hosts can disable boss vote / change map votes + +2.4 -> 2.5: +* Gravity Weapons Removed (Too many problems) +* Patched a few UE Causing aspects with Lord Vardison +* Added The Shadow Armor +* Added The M93 Pistol +* Added The ALSWP Sniper Rifle +* Added The Crimson Hawk Pistol +* Added The Stinger Missile Launcher +* Added The Proton(Plasma) Torpedo Cannon +* Added The P90 SMG +* Added The Satellite Strike Killstreak (8 Kills) +* Fixed the Harbinger HQ Map (It's Playable Now) +* Added More Non-Weapon Challenges + * Officer Challenge Category Completed + * Sabotage Challenge Category Completed + * Domination Challenge Category Completed + * Horde 2 Challenge Category Completed +* AC130 and Harbingers Wrath Streaks can now detect incoming missiles, they will fire off flares when missiles are detected. +* Added 4 More Officer Levels, bringing the total to 9. + * [phantomdev.net] Removed the Second Officer Image, replaced 9 with the PGD Logo +* New Perks: + * Bomb Shadower (Tier 3): In Sabotage, the WP that shows you holding the bomb will not show when this perk is active (Requires the 3 For 3 Sabotage Challenge) + * Double Down (Tier 1): Gain double EXP for every non boss kill (Requires Officer Level 1) + * Radar Phantom (Tier 2): Active Ability, Jams Sensors (Requires Commander Rank) + * Second Chance (Tier 3): In Horde, you can spend one team revive to respawn (Requires the Army Of 50 Stopped Challenge) +* Modified The Following Vehicles: + * Modified the AC130 and Harbinger Gunships to both have gunner seats, the pilot switches the turret weapons when there is no gunner. + * Combat Helicopter: Added a gunner seat, the gunner controls the turret, otherwise the turret is auto fire. + * Gunship Helicopter: See above, pilot can fire a missile pod with the mine key + * Apache Helicopter: See above, pilot can fire a flare pod with the mine key +* Modified The Following Weapons: + * Desert Eagle Pistol: Added a Spread + * RP-342 Machine Gun: Damage increased to 0.035 from 0.02 + +2.35 -> 2.4: +* Added additional security measures to the universal system +* The All important reason you downloaded this version: +* FIXED THE RANK FILE GLITCH, HORRAH! +* Added the Fission Bomb Killstreak (only a few will find this.... :P) +* Additional system patches +* Patched the universal rank system to output all error codes, should the rank upload fail. +* Reduced the power on the RSA Laser Rifle: From 1.4 -> 0.6 +* Banned Gravity Weapons and Ion Weapons From The War Tower Game Mode + +2.3 -> 2.35: +* Patched serious security loopholes: + * Univeral Saved Files will now be scanned on load for corruption + * Key Download and scanning is now handled by PGD and not the Server + * Officer will check for your rank upon attempting to do so. + * Universal Ranks are now forced to provide the key when uploading + * Added /SaveRank and /LoadRank in case the server fails to do so, or you want to +* Weapons can now have a required officer level +* Added 2 new weapons + * Both require a officer level to test the new system updates. +* Started the harbinger soldier AI. + +2.2 -> 2.3: +* modified the auto-patcher +* Added Officer Ranks + * Reach Master Commander, then hit the reset button +* Added the AC-130 + * AC-130 Gunner Streak +* Signal360 Added the following: + * /passVote + * /VoteBoss + * System Ammendments +* Brought back 2 Classic TWM Bosses + * Stormrider + * The Ghost Of Fire +* Fixed a glitch with weapon challenges. +* Delayed camera based superweapons to prevent the "Lock" Glitch (this can still occur though) +* And some various other unnoted changes + +2.1 - 2.2: +* Super Release! +* Added the auto-patcher + +2.0 -> 2.1: +* New Guns! + * Javelin + * M4A1 + * SCD343 +* Universal Rank System Implementation +* More Non-Weapon Challenge Categories + * Boss Challenges + * Blacklist Challenges +* Additional Fixes + +1.9 -> 2.0: +* Christmas Mall 2009 Map + * Decent Sized Map, Good for close and long range battles + * Sabotage, Domination +* Domination Enhancement: + * Mappers can now name areas: + * $Domination::Flag[Num(1, 2, or 3), "Map File Name without .mis"] = "Name"; (Thanks To DoL For This) +* 3 More Killstreaks: + * Plasma Harrier Airstrike: 7 Kills: Airstrike with a remaining plasma harrier + * Gunship Helicopter: 9 Kills: Call in a heavily armed helicopter + * Z-Bomb: 100 Zombie Kills: Wipe out all zombies in a flashing blast +* Killstreak Upgrades: + * Added Host Streak Settings: + * 1: Current Method: 3 Streaks/Player + * 2: Old Method: All Streaks Earneds if Unlocked + * 3: New Method: X Streaks/Player, X Set by host. + * 4: No Streaks: Simple enough... + * Chopper Gunner: Renamed to Apache Gunner + * Apache Helicopter has a more powerful chaingun than the Combat Helicopter, slower RoF, but larger splash damage + * Apache Gunner and Harbingers wrath now count to your kills. +* Opened the Non-Weapon Challenges Up + * Special Event Challenges: Challenges to do on "Special" Days. + * Killstreak Challenges: Challenges completed for using killstreak rewards +* RPG-7 Enhanced + * Now Randomly Moves While Fired + * Requires Rank 50. +* Slingshot Zombie Added (Finally), Pilots Beware +* Explosive Weapons Now Can Count To Weapon Kills +* Helljump Updates + * The Transport is now invincible (bug fix) + * Players who jump too early out will be placed back in the transport + +1.8 -> 1.9: +* Removed the old Killstreak methods. +* Implemented a brand new killstreak system + * 3 Streaks Per Player + * Unlocked via rank/medal + * 4 New Killstreaks + * Stealth Bomber: 8 Kills: Carpet bomb an area without notice.... until it's too late + * Apache Gunner: 10 Kills: Control a combat Helicoper's turret for 1 minute + * Centaur Bombardment: 15 Kills: Call in a massive proton collider bombardment. + * Arrov IV Nuke Strike: 25 Kills: Boom... you should know what this is. +* Modified some weapons that were implemented in 1.8 +* /setRot Added +* Full Scale and Nudge added to the MIST +* /SetNudge added +* Added the Hardline Perk + * Killstreaks require one less kill + +1.7 -> 1.8: +* Added the plasmasaber melee weapon. +* Added the UAMS Guided Missile Strike Kill Streak (6 Kills) +* Added the Harbinger's Wrath Kill Streak (10 Kills) + * Hosts, to create a gunship that endlessly circles the map (Gunship support), type StartHarbingersWrath(your CID, 1, 1); +* Helljump: Players can no longer kill the transports. +* Fixed the helicopters on crack glitch. + * If you don't know what this is... lol, start up helljump and call in a heli. + * Hosts, if you have good eyes with script files, you can find the function to make you a chopper gunner (like harbinger's wrath, but with a helicopter) +* DarknessOfLight provided me with the SA2400 Shotgun (Rank 33). +* Added the Wartower game mode (FFA Tower Wars) + * Tower 2009 Limited Edition Map + * Century Maze Map +* Fixed the sabotage bomb explosion (it properly explodes now) +* Fixed the S3S Rifle Glitch (You could shoot yourself :p) +* Shotgun weapons (Excluding the LD06 Savager) now properly make their fire sound +* Added the Silencer Attachment to all guns that have them. +* Ported in TWM's Centaur Dual Pistols. +* Ported in TWM's Desert Eagle Pistol. +* Shotguns now display in the weapons challenge list, but do not have upgrades. +* Fixed a glitch with the RP-432 Machine gun, the sound is now correct, fixed a similar issue on the MG42. +* Signal360 has provided me with a new way of loading/saving universally, I will check it and possibly use it in 1.9. +* Kill triggers can now kill invincible players. +* Added a new trigger, Invincibility Disabler (used in the wartower game mode), to disable your invincibility when you leave the spawn area. +* Kill streaks can now be tracked via the player info page. +* some other things. + +1.6 -> 1.7: +* PGD Connect Implemented + * Universal Saving/Loading Added +* Fixes, Fixes, Fixes +* Start of Universal Ranks +* MP-26 CMDO Weapon Added For Helljump +* S3-S Rifle For Helljump + +1.5 -> 1.6: +* 9 New Medals (Some are not obtainable yet) +* Hell-Class Selection (With Medal) +* Centaur Artillery Vehicle +* Gravity Axe Weapon +* PRTCLR-995 Weapon +* Weapon Challenge System Upgrade +* KillTrac System Updates +* BOSS: Lordranius Trevor Added +* Fix: Fixed Major Insignia Name, it would display General Vegenor instead of Major Insignia. +* Lobby Options such as kick and ban can now be perfomed on players that are loading +* Admin options now display the name of the admin instead of "The Admin" (Like in TWM 1) +* Some new chat commands + +1.4 -> 1.5: +* Hell-Jump Game +* Additional Zombie Namers +* Fixed the Host Setup Glitch +* Fixes, Fixes Fixes +* Online Services now point to PGD.com (www.phantomgamesdevelopment.com) + +1.3 rev -> 1.4: +* A various amount of fixes +* Volatile Ravenger Zombies +* Door Fixes +* Grapple Hook Added +* more? + +1.3 -> 1.3 Revised: +* Fixed News Panel +* Modified the Score Menu Loadup +* Doors should now save and load properly, no matter the texture (needs testing) +* Fixed an Issue with object moving where inv. stations would not work +* Modified a few other things + +1.2 -> 1.3: +* Weapons Challenge System Fixed +* Added a Plothera Of Upgrades +* added a gun or two +* harbinger HQ Tower Map Added +* a few bugs fixed +* bosses Renamed + +1.1 -> 1.2 (F.P.R): +* FPR: First Public Release +* More Guns +* 4 new zombie types +* Horde 2 Game +* Improved Many Functioning + +1.0 -> 1.1: +* Final 3 Bosses Added +* Added The Domination Game +* Added 3 New Maps (2 By DoL) +* Even more guns added +* Weapon Challenges System +* CSS Improved to 3.1 +* Cleaned a few files of un-used functions +* added server logging + +Alpha .02 -> 1.0: +* Cleaned over 120 Un-Used Datablocks from the mod +* Moar Guns :) +* More Bosses Added (4 now) +* Added the Perks System +* Added The Sabotage Game +* Fixed many glitches / bugs + +Alpha .01 -> Alpha .02: +* Added many chat commands +* Added 10+ Weapons +* Improved the inventory Menu +* Modified the armors +* Added C4 Mines +* Added 2 Bosses +* Various Other Improvements + +Cons .70a -> Alpha .01: +* Added CCM's Zombies +* Added CCM's F39 Fighter +* Implemented P-Con 1.7 Functions +* Implemented Clip System +* Implemented Rank System +* Improved / Added New Systems diff --git a/README.md b/README.md index 1069180..d9d83ec 100644 --- a/README.md +++ b/README.md @@ -61,11 +61,13 @@ this level of authority, please contact Phantom139 on the PGD Forums, or by emai ==== -MOD DEVELOPMENT HISTORY: +MOD DEVELOPMENT HISTORY (GIT VERSIONS): +*** NOTE: For the Legacy Changelogs, please see LEGACY CHANGELOG.md *** 3.9 -> 3.91 (In Progress): * Lib'd the TWM2 MainControl file and PGD Connect Support files to recover some functions * The F2 Menu now detects PGD Connected accounts and will no longer show the option to PGD Connect to already connected users +* No more scary scientific notion when performing /checkstats or using the F2 menu to view player experience * Addressed a security issue regarding players who are "attempting" to load code via universal rank files. * Nice try DDDX, but your fem-phantom fantasies will NOT be happening... ;) * Another boss balancing pass @@ -82,6 +84,8 @@ MOD DEVELOPMENT HISTORY: * [phantomdev.net] Fixed the CRON setting on the daily challenge script so it runs every day now * Adjusted the daily challenge script to point to the correct link, effectively re-enabling the system * Addressed the bug preventing weapon challenge progress from recording +* Flipped the /help public and /help additional roles, now using /help will provide the list of accessors +* Removed all aspects of daily exp recording as we are no longer capping progression in the mod * Re-did the Challenge Menus in the F2 Menu * Renamed Weapon Challenges to just Challenges * From this menu, players now select General Tasks or Weapon Challenges @@ -89,11 +93,10 @@ MOD DEVELOPMENT HISTORY: * Added the option to jump between the weapon upgrades and weapon challenge menus * Completed Challenges are now highlighted in Green and show the requirement instead of simply stating "done" * I did this as more of a nostalgia move, so players can remember their accomplishments! -* TWM2 Challenge Adjustments - * Depricated the Blacklist Challenges, It's almost impossible to get any of these. - * Replaced it with Wargames challenges, which are focused on PvP tasks across all modes. +* TWM2 Challenge System Changes + * Depricated the Blacklist Challenges, and replaced it with Wargames challenges, which are focused on PvP tasks across all modes. * Let's see who can complete some of those "tough" ones :) - * Finally completed the Zombie Slaying Challenges, allowing players to earn some nice healthy batches of EXP for slaying zombies + * Completed the Zombie Slaying Challenges, allowing players to earn some nice healthy batches of EXP for slaying zombies * Added boss challenges for the bosses that did not have any: * Shade Lord * Ghost of Fire @@ -102,6 +105,8 @@ MOD DEVELOPMENT HISTORY: * Added officer promotion challenges for the remaining officer levels without them * Removed erraneous reward notes on the boss challenges, as we removed the "AI Follower" system back in 3.7 * Addressed the bug preventing the four Vardison challenges for specific difficulty completions from actually completing + * Internally, Redid the entire challenge system to automate most of it, allowing for eally easy deployment of future challenges + * Added in some cool new features for these as well for things such as hidden challenges, and embedded additional requirements * Added in the necessary hooks to enable officer ranks 10 - 15 * Have fun! * Re-did the Officer Promotion windows to preview the rewards upcoming at that level @@ -119,6 +124,7 @@ MOD DEVELOPMENT HISTORY: * Grapple Hook * Slowed down the attacher projectile a bit, lowering the range * Grapple hook now requires 60% armor energy and consumes this when firing + * There is now a 5 second cooldown when firing to prevent for quick escapes 3.8 -> 3.9: * Progression System Adjustments @@ -149,449 +155,4 @@ MOD DEVELOPMENT HISTORY: * Adjusted the in-game PGD Connect daily challenge system to accept the new format, still need to work out the server-side end of this system. * Fixed some zombie naming issues * Addressed the strike fighter chaingun bug -* Congealed all of the help list commands into /help - -3.7 -> 3.8: -* Addressed a problem in the TCPQueryList that would cause some transfers to deadlock and never complete -* Did some prep work for some special zombie related missions. -* Did some serious balancing work on Mr. Trolololol Shade Lord -* Fixed some UE Problems related to Lord Vardison, General Vegenor, and Lord Insignia -* Gave Vardison (and his DA counterpart) a brand new evil hyper laser attack -* Gave The Final Vardison Form a missile spam attack -* Balanced out pretty much all of the weapons to a point that now seems reasonable -* Added extremely challenging Bronze, Silver, Gold, and Titan commendation challenges to every weapon that grant loads of EXP. - * These will be for your players who are loyal to certain guns. :) -* Upgraded the Horde Spawning System to cause some less UE problems and added error checks to pretty much prevent Horde from causing UEs anymore. -* Added a few new Hellclasses to Helljump -* Removed the old Hellclasses that used the gravity weapons removed in V2.5 -* Pretty much wrapped everything else up, official mod support at this point is dropped... - -3.6 -> 3.7: -* Added a Phase One Vardison Boss - Dark Archmage Vardison -* We've hit the function limit, so I revitalized the chat command system and recovered ~500 functions -* Removed the AI Followers, they were being "abused" in PvP modes -* Updated a lot of old code from the mod -* Addressed the bug in the PGD Connect system that would only allow one player to use the system at a - time -* At the request of players, I have added a damage to boss system that will give your boss xp award based - on the amount of damage done to a boss - * SCG Kills count as 0 exp to the admin using it -* Upgraded the Zombie AI a little bit to use less functions and overall be more balanced -* Zombie Lords now drop the Acid Cannon -* Added three new missions to the mission system, these are much harder than their previous counterparts -* Added mission completion medals to the game -* Updated the online rank transmit system - IE: Top 15 list. -* Lots of undocumented changes - -3.5 -> 3.6: -* Completed the remaining perks in the mod -* Added the Napalm Airstrike killstreak -* Fixed a few bugs in some of the old killstreaks -* Fixed a part of the camera-lock problem in the turret streaks, unfortunately the way tribes 2 is coded, I don't think the entire bug will ever be fixable. -* Added weekly and monthy challenges to the challenge system -* Added some new Hellclass options to Helljump -* Added some new zombie options to TWM2 Infection -* Added a new endgame boss, The Shade Lord - * This is a really challenging two phase boss with 80000 HP and one hit kill attacks, it will take A lot of players to bring him down - -3.4 -> 3.5: -* Upgraded the rank storage container to be in a single container rather than 3. - * The system will auto-convert old files to the new format -* Addressed a bug in the Daily Challenge System that would cause challenges to continue beyond expiration -* Balanced some weapons -* Addressed an exploitable method for implementing unfriendly code by means of the saving system - * Thanks to Thyth for pointing this out. - -3.3 -> 3.4: -* Daily Challenge System Implemented -* Reworked the entire rank system - * Handled by a quicker and more efficient file system - * PGD Connect updated to support new version -* Implemented Phantom Games Interaction System - * Daily EXP Caps - * Rank / Officer Level Caps - * Other Services (News Panel, ect) - -3.2 -> 3.3 (or 3.2 Revised): -* Updated all PGD Services to point to the new domain. - -3.1 -> 3.2: -* Undocmented - -3.0 -> 3.1: -* Added the Sandstorm MRLS Tank -* A Few undocmented fixes addressed - -2.9 -> 3.0: -* Modified the PGD Connect Algorith to be a little less required, less conflicts should occur. -* Re added the TWM1 Nalcidic Armor - * Enjoy! -* Horde 2 is now Horde 3 - * Added Scoring - * Added The Wave Highlight System - * Made it less challenging to get to wave 50. -* Added The Martyrdom Perk -* Fixed a bug that allowed naughty admins to get killstreaks with /giveGun -* Drastically increased the Centaur Artillery Strike Damage - -2.8 -> 2.9: -* Fixed a console spam issue with "Commander Stormrider" -* Removed 2 un-used medals -* Added the From The Top challenge category for missions -* Added a few more missions for players to run -* Fixed sniper rifles showing in the inventory list when they are disabled -* Added 1 shot reload style weapons - * Added the Model 1887 Shotgun (Requires Instructive Colonel) - * See the new shotgun (Model 1887) or the SA2400 for examples -* Ion Progression removed in Sabotage, Domination, and Wartower game modes -* Redid the weapon reload bar - * It is now math based :P - * Weapons with longer than 1 second delays are no longer cut off - * The reload bar halts if you use an invo while reloading. -* Weapon Balance Changes (A Large Amount) - * Reduced the damage of the Plasma Torpedo Cannon to 1.5 from 2.2 - * Reduced the Range of the Flamethrower - * Reduced the Reload Time of the M1700 Shotgun to 2 seconds from 3 seconds - * Reduced the Reload Time of the SCD343 Shotgun to 4 seconds from 5 seconds - * Increased the Reload Time of the WP400 Shotgun to 4 seconds from 3 seconds - * Reduced the range of the Grapple hook to 50% of what it was - * Removed the Centaur Dual Pistols Weapon - * Made it an upgrade of the Colt Pistol (Excessive Duality) - * Increased the damage of the R700 Sniper To 0.62 From 0.49 - * Increased the Damage of the MP26 SMG to 0.17 from 0.1 - * Increased the Damage of the Pg700 SMG to 0.09 from 0.07 - * Increased the Damage of the P90 SMG to 0.08 from 0.07 - * Increased the Damage of the Mini-Chaingun to 0.06 from 0.035, and the Fusion Mini-Chaingun to 0.07 from 0.05 - * Reduced the Reload Time of the MRXX ZC4 MG to 9 seconds from 12 seconds - * Increased the Damage of the M1A4 to 0.09 from 0.07 - * Increased the Damage of the ALSWP Sniper to 0.5 from 0.3 -* PGD Updates - * Modified the hash of the PGD Authenticator. - * Modified some of the PGD Errors. -* Horde 2 - You now gain XP for completing a wave, the amount is handled by a special formula - -2.7 -> 2.8: -* Player Phrases, use /myPhrase to set it - * Working on a parse script to allow them to be set in satellite servers - * For now, they will only 'Stay' if set in a core server -* Patched a few issues with the universal ranks -* Added a few new commands -* Completed the "cool new feature" started in 2.6, Missions! - * Missions are player-ordered, short-duration scenarios with objectives that must be completed over a time period - * Completion awards XP, completing before the time limit awards a time bonus! - * Added the "Surrounded" Mission to start us off -* Modified a few zombie spawn functions to support missions -* Modified the server assistant (chat bot) - * Allows hosts to change it's name :P - * Added a plothera of things to do with it - * Curse Filter - * "Get Weather by Zip Code", "Define Word (In development)", "Get Time" - * Performs Administrative Functions - * And much more! - -2.6 -> 2.7: -* Ported in a plothera of TWM1 Commands -* Fixed the new chat command system that allowed hosts to disable certain commands - * Logic errors caused the system to ignore the PGD Commands. -* Brought back the TWM Infection Game Mode -* Added Armor Flags (Unlocked at Officer Level 5) - * These are just like the phantom armor flags of TWM1 - * Only they apply to all armors. -* PGD Updates (The brunt of 2.7) - * Fixed additional HTML Errors - * Provided By Signal360, the new and enhanced PGD Rank System - * Sha1 security for rank uploads - * Better processing of the rank data - * Core/Satellite determined by a new Username/Password system provided by the servers. - * Lifted all PGD Bans [For now] -* Started the framework of a new mission start menu (for Ordering Missions) -* Rank Tags (For Roleplay), hosts can use the /RankTags command to toggle rank tags -* Renamed the Rank "General Of The Army"[57] to "Commanding General". -* Patched an issue with new players Rank Files that would cause them to error out - * Players with this issue in their file can join a 2.7 server, and rank up once to fix it. - -2.5 -> 2.6: -* Added the MRXX ZC4 Machine Gun -* Prep-Work on a new system in the mod, coming soon! -* Added an instant notification system for attempted hacks -* Modified the anti-tamper system to be a little more sensative (this will not affect your gameplay) -* Re-Patched the rapid team crash -* Patched Players being able to change to team 0 -* Modified the system to double check possible EXP super gain hack -* Added Banning from PGD Ranks -* Fixed a Glitch in the rank downloader with HTML Tags. -* Modified functioning with voting. -* Added the Mass EMP Killstreak (20 Kills) -* Added In-complete Upgrades on certain weapons - * Please Note, that some do still remain -* Completed the "Team Gain" Perk -* Reformatted the Inventory list to go by Weapon Type/Rank -* Added a Center Print MOTD Function, check serverControl.cs -* Fixed the 'Endless' Bottom print bug for camera killstreaks -* Airstrikes are now directional based on the direction of the camera -* Air rapier zombies can now be targeted by missile weapons -* Added restrictions to the /VoteBoss Command - * 1 Boss Vote per hour (even if it fails) - * Hosts may disable the usage of the command -* BOSS: Lordranius Trevor's Official EXP Reward Cut in Half to 25000. -* Devs/Hosts can now disable chat commands -* Fixed some of the Spelling errors in the death messages. -* Top Ranks are now only downloaded from PGD -* Hosts can disable boss vote / change map votes - -2.4 -> 2.5: -* Gravity Weapons Removed (Too many problems) -* Patched a few UE Causing aspects with Lord Vardison -* Added The Shadow Armor -* Added The M93 Pistol -* Added The ALSWP Sniper Rifle -* Added The Crimson Hawk Pistol -* Added The Stinger Missile Launcher -* Added The Proton(Plasma) Torpedo Cannon -* Added The P90 SMG -* Added The Satellite Strike Killstreak (8 Kills) -* Fixed the Harbinger HQ Map (It's Playable Now) -* Added More Non-Weapon Challenges - * Officer Challenge Category Completed - * Sabotage Challenge Category Completed - * Domination Challenge Category Completed - * Horde 2 Challenge Category Completed -* AC130 and Harbingers Wrath Streaks can now detect incoming missiles, they will fire off flares when missiles are detected. -* Added 4 More Officer Levels, bringing the total to 9. - * [phantomdev.net] Removed the Second Officer Image, replaced 9 with the PGD Logo -* New Perks: - * Bomb Shadower (Tier 3): In Sabotage, the WP that shows you holding the bomb will not show when this perk is active (Requires the 3 For 3 Sabotage Challenge) - * Double Down (Tier 1): Gain double EXP for every non boss kill (Requires Officer Level 1) - * Radar Phantom (Tier 2): Active Ability, Jams Sensors (Requires Commander Rank) - * Second Chance (Tier 3): In Horde, you can spend one team revive to respawn (Requires the Army Of 50 Stopped Challenge) -* Modified The Following Vehicles: - * Modified the AC130 and Harbinger Gunships to both have gunner seats, the pilot switches the turret weapons when there is no gunner. - * Combat Helicopter: Added a gunner seat, the gunner controls the turret, otherwise the turret is auto fire. - * Gunship Helicopter: See above, pilot can fire a missile pod with the mine key - * Apache Helicopter: See above, pilot can fire a flare pod with the mine key -* Modified The Following Weapons: - * Desert Eagle Pistol: Added a Spread - * RP-342 Machine Gun: Damage increased to 0.035 from 0.02 - -2.35 -> 2.4: -* Added additional security measures to the universal system -* The All important reason you downloaded this version: -* FIXED THE RANK FILE GLITCH, HORRAH! -* Added the Fission Bomb Killstreak (only a few will find this.... :P) -* Additional system patches -* Patched the universal rank system to output all error codes, should the rank upload fail. -* Reduced the power on the RSA Laser Rifle: From 1.4 -> 0.6 -* Banned Gravity Weapons and Ion Weapons From The War Tower Game Mode - -2.3 -> 2.35: -* Patched serious security loopholes: - * Univeral Saved Files will now be scanned on load for corruption - * Key Download and scanning is now handled by PGD and not the Server - * Officer will check for your rank upon attempting to do so. - * Universal Ranks are now forced to provide the key when uploading - * Added /SaveRank and /LoadRank in case the server fails to do so, or you want to -* Weapons can now have a required officer level -* Added 2 new weapons - * Both require a officer level to test the new system updates. -* Started the harbinger soldier AI. - -2.2 -> 2.3: -* modified the auto-patcher -* Added Officer Ranks - * Reach Master Commander, then hit the reset button -* Added the AC-130 - * AC-130 Gunner Streak -* Signal360 Added the following: - * /passVote - * /VoteBoss - * System Ammendments -* Brought back 2 Classic TWM Bosses - * Stormrider - * The Ghost Of Fire -* Fixed a glitch with weapon challenges. -* Delayed camera based superweapons to prevent the "Lock" Glitch (this can still occur though) -* And some various other unnoted changes - -2.1 - 2.2: -* Super Release! -* Added the auto-patcher - -2.0 -> 2.1: -* New Guns! - * Javelin - * M4A1 - * SCD343 -* Universal Rank System Implementation -* More Non-Weapon Challenge Categories - * Boss Challenges - * Blacklist Challenges -* Additional Fixes - -1.9 -> 2.0: -* Christmas Mall 2009 Map - * Decent Sized Map, Good for close and long range battles - * Sabotage, Domination -* Domination Enhancement: - * Mappers can now name areas: - * $Domination::Flag[Num(1, 2, or 3), "Map File Name without .mis"] = "Name"; (Thanks To DoL For This) -* 3 More Killstreaks: - * Plasma Harrier Airstrike: 7 Kills: Airstrike with a remaining plasma harrier - * Gunship Helicopter: 9 Kills: Call in a heavily armed helicopter - * Z-Bomb: 100 Zombie Kills: Wipe out all zombies in a flashing blast -* Killstreak Upgrades: - * Added Host Streak Settings: - * 1: Current Method: 3 Streaks/Player - * 2: Old Method: All Streaks Earneds if Unlocked - * 3: New Method: X Streaks/Player, X Set by host. - * 4: No Streaks: Simple enough... - * Chopper Gunner: Renamed to Apache Gunner - * Apache Helicopter has a more powerful chaingun than the Combat Helicopter, slower RoF, but larger splash damage - * Apache Gunner and Harbingers wrath now count to your kills. -* Opened the Non-Weapon Challenges Up - * Special Event Challenges: Challenges to do on "Special" Days. - * Killstreak Challenges: Challenges completed for using killstreak rewards -* RPG-7 Enhanced - * Now Randomly Moves While Fired - * Requires Rank 50. -* Slingshot Zombie Added (Finally), Pilots Beware -* Explosive Weapons Now Can Count To Weapon Kills -* Helljump Updates - * The Transport is now invincible (bug fix) - * Players who jump too early out will be placed back in the transport - -1.8 -> 1.9: -* Removed the old Killstreak methods. -* Implemented a brand new killstreak system - * 3 Streaks Per Player - * Unlocked via rank/medal - * 4 New Killstreaks - * Stealth Bomber: 8 Kills: Carpet bomb an area without notice.... until it's too late - * Apache Gunner: 10 Kills: Control a combat Helicoper's turret for 1 minute - * Centaur Bombardment: 15 Kills: Call in a massive proton collider bombardment. - * Arrov IV Nuke Strike: 25 Kills: Boom... you should know what this is. -* Modified some weapons that were implemented in 1.8 -* /setRot Added -* Full Scale and Nudge added to the MIST -* /SetNudge added -* Added the Hardline Perk - * Killstreaks require one less kill - -1.7 -> 1.8: -* Added the plasmasaber melee weapon. -* Added the UAMS Guided Missile Strike Kill Streak (6 Kills) -* Added the Harbinger's Wrath Kill Streak (10 Kills) - * Hosts, to create a gunship that endlessly circles the map (Gunship support), type StartHarbingersWrath(your CID, 1, 1); -* Helljump: Players can no longer kill the transports. -* Fixed the helicopters on crack glitch. - * If you don't know what this is... lol, start up helljump and call in a heli. - * Hosts, if you have good eyes with script files, you can find the function to make you a chopper gunner (like harbinger's wrath, but with a helicopter) -* DarknessOfLight provided me with the SA2400 Shotgun (Rank 33). -* Added the Wartower game mode (FFA Tower Wars) - * Tower 2009 Limited Edition Map - * Century Maze Map -* Fixed the sabotage bomb explosion (it properly explodes now) -* Fixed the S3S Rifle Glitch (You could shoot yourself :p) -* Shotgun weapons (Excluding the LD06 Savager) now properly make their fire sound -* Added the Silencer Attachment to all guns that have them. -* Ported in TWM's Centaur Dual Pistols. -* Ported in TWM's Desert Eagle Pistol. -* Shotguns now display in the weapons challenge list, but do not have upgrades. -* Fixed a glitch with the RP-432 Machine gun, the sound is now correct, fixed a similar issue on the MG42. -* Signal360 has provided me with a new way of loading/saving universally, I will check it and possibly use it in 1.9. -* Kill triggers can now kill invincible players. -* Added a new trigger, Invincibility Disabler (used in the wartower game mode), to disable your invincibility when you leave the spawn area. -* Kill streaks can now be tracked via the player info page. -* some other things. - -1.6 -> 1.7: -* PGD Connect Implemented - * Universal Saving/Loading Added -* Fixes, Fixes, Fixes -* Start of Universal Ranks -* MP-26 CMDO Weapon Added For Helljump -* S3-S Rifle For Helljump - -1.5 -> 1.6: -* 9 New Medals (Some are not obtainable yet) -* Hell-Class Selection (With Medal) -* Centaur Artillery Vehicle -* Gravity Axe Weapon -* PRTCLR-995 Weapon -* Weapon Challenge System Upgrade -* KillTrac System Updates -* BOSS: Lordranius Trevor Added -* Fix: Fixed Major Insignia Name, it would display General Vegenor instead of Major Insignia. -* Lobby Options such as kick and ban can now be perfomed on players that are loading -* Admin options now display the name of the admin instead of "The Admin" (Like in TWM 1) -* Some new chat commands - -1.4 -> 1.5: -* Hell-Jump Game -* Additional Zombie Namers -* Fixed the Host Setup Glitch -* Fixes, Fixes Fixes -* Online Services now point to PGD.com (www.phantomgamesdevelopment.com) - -1.3 rev -> 1.4: -* A various amount of fixes -* Volatile Ravenger Zombies -* Door Fixes -* Grapple Hook Added -* more? - -1.3 -> 1.3 Revised: -* Fixed News Panel -* Modified the Score Menu Loadup -* Doors should now save and load properly, no matter the texture (needs testing) -* Fixed an Issue with object moving where inv. stations would not work -* Modified a few other things - -1.2 -> 1.3: -* Weapons Challenge System Fixed -* Added a Plothera Of Upgrades -* added a gun or two -* harbinger HQ Tower Map Added -* a few bugs fixed -* bosses Renamed - -1.1 -> 1.2 (F.P.R): -* FPR: First Public Release -* More Guns -* 4 new zombie types -* Horde 2 Game -* Improved Many Functioning - -1.0 -> 1.1: -* Final 3 Bosses Added -* Added The Domination Game -* Added 3 New Maps (2 By DoL) -* Even more guns added -* Weapon Challenges System -* CSS Improved to 3.1 -* Cleaned a few files of un-used functions -* added server logging - -Alpha .02 -> 1.0: -* Cleaned over 120 Un-Used Datablocks from the mod -* Moar Guns :) -* More Bosses Added (4 now) -* Added the Perks System -* Added The Sabotage Game -* Fixed many glitches / bugs - -Alpha .01 -> Alpha .02: -* Added many chat commands -* Added 10+ Weapons -* Improved the inventory Menu -* Modified the armors -* Added C4 Mines -* Added 2 Bosses -* Various Other Improvements - -Cons .70a -> Alpha .01: -* Added CCM's Zombies -* Added CCM's F39 Fighter -* Implemented P-Con 1.7 Functions -* Implemented Clip System -* Implemented Rank System -* Improved / Added New Systems +* Congealed all of the help list commands into /help \ No newline at end of file From b316f2fdbe9d57b571deda2f6327b9f0a786b542 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Fri, 30 Jun 2017 13:24:52 -0500 Subject: [PATCH 16/29] Fixed Trevor's Internal Tags, Implemented New Challenge Menu Code Fixed the internal tags for Lordranius Trevor, Grapple Hook balance, round 2, implemented automenu system for challenges (No more mega files, yay!) --- ...ordraniusTrebor.cs => LordraniusTrevor.cs} | 62 +- scripts/TWM2/ChatCommands/Public.cs | 2 +- scripts/TWM2/ChatCommands/SuperAdmin.cs | 8 +- scripts/TWM2/Missions/MissionCore.cs | 44 +- scripts/TWM2/Systems/BossSystem.cs | 16 +- scripts/TWM2/Systems/ChallengeMenus.cs | 1925 +++-------------- scripts/TWM2/Systems/DChalg.cs | 6 + scripts/TWM2/Systems/MainControl.cs | 16 + scripts/TWM2/Systems/Medals.cs | 8 +- scripts/TWM2/Systems/NWChallengeIndex.cs | 1032 +++++---- scripts/TWM2/Systems/scoremenucmds.cs | 28 +- scripts/TWM2/cmddisplaylist.txt | 2 +- scripts/chatCommands.cs | 12 +- scripts/serverCommanderMap.cs | 73 +- scripts/weapons/Pistols/GrappleHook.cs | 2 +- serverControl.cs | 6 +- 16 files changed, 1031 insertions(+), 2211 deletions(-) rename scripts/TWM2/Bosses/{LordraniusTrebor.cs => LordraniusTrevor.cs} (91%) diff --git a/scripts/TWM2/Bosses/LordraniusTrebor.cs b/scripts/TWM2/Bosses/LordraniusTrevor.cs similarity index 91% rename from scripts/TWM2/Bosses/LordraniusTrebor.cs rename to scripts/TWM2/Bosses/LordraniusTrevor.cs index 640e59a..f1d4832 100644 --- a/scripts/TWM2/Bosses/LordraniusTrebor.cs +++ b/scripts/TWM2/Bosses/LordraniusTrevor.cs @@ -1,4 +1,4 @@ -datablock HoverVehicleData(TreborTank) : CentaurVehicle { +datablock HoverVehicleData(TrevorTank) : CentaurVehicle { spawnOffset = "0 0 4"; canControl = true; floatingGravMag = 4.5; @@ -30,13 +30,13 @@ datablock HoverVehicleData(TreborTank) : CentaurVehicle { ShieldDamageScale[$DamageType::Bullet] = 0.01; //I deny you shrike n0bs }; -function StartTrebor(%pos){ +function StartTrevor(%pos){ %team = 6; %rotation = "1 0 0 0"; %skill = 10; %tank = new HoverVehicle() { - dataBlock = TreborTank; + dataBlock = TrevorTank; position = %pos; rotation = %rotation; team = %team; @@ -49,16 +49,16 @@ function StartTrebor(%pos){ %tank.CanUseSpec = 1; %tank.SpecTicks = 0; - InitiateBoss(%tank, "Trebor"); + InitiateBoss(%tank, "Trevor"); - TreborDetermineAttack(%tank); - TreborMove(%tank); - MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trebor"]@": It's time to test the harbinger clan's ultimate siege weapon. ON YOU!"); + TrevorDetermineAttack(%tank); + TrevorMove(%tank); + MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trevor"]@": It's time to test the harbinger clan's ultimate siege weapon. ON YOU!"); return %tank; } -function TreborTank::onAdd(%this, %obj) { +function TrevorTank::onAdd(%this, %obj) { Parent::onAdd(%this, %obj); %turret = TurretData::create(CentaurTurret); @@ -85,11 +85,11 @@ function TreborTank::onAdd(%this, %obj) { setTargetSensorGroup(%turret.getTarget(), 6); setTargetAlwaysVisMask(%turret.getTarget(), 0xffffffff); } -function TreborTank::deleteAllMounted(%data, %obj) { +function TrevorTank::deleteAllMounted(%data, %obj) { CentaurVehicle::deleteAllMounted(%data, %obj); } -function TreborLocateTarget(%tank) { +function TrevorLocateTarget(%tank) { %wbpos = %tank.getworldboxcenter(); %count = ClientGroup.getCount(); %closestClient = -1; @@ -108,7 +108,7 @@ function TreborLocateTarget(%tank) { return %closestClient SPC %closestDistance; } -function TreborRotateAndVec(%tank, %tPl){ +function TrevorRotateAndVec(%tank, %tPl){ if(!isObject(%tPl)) { return; } @@ -126,20 +126,20 @@ function TreborRotateAndVec(%tank, %tPl){ return %set; } -function TreborMove(%tank) { +function TrevorMove(%tank) { if(!isObject(%tank)) { return; } if(%tank.performingSpec) { //Specials make the tank do things that this must be off to work - schedule(250, 0, "TreborMove", %tank); + schedule(250, 0, "TrevorMove", %tank); return; } - %target = TreborLocateTarget(%tank); + %target = TrevorLocateTarget(%tank); if(!isObject(%target.player)) { - schedule(100, 0, "TreborMove", %tank); + schedule(100, 0, "TrevorMove", %tank); return; } - %vec = TreborRotateAndVec(%tank, %target.player); //turns the tank + %vec = TrevorRotateAndVec(%tank, %target.player); //turns the tank %dist = VectorDist(%target.player.getPosition(), %tank.getPosition()); //The all important //don't ask how we would get this far //but we simply move @@ -159,26 +159,26 @@ function TreborMove(%tank) { if(%dist < 10 && !%tank.teleporting) { //interesting... trying to cut it close? %tank.teleporting = 1; - MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trebor"]@": Trying to do that huhn? I think not!"); + MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trevor"]@": Trying to do that huhn? I think not!"); PhaseShift(%tank); } %vector = vectorscale(%tank.getForwardVector(), 1150); %tank.applyImpulse(%tank.getPosition(), %vector); } - schedule(100, 0, "TreborMove", %tank); + schedule(100, 0, "TrevorMove", %tank); } -function TreborDetermineAttack(%tank) { +function TrevorDetermineAttack(%tank) { if(!isObject(%tank)) { return; } if(%tank.performingSpec) { //Specials make the tank do things that this must be off to work - schedule(250, 0, "TreborDetermineAttack", %tank); + schedule(250, 0, "TrevorDetermineAttack", %tank); return; } - %target = TreborLocateTarget(%tank); + %target = TrevorLocateTarget(%tank); if(!isObject(%target)) { - schedule(250, 0, "TreborDetermineAttack", %tank); + schedule(250, 0, "TrevorDetermineAttack", %tank); return; } %dist = VectorDist(%target.player.getPosition(), %tank.getPosition()); //The all important @@ -215,13 +215,13 @@ function TreborDetermineAttack(%tank) { //3. Phase Shift: Tank Shifts to collider range switch(%attackNum) { case 1: - MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trebor"]@": Dodge this "@getTaggedString(%target.name)@"!!!"); + MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trevor"]@": Dodge this "@getTaggedString(%target.name)@"!!!"); RammingSpeed(%tank, %target); case 2: - MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trebor"]@": Engage sideswipe boosters"); + MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trevor"]@": Engage sideswipe boosters"); SlideTarget(%tank, %target); case 3: - MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trebor"]@": Engage Phase Shift!"); + MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trevor"]@": Engage Phase Shift!"); PhaseShift(%tank); } } @@ -230,18 +230,18 @@ function TreborDetermineAttack(%tank) { %attackNum = getRandom(1,3); switch(%attackNum) { case 1: - MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trebor"]@": Engage missile storm on "@getTaggedString(%target.name)@"!!!"); + MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trevor"]@": Engage missile storm on "@getTaggedString(%target.name)@"!!!"); MissileStorm(%tank, %target); case 2: - MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trebor"]@": Let a firey storm of missiles rain upon you, "@getTaggedString(%target.name)@"!!!"); + MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trevor"]@": Let a firey storm of missiles rain upon you, "@getTaggedString(%target.name)@"!!!"); MissileRain(%tank, %target); case 3: - MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trebor"]@": Engage missile storm on "@getTaggedString(%target.name)@"!!!"); + MessageAll('MsgBossBegin', "\c4"@$TWM2::BossName["Trevor"]@": Engage missile storm on "@getTaggedString(%target.name)@"!!!"); MissileStorm(%tank, %target); } } } - schedule(250, 0, "TreborDetermineAttack", %tank); + schedule(250, 0, "TrevorDetermineAttack", %tank); } //Attackz0rs @@ -266,7 +266,7 @@ function RammingSpeed(%tank, %target) { %tank.turretObject.schedule(100, "unMountImage", 0); } else { - %vec = TreborRotateAndVec(%tank, %target.player); //turns the tank + %vec = TrevorRotateAndVec(%tank, %target.player); //turns the tank %vector = vectorscale(%tank.getForwardVector(), 15000); %tank.applyImpulse(%tank.getPosition(), %vector); //%tank.setImageTrigger(3, true); @@ -296,7 +296,7 @@ function SlideTarget(%tank, %target) { %tank.performingSpec = 1; } else { - %vec = TreborRotateAndVec(%tank, %target.player); //turns the tank + %vec = TrevorRotateAndVec(%tank, %target.player); //turns the tank %x = Getword(%vec,0); %y = Getword(%vec,1); %nv1 = %y; diff --git a/scripts/TWM2/ChatCommands/Public.cs b/scripts/TWM2/ChatCommands/Public.cs index 5c78078..f6975fc 100644 --- a/scripts/TWM2/ChatCommands/Public.cs +++ b/scripts/TWM2/ChatCommands/Public.cs @@ -905,7 +905,7 @@ function parsePublicCommands(%sender, %command, %args) { else if (!isBoss(strlwr(%Boss))) { messageclient(%sender, 'MsgClient', '\c2Invalid Boss Name.'); messageclient(%sender, 'MsgClient', '\c2Bosses: Yvex, CnlWindshear, GOL, GOF, Stormrider.'); - messageclient(%sender, 'MsgClient', '\c2GenVeg, LordRog, Insignia, Trebor, Vardison, ShadeLord.'); + messageclient(%sender, 'MsgClient', '\c2GenVeg, LordRog, Insignia, Trevor, Vardison, ShadeLord.'); return 1; } else { diff --git a/scripts/TWM2/ChatCommands/SuperAdmin.cs b/scripts/TWM2/ChatCommands/SuperAdmin.cs index c7eb8f7..727173e 100644 --- a/scripts/TWM2/ChatCommands/SuperAdmin.cs +++ b/scripts/TWM2/ChatCommands/SuperAdmin.cs @@ -120,10 +120,10 @@ function parseSuperAdminCommands(%sender, %command, %args) { %pos = VectorAdd(%sender.player.getPosition(), "0 0 5"); SpawnInsignia(%pos); MessageAll('MsgAdminForce', "\c3"@%sender.namebase@"\c2 spawned Rog's major insignia."); - case "Trebor": + case "Trevor": %pos = VectorAdd(%sender.player.getPosition(), "0 0 15"); - StartTrebor(%pos); - MessageAll('MsgAdminForce', "\c3"@%sender.namebase@"\c2 spawned Lordranius Trebor, leader of the harbinger clan."); + StartTrevor(%pos); + MessageAll('MsgAdminForce', "\c3"@%sender.namebase@"\c2 spawned Lordranius Trevor, leader of the harbinger clan."); case "GhostOfFire": %pos = VectorAdd(%sender.player.getPosition(), "0 0 15"); StartGhostFire(%pos); @@ -143,7 +143,7 @@ function parseSuperAdminCommands(%sender, %command, %args) { default: messageclient(%sender, 'MsgClient', '\c2Invalid Boss Name.'); messageclient(%sender, 'MsgClient', '\c2Bosses: Yvex, CnlWindshear, GhostOfLightning.'); - messageclient(%sender, 'MsgClient', '\c2GenVegenor, LordRog, Insignia, Trebor, Vardison.'); + messageclient(%sender, 'MsgClient', '\c2GenVegenor, LordRog, Insignia, Trevor, Vardison.'); messageclient(%sender, 'MsgClient', '\c2Stormrider, GhostOfFire, ShadeLord.'); } return 1; diff --git a/scripts/TWM2/Missions/MissionCore.cs b/scripts/TWM2/Missions/MissionCore.cs index ade4e6e..c9c65f0 100644 --- a/scripts/TWM2/Missions/MissionCore.cs +++ b/scripts/TWM2/Missions/MissionCore.cs @@ -145,32 +145,32 @@ function CheckMissionRequirement(%client, %mission) { function CreateTWM2Mission(%client, %mission) { %group = NameToID("TWM2Mission"); if(%group.inProgress) { - messageClient(%client, 'msgNope', "\c5MISSION: A mission has been ordered or is in progress."); + messageClient(%client, 'msgNope', "\c5OPERATION: A operation has been ordered or is currently in progress, please try again later."); return; } if(!isObject(%client.player) || %client.player.getState() $= "Dead") { - messageClient(%client, 'msgNope', "\c5MISSION: Dead people cannot order missions."); + messageClient(%client, 'msgNope', "\c5OPERATION: Dead people cannot order operations."); return; } - if(getCurrentEXP(%client) < $Ranks::MinPoints[59] && %client.TWM2Core.officer < 1) { - messageClient(%client, 'msgNope', "\c5MISSION: You must be a Commanding Officer (or Higher) to order missions."); + if(getCurrentEXP(%client) < $Ranks::MinPoints[49] && %client.TWM2Core.officer < 1) { + messageClient(%client, 'msgNope', "\c5OPERATION: You must be a General (or Higher) to order operations."); return; } if($CurrentMissionType !$= "Construction") { error("TWM2 Mission: Must be in construction, aborted."); - messageClient(%client, 'msgNope', "\c5MISSION: Missions an only be ordered in the construction game mode."); + messageClient(%client, 'msgNope', "\c5OPERATION: Operations an only be ordered in the construction game mode."); return; } if($CurrentMission !$= "FlatlandBig" && $CurrentMission !$= "Flatland") { error("TWM2 Mission: Must be in FLBig, aborted."); - messageClient(%client, 'msgNope', "\c5MISSION: Missions can only be ordered on Flatland."); + messageClient(%client, 'msgNope', "\c5OPERATION: This map is incompatible with operations, please request a map change."); return; } %timeleft = $Mission::VarSet[%mission, "TimeLimit"]; %playerlimit = $Mission::VarSet[%mission, "PlayerLimit"]; %playerreq = $Mission::VarSet[%mission, "PlayerReq"]; %missionname = GetField($Mission::VarSet[%mission, "TaskDetails"], 0); - messageClient(%client, 'msgNope', "\c5MISSION: Issuing request to initiate mission: "@%missionname@"."); + messageClient(%client, 'msgNope', "\c5OPERATION: Issuing request to initiate operation: "@%missionname@"."); %group = new ScriptObject(TWM2Mission) { class = "TWM2MissionClass"; @@ -196,7 +196,7 @@ function CreateTWM2Mission(%client, %mission) { %group.schedule(%group.timeToBegin * 1000, "StartTWM2MissionTimer"); if(%group.playerLimit > 1) { //Phantom139: Added TWM2 3.8, obviously we don't want to ask people to join a 1 player mission. - messageAll('msgMission', "\c5MISSION: "@%client.namebase@" has ordered a mission, press [F2] -> Mission to join in."); + messageAll('msgMission', "\c5OPERATION: "@%client.namebase@" has ordered an operation, press [F2] -> Operations to join in."); CompleteNWChallenge(%client, "SimonSays"); } } @@ -204,26 +204,26 @@ function CreateTWM2Mission(%client, %mission) { function AddClientToMission(%client) { %group = nameToID("TWM2Mission"); if(%group.InProgress == 0) { - messageClient(%client, 'msgFailed', "\c5MISSION: There is no mission to join."); + messageClient(%client, 'msgFailed', "\c5OPERATION: There is no active operation to join."); return; } if(%group.InProgress == 1) { - messageClient(%client, 'msgFailed', "\c5MISSION: You cannot join a mission in progress."); + messageClient(%client, 'msgFailed', "\c5OPERATION: You cannot join an operation already in progress."); return; } if(!isObject(%client.player) || %client.player.getState() $= "Dead") { - messageClient(%client, 'msgNope', "\c5MISSION: Dead people cannot join missions."); + messageClient(%client, 'msgNope', "\c5OPERATION: Dead people cannot join operations."); return; } //add them if(%group.Participants >= %group.playerLimit) { - messageClient(%client, 'msgFailed', "\c5MISSION: This mission cannot take any more soldiers."); + messageClient(%client, 'msgFailed', "\c5OPERATION: The fireteam for this operation is to capacity."); return; } //last check, for lulz for(%i = 1; %i <= %group.Participants; %i++) { if(%client == %group.Participant[%i]) { - messageClient(%client, 'msgFailed', "\c5MISSION: Trying to join twice eh?"); + messageClient(%client, 'msgFailed', "\c5OPERATION: You're already in the operation fireteam, prepare for deployment..."); return; } } @@ -231,7 +231,7 @@ function AddClientToMission(%client) { %group.Participants++; %group.Participant[%group.Participants] = %client; %group.ParticipantAlive[%group.Participants] = true; - messageClient(%client, 'msgFailed', "\c5MISSION: Added to the mission squad, prepare for orders."); + messageClient(%client, 'msgFailed', "\c5OPERATION: Added to the operation fireteam, prepare for orders."); CompleteNWChallenge(%client, "FromTheTop"); CompleteNWChallenge(%group.Participant[1], "NaturalLeader"); } @@ -244,11 +244,11 @@ function TWM2MissionClass::StartTWM2MissionTimer(%group) { for(%r = 1; %r <= %counter; %r++) { if(%cl == %group.Participant[%r]) { if(!isObject(%cl.player) || %cl.player.getState() $= "Dead") { - messageClient(%cl, 'msgNope', "\c5MISSION: You have been released from the mission for being dead."); + messageClient(%cl, 'msgNope', "\c5OPERATION: You have been released from the operation fireteam for being dead."); %cl.missionReady = false; } else { - messageClient(%cl, 'msgNope', "\c5MISSION: Standby.... Relaying orders...."); + messageClient(%cl, 'msgNope', "\c5OPERATION: Standby.... Relaying orders...."); %cl.missionReady = true; } } @@ -270,7 +270,7 @@ function TWM2MissionClass::StartTWM2MissionTimer(%group) { //echo("checking 2"); if(%group.Participants < %req) { for(%lol = 1; %lol <= %group.Participants; %lol++) { - messageClient(%group.Participant[%lol], 'msgFailed', "\c5MISSION: Not enough participants, Aborted."); + messageClient(%group.Participant[%lol], 'msgFailed', "\c5OPERATION: Not enough participants in the fireteam, operation aborted."); } %group.EndTWM2Mission(); //echo("NaP"); @@ -324,7 +324,7 @@ function TWM2MissionClass::EndTWM2Mission(%group) { if(%group.Status $= "Failed") { for(%i = 1; %i <= %group.Participants; %i++) { messageClient(%group.Participant[%i], 'msgFailed', "\c5"@%group.commandName@": "@%group.failMessage@"~wfx/misc/flag_lost.wav"); - messageClient(%group.Participant[%i], 'MsgSPCurrentObjective1', "", ""@%group.MissionName@" - Mission Failed"); + messageClient(%group.Participant[%i], 'MsgSPCurrentObjective1', "", ""@%group.MissionName@" - Operation Failed"); schedule(5000, 0, messageClient, %group.Participant[%i], 'MsgSPCurrentObjective1' ,"", "Welcome to TWM2!"); CompleteNWChallenge(%group.Participant[%i], "EpicFailure"); } @@ -333,8 +333,8 @@ function TWM2MissionClass::EndTWM2Mission(%group) { if(%group.timer > 0) { for(%i = 1; %i <= %group.Participants; %i++) { messageClient(%group.Participant[%i], 'msgFailed', "\c5"@%group.commandName@": "@%group.BonusCompleteMessage@"~wfx/misc/hunters_horde.wav"); - GainExperience(%group.Participant[%i], %group.bonusEXP + %group.completionEXP, "Mission Accomplished, Bonus EXP Recieved "); - messageClient(%group.Participant[%i], 'MsgSPCurrentObjective1', "", ""@%group.MissionName@" - Mission Accomplished (Time!)"); + GainExperience(%group.Participant[%i], %group.bonusEXP + %group.completionEXP, "Operation Accomplished, Bonus EXP Recieved "); + messageClient(%group.Participant[%i], 'MsgSPCurrentObjective1', "", ""@%group.MissionName@" - Operation Accomplished (Time Bonus Achieved)"); schedule(5000, 0, messageClient, %group.Participant[%i], 'MsgSPCurrentObjective1' ,"", "Welcome to TWM2!"); CompleteNWChallenge(%group.Participant[%i], "GoldStar"); } @@ -342,8 +342,8 @@ function TWM2MissionClass::EndTWM2Mission(%group) { else { for(%i = 1; %i <= %group.Participants; %i++) { messageClient(%group.Participant[%i], 'msgFailed', "\c5"@%group.commandName@": "@%group.CompleteMessageNoTime@"~wfx/misc/flag_capture.wav"); - GainExperience(%group.Participant[%i], %group.completionEXP, "Mission Accomplished! "); - messageClient(%group.Participant[%i], 'MsgSPCurrentObjective1', "", ""@%group.MissionName@" - Mission Accomplished"); + GainExperience(%group.Participant[%i], %group.completionEXP, "Operation Accomplished! "); + messageClient(%group.Participant[%i], 'MsgSPCurrentObjective1', "", ""@%group.MissionName@" - Operation Accomplished"); schedule(5000, 0, messageClient, %group.Participant[%i], 'MsgSPCurrentObjective1' ,"", "Welcome to TWM2!"); CompleteNWChallenge(%group.Participant[%i], "Faster"); } diff --git a/scripts/TWM2/Systems/BossSystem.cs b/scripts/TWM2/Systems/BossSystem.cs index e89c5fe..ac87d75 100644 --- a/scripts/TWM2/Systems/BossSystem.cs +++ b/scripts/TWM2/Systems/BossSystem.cs @@ -35,7 +35,7 @@ function InitiateBoss(%Boss, %name) { %print = "BOSS ALERT \n LORD VARDISON HAS ENTERED HIS SECOND FORM"; case "Vardison3": %print = "BOSS ALERT \n LORD VARDISON HAS ENTERED HIS FINAL FORM"; - case "Trebor": + case "Trevor": %print = "BOSS BATTLE \n LORDRANIUS TREVOR"; case "Stormrider": %print = "CLASSIC BOSS BATTLE \n COMMANDER STORMRIDER"; @@ -64,7 +64,7 @@ function BossCheckUp(%boss, %name) { MessageAll('MsgSPCurrentObjective1', "", "Boss Battle: "@$TWM2::BossName[%name]@" [Boss Kill Count: "@$TWM2::BossManager.bossKills@"]"); MessageAll('MsgSPCurrentObjective2', "", "Boss HP: "@mFloor(%boss.getDamageLeft()*100)@"/"@mFloor(%boss.getMaxDamage()*100)@" ("@%percentage@"%)"); - if(%name !$= "CnlWindshear" && %name !$= "Trebor" && %name !$= "Stormrider") { + if(%name !$= "CnlWindshear" && %name !$= "Trevor" && %name !$= "Stormrider") { if(!isObject(%boss) || %boss.getState() $= "dead") { if(%name $= "Vardison1") { %count = ClientGroup.getCount(); @@ -175,7 +175,7 @@ function GameConnection::GiveBossAward(%client, %bossName) { CompleteNWChallenge(%client, "VardWtf"); } } - else if(%bossName $= "Trebor") { + else if(%bossName $= "Trevor") { AwardClient(%client, 15); } //rank writing @@ -310,15 +310,15 @@ function CheckBossChallenge(%client, %boss) { if(%dc >= 10) { CompleteNWChallenge(%client, "Stormrider3"); } - case "Trebor": + case "Trevor": if(%dc >= 2) { - CompleteNWChallenge(%client, "Treb1"); + CompleteNWChallenge(%client, "Trev1"); } if(%dc >= 4) { - CompleteNWChallenge(%client, "Treb2"); + CompleteNWChallenge(%client, "Trev2"); } if(%dc >= 7) { - CompleteNWChallenge(%client, "Treb3"); + CompleteNWChallenge(%client, "Trev3"); } case "ShadeLord": if(%dc >= 1) { @@ -344,7 +344,7 @@ exec("scripts/TWM2/Bosses/GhostOfLightning.cs"); exec("scripts/TWM2/Bosses/GeneralVegenor.cs"); exec("scripts/TWM2/Bosses/LordRog.cs"); exec("scripts/TWM2/Bosses/MajorInsignia.cs"); -exec("scripts/TWM2/Bosses/LordraniusTrebor.cs"); +exec("scripts/TWM2/Bosses/LordraniusTrevor.cs"); exec("scripts/TWM2/Bosses/Stormrider.cs"); exec("scripts/TWM2/Bosses/GhostOfFire.cs"); exec("scripts/TWM2/Bosses/ShadeLord.cs"); diff --git a/scripts/TWM2/Systems/ChallengeMenus.cs b/scripts/TWM2/Systems/ChallengeMenus.cs index 908df37..43f8c31 100644 --- a/scripts/TWM2/Systems/ChallengeMenus.cs +++ b/scripts/TWM2/Systems/ChallengeMenus.cs @@ -1,1699 +1,306 @@ //Challenge Menus //TWM2 3.9.1 -//Moved all of the Non-Weapon Challenge menus to a singular file -// under a single function to streamline it... +//All of the challenge menu functions are now in this file to make locating them for adjustment +// easier to maintain. Also, as of 3.9.1, I have now provided a means to automate this menu's +// creation such that new challenges can be very easily added. -// Yes, I know I could "automate" this, but my laziness is still rather persistent to re-do the entire old system... +function GenerateChallengesMenu(%client, %tag, %index) { + %scriptController = %client.TWM2Core; + %xp = getCurrentEXP(%client); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Select a category to view challenges:"); + %index++; + // + messageClient( %client, 'SetLineHud', "", %tag, %index, "PGD Challenges (Daily/Weekly/Monthly)"); + %index++; + for(%i = 1; $Challenge::Category[%i] !$= ""; %i++) { + if(%i != 6) { + %categoryReq = getField($Challenge::Category[%i], 2); + if(getWord(%categoryReq, 0) $= "Officer") { + %offLevel = getWord(%categoryReq, 1); + if(%scriptController.officer >= %offLevel) { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Challenge::Category[%i], 0)@": "@getField($Challenge::Category[%i], 1)); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Challenge::Category[%i], 0)@": Locked, Requires officer level "@%offLevel@" ("@strReplace($Prestige::Name[%offLevel], " ", "")@")"); + %index++; + } + } + else { + if(%categoryReq == -1) { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Challenge::Category[%i], 0)@": "@getField($Challenge::Category[%i], 1)); + %index++; + } + else { + if(%xp >= $Rank::MinPoints[%categoryReq]) { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Challenge::Category[%i], 0)@": "@getField($Challenge::Category[%i], 1)); + %index++; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField($Challenge::Category[%i], 0)@": Locked, Requires Rank of "@$Ranks::NewRank[%categoryReq]@"."); + %index++; + } + } + } + } + } + return %index; +} function GenerateChallengeSubMenu(%client, %subMenu, %tag, %index) { - switch(%subMenu) { - case 1: - //Killstreaks - messageClient( %client, 'SetLineHud', "", %tag, %index, "Killstreak Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("UAV1")) { - if(%client.CheckNWChallengeCompletion("UAV2")) { - if(%client.CheckNWChallengeCompletion("UAV3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert III: Call in 150 UAV Recon Satellites"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert III: Call in 150 UAV Recon Satellites"); - %index++; - } + if(%subMenu == 6) { + return GenerateDWMChallengeMenu(%client, %tag, %index); + } + + %scriptController = %client.TWM2Core; + %xp = getCurrentEXP(%client); + + for(%i = 0; $Challenge::Challenge[%subMenu, %i] !$= ""; %i++) { + %loopAndFinish = false; + %challengeInternalName = $Challenge::Challenge[%subMenu, %i]; + %challengeDetails = $Challenge::Info[%challengeInternalName]; + %trailing = TWM2Lib_MainControl("getStrTrailingNumber", %challengeInternalName); + if(%done[%challengeInternalName]) { + continue; + } + if(%challengeDetails !$= "") { + //Is this NOT a multi-tier challenge? + if($Challenge::IsNotMultiTier[%challengeInternalName] || %trailing $= "" || %trailing == 0) { + //Proceed to writing ;) + if(%client.CheckNWChallengeCompletion(%challengeInternalName)) { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField(%challengeDetails, 0)@": "@getField(%challengeDetails, 4)); + %index++; + continue; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert II: Call in 75 UAV Recon Satellites"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAV Expert I: Call in 30 UAV Recon Satellites"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Airstrike1")) { - if(%client.CheckNWChallengeCompletion("Airstrike2")) { - if(%client.CheckNWChallengeCompletion("Airstrike3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert III: Call in 125 Airstrikes"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert III: Call in 125 Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert II: Call in 65 Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Airstrike Expert I: Call in 25 Airstrikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("UAMS1")) { - if(%client.CheckNWChallengeCompletion("UAMS2")) { - if(%client.CheckNWChallengeCompletion("UAMS3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert III: Call in 125 UAMS Strikes"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert III: Call in 125 UAMS Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert II: Call in 65 UAMS Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "UAMS Expert I: Call in 25 UAMS Strikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Helicopter1")) { - if(%client.CheckNWChallengeCompletion("Helicopter2")) { - if(%client.CheckNWChallengeCompletion("Helicopter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert III: Call in 125 Combat Helicopters"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert III: Call in 125 Combat Helicopters"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert II: Call in 65 Combat Helicopters"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helicopter Expert I: Call in 25 Combat Helicopters"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Harrier1")) { - if(%client.CheckNWChallengeCompletion("Harrier2")) { - if(%client.CheckNWChallengeCompletion("Harrier3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert III: Call in 110 Plasma Harrier Airstrikes"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert III: Call in 110 Plasma Harrier Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert II: Call in 55 Plasma Harrier Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harrier Expert I: Call in 20 Plasma Harrier Airstrikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SatNuke1")) { - if(%client.CheckNWChallengeCompletion("SatNuke2")) { - if(%client.CheckNWChallengeCompletion("SatNuke3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert III: Call in 125 Orbital Laser Strikes"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert III: Call in 125 Orbital Laser Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert II: Call in 65 Orbital Laser Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "OLS Expert I: Call in 25 Orbital Laser Strikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("NapalmHarrier1")) { - if(%client.CheckNWChallengeCompletion("NapalmHarrier2")) { - if(%client.CheckNWChallengeCompletion("NapalmHarrier3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert III: Call in 110 Napalm Airstrikes"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert III: Call in 110 Napalm Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert II: Call in 55 Napalm Airstrikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Napalm Airstrike Expert I: Call in 20 Napalm Airstrikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GunHeli1")) { - if(%client.CheckNWChallengeCompletion("GunHeli2")) { - if(%client.CheckNWChallengeCompletion("GunHeli3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert III: Call in 110 Gunship Helicopters"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert III: Call in 110 Gunship Helicopters"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert II: Call in 55 Gunship Helicopters"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship Helicopter Expert I: Call in 20 Gunship Helicopters"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SBomber1")) { - if(%client.CheckNWChallengeCompletion("SBomber2")) { - if(%client.CheckNWChallengeCompletion("SBomber3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert III: Call in 100 Stealth Bombers"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert III: Call in 100 Stealth Bombers"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert II: Call in 50 Stealth Bombers"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Stealth Bomber Expert I: Call in 20 Stealth Bombers"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Gunship1")) { - if(%client.CheckNWChallengeCompletion("Gunship2")) { - if(%client.CheckNWChallengeCompletion("Gunship3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert III: Call in 75 Harbinger Gunships"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert III: Call in 75 Harbinger Gunships"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert II: Call in 35 Harbinger Gunships"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Gunship Expert I: Call in 15 Harbinger Gunships"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Apache1")) { - if(%client.CheckNWChallengeCompletion("Apache2")) { - if(%client.CheckNWChallengeCompletion("Apache3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert III: Call in 75 Apache Gunners"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert III: Call in 75 Apache Gunners"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert II: Call in 35 Apache Gunners"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Apache Gunner Expert I: Call in 15 Apache Gunners"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Gunship3")) { - if(%client.CheckNWChallengeCompletion("ACGunship1")) { - if(%client.CheckNWChallengeCompletion("ACGunship2")) { - if(%client.CheckNWChallengeCompletion("ACGunship3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert III: Call in 75 AC-130 Gunners"); + //Does this challenge require another challenge be completed? + if($Challenge::RequiresChallenge[%subMenu, %i] !$= "") { + %requiredChallengeName = $Challenge::RequiresChallenge[%subMenu, %i]; + %requiredChallengeDetails = $Challenge::Info[%requiredChallengeName]; + if(!%client.CheckNWChallengeCompletion(%requiredChallengeName)) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenge Locked: Requires Completion of "@getField(%requiredChallengeDetails, 0)); %index++; + continue; + } + } + //Does this challenge have an embedded requirement? + if($Challenge::SetRequirement[%subMenu, %i] !$= "") { + %cReq = $Challenge::SetRequirement[%subMenu, %i]; + if(getWord(%cReq, 0) $= "Officer") { + %offLevel = getWord(%cReq, 1); + if(%scriptController.officer < %offLevel) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenge Locked, Requires officer level "@%offLevel@" ("@strReplace($Prestige::Name[%offLevel], " ", "")@")"); + %index++; + continue; + } } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert III: Call in 75 AC-130 Gunners"); - %index++; + %expReq = $Rank::MinPoints[%cReq]; + if(%xp < $expReq) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenge Locked, Requires "@$Ranks::NewRank[%cReq]@" rank"); + %index++; + continue; + } } } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert II: Call in 35 AC-130 Gunners"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "AC-130 Expert I: Call in 15 AC-130 Gunners"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Locked: Requires Harbinger Gunship Expert III."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Centaur1")) { - if(%client.CheckNWChallengeCompletion("Centaur2")) { - if(%client.CheckNWChallengeCompletion("Centaur3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert III: Call in 50 Artillery Strikes"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert III: Call in 50 Artillery Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert II: Call in 25 Artillery Strikes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Centaur Artillery Expert I: Call in 10 Artillery Strikes"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("EMP1")) { - if(%client.CheckNWChallengeCompletion("EMP2")) { - if(%client.CheckNWChallengeCompletion("EMP3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert III: Call in 25 Mass EMP's"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert III: Call in 25 Mass EMP's"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert II: Call in 10 Mass EMP's"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "EMP Expert I: Call in 5 Mass EMP's"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Nuke1")) { - if(%client.CheckNWChallengeCompletion("Nuke2")) { - if(%client.CheckNWChallengeCompletion("Nuke3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert III: Call in 25 Nukes"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert III: Call in 25 Nukes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert II: Call in 10 Nukes"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nuke Expert I: Call in 5 Nukes"); - %index++; - } - // - if(%client.TWM2Core.Officer >= 1) { - if(%client.CheckNWChallengeCompletion("Fission1")) { - if(%client.CheckNWChallengeCompletion("Fission2")) { - if(%client.CheckNWChallengeCompletion("Fission3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert III: Call in 5 Fission Bombs"); + //Is this a "hidden" challenge? + if($Challenge::SetHidden[%subMenu, %i]) { + if($Challenge::HiddenMessage[%subMenu, %i] !$= "") { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$Challenge::HiddenMessage[%subMenu, %i]); %index++; + continue; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert III: Call in 5 Fission Bombs"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "This is a hidden challenge, unlock it to learn more."); %index++; + continue; } } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert II: Call in 2 Fission Bombs"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fission Bomb Expert I: Call in 1 Fission Bomb"); - %index++; + //All tests passed, write normally. + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField(%challengeDetails, 0)@": "@getField(%challengeDetails, 4)); + %index++; } } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Locked: Requires Instructive Officer Rank (Off. Rank 1)"); - %index++; - } - // - if(%client.TWM2Core.Officer >= 15) { - if(%client.CheckNWChallengeCompletion("LOAS1")) { - if(%client.CheckNWChallengeCompletion("LOAS2")) { - if(%client.CheckNWChallengeCompletion("LOAS3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert III: Call in 15 Low Orbit Orbital Strikes (LOAS)"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert III: Call in 15 Low Orbit Orbital Strikes (LOAS)"); - %index++; - } + //Scan for additional challenges using the same internal name.. + %chStr = getSubStr(%challengeInternalName, 0, strLen(%challengeInternalName) - strLen(%trailing)); + //Loop forward until the system draws a blank + %fCount = 0; + %j = %i; + while(true) { + %nextC = $Challenge::Challenge[%subMenu, %j]; + %nextT = TWM2Lib_MainControl("getStrTrailingNumber", %nextC); + %nextChStr = getSubStr(%nextC, 0, strLen(%nextC) - strLen(%nextT)); + if(%nextChStr $= %chStr && %nextT == %fCount+1) { + %fCount++; + %j++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert II: Call in 10 Low Orbit Orbital Strikes (LOAS)"); - %index++; + break; } } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "LOAS Expert I: Call in 5 Low Orbit Orbital Strikes (LOAS)"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Locked: Requires Harbinger Officer Rank (Off. Rank 15)"); - %index++; - } - return %index; - - case 2: - //Boss Hunting - messageClient( %client, 'SetLineHud', "", %tag, %index, "Boss Hunting Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("Yvex1")) { - if(%client.CheckNWChallengeCompletion("Yvex2")) { - if(%client.CheckNWChallengeCompletion("Yvex3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowy Desecration: Defeat Lord Yvex 10 Times"); + //This isn't a multi-tier, flag it internally so we can skip this code later, and push a message to the console to let the host know. + if(%fCount == 1) { + error("NOTE: Challenge menu generator has flagged a non multi-tier challenge caught inside the multi-tier loop, consider removing "@%challengeInternalName@" by adding the $Challenge::IsNotMultiTier flag to this challenge."); + if(%client.CheckNWChallengeCompletion(%challengeInternalName)) { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField(%challengeDetails, 0)@": "@getField(%challengeDetails, 4)); %index++; + continue; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowy Desecration: Defeat Lord Yvex 10 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Darkness Rising: Defeat Lord Yvex 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Nightmarish Enterprise: Defeat Lord Yvex 3 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("CWS1")) { - if(%client.CheckNWChallengeCompletion("CWS2")) { - if(%client.CheckNWChallengeCompletion("CWS3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger's Bane: Defeat Colonel Windshear 10 Times"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger's Bane: Defeat Colonel Windshear 10 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Aerieal Nightmare: Defeat Colonel Windshear 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fortress In The Sky: Defeat Colonel Windshear 3 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GOL1")) { - if(%client.CheckNWChallengeCompletion("GOL2")) { - if(%client.CheckNWChallengeCompletion("GOL3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Severe Thunderstorm: Defeat The Ghost Of Lightning 10 Times"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Severe Thunderstorm: Defeat The Ghost Of Lightning 10 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Shocking Truth: Defeat The Ghost Of Lightning 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Envious Lightning: Defeat The Ghost Of Lightning 3 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GOF1")) { - if(%client.CheckNWChallengeCompletion("GOF2")) { - if(%client.CheckNWChallengeCompletion("GOF3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Mt. Death Depleter: Defeat The Ghost Of Fire 5 Times"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Mt. Death Depleter: Defeat The Ghost Of Fire 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Inceneration Ender: Defeat The Ghost Of Fire 3 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Purifier: Defeat The Ghost Of Fire"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Veg1")) { - if(%client.CheckNWChallengeCompletion("Veg2")) { - if(%client.CheckNWChallengeCompletion("Veg3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Firestorm Ender: Defeat General Vegenor 10 Times"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Firestorm Ender: Defeat General Vegenor 10 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Burning Frenzy: Defeat General Vegenor 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Flaming Revolt: Defeat General Vegenor 3 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("LRog1")) { - if(%client.CheckNWChallengeCompletion("LRog2")) { - if(%client.CheckNWChallengeCompletion("LRog3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Payback's A Bitch: Defeat Lord Rog 7 Times"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Payback's A Bitch: Defeat Lord Rog 7 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Return to Returner: Defeat Lord Rog 4 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Revenge Halter: Defeat Lord Rog 2 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Ins1")) { - if(%client.CheckNWChallengeCompletion("Ins2")) { - if(%client.CheckNWChallengeCompletion("Ins3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gravitational Influx: Defeat Major Insignia 7 Times"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gravitational Influx: Defeat Major Insignia 7 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "No Gravity, No Problem: Defeat Major Insignia 4 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "El Shipitor: Defeat Major Insignia 2 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Stormrider1")) { - if(%client.CheckNWChallengeCompletion("Stormrider2")) { - if(%client.CheckNWChallengeCompletion("Stormrider3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Fighter Demolisher: Defeat Commander Stormrider 10 Times"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Fighter Demolisher: Defeat Commander Stormrider 10 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shootdown Master: Defeat Commander Stormrider 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Clear Skies: Defeat Commander Stormrider 3 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Treb1")) { - if(%client.CheckNWChallengeCompletion("Treb2")) { - if(%client.CheckNWChallengeCompletion("Treb3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Tank Halter: Defeat Lordranius Trevor 7 Times"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Tank Halter: Defeat Lordranius Trevor 7 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Harbinger Denied: Defeat Lordranius Trevor 4 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Precious Cargo: Defeat Lordranius Trevor 2 Times"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Vard1")) { - if(%client.CheckNWChallengeCompletion("Vard2")) { - if(%client.CheckNWChallengeCompletion("Vard3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Outevil The Wicked: Defeat Lord Vardison 5 Times"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Outevil The Wicked: Defeat Lord Vardison 5 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Glare The Dark: Defeat Lord Vardison 3 Times"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shining Star: Defeat Lord Vardison"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("VardEasy")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience: Defeat Lord Vardison on Easy Difficulty"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience: Defeat Lord Vardison on Easy Difficulty"); - %index++; - } - if(%client.CheckNWChallengeCompletion("VardNorm")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter: Defeat Lord Vardison on Normal Difficulty"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter: Defeat Lord Vardison on Normal Difficulty"); - %index++; - } - if(%client.CheckNWChallengeCompletion("VardHard")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer: Defeat Lord Vardison on Hard Difficulty"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer: Defeat Lord Vardison on Hard Difficulty"); - %index++; - } - if(%client.CheckNWChallengeCompletion("VardWtf")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm: You're a fucking badass... Just bask in that..."); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, ""); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm: Against all odds, emerge victorious against WTF difficulty Lord Vardison"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, ""); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ShadeLord1")) { - if(%client.CheckNWChallengeCompletion("ShadeLord2")) { - if(%client.CheckNWChallengeCompletion("ShadeLord3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Dawnlight Encarnate: Defeat The Shade Lord for the Third Time"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Dawnlight Encarnate: Defeat The Shade Lord for the Third Time"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadow Embracer: Defeat The Shade Lord Twice"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Night Stalker: Defeat The Shade Lord"); - %index++; - } - // - return %index; - - case 3: - //Wargames - messageClient( %client, 'SetLineHud', "", %tag, %index, "Wargames (PvP) Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("Slayer1")) { - if(%client.CheckNWChallengeCompletion("Slayer2")) { - if(%client.CheckNWChallengeCompletion("Slayer3")) { - if(%client.CheckNWChallengeCompletion("Slayer4")) { - if(%client.CheckNWChallengeCompletion("Slayer5")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer V: Kill 1,000 Enemy Players"); - %index++; + //Does this challenge require another challenge be completed? + if($Challenge::RequiresChallenge[%subMenu, %i] !$= "") { + %requiredChallengeName = $Challenge::RequiresChallenge[%subMenu, %i]; + %requiredChallengeDetails = $Challenge::Info[%requiredChallengeName]; + if(!%client.CheckNWChallengeCompletion(%requiredChallengeName)) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenge Locked: Requires Completion of "@getField(%requiredChallengeDetails, 0)); + %index++; + continue; + } + } + //Does this challenge have an embedded requirement? + if($Challenge::SetRequirement[%subMenu, %i] !$= "") { + %cReq = $Challenge::SetRequirement[%subMenu, %i]; + if(getWord(%cReq, 0) $= "Officer") { + %offLevel = getWord(%cReq, 1); + if(%scriptController.officer < %offLevel) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenge Locked, Requires officer level "@%offLevel@" ("@strReplace($Prestige::Name[%offLevel], " ", "")@")"); + %index++; + continue; + } } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer V: Kill 1,000 Enemy Players"); + %expReq = $Rank::MinPoints[%cReq]; + if(%xp < $expReq) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenge Locked, Requires "@$Ranks::NewRank[%cReq]@" rank"); + %index++; + continue; + } + } + } + //Is this a "hidden" challenge? + if($Challenge::SetHidden[%subMenu, %i]) { + if($Challenge::HiddenMessage[%subMenu, %i] !$= "") { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$Challenge::HiddenMessage[%subMenu, %i]); + %index++; + continue; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "This is a hidden challenge, unlock it to learn more."); + %index++; + continue; + } + } + //All tests passed, write normally. + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField(%challengeDetails, 0)@": "@getField(%challengeDetails, 4)); + %index++; + } + } + else { + //Alright, we've got a multi-tier challenge. Now, let's process... + //Step 1: Identify the active challenge... + %j = %i; + %fCount = 1; + while(true) { + %currentC = $Challenge::Challenge[%subMenu, %j]; + %currentT = TWM2Lib_MainControl("getStrTrailingNumber", %currentC); + %currentChStr = getSubStr(%currentC, 0, strLen(%currentC) - strLen(%currentT)); + %cDetails = $Challenge::Info[%currentC]; + if(%loopAndFinish) { + if(%currentChStr $= %chStr && %currentT == %fCount) { + %done[%currentC] = true; + %fCount++; + %j++; + continue; + } + else { + break; + } + } + //Is this challenge complete? If so, check to see if the next challenge is still contained in our "sequence" + if(%client.CheckNWChallengeCompletion(%currentC)) { + %done[%currentC] = true; + //Yes, it's complete, move to the next. + %nextC = $Challenge::Challenge[%subMenu, %j+1]; + %nextT = TWM2Lib_MainControl("getStrTrailingNumber", %nextC); + %nextChStr = getSubStr(%nextC, 0, strLen(%nextC) - strLen(%nextT)); + if(%nextChStr $= %currentChStr && %nextT == %fCount+1) { + %fCount++; + %j++; + continue; + } + else { + %cDetails = $Challenge::Info[%currentC]; + //This is the last challenge in the sequence, and it's done... write. + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField(%cDetails, 0)@": "@getField(%cDetails, 4)); %index++; + break; } } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer IV: Kill 750 Enemy Players"); - %index++; + //Not complete, this is the active challenge. Proceed to write, then flag the others in the chain as "done" + //Does this challenge require another challenge be completed? + if($Challenge::RequiresChallenge[%subMenu, %j] !$= "") { + %requiredChallengeName = $Challenge::RequiresChallenge[%subMenu, %j]; + %requiredChallengeDetails = $Challenge::Info[%requiredChallengeName]; + if(!%client.CheckNWChallengeCompletion(%requiredChallengeName)) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenge Locked: Requires Completion of "@getField(%requiredChallengeDetails, 0)); + %index++; + %loopAndFinish = true; + continue; + } + } + //Does this challenge have an embedded requirement? + if($Challenge::SetRequirement[%subMenu, %j] !$= "") { + %cReq = $Challenge::SetRequirement[%subMenu, %j]; + if(getWord(%cReq, 0) $= "Officer") { + %offLevel = getWord(%cReq, 1); + if(%scriptController.officer < %offLevel) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenge Locked, Requires officer level "@%offLevel@" ("@strReplace($Prestige::Name[%offLevel], " ", "")@")"); + %index++; + %loopAndFinish = true; + continue; + } + } + else { + %expReq = $Rank::MinPoints[%cReq]; + if(%xp < $expReq) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Challenge Locked, Requires "@$Ranks::NewRank[%cReq]@" rank"); + %index++; + %loopAndFinish = true; + continue; + } + } + } + //Is this a "hidden" challenge? + if($Challenge::SetHidden[%subMenu, %j]) { + if($Challenge::HiddenMessage[%subMenu, %j] !$= "") { + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@$Challenge::HiddenMessage[%subMenu, %i]); + %index++; + %loopAndFinish = true; + continue; + } + else { + messageClient( %client, 'SetLineHud', "", %tag, %index, "This is a hidden challenge, unlock it to learn more."); + %index++; + %loopAndFinish = true; + continue; + } + } + //All tests passed, write normally. + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@getField(%cDetails, 0)@": "@getField(%cDetails, 4)); + %index++; + //Flag the rest of the chain as done. + %loopAndFinish = true; } } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer III: Kill 500 Enemy Players"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer II: Kill 250 Enemy Players"); - %index++; } } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Slayer I: Kill 100 Enemy Players"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Defectionator1")) { - if(%client.CheckNWChallengeCompletion("Defectionator2")) { - if(%client.CheckNWChallengeCompletion("Defectionator3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator III: Kill 500 \"Zombified\" Players"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator III: Kill 500 \"Zombified\" Players"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator II: Kill 250 \"Zombified\" Players"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Defectionator I: Kill 100 \"Zombified\" Players"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Infectionator1")) { - if(%client.CheckNWChallengeCompletion("Infectionator2")) { - if(%client.CheckNWChallengeCompletion("Infectionator3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator III: Convert 250 Players to the Zombie Horde"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator III: Convert 250 Players to the Zombie Horde"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator II: Convert 100 Players to the Zombie Horde"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Infectionator I: Convert 50 Players to the Zombie Horde..."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("HSHoncho1")) { - if(%client.CheckNWChallengeCompletion("HSHoncho2")) { - if(%client.CheckNWChallengeCompletion("HSHoncho3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho III: Eliminate 300 Enemy Players with Headshots"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho III: Eliminate 300 Enemy Players with Headshots"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho II: Eliminate 200 Enemy Players with Headshots"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Headshot Honcho I: Eliminate 100 Enemy Players with Headshots"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("VehMans1")) { - if(%client.CheckNWChallengeCompletion("VehMans2")) { - if(%client.CheckNWChallengeCompletion("VehMans3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter III: Eliminate 250 Enemy Players with a vehicle"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter III: Eliminate 250 Enemy Players with a vehicle"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter II: Eliminate 100 Enemy Players with a vehicle"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Vehicular Manslaughter I: Eliminate 50 Enemy Players with a vehicle"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Assassin")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Assassinator: Backstab an enemy player using the Blade of Vengeance"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Assassinator: Backstab an enemy player using the Blade of Vengeance"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("CompletelyUnexpected")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "That Was... Unexpected: Eliminate someone playing as General Rog by backstabbing them with the Blade of Vengence"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, ""); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "That Was... Unexpected: Eliminate someone playing as General Rog by backstabbing them with the Blade of Vengence"); - %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, ""); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Uncomprehendable")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Uncomprehendable: You committed the ultimate vehicle kill humiliation, well done!"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Uncomprehendable: Get killed in a fighter, and have the driverless vehicle run down your killer"); - %index++; - } - // - return %index; - - case 4: - //Zombie Slaying - messageClient( %client, 'SetLineHud', "", %tag, %index, "Zombie Slayer Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("NormHunter1")) { - if(%client.CheckNWChallengeCompletion("NormHunter2")) { - if(%client.CheckNWChallengeCompletion("NormHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster III: Slay 10,000 Zombies (Normal Type)"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster III: Slay 10,000 Zombies (Normal Type)"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster II: Slay 5,000 Zombies (Normal Type)"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Frontline Buster I: Slay 2,500 Zombies (Normal Type)"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("RavHunter1")) { - if(%client.CheckNWChallengeCompletion("RavHunter2")) { - if(%client.CheckNWChallengeCompletion("RavHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills III: Slay 5,000 Ravager Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills III: Slay 5,000 Ravager Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills II: Slay 2,500 Ravager Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Kills I: Slay 1,000 Ravager Zombies"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("LordHunter1")) { - if(%client.CheckNWChallengeCompletion("LordHunter2")) { - if(%client.CheckNWChallengeCompletion("LordHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are III: Slay 3,000 Zombie Lords"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are III: Slay 3,000 Zombie Lords"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are II: Slay 2,000 Zombie Lords"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "The Bigger They Are I: Slay 1,000 Zombie Lords"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("DemonHunter1")) { - if(%client.CheckNWChallengeCompletion("DemonHunter2")) { - if(%client.CheckNWChallengeCompletion("DemonHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant III: Slay 5,000 Demon Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant III: Slay 5,000 Demon Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant II: Slay 2,500 Demon Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Fire Retardant I: Slay 1,000 Demon Zombies"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("AirRapHunter1")) { - if(%client.CheckNWChallengeCompletion("AirRapHunter2")) { - if(%client.CheckNWChallengeCompletion("AirRapHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer III: Slay 6,000 Air Rapier Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer III: Slay 6,000 Air Rapier Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer II: Slay 3,500 Air Rapier Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bat Slayer I: Slay 1,500 Air Rapier Zombies"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("DLordHunter1")) { - if(%client.CheckNWChallengeCompletion("DLordHunter2")) { - if(%client.CheckNWChallengeCompletion("DLordHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator III: Slay 1,500 Demon Lord Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator III: Slay 1,500 Demon Lord Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator II: Slay 1,000 Demon Lord Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Hellspawn Erradicator I: Slay 500 Demon Lord Zombies"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ShifterHunter1")) { - if(%client.CheckNWChallengeCompletion("ShifterHunter2")) { - if(%client.CheckNWChallengeCompletion("ShifterHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp III: Slay 6,000 Shifter Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp III: Slay 6,000 Shifter Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp II: Slay 3,000 Shifter Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti-Warp I: Slay 1,500 Shifter Zombies"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SummonerHunter1")) { - if(%client.CheckNWChallengeCompletion("SummonerHunter2")) { - if(%client.CheckNWChallengeCompletion("SummonerHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter III: Slay 5,000 Zombie Summoners"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter III: Slay 5,000 Zombie Summoners"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter II: Slay 2,500 Zombie Summoners"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde Halter I: Slay 1,000 Zombie Summoners"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SniperHunter1")) { - if(%client.CheckNWChallengeCompletion("SniperHunter2")) { - if(%client.CheckNWChallengeCompletion("SniperHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker III: Slay 5,000 Sniper Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker III: Slay 5,000 Sniper Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker II: Slay 2,500 Sniper Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Scope Breaker I: Slay 1,000 Sniper Zombies"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("UDemHunter1")) { - if(%client.CheckNWChallengeCompletion("UDemHunter2")) { - if(%client.CheckNWChallengeCompletion("UDemHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down III: Slay 5,000 Ultra Demon Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down III: Slay 5,000 Ultra Demon Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down II: Slay 2,500 Ultra Demon Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Runner Down I: Slay 1,000 Ultra Demon Zombies"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("VRavHunter1")) { - if(%client.CheckNWChallengeCompletion("VRavHunter2")) { - if(%client.CheckNWChallengeCompletion("VRavHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through III: Slay 5,000 Volatile Ravager Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through III: Slay 5,000 Volatile Ravager Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through II: Slay 2,500 Volatile Ravager Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "C4 Coming Through I: Slay 1,000 Volatile Ravager Zombies"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SSHunter1")) { - if(%client.CheckNWChallengeCompletion("SSHunter2")) { - if(%client.CheckNWChallengeCompletion("SSHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer III: Slay 5,000 Slingshot Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer III: Slay 5,000 Slingshot Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer II: Slay 2,500 Slingshot Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "De-Flakerizer I: Slay 1,000 Slingshot Zombies"); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("WraithHunter1")) { - if(%client.CheckNWChallengeCompletion("WraithHunter2")) { - if(%client.CheckNWChallengeCompletion("WraithHunter3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops III: Slay 1,000 Wraith Zombies"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops III: Slay 1,000 Wraith Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops II: Slay 750 Wraith Zombies"); - %index++; - } - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Anti Spec-Ops I: Slay 500 Wraith Zombies"); - %index++; - } - // - return %index; - - case 5: - //Special Events - messageClient( %client, 'SetLineHud', "", %tag, %index, "Special Event Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("NewYearsEve")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Eve Fireworks: Get a Javelin Kill on New Year's Eve."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Eve Fireworks: Get a Javelin Kill on New Year's Eve."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("NewYears")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Fireworks: Call in a Nuclear Strike on New Year's Day."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "New Years Fireworks: Call in a Nuclear Strike on New Year's Day."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GunshipMall")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship to The Mall: Call in a Gunship Killstreak on Christmas Mall 2009."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gunship to The Mall: Call in a Gunship Killstreak on Christmas Mall 2009."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("IndepRPG")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Independance RPG: Score an RPG Kill on the Fourth of July."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Independance RPG: Score an RPG Kill on the Fourth of July."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SoulsticeBombard")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Soulstice Bombard: Call in artillery on one of the soulstices (6/21 or 12/21)."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Soulstice Bombard: Call in artillery on one of the soulstices (6/21 or 12/21)."); - %index++; - } - return %index; - - case 6: - //PGD Daily Challenges - //Handled by DChalg.cs - %index = GenerateDWMChallengeMenu(%client, %tag, %index); - return %index; - - case 7: - //Sabotage - messageClient( %client, 'SetLineHud', "", %tag, %index, "Sabotage Game Mode Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("BombDisarmed")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed: Disarm an enemy bomb."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed: Disarm an enemy bomb."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("BombPlanted")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Planted: Arm the bomb at the objective."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Planted: Arm the bomb at the objective."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("BombDetonated")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Detonated: Win a Round Of Sabotage."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Detonated: Win a Round Of Sabotage."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("3For5Sabo")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Sabotage in a match."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Sabotage in a match."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("BaseDestroyer")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Base Destroyer: Go Undefeated in a full game of Sabotage."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Base Destroyer: Go Undefeated in a full game of Sabotage."); - %index++; - } - // - return %index; - - case 8: - //Domination - messageClient( %client, 'SetLineHud', "", %tag, %index, "Domination Game Mode Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("ZoneCapture")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Zone Conquerer: Capture an Area."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Zone Conquerer: Capture an Area."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ABC")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Alpha Bravo Charlie: Secure All Three Areas at one Time."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Alpha Bravo Charlie: Secure All Three Areas at one Time."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("MatchSet")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Match Set: Win a Round Of Domination."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Match Set: Win a Round Of Domination."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("3For5")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Domination."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five: Win 3 Rounds Of Domination."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Undefeatable")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Undefeatable: Go Undefeated in a full game of Domination."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Undefeatable: Go Undefeated in a full game of Domination."); - %index++; - } - // - return %index; - - case 9: - //Horde - messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde 3 Game Mode Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("15For15")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "15 For 15: Complete Wave 15."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "15 For 15: Complete Wave 15."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Milestone25")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Milestone 25: Complete Wave 25."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Milestone 25: Complete Wave 25."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ArmyOf50Stopped")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Army Of 50 Stopped: Complete Horde 3 (All 50 Waves)."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Army Of 50 Stopped: Complete Horde 3 (All 50 Waves)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Angel")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Angel: Revive a fallen teammate in Horde."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Angel: Revive a fallen teammate in Horde."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ZBomber")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Z-Bomber: Call in a Z-Bomb While Playing Horde."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Z-Bomber: Call in a Z-Bomb While Playing Horde."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("FirstBlood")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "First Blood: Kill the first zombie that spawns in a Horde 3 game."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "First Blood: Kill the first zombie that spawns in a Horde 3 game."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SpeedSlayer")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Slayer: Be the featured first killer 10 times in a single game."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Speed Slayer: Be the featured first killer 10 times in a single game."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("HighScorer")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "High Scorer: Be the featured high scorer 10 times in a single game."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "High Scorer: Be the featured high scorer 10 times in a single game."); - %index++; - } - // - return %index; - - case 10: - //Helljump - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helljump Game Mode Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("GroupBuster")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Group Buster: Complete A Group."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Group Buster: Complete A Group."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("WaveDefeater")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Wave Defeater: Complete A Wave."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Wave Defeater: Complete A Wave."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("OneK")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "1K Soldier: Earn 1,000 Points (Solo Score)."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "1K Soldier: Earn 1,000 Points (Solo Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("FiveK")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "5K Soldier: Earn 5,000 Points (Solo Score)."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "5K Soldier: Earn 5,000 Points (Solo Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("TenK")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "10K Soldier: Earn 10,000 Points (Solo Score)."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "10K Soldier: Earn 10,000 Points (Solo Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("PointsSurge")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Surge: Earn 7,500 Points (Team Score)."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Surge: Earn 7,500 Points (Team Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("PointsJackpot")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Jackpot: Earn 25,000 Points (Team Score)."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Points Jackpot: Earn 25,000 Points (Team Score)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("DownBoy")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Down Boy... Down: Kill the wraith zombie on Strike 5."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Down Boy... Down: Kill the wraith zombie on Strike 5."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ClassExtravaganza")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Class Extravaganza: Use a hellclass."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Class Extravaganza: Use a hellclass."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("LifeGiver")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Giver of Life: Use a Full Team Respawn beacon."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Giver of Life: Use a Full Team Respawn beacon."); - %index++; - } - // - return %index; - - case 11: - //From The Top (Missions) - messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top (Mission) Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("SimonSays")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Simon Says: Order a mission."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Simon Says: Order a mission."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("FromTheTop")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top: Accept a mission."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "From The Top: Accept a mission."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("NaturalLeader")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Natural Leader: Order a mission and have another player join your team."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Natural Leader: Order a mission and have another player join your team."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GoldStar")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gold Star: Complete a mission within the time limit."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Gold Star: Complete a mission within the time limit."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Faster")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Faster!: Complete a mission, but miss the time limit."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Faster!: Complete a mission, but miss the time limit."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("EpicFailure")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Epic Failure: Fail a mission ;)."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Epic Failure: Fail a mission ;)."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("ExpertGunner")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Expert AC-130 Gunner: Complete 'Rain Down'."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Expert AC-130 Gunner: Complete 'Rain Down'."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Survivalist")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Survivalist: Complete 'Surrounded'."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Survivalist: Complete 'Surrounded'."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Invisibreh")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shhh.. I'm Invisibreh: Complete 'Enemy AC-130 Above' by outlasting the enemy AC-130."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shhh.. I'm Invisibreh: Complete 'Enemy AC-130 Above' by outlasting the enemy AC-130."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("WeakGunship")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "I have you now!: Complete 'Enemy AC-130 Above' by destroying the enemy AC-130."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "I have you now!: Complete 'Enemy AC-130 Above' by destroying the enemy AC-130."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("InvasionBuster")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Invade THIS!: Complete 'Invasion'."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Invade THIS!: Complete 'Invasion'."); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("SurvivalistExtreme")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Extreme Survivalist: Complete 'Surrounded 2.0'."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Extreme Survivalist: Complete 'Surrounded 2.0'."); - %index++; - } - // - return %index; - - case 12: - //Officer Promotion - messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges:"); - %index++; - if(%client.CheckNWChallengeCompletion("Prestige1")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Instructive Officer - Reach Officer Level 1."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige2")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Excelling Officer - Reach Officer Level 2."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige3")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Champion Officer - Reach Officer Level 3."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige4")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Prestigious Officer - Reach Officer Level 4."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige5")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Supreme Officer - Reach Officer Level 5."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige6")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Glorious Officer - Reach Officer Level 6."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige7")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Ultimate Officer - Reach Officer Level 7."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige8")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Shadowing Officer - Reach Officer Level 8."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige9")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Phantom Officer - Reach Oficer Level 9."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige10")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Brutal Officer - Reach Oficer Level 10."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige11")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Vengeful Officer - Reach Oficer Level 11."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige12")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Noble Officer - Reach Oficer Level 12."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige13")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Spectral Officer - Reach Oficer Level 13."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige14")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Masterful Officer - Reach Oficer Level 14."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("Prestige15")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Rising Harbinger - Reach The Highest Officer Level (15)."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "=== CLASSIFIED: REQUIRES ADDITIONAL INTELLIGENCE ==="); - %index++; - } - // - if(%client.CheckNWChallengeCompletion("GameEnder")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Game Ender - Call in a Fission Bomb."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Game Ender - Call in a Fission Bomb."); - %index++; - } - // - return %index; - - default: - //Invalid - messageClient( %client, 'SetLineHud', "", %tag, %index, "Invalid menu option passed to GenerateChallengeSubMenu."); - %index++; - return %index; + } + else { + error("GenerateChallengeSubMenu(): Something went wrong.. Loop found challenge "@%challengeInternalName@", but this is not defined in the NWChallengeIndex."); + } } + return %index; + } \ No newline at end of file diff --git a/scripts/TWM2/Systems/DChalg.cs b/scripts/TWM2/Systems/DChalg.cs index 2e00612..79ff052 100644 --- a/scripts/TWM2/Systems/DChalg.cs +++ b/scripts/TWM2/Systems/DChalg.cs @@ -746,10 +746,16 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Uncolored Indicates An Active Challenge"); %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, ""); + %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "PGD Daily Challenge News:"); + %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "6/29/17: PGD Challenges reacitvated, now running 5x daily"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "4/20/16: New Daily Challenge System is Live!"); %index++; + messageClient( %client, 'SetLineHud', "", %tag, %index, "=========================="); + %index++; for(%i = 1; isSet($Challenges::Challenge[%i]); %i++) { %challenge = $Challenges::Challenge[%i]; %cType = getField(%challenge, 0); diff --git a/scripts/TWM2/Systems/MainControl.cs b/scripts/TWM2/Systems/MainControl.cs index 0f92b6c..9b084ca 100644 --- a/scripts/TWM2/Systems/MainControl.cs +++ b/scripts/TWM2/Systems/MainControl.cs @@ -206,6 +206,22 @@ function TWM2Lib_MainControl(%functionName, %arguments) { %PositionF = getWord(%Position, 0) SPC getWord(%Position, 1) SPC %Z; return %PositionF; + + case "getstrtrailingnumber": + %str = trim(StrReplace(%arguments, " ", "")); + %len = strLen(%str); + %trailingNum = ""; + for(%i = %len-1; %i >= 0; %i--) { + %ch = strcmp(getSubStr(%str, %i, 1), ""); + if(%ch > 48 && %ch < 57) { + //Number, remember, we're reading backwards, so write backwards. + %trailingNum = getSubStr(%str, %i, 1) @ %trailingNum; + } + else { + break; + } + } + return %trailingNum; default: error("TWM2Lib_MainControl(): Error, unknown function "@%functionName@" sent to command."); diff --git a/scripts/TWM2/Systems/Medals.cs b/scripts/TWM2/Systems/Medals.cs index f912906..48c39f3 100644 --- a/scripts/TWM2/Systems/Medals.cs +++ b/scripts/TWM2/Systems/Medals.cs @@ -89,10 +89,6 @@ function GetClientMedals(%client, %target, %tag, %index) { messageClient( %client, 'SetLineHud', "", %tag, %index, "*About Damn Time: Reach the Final Rank (3,000,000 EXP)"); %index++; } - if(%target.hasMedal(29)) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*Daily Max: Earn the maximum amount of EXP for a given day"); - %index++; - } messageClient( %client, 'SetLineHud', "", %tag, %index, "***Boss Medals***"); %index++; if(%target.hasMedal(1)) { @@ -169,7 +165,7 @@ function GetClientMedals(%client, %target, %tag, %index) { messageClient( %client, 'SetLineHud', "", %tag, %index, "*Glorious Fire: accumulate 250 kills with the A|V|X Flamethrower"); %index++; } - messageClient( %client, 'SetLineHud', "", %tag, %index, "***Mission Medals***"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "***Operation Medals***"); %index++; if(%target.hasMedal(32)) { messageClient( %client, 'SetLineHud', "", %tag, %index, "*AC-130 Expert: Complete 'Rain Down'."); @@ -212,7 +208,7 @@ function GetClientMedals(%client, %target, %tag, %index) { %index++; } if(%target.hasMedal(42)) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*Rog's Vengeance: Complete All 4 Rog's Vengeance Missions"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "*Rog's Vengeance: Complete All 4 Rog's Vengeance Operations"); %index++; } if(%target.hasMedal(31)) { diff --git a/scripts/TWM2/Systems/NWChallengeIndex.cs b/scripts/TWM2/Systems/NWChallengeIndex.cs index 17d081f..3387b46 100644 --- a/scripts/TWM2/Systems/NWChallengeIndex.cs +++ b/scripts/TWM2/Systems/NWChallengeIndex.cs @@ -1,250 +1,614 @@ -//Non-Weapon Challenge Index -//The List -//$Challenge::Info[%name] = "Name\tCategoryID\tEXP Reward\tOther Reward"; +//NWChallengeIndex.cs +//By: Robert C. Fritzen (Phantom139) +//TWM2 3.9.1 Update +//Non-Weapon Challenge Index (Also known as General Tasks, or any challenges that aren't weapon image specific) + +//This system requires the use of three global variables, defined below +//$Challenge::Category[%id] = "F2 Menu Name\tF2 Menu Description\tRequired Rank # or Officer #"; +//$Challenge::Challenge[%catID, %id] = "Name"; +//$Challenge::Info[%name] = "Name\tCategoryID\tEXP Reward\tOther Reward (Text Only)\tDescription (Requirement)"; + +//If you want to make a multi-tier challenge, then all you need to do is use the same name with an incrementing value +// starting from 1.. for example: UAV1, UAV2, UAV3. +//If you need all of these challenges to show, then you must set $Challenge::IsNotMultiTier[%name] = true; +// However, you should get into the habbit of using the $Challenge::IsNotMultiTier[%name] = true; flag for all challenges +// that you make that are not multi-tier. This will make the menu generation code run faster... + +//Additionally, you can flag challenges for additional requirements or other neat little things, here's an example +// of a challenge that is hidden until unlocked +//$Challenge::SetHidden[%catID, %id] = true; +//$Challenge::HiddenMessage[%catID, %id] = "=== CLASSIFIED ==="; + +//To make a challenge require another challenge to be completed: +//$Challenge::RequiresChallenge[%catID, %id] = "Name"; + +//You can also embed additional rank requirements for challenges inside of a menu, for example the killstreak menu +// has two officer killstreak challenges: +//$Challenge::SetRequirement[%catID, %id] = "Officer 15"; + +//For development purposes, challenges can also be disabled here: +//$Challenge::FlagDisabled[%name] = true; //Killstreaks -$Challenge::Info["UAV1"] = "UAV Expert I\t1\t500\tNone"; -$Challenge::Info["UAV2"] = "UAV Expert II\t1\t1000\tNone"; -$Challenge::Info["UAV3"] = "UAV Expert III\t1\t2500\tNone"; -$Challenge::Info["Airstrike1"] = "Airstrike Expert I\t1\t1000\tNone"; -$Challenge::Info["Airstrike2"] = "Airstrike Expert II\t1\t5000\tNone"; -$Challenge::Info["Airstrike3"] = "Airstrike Expert III\t1\t10000\tNone"; -$Challenge::Info["UAMS1"] = "UAMS Expert I\t1\t1000\tNone"; -$Challenge::Info["UAMS2"] = "UAMS Expert II\t1\t5000\tNone"; -$Challenge::Info["UAMS3"] = "UAMS Expert III\t1\t10000\tNone"; -$Challenge::Info["Helicopter1"] = "Helicopter Expert I\t1\t2500\tNone"; -$Challenge::Info["Helicopter2"] = "Helicopter Expert II\t1\t10000\tNone"; -$Challenge::Info["Helicopter3"] = "Helicopter Expert III\t1\t12500\tCombat Helicopter Schematics"; -$Challenge::Info["Harrier1"] = "Harrier Expert I\t1\t2500\tNone"; -$Challenge::Info["Harrier2"] = "Harrier Expert II\t1\t5000\tNone"; -$Challenge::Info["Harrier3"] = "Harrier Expert III\t1\t12500\tPlasma Harrier Schematics"; -$Challenge::Info["SatNuke1"] = "OLS Expert I\t1\t5000\tNone"; -$Challenge::Info["SatNuke2"] = "OLS Expert II\t1\t10000\tNone"; -$Challenge::Info["SatNuke3"] = "OLS Expert III\t1\t25000\tNone"; -$Challenge::Info["NapalmHarrier1"] = "Napalm Airstrike Expert I\t1\t5000\tNone"; -$Challenge::Info["NapalmHarrier2"] = "Napalm Airstrike Expert II\t1\t10000\tNone"; -$Challenge::Info["NapalmHarrier3"] = "Napalm Airstrike Expert III\t1\t25000\tF41 Strike Fighter Schematics"; -$Challenge::Info["GunHeli1"] = "Gunship Helicopter Expert I\t1\t5000\tNone"; -$Challenge::Info["GunHeli2"] = "Gunship Helicopter Expert II\t1\t10000\tNone"; -$Challenge::Info["GunHeli3"] = "Gunship Helicopter Expert III\t1\t25000\tGunship Helicopter Schematics"; -$Challenge::Info["SBomber1"] = "Stealth Bomber Expert I\t1\t5000\tNone"; -$Challenge::Info["SBomber2"] = "Stealth Bomber Expert II\t1\t10000\tNone"; -$Challenge::Info["SBomber3"] = "Stealth Bomber Expert III\t1\t25000\tStealth Bomber Schematics"; -$Challenge::Info["Gunship1"] = "Harbingers Wrath Expert I\t1\t5000\tNone"; -$Challenge::Info["Gunship2"] = "Harbingers Wrath Expert II\t1\t10000\tNone"; -$Challenge::Info["Gunship3"] = "Harbingers Wrath Expert III\t1\t25000\tAC-130 Vehicle Schematics"; -$Challenge::Info["ACGunship1"] = "AC-130 Expert I\t1\t5000\tNone"; -$Challenge::Info["ACGunship2"] = "AC-130 Expert II\t1\t10000\tNone"; -$Challenge::Info["ACGunship3"] = "AC-130 Expert III\t1\t25000\tBragging Rights... lol."; -$Challenge::Info["Apache1"] = "Apache Gunner Expert I\t1\t5000\tNone"; -$Challenge::Info["Apache2"] = "Apache Gunner Expert II\t1\t10000\tNone"; -$Challenge::Info["Apache3"] = "Apache Gunner Expert III\t1\t25000\tApache Helicopter Schematics"; -$Challenge::Info["Centaur1"] = "Centaur Artillery Expert I\t1\t10000\tNone"; -$Challenge::Info["Centaur2"] = "Centaur Artillery Expert II\t1\t25000\tNone"; -$Challenge::Info["Centaur3"] = "Centaur Artillery Expert III\t1\t50000\tNone"; -$Challenge::Info["Hind1"] = "Hind Expert I\t1\t10000\tNone"; -$Challenge::Info["Hind2"] = "Hind Expert II\t1\t25000\tNone"; -$Challenge::Info["Hind3"] = "Hind Expert III\t1\t50000\tHind Helicopter Schematics"; -$Challenge::Info["EMP1"] = "EMP Expert I\t1\t10000\tNone"; -$Challenge::Info["EMP2"] = "EMP Expert II\t1\t25000\tNone"; -$Challenge::Info["EMP3"] = "EMP Expert III\t1\t50000\tNone"; -$Challenge::Info["Nuke1"] = "Nuke Expert I\t1\t10000\tNone"; -$Challenge::Info["Nuke2"] = "Nuke Expert II\t1\t25000\tNone"; -$Challenge::Info["Nuke3"] = "Nuke Expert III\t1\t50000\tZ-Bomb Killstreak"; -$Challenge::Info["Fission1"] = "Fission Bomb Expert I\t1\t25000\tNone"; -$Challenge::Info["Fission2"] = "Fission Bomb Expert II\t1\t50000\tNone"; -$Challenge::Info["Fission3"] = "Fission Bomb Expert III\t1\t75000\tNone"; -$Challenge::Info["LOAS1"] = "LOAS Expert I\t1\t25000\tNone"; -$Challenge::Info["LOAS2"] = "LOAS Expert II\t1\t50000\tNone"; -$Challenge::Info["LOAS3"] = "LOAS Expert III\t1\t75000\tNone"; +$Challenge::Category[1] = "Killstreak Challenges\tTasks for calling in advanced support\t13"; + +$Challenge::Challenge[1, 0] = "UAV1"; +$Challenge::Info["UAV1"] = "UAV Expert I\t1\t500\tNone\tCall in 30 UAV Recon Satellites"; +$Challenge::Challenge[1, 1] = "UAV2"; +$Challenge::Info["UAV2"] = "UAV Expert II\t1\t1000\tNone\tCall in 75 UAV Recon Satellites"; +$Challenge::Challenge[1, 2] = "UAV3"; +$Challenge::Info["UAV3"] = "UAV Expert III\t1\t2500\tNone\tCall in 100 UAV Recon Satellites"; +$Challenge::Challenge[1, 3] = "Airstrike1"; +$Challenge::Info["Airstrike1"] = "Airstrike Expert I\t1\t1000\tNone\tCall in 25 Airstrikes"; +$Challenge::Challenge[1, 4] = "Airstrike2"; +$Challenge::Info["Airstrike2"] = "Airstrike Expert II\t1\t5000\tNone\tCall in 65 Airstrikes"; +$Challenge::Challenge[1, 5] = "Airstrike3"; +$Challenge::Info["Airstrike3"] = "Airstrike Expert III\t1\t10000\tNone\tCall in 125 Airstrikes"; +$Challenge::Challenge[1, 6] = "UAMS1"; +$Challenge::Info["UAMS1"] = "UAMS Expert I\t1\t1000\tNone\tCall in 25 UAMS Strikes"; +$Challenge::Challenge[1, 7] = "UAMS2"; +$Challenge::Info["UAMS2"] = "UAMS Expert II\t1\t5000\tNone\tCall in 65 UAMS Strikes"; +$Challenge::Challenge[1, 8] = "UAMS3"; +$Challenge::Info["UAMS3"] = "UAMS Expert III\t1\t10000\tNone\tCall in 125 UAMS Strikes"; +$Challenge::Challenge[1, 9] = "Helicopter1"; +$Challenge::Info["Helicopter1"] = "Helicopter Expert I\t1\t2500\tNone\tCall in 25 Combat Helicopters"; +$Challenge::Challenge[1, 10] = "Helicopter2"; +$Challenge::Info["Helicopter2"] = "Helicopter Expert II\t1\t10000\tNone\tCall in 65 Combat Helicopters"; +$Challenge::Challenge[1, 11] = "Helicopter3"; +$Challenge::Info["Helicopter3"] = "Helicopter Expert III\t1\t12500\tCombat Helicopter Schematics\tCall in 125 Combat Helicopters"; +$Challenge::Challenge[1, 12] = "Harrier1"; +$Challenge::Info["Harrier1"] = "Harrier Expert I\t1\t2500\tNone\tCall in 20 Plasma Harrier Airstrikes"; +$Challenge::Challenge[1, 13] = "Harrier2"; +$Challenge::Info["Harrier2"] = "Harrier Expert II\t1\t5000\tNone\tCall in 55 Plasma Harrier Airstrikes"; +$Challenge::Challenge[1, 14] = "Harrier3"; +$Challenge::Info["Harrier3"] = "Harrier Expert III\t1\t12500\tPlasma Harrier Schematics\tCall in 110 Plasma Harrier Airstrikes"; +$Challenge::Challenge[1, 15] = "SatNuke1"; +$Challenge::Info["SatNuke1"] = "OLS Expert I\t1\t5000\tNone\tCall in 25 Orbital Laser Strikes"; +$Challenge::Challenge[1, 16] = "SatNuke2"; +$Challenge::Info["SatNuke2"] = "OLS Expert II\t1\t10000\tNone\tCall in 65 Orbital Laser Strikes"; +$Challenge::Challenge[1, 17] = "SatNuke3"; +$Challenge::Info["SatNuke3"] = "OLS Expert III\t1\t25000\tNone\tCall in 125 Orbital Laser Strikes"; +$Challenge::Challenge[1, 18] = "NapalmHarrier1"; +$Challenge::Info["NapalmHarrier1"] = "Napalm Airstrike Expert I\t1\t5000\tNone\tCall in 20 Napalm Airstrikes"; +$Challenge::Challenge[1, 19] = "NapalmHarrier2"; +$Challenge::Info["NapalmHarrier2"] = "Napalm Airstrike Expert II\t1\t10000\tNone\tCall in 55 Napalm Airstrikes"; +$Challenge::Challenge[1, 20] = "NapalmHarrier3"; +$Challenge::Info["NapalmHarrier3"] = "Napalm Airstrike Expert III\t1\t25000\tF41 Strike Fighter Schematics\tCall in 110 Napalm Airstrikes"; +$Challenge::Challenge[1, 21] = "GunHeli1"; +$Challenge::Info["GunHeli1"] = "Gunship Helicopter Expert I\t1\t5000\tNone\tCall in 20 Gunship Helicopters"; +$Challenge::Challenge[1, 22] = "GunHeli2"; +$Challenge::Info["GunHeli2"] = "Gunship Helicopter Expert II\t1\t10000\tNone\tCall in 55 Gunship Helicopters"; +$Challenge::Challenge[1, 23] = "GunHeli3"; +$Challenge::Info["GunHeli3"] = "Gunship Helicopter Expert III\t1\t25000\tGunship Helicopter Schematics\tCall in 110 Gunship Helicopters"; +$Challenge::Challenge[1, 24] = "SBomber1"; +$Challenge::Info["SBomber1"] = "Stealth Bomber Expert I\t1\t5000\tNone\tCall in 20 Stealth Bombers"; +$Challenge::Challenge[1, 25] = "SBomber2"; +$Challenge::Info["SBomber2"] = "Stealth Bomber Expert II\t1\t10000\tNone\tCall in 50 Stealth Bombers"; +$Challenge::Challenge[1, 26] = "SBomber3"; +$Challenge::Info["SBomber3"] = "Stealth Bomber Expert III\t1\t25000\tNone\tCall in 100 Stealth Bombers"; +$Challenge::Challenge[1, 27] = "Gunship1"; +$Challenge::Info["Gunship1"] = "Harbinger's Wrath Expert I\t1\t5000\tNone\tCall in 15 Harbinger Gunships"; +$Challenge::Challenge[1, 28] = "Gunship2"; +$Challenge::Info["Gunship2"] = "Harbinger's Wrath Expert II\t1\t10000\tNone\tCall in 35 Harbinger Gunships"; +$Challenge::Challenge[1, 29] = "Gunship3"; +$Challenge::Info["Gunship3"] = "Harbinger's Wrath Expert III\t1\t25000\tAC-130 Vehicle Schematics\tCall in 75 Harbinger Gunships"; +$Challenge::Challenge[1, 30] = "ACGunship1"; +$Challenge::RequiresChallenge[1, 30] = "Gunship3"; +$Challenge::Info["ACGunship1"] = "AC-130 Expert I\t1\t5000\tNone\tCall in 15 AC-130 Gunners"; +$Challenge::Challenge[1, 31] = "ACGunship2"; +$Challenge::RequiresChallenge[1, 31] = "Gunship3"; +$Challenge::Info["ACGunship2"] = "AC-130 Expert II\t1\t10000\tNone\tCall in 35 AC-130 Gunners"; +$Challenge::Challenge[1, 32] = "ACGunship3"; +$Challenge::RequiresChallenge[1, 32] = "Gunship3"; +$Challenge::Info["ACGunship3"] = "AC-130 Expert III\t1\t25000\tBragging Rights... lol.\tCall in 75 AC-130 Gunners"; +$Challenge::Challenge[1, 33] = "Apache1"; +$Challenge::Info["Apache1"] = "Apache Gunner Expert I\t1\t5000\tNone\tCall in 15 Apache Gunners"; +$Challenge::Challenge[1, 34] = "Apache2"; +$Challenge::Info["Apache2"] = "Apache Gunner Expert II\t1\t10000\tNone\tCall in 35 Apache Gunners"; +$Challenge::Challenge[1, 35] = "Apache3"; +$Challenge::Info["Apache3"] = "Apache Gunner Expert III\t1\t25000\tApache Helicopter Schematics\tCall in 75 Apache Gunners"; +$Challenge::Challenge[1, 36] = "Centaur1"; +$Challenge::Info["Centaur1"] = "Centaur Artillery Expert I\t1\t10000\tNone\tCall in 10 Artillery Strikes"; +$Challenge::Challenge[1, 37] = "Centaur2"; +$Challenge::Info["Centaur2"] = "Centaur Artillery Expert II\t1\t25000\tNone\tCall in 25 Artillery Strikes"; +$Challenge::Challenge[1, 38] = "Centaur3"; +$Challenge::Info["Centaur3"] = "Centaur Artillery Expert III\t1\t50000\tNone\tCall in 50 Artillery Strikes"; +$Challenge::Challenge[1, 39] = "EMP1"; +$Challenge::Info["EMP1"] = "EMP Expert I\t1\t10000\tNone\tCall in 5 Mass EMP's"; +$Challenge::Challenge[1, 40] = "EMP2"; +$Challenge::Info["EMP2"] = "EMP Expert II\t1\t25000\tNone\tCall in 10 Mass EMP's"; +$Challenge::Challenge[1, 41] = "EMP3"; +$Challenge::Info["EMP3"] = "EMP Expert III\t1\t50000\tNone\tCall in 25 Mass EMP's"; +$Challenge::Challenge[1, 42] = "Nuke1"; +$Challenge::Info["Nuke1"] = "Nuke Expert I\t1\t10000\tNone\tCall in 5 Nukes"; +$Challenge::Challenge[1, 43] = "Nuke2"; +$Challenge::Info["Nuke2"] = "Nuke Expert II\t1\t25000\tNone\tCall in 10 Nukes"; +$Challenge::Challenge[1, 44] = "Nuke3"; +$Challenge::Info["Nuke3"] = "Nuke Expert III\t1\t50000\tZ-Bomb Killstreak\tCall in 25 Nukes"; +$Challenge::Challenge[1, 45] = "Fission1"; +$Challenge::SetRequirement[1, 45] = "Officer 1"; +$Challenge::Info["Fission1"] = "Fission Bomb Expert I\t1\t25000\tNone\tCall in 1 Fission Bomb"; +$Challenge::Challenge[1, 46] = "Fission2"; +$Challenge::SetRequirement[1, 46] = "Officer 1"; +$Challenge::Info["Fission2"] = "Fission Bomb Expert II\t1\t50000\tNone\tCall in 2 Fission Bomb"; +$Challenge::Challenge[1, 47] = "Fission3"; +$Challenge::SetRequirement[1, 47] = "Officer 1"; +$Challenge::Info["Fission3"] = "Fission Bomb Expert III\t1\t75000\tNone\tCall in 5 Fission Bomb"; +$Challenge::Challenge[1, 48] = "LOAS1"; +$Challenge::SetRequirement[1, 48] = "Officer 15"; +$Challenge::Info["LOAS1"] = "LOAS Expert I\t1\t25000\tNone\tCall in 5 Low Orbit Orbital Strikes (LOAS)"; +$Challenge::Challenge[1, 49] = "LOAS2"; +$Challenge::SetRequirement[1, 49] = "Officer 15"; +$Challenge::Info["LOAS2"] = "LOAS Expert II\t1\t50000\tNone\tCall in 10 Low Orbit Orbital Strikes (LOAS)"; +$Challenge::Challenge[1, 50] = "LOAS3"; +$Challenge::SetRequirement[1, 50] = "Officer 15"; +$Challenge::Info["LOAS3"] = "LOAS Expert III\t1\t75000\tNone\tCall in 15 Low Orbit Orbital Strikes (LOAS)"; //Bosses -$Challenge::Info["Yvex1"] = "Nightmarish Enterprise\t2\t1000\tNone"; -$Challenge::Info["Yvex2"] = "Darkness Rising\t2\t2500\tNone"; -$Challenge::Info["Yvex3"] = "Shadowy Desecration\t2\t5000\tNone"; -$Challenge::Info["CWS1"] = "Fortress In The Sky\t2\t1000\tNone"; -$Challenge::Info["CWS2"] = "Aerieal Nightmare\t2\t2500\tNone"; -$Challenge::Info["CWS3"] = "Harbinger's Bane\t2\t5000\tNone"; -$Challenge::Info["GOL1"] = "Envious Lightning\t2\t1500\tNone"; -$Challenge::Info["GOL2"] = "The Shocking Truth\t2\t3000\tNone"; -$Challenge::Info["GOL3"] = "Severe Thunderstorm\t2\t6500\tNone"; -$Challenge::Info["GOF1"] = "Purifier\t2\t5000\tNone"; -$Challenge::Info["GOF2"] = "Inceneration Ender\t2\t10000\tNone"; -$Challenge::Info["GOF3"] = "Mt. Death Depleter\t2\t20000\tNone"; -$Challenge::Info["Veg1"] = "Flaming Revolt\t2\t1500\tNone"; -$Challenge::Info["Veg2"] = "Burning Frenzy\t2\t3000\tNone"; -$Challenge::Info["Veg3"] = "Firestorm Ender\t2\t6500\tNone"; -$Challenge::Info["LRog1"] = "Revenge Halter\t2\t2500\tNone"; -$Challenge::Info["LRog2"] = "Return to Returner\t2\t5000\tNone"; -$Challenge::Info["LRog3"] = "Payback's A Bitch\t2\t10000\tNone"; -$Challenge::Info["Ins1"] = "El Shipitor\t2\t2500\tNone"; -$Challenge::Info["Ins2"] = "No Gravity, No Problem\t2\t5000\tNone"; -$Challenge::Info["Ins3"] = "Gravitational Influx\t2\t10000\tNone"; -$Challenge::Info["Stormrider1"] = "Clear Skies\t2\t2500\tNone"; -$Challenge::Info["Stormrider2"] = "Shootdown Master\t2\t5000\tNone"; -$Challenge::Info["Stormrider3"] = "Harbinger Fighter Demolisher\t2\t10000\tNone"; -$Challenge::Info["Treb1"] = "Precious Cargo\t2\t2500\tNone"; -$Challenge::Info["Treb2"] = "Harbinger Denied\t2\t5000\tNone"; -$Challenge::Info["Treb3"] = "Tank Halter\t2\t10000\tNone"; -$Challenge::Info["Vard1"] = "Shining Star\t2\t3500\tNone"; -$Challenge::Info["Vard2"] = "Glare The Dark\t2\t7000\tNone"; -$Challenge::Info["Vard3"] = "Outevil The Wicked\t2\t12500\tNone"; -$Challenge::Info["VardEasy"] = "The Standard Experience\t2\t7000\tNone"; -$Challenge::Info["VardNorm"] = "Demon Hunter\t2\t15000\tNone"; -$Challenge::Info["VardHard"] = "Master Demon Slayer\t2\t25000\tNone"; -$Challenge::Info["VardWtf"] = "God of the Shadow Realm\t2\t50000\tNone"; -$Challenge::Info["ShadeLord1"] = "Night Stalker\t2\t5000\tNone"; -$Challenge::Info["ShadeLord2"] = "Shadow Embracer\t2\t10000\tNone"; -$Challenge::Info["ShadeLord3"] = "Dawnlight Encarnate\t2\t20000\tNone"; +$Challenge::Category[2] = "Boss Challenges\tTasks for eliminating the toughest enemies in TWM2\t18"; -//Blacklist: Depricated 3.9.1 -//$Challenge::Info["Acceptance"] = "Acceptance\t3\t1000\tNone"; -//$Challenge::Info["ListHit"] = "Hitlister of The List\t3\t2500\tNone"; -//$Challenge::Info["TopHit"] = "Champion Slayer\t3\t3500\tNone"; -//$Challenge::Info["ButIm2"] = "But I'm #2\t3\t3500\tNone"; -//$Challenge::Info["DF3"] = "Don't Forget #3\t3\t3500\tNone"; +$Challenge::Challenge[2, 0] = "Yvex1"; +$Challenge::Info["Yvex1"] = "Nightmarish Enterprise\t2\t1000\tNone\tDefeat Lord Yvex 3 Times"; +$Challenge::Challenge[2, 1] = "Yvex2"; +$Challenge::Info["Yvex2"] = "Darkness Rising\t2\t2500\tNone\tDefeat Lord Yvex 5 Times"; +$Challenge::Challenge[2, 2] = "Yvex3"; +$Challenge::Info["Yvex3"] = "Shadowy Desecration\t2\t5000\tNone\tDefeat Lord Yvex 10 Times"; +$Challenge::Challenge[2, 3] = "CWS1"; +$Challenge::Info["CWS1"] = "Fortress In The Sky\t2\t1000\tNone\tDefeat Colonel Windshear 3 Times"; +$Challenge::Challenge[2, 4] = "CWS2"; +$Challenge::Info["CWS2"] = "Aerieal Nightmare\t2\t2500\tNone\tDefeat Colonel Windshear 5 Times"; +$Challenge::Challenge[2, 5] = "CWS3"; +$Challenge::Info["CWS3"] = "Harbinger's Bane\t2\t5000\tNone\tDefeat Colonel Windshear 10 Times"; +$Challenge::Challenge[2, 6] = "GOL1"; +$Challenge::Info["GOL1"] = "Envious Lightning\t2\t1500\tNone\tDefeat The Ghost Of Lightning 3 Times"; +$Challenge::Challenge[2, 7] = "GOL2"; +$Challenge::Info["GOL2"] = "The Shocking Truth\t2\t3000\tNone\tDefeat The Ghost Of Lightning 5 Times"; +$Challenge::Challenge[2, 8] = "GOL3"; +$Challenge::Info["GOL3"] = "Severe Thunderstorm\t2\t6500\tNone\tDefeat The Ghost Of Lightning 10 Times"; +$Challenge::Challenge[2, 9] = "GOF1"; +$Challenge::Info["GOF1"] = "Purifier\t2\t5000\tNone\tDefeat The Ghost Of Fire"; +$Challenge::Challenge[2, 10] = "GOF2"; +$Challenge::Info["GOF2"] = "Inceneration Ender\t2\t10000\tNone\tDefeat The Ghost Of Fire 3 Times"; +$Challenge::Challenge[2, 11] = "GOF3"; +$Challenge::Info["GOF3"] = "Mt. Death Depleter\t2\t20000\tNone\tDefeat The Ghost Of Fire 5 Times"; +$Challenge::Challenge[2, 12] = "Veg1"; +$Challenge::Info["Veg1"] = "Flaming Revolt\t2\t1500\tNone\tDefeat General Vegenor 3 Times"; +$Challenge::Challenge[2, 13] = "Veg2"; +$Challenge::Info["Veg2"] = "Burning Frenzy\t2\t3000\tNone\tDefeat General Vegenor 5 Times"; +$Challenge::Challenge[2, 14] = "Veg3"; +$Challenge::Info["Veg3"] = "Firestorm Ender\t2\t6500\tNone\tDefeat General Vegenor 10 Times"; +$Challenge::Challenge[2, 15] = "LRog1"; +$Challenge::Info["LRog1"] = "Revenge Halter\t2\t2500\tNone\tDefeat Lord Rog 2 Times"; +$Challenge::Challenge[2, 16] = "LRog2"; +$Challenge::Info["LRog2"] = "Return to Returner\t2\t5000\tNone\tDefeat Lord Rog 4 Times"; +$Challenge::Challenge[2, 17] = "LRog3"; +$Challenge::Info["LRog3"] = "Payback's A Bitch\t2\t10000\tNone\tDefeat Lord Rog 7 Times"; +$Challenge::Challenge[2, 18] = "Ins1"; +$Challenge::Info["Ins1"] = "El Shipitor\t2\t2500\tNone\tDefeat Major Insignia 2 Times"; +$Challenge::Challenge[2, 19] = "Ins2"; +$Challenge::Info["Ins2"] = "No Gravity, No Problem\t2\t5000\tNone\tDefeat Major Insignia 4 Times"; +$Challenge::Challenge[2, 20] = "Ins3"; +$Challenge::Info["Ins3"] = "Gravitational Influx\t2\t10000\tNone\tDefeat Major Insignia 7 Times"; +$Challenge::Challenge[2, 21] = "Stormrider1"; +$Challenge::Info["Stormrider1"] = "Clear Skies\t2\t2500\tNone\tDefeat Commander Stormrider 3 Times"; +$Challenge::Challenge[2, 22] = "Stormrider2"; +$Challenge::Info["Stormrider2"] = "Shootdown Master\t2\t5000\tNone\tDefeat Commander Stormrider 5 Times"; +$Challenge::Challenge[2, 23] = "Stormrider3"; +$Challenge::Info["Stormrider3"] = "Harbinger Fighter Demolisher\t2\t10000\tNone\tDefeat Commander Stormrider 10 Times"; +$Challenge::Challenge[2, 24] = "Trev1"; +$Challenge::Info["Trev1"] = "Precious Cargo\t2\t2500\tNone\tDefeat Lordranius Trevor 2 Times"; +$Challenge::Challenge[2, 25] = "Trev2"; +$Challenge::Info["Trev2"] = "Harbinger Denied\t2\t5000\tNone\tDefeat Lordranius Trevor 4 Times"; +$Challenge::Challenge[2, 26] = "Trev3"; +$Challenge::Info["Trev3"] = "Tank Halter\t2\t10000\tNone\tDefeat Lordranius Trevor 7 Times"; +$Challenge::Challenge[2, 27] = "Vard1"; +$Challenge::Info["Vard1"] = "Shining Star\t2\t3500\tNone\tDefeat Lord Vardison"; +$Challenge::Challenge[2, 28] = "Vard2"; +$Challenge::Info["Vard2"] = "Glare The Dark\t2\t7000\tNone\tDefeat Lord Vardison 3 Times"; +$Challenge::Challenge[2, 29] = "Vard3"; +$Challenge::Info["Vard3"] = "Outevil The Wicked\t2\t12500\tNone\tDefeat Lord Vardison 5 Times"; +$Challenge::Challenge[2, 30] = "VardEasy"; +$Challenge::IsNotMultiTier["VardEasy"] = true; +$Challenge::Info["VardEasy"] = "The Standard Experience\t2\t7000\tNone\tDefeat Lord Vardison on Easy Difficulty"; +$Challenge::Challenge[2, 31] = "VardNorm"; +$Challenge::IsNotMultiTier["VardNorm"] = true; +$Challenge::Info["VardNorm"] = "Demon Hunter\t2\t15000\tNone\tDefeat Lord Vardison on Medium Difficulty"; +$Challenge::Challenge[2, 32] = "VardHard"; +$Challenge::IsNotMultiTier["VardHard"] = true; +$Challenge::Info["VardHard"] = "Master Demon Slayer\t2\t25000\tNone\tDefeat Lord Vardison on Hard Difficulty"; +$Challenge::Challenge[2, 33] = "VardWtf"; +$Challenge::IsNotMultiTier["VardWtf"] = true; +$Challenge::Info["VardWtf"] = "God of the Shadow Realm\t2\t50000\tNone\tAgainst all odds, slay WTF difficulty Lord Vardison"; +$Challenge::Challenge[2, 34] = "ShadeLord1"; +$Challenge::Info["ShadeLord1"] = "Night Stalker\t2\t5000\tNone\tDefeat The Shade Lord"; +$Challenge::Challenge[2, 35] = "ShadeLord2"; +$Challenge::Info["ShadeLord2"] = "Shadow Embracer\t2\t10000\tNone\tDefeat The Shade Lord Twice"; +$Challenge::Challenge[2, 36] = "ShadeLord3"; +$Challenge::Info["ShadeLord3"] = "Dawnlight Encarnate\t2\t20000\tNone\tDefeat The Shade Lord for the Third Time"; //Wargames -$Challenge::Info["Slayer1"] = "Slayer I\t3\t1000\tNone"; -$Challenge::Info["Slayer2"] = "Slayer II\t3\t2500\tNone"; -$Challenge::Info["Slayer3"] = "Slayer III\t3\t5000\tNone"; -$Challenge::Info["Slayer4"] = "Slayer IV\t3\t7500\tNone"; -$Challenge::Info["Slayer5"] = "Slayer V\t3\t10000\tNone"; -$Challenge::Info["Defectionator1"] = "Defectionator I\t3\t2500\tNone"; -$Challenge::Info["Defectionator2"] = "Defectionator II\t3\t5000\tNone"; -$Challenge::Info["Defectionator3"] = "Defectionator III\t3\t10000\tNone"; -$Challenge::Info["Infectionator1"] = "Infectionator I\t3\t2500\tNone"; -$Challenge::Info["Infectionator2"] = "Infectionator II\t3\t5000\tNone"; -$Challenge::Info["Infectionator3"] = "Infectionator III\t3\t10000\tNone"; -$Challenge::Info["HSHoncho1"] = "Headshot Honcho I\t3\t2500\tNone"; -$Challenge::Info["HSHoncho2"] = "Headshot Honcho II\t3\t5000\tNone"; -$Challenge::Info["HSHoncho3"] = "Headshot Honcho III\t3\t10000\tNone"; -$Challenge::Info["VehMans1"] = "Vehicular Manslaughter I\t3\t2500\tNone"; -$Challenge::Info["VehMans2"] = "Vehicular Manslaughter II\t3\t5000\tNone"; -$Challenge::Info["VehMans3"] = "Vehicular Manslaughter III\t3\t10000\tNone"; -$Challenge::Info["Assassin"] = "Assassinator\t3\t5000\tNone"; -$Challenge::Info["CompletelyUnexpected"] = "That Was... Unexpected\t3\t50000\tNone"; -$Challenge::Info["Uncomprehendable"] = "Uncomprehendable\t3\t100000\tNone"; +$Challenge::Category[3] = "Wargames Challenges\tTasks for eliminating enemy players in various ways\t23"; + +$Challenge::Challenge[3, 0] = "Slayer1"; +$Challenge::Info["Slayer1"] = "Slayer I\t3\t1000\tNone\tKill 100 Enemy Players"; +$Challenge::Challenge[3, 1] = "Slayer2"; +$Challenge::Info["Slayer2"] = "Slayer II\t3\t2500\tNone\tKill 250 Enemy Players"; +$Challenge::Challenge[3, 2] = "Slayer3"; +$Challenge::Info["Slayer3"] = "Slayer III\t3\t5000\tNone\tKill 500 Enemy Players"; +$Challenge::Challenge[3, 3] = "Slayer4"; +$Challenge::Info["Slayer4"] = "Slayer IV\t3\t7500\tNone\tKill 750 Enemy Players"; +$Challenge::Challenge[3, 4] = "Slayer5"; +$Challenge::Info["Slayer5"] = "Slayer V\t3\t10000\tNone\tKill 1000 Enemy Players"; +$Challenge::Challenge[3, 5] = "Defectionator1"; +$Challenge::Info["Defectionator1"] = "Defectionator I\t3\t2500\tNone\tKill 100 \"Zombified\" Players"; +$Challenge::Challenge[3, 6] = "Defectionator2"; +$Challenge::Info["Defectionator2"] = "Defectionator II\t3\t5000\tNone\tKill 250 \"Zombified\" Players"; +$Challenge::Challenge[3, 7] = "Defectionator3"; +$Challenge::Info["Defectionator3"] = "Defectionator III\t3\t10000\tNone\tKill 500 \"Zombified\" Players"; +$Challenge::Challenge[3, 8] = "Infectionator1"; +$Challenge::Info["Infectionator1"] = "Infectionator I\t3\t2500\tNone\tConvert 50 Players to the Zombie Horde"; +$Challenge::Challenge[3, 9] = "Infectionator2"; +$Challenge::Info["Infectionator2"] = "Infectionator II\t3\t5000\tNone\tConvert 100 Players to the Zombie Horde"; +$Challenge::Challenge[3, 10] = "Infectionator3"; +$Challenge::Info["Infectionator3"] = "Infectionator III\t3\t10000\tNone\tConvert 250 Players to the Zombie Horde"; +$Challenge::Challenge[3, 11] = "HSHoncho1"; +$Challenge::Info["HSHoncho1"] = "Headshot Honcho I\t3\t2500\tNone\tEliminate 100 Enemy Players with Headshots"; +$Challenge::Challenge[3, 12] = "HSHoncho2"; +$Challenge::Info["HSHoncho2"] = "Headshot Honcho II\t3\t5000\tNone\tEliminate 200 Enemy Players with Headshots"; +$Challenge::Challenge[3, 13] = "HSHoncho3"; +$Challenge::Info["HSHoncho3"] = "Headshot Honcho III\t3\t10000\tNone\tEliminate 300 Enemy Players with Headshots"; +$Challenge::Challenge[3, 14] = "VehMans1"; +$Challenge::Info["VehMans1"] = "Vehicular Manslaughter I\t3\t2500\tNone\tEliminate 50 Enemy Players with a vehicle"; +$Challenge::Challenge[3, 15] = "VehMans2"; +$Challenge::Info["VehMans2"] = "Vehicular Manslaughter II\t3\t5000\tNone\tEliminate 100 Enemy Players with a vehicle"; +$Challenge::Challenge[3, 16] = "VehMans3"; +$Challenge::Info["VehMans3"] = "Vehicular Manslaughter III\t3\t10000\tNone\tEliminate 250 Enemy Players with a vehicle"; +$Challenge::Challenge[3, 17] = "Assassin"; +$Challenge::IsNotMultiTier["Assassin"] = true; +$Challenge::Info["Assassin"] = "Assassinator\t3\t5000\tNone\tBackstab an enemy player using the Blade of Vengeance"; +$Challenge::Challenge[3, 18] = "CompletelyUnexpected"; +$Challenge::IsNotMultiTier["CompletelyUnexpected"] = true; +$Challenge::Info["CompletelyUnexpected"] = "That Was... Unexpected\t3\t50000\tNone\tEliminate General Rog by backstabbing him with the Blade of Vengence"; +$Challenge::Challenge[3, 19] = "Uncomprehendable"; +$Challenge::IsNotMultiTier["Uncomprehendable"] = true; +$Challenge::Info["Uncomprehendable"] = "Uncomprehendable\t3\t100000\tPure shock?\tGet killed in a fighter, and have the driverless vehicle run down your killer"; //Zombie Slaying -$Challenge::Info["NormHunter1"] = "Frontline Buster I\t4\t2500\tNone"; -$Challenge::Info["NormHunter2"] = "Frontline Buster II\t4\t5000\tNone"; -$Challenge::Info["NormHunter3"] = "Frontline Buster III\t4\t10000\tNone"; -$Challenge::Info["RavHunter1"] = "Speed Kills I\t4\t2500\tNone"; -$Challenge::Info["RavHunter2"] = "Speed Kills II\t4\t5000\tNone"; -$Challenge::Info["RavHunter3"] = "Speed Kills III\t4\t10000\tNone"; -$Challenge::Info["LordHunter1"] = "The Bigger They Are I\t4\t2500\tNone"; -$Challenge::Info["LordHunter2"] = "The Bigger They Are II\t4\t5000\tNone"; -$Challenge::Info["LordHunter3"] = "The Bigger They Are III\t4\t10000\tNone"; -$Challenge::Info["DemonHunter1"] = "Fire Retardant I\t4\t2500\tNone"; -$Challenge::Info["DemonHunter2"] = "Fire Retardant II\t4\t5000\tNone"; -$Challenge::Info["DemonHunter3"] = "Fire Retardant III\t4\t10000\tNone"; -$Challenge::Info["AirRapHunter1"] = "Bat Slayer I\t4\t2500\tNone"; -$Challenge::Info["AirRapHunter2"] = "Bat Slayer II\t4\t5000\tNone"; -$Challenge::Info["AirRapHunter3"] = "Bat Slayer III\t4\t10000\tNone"; -$Challenge::Info["DLordHunter1"] = "Hellspawn Erradicator I\t4\t2500\tNone"; -$Challenge::Info["DLordHunter2"] = "Hellspawn Erradicator II\t4\t5000\tNone"; -$Challenge::Info["DLordHunter3"] = "Hellspawn Erradicator III\t4\t10000\tNone"; -$Challenge::Info["ShifterHunter1"] = "Anti-Warp I\t4\t2500\tNone"; -$Challenge::Info["ShifterHunter2"] = "Anti-Warp II\t4\t5000\tNone"; -$Challenge::Info["ShifterHunter3"] = "Anti-Warp III\t4\t10000\tNone"; -$Challenge::Info["SummonerHunter1"] = "Horde Halter I\t4\t2500\tNone"; -$Challenge::Info["SummonerHunter2"] = "Horde Halter II\t4\t5000\tNone"; -$Challenge::Info["SummonerHunter3"] = "Horde Halter III\t4\t10000\tNone"; -$Challenge::Info["SniperHunter1"] = "Scope Breaker I\t4\t2500\tNone"; -$Challenge::Info["SniperHunter2"] = "Scope Breaker II\t4\t5000\tNone"; -$Challenge::Info["SniperHunter3"] = "Scope Breaker III\t4\t10000\tNone"; -$Challenge::Info["UDemHunter1"] = "Runner Down I\t4\t2500\tNone"; -$Challenge::Info["UDemHunter2"] = "Runner Down II\t4\t5000\tNone"; -$Challenge::Info["UDemHunter3"] = "Runner Down III\t4\t10000\tNone"; -$Challenge::Info["VRavHunter1"] = "C4 Coming Through I\t4\t2500\tNone"; -$Challenge::Info["VRavHunter2"] = "C4 Coming Through II\t4\t5000\tNone"; -$Challenge::Info["VRavHunter3"] = "C4 Coming Through III\t4\t10000\tNone"; -$Challenge::Info["SSHunter1"] = "De-Flakerizer I\t4\t2500\tNone"; -$Challenge::Info["SSHunter2"] = "De-Flakerizer II\t4\t5000\tNone"; -$Challenge::Info["SSHunter3"] = "De-Flakerizer III\t4\t10000\tNone"; -$Challenge::Info["WraithHunter1"] = "Anti Spec-Ops I\t4\t2500\tNone"; -$Challenge::Info["WraithHunter2"] = "Anti Spec-Ops II\t4\t5000\tNone"; -$Challenge::Info["WraithHunter3"] = "Anti Spec-Ops III\t4\t10000\tNone"; +$Challenge::Category[4] = "Zombie Slaying Challenges\tTasks for eliminating combatants of the zombie horde\t28"; + +$Challenge::Challenge[4, 0] = "NormHunter1"; +$Challenge::Info["NormHunter1"] = "Frontline Buster I\t4\t2500\tNone\tSlay 2,500 Zombies (Normal Type)"; +$Challenge::Challenge[4, 1] = "NormHunter2"; +$Challenge::Info["NormHunter2"] = "Frontline Buster II\t4\t5000\tNone\tSlay 5,000 Zombies (Normal Type)"; +$Challenge::Challenge[4, 2] = "NormHunter3"; +$Challenge::Info["NormHunter3"] = "Frontline Buster III\t4\t10000\tNone\tSlay 10,000 Zombies (Normal Type)"; +$Challenge::Challenge[4, 3] = "RavHunter1"; +$Challenge::Info["RavHunter1"] = "Speed Kills I\t4\t2500\tNone\tSlay 1,000 Ravager Zombies"; +$Challenge::Challenge[4, 4] = "RavHunter2"; +$Challenge::Info["RavHunter2"] = "Speed Kills II\t4\t5000\tNone\tSlay 2,500 Ravager Zombies"; +$Challenge::Challenge[4, 5] = "RavHunter3"; +$Challenge::Info["RavHunter3"] = "Speed Kills III\t4\t10000\tNone\tSlay 5,000 Ravager Zombies"; +$Challenge::Challenge[4, 6] = "LordHunter1"; +$Challenge::Info["LordHunter1"] = "The Bigger They Are I\t4\t2500\tNone\tSlay 1,000 Zombie Lords"; +$Challenge::Challenge[4, 7] = "LordHunter2"; +$Challenge::Info["LordHunter2"] = "The Bigger They Are II\t4\t5000\tNone\tSlay 2,000 Zombie Lords"; +$Challenge::Challenge[4, 8] = "LordHunter3"; +$Challenge::Info["LordHunter3"] = "The Bigger They Are III\t4\t10000\tNone\tSlay 3,000 Zombie Lords"; +$Challenge::Challenge[4, 9] = "DemonHunter1"; +$Challenge::Info["DemonHunter1"] = "Fire Retardant I\t4\t2500\tNone\tSlay 1,000 Demon Zombies"; +$Challenge::Challenge[4, 10] = "DemonHunter2"; +$Challenge::Info["DemonHunter2"] = "Fire Retardant II\t4\t5000\tNone\tSlay 2,500 Demon Zombies"; +$Challenge::Challenge[4, 11] = "DemonHunter3"; +$Challenge::Info["DemonHunter3"] = "Fire Retardant III\t4\t10000\tNone\tSlay 5,000 Demon Zombies"; +$Challenge::Challenge[4, 12] = "AirRapHunter1"; +$Challenge::Info["AirRapHunter1"] = "Bat Slayer I\t4\t2500\tNone\tSlay 1,500 Air Rapier Zombies"; +$Challenge::Challenge[4, 13] = "AirRapHunter2"; +$Challenge::Info["AirRapHunter2"] = "Bat Slayer II\t4\t5000\tNone\tSlay 3,500 Air Rapier Zombies"; +$Challenge::Challenge[4, 14] = "AirRapHunter3"; +$Challenge::Info["AirRapHunter3"] = "Bat Slayer III\t4\t10000\tNone\tSlay 6,000 Air Rapier Zombies"; +$Challenge::Challenge[4, 15] = "DLordHunter1"; +$Challenge::Info["DLordHunter1"] = "Hellspawn Erradicator I\t4\t2500\tNone\tSlay 500 Demon Lord Zombies"; +$Challenge::Challenge[4, 16] = "DLordHunter2"; +$Challenge::Info["DLordHunter2"] = "Hellspawn Erradicator II\t4\t5000\tNone\tSlay 1,000 Demon Lord Zombies"; +$Challenge::Challenge[4, 17] = "DLordHunter3"; +$Challenge::Info["DLordHunter3"] = "Hellspawn Erradicator III\t4\t10000\tNone\tSlay 1,500 Demon Lord Zombies"; +$Challenge::Challenge[4, 18] = "ShifterHunter1"; +$Challenge::Info["ShifterHunter1"] = "Anti-Warp I\t4\t2500\tNone\tSlay 1,500 Shifter Zombies"; +$Challenge::Challenge[4, 19] = "ShifterHunter2"; +$Challenge::Info["ShifterHunter2"] = "Anti-Warp II\t4\t5000\tNone\tSlay 3,000 Shifter Zombies"; +$Challenge::Challenge[4, 20] = "ShifterHunter3"; +$Challenge::Info["ShifterHunter3"] = "Anti-Warp III\t4\t10000\tNone\tSlay 6,000 Shifter Zombies"; +$Challenge::Challenge[4, 21] = "SummonerHunter1"; +$Challenge::Info["SummonerHunter1"] = "Horde Halter I\t4\t2500\tNone\tSlay 1,000 Zombie Summoners"; +$Challenge::Challenge[4, 22] = "SummonerHunter2"; +$Challenge::Info["SummonerHunter2"] = "Horde Halter II\t4\t5000\tNone\tSlay 2,500 Zombie Summoners"; +$Challenge::Challenge[4, 23] = "SummonerHunter3"; +$Challenge::Info["SummonerHunter3"] = "Horde Halter III\t4\t10000\tNone\tSlay 5,000 Zombie Summoners"; +$Challenge::Challenge[4, 24] = "SniperHunter1"; +$Challenge::Info["SniperHunter1"] = "Scope Breaker I\t4\t2500\tNone\tSlay 1,000 Sniper Zombies"; +$Challenge::Challenge[4, 25] = "SniperHunter2"; +$Challenge::Info["SniperHunter2"] = "Scope Breaker II\t4\t5000\tNone\tSlay 2,500 Sniper Zombies"; +$Challenge::Challenge[4, 26] = "SniperHunter3"; +$Challenge::Info["SniperHunter3"] = "Scope Breaker III\t4\t10000\tNone\tSlay 5,000 Sniper Zombies"; +$Challenge::Challenge[4, 27] = "UDemHunter1"; +$Challenge::Info["UDemHunter1"] = "Runner Down I\t4\t2500\tNone\tSlay 1,000 Ultra Demon Zombies"; +$Challenge::Challenge[4, 28] = "UDemHunter2"; +$Challenge::Info["UDemHunter2"] = "Runner Down II\t4\t5000\tNone\tSlay 2,500 Ultra Demon Zombies"; +$Challenge::Challenge[4, 29] = "UDemHunter3"; +$Challenge::Info["UDemHunter3"] = "Runner Down III\t4\t10000\tNone\tSlay 5,000 Ultra Demon Zombies"; +$Challenge::Challenge[4, 30] = "VRavHunter1"; +$Challenge::Info["VRavHunter1"] = "C4 Coming Through I\t4\t2500\tNone\tSlay 1,000 Volatile Ravager Zombies"; +$Challenge::Challenge[4, 31] = "VRavHunter2"; +$Challenge::Info["VRavHunter2"] = "C4 Coming Through II\t4\t5000\tNone\tSlay 2,500 Volatile Ravager Zombies"; +$Challenge::Challenge[4, 32] = "VRavHunter3"; +$Challenge::Info["VRavHunter3"] = "C4 Coming Through III\t4\t10000\tNone\tSlay 5,000 Volatile Ravager Zombies"; +$Challenge::Challenge[4, 33] = "SSHunter1"; +$Challenge::Info["SSHunter1"] = "De-Flakerizer I\t4\t2500\tNone\tSlay 1,000 Slingshot Zombies"; +$Challenge::Challenge[4, 34] = "SSHunter2"; +$Challenge::Info["SSHunter2"] = "De-Flakerizer II\t4\t5000\tNone\tSlay 2,500 Slingshot Zombies"; +$Challenge::Challenge[4, 35] = "SSHunter3"; +$Challenge::Info["SSHunter3"] = "De-Flakerizer III\t4\t10000\tNone\tSlay 5,000 Slingshot Zombies"; +$Challenge::Challenge[4, 36] = "WraithHunter1"; +$Challenge::Info["WraithHunter1"] = "Anti Spec-Ops I\t4\t2500\tNone\tSlay 500 Wraith Zombies"; +$Challenge::Challenge[4, 37] = "WraithHunter2"; +$Challenge::Info["WraithHunter2"] = "Anti Spec-Ops II\t4\t5000\tNone\tSlay 750 Wraith Zombies"; +$Challenge::Challenge[4, 38] = "WraithHunter3"; +$Challenge::Info["WraithHunter3"] = "Anti Spec-Ops III\t4\t10000\tNone\tSlay 1,000 Wraith Zombies"; //Events -$Challenge::Info["NewYearsEve"] = "New Years Eve Fireworks\t5\t1500\tJavelin Hellclass"; -$Challenge::Info["NewYears"] = "New Years Fireworks\t5\t1500\tNone"; -$Challenge::Info["GunshipMall"] = "Gunship to the Mall\t5\t2500\tNone"; -$Challenge::Info["IndepRPG"] = "Independance RPG\t5\t1500\tNone"; -$Challenge::Info["SoulsticeBombard"] = "Soulstice Bombard\t5\t1500\tNone"; +$Challenge::Category[5] = "Special Event Challenges\tTasks for playing TWM2 during special events\t-1"; + +$Challenge::Challenge[5, 0] = "NewYearsEve"; +$Challenge::Info["NewYearsEve"] = "New Years Eve Fireworks\t5\t1500\tJavelin Hellclass\tGet a Javelin Kill on New Year's Eve"; +$Challenge::Challenge[5, 1] = "NewYears"; +$Challenge::Info["NewYears"] = "New Years Fireworks\t5\t1500\tNone\tCall in a Nuclear Strike on New Year's Day"; +$Challenge::Challenge[5, 2] = "GunshipMall"; +$Challenge::Info["GunshipMall"] = "Gunship to the Mall\t5\t2500\tNone\tCall in a Gunship Killstreak on Christmas Mall 2009"; +$Challenge::Challenge[5, 3] = "IndepRPG"; +$Challenge::Info["IndepRPG"] = "Independance RPG\t5\t1500\tNone\tScore an RPG Kill on the Fourth of July"; +$Challenge::Challenge[5, 4] = "SoulsticeBombard"; +$Challenge::Info["SoulsticeBombard"] = "Soulstice Bombard\t5\t1500\tNone\tCall in artillery on one of the soulstices (6/21 or 12/21)"; //Phantom Games Development //see DChalg.cs +$Challenge::Category[6] = "PGD Challenges\tDaily challenges issued by PGD\t-1"; //Sabotage -$Challenge::Info["BombDisarmed"] = "Bomb Disarmed\t7\t500\tNone"; -$Challenge::Info["BombPlanted"] = "Bomb Planted\t7\t2500\tNone"; -$Challenge::Info["BombDetonated"] = "Bomb Detonated\t7\t3000\tNone"; -$Challenge::Info["3For5Sabo"] = "Three For Five\t7\t4500\tBomb Shadower Perk"; -$Challenge::Info["BaseDestroyer"] = "Base Destroyer\t7\t5000\tNone"; +$Challenge::Category[7] = "Sabotage Challenges\tTasks related to the Sabotage game mode\t40"; + +$Challenge::Challenge[7, 0] = "BombDisarmed"; +$Challenge::IsNotMultiTier["BombDisarmed"] = true; +$Challenge::Info["BombDisarmed"] = "Bomb Disarmed\t7\t500\tNone\tDisarm an enemy bomb"; +$Challenge::Challenge[7, 1] = "BombPlanted"; +$Challenge::IsNotMultiTier["BombPlanted"] = true; +$Challenge::Info["BombPlanted"] = "Bomb Planted\t7\t2500\tNone\tArm the bomb at the objective"; +$Challenge::Challenge[7, 2] = "BombDetonated"; +$Challenge::IsNotMultiTier["BombDetonated"] = true; +$Challenge::Info["BombDetonated"] = "Bomb Detonated\t7\t3000\tNone\tWin a Round Of Sabotage"; +$Challenge::Challenge[7, 3] = "3For5Sabo"; +$Challenge::IsNotMultiTier["3For5Sabo"] = true; +$Challenge::Info["3For5Sabo"] = "Three For Five\t7\t4500\tBomb Shadower Perk\tWin 3 of the 5 rounds in a Sabotage match"; +$Challenge::Challenge[7, 4] = "BaseDestroyer"; +$Challenge::IsNotMultiTier["BaseDestroyer"] = true; +$Challenge::Info["BaseDestroyer"] = "Base Destroyer\t7\t5000\tNone\tGo Undefeated in a full game of Sabotage"; //Domination -$Challenge::Info["ZoneCapture"] = "Zone Conquerer\t8\t500\tNone"; -$Challenge::Info["ABC"] = "Alpha Bravo Charlie\t8\t2500\tNone"; -$Challenge::Info["MatchSet"] = "Match Set\t8\t3000\tNone"; -$Challenge::Info["3For5"] = "Three For Five\t8\t4500\tNone"; -$Challenge::Info["Undefeatable"] = "Undefeatable\t8\t5000\tNone"; +$Challenge::Category[8] = "Domination Challenges\tTasks related to the Domination game mode\t40"; + +$Challenge::Challenge[8, 0] = "ZoneCapture"; +$Challenge::IsNotMultiTier["ZoneCapture"] = true; +$Challenge::Info["ZoneCapture"] = "Zone Conquerer\t8\t500\tNone\tCapture a domination point"; +$Challenge::Challenge[8, 1] = "ABC"; +$Challenge::IsNotMultiTier["ABC"] = true; +$Challenge::Info["ABC"] = "Alpha Bravo Charlie\t8\t2500\tNone\tAt any point in the game, hold all three points"; +$Challenge::Challenge[8, 2] = "MatchSet"; +$Challenge::IsNotMultiTier["MatchSet"] = true; +$Challenge::Info["MatchSet"] = "Match Set\t8\t3000\tNone\tWin a Round Of Domination"; +$Challenge::Challenge[8, 3] = "3For5"; +$Challenge::IsNotMultiTier["3For5"] = true; +$Challenge::Info["3For5"] = "Three For Five\t8\t4500\tNone\tWin 3 of the 5 rounds in a Domination match"; +$Challenge::Challenge[8, 4] = "Undefeatable"; +$Challenge::IsNotMultiTier["Undefeatable"] = true; +$Challenge::Info["Undefeatable"] = "Undefeatable\t8\t5000\tNone\tGo Undefeated in a full game of Domination"; //Horde 3 -$Challenge::Info["15For15"] = "15 For 15\t9\t15000\tNone"; -$Challenge::Info["Milestone25"] = "Milestone 25\t9\t25000\tNone"; -$Challenge::Info["ArmyOf50Stopped"] = "Army Of 50 Stopped\t9\t50000\tSecond Chance Perk"; -$Challenge::Info["Angel"] = "Angel\t9\t500\tNone"; -$Challenge::Info["ZBomber"] = "Z-Bomber\t9\t2000\tNone"; -$Challenge::Info["FirstBlood"] = "First Blood\t9\t10000\tNone"; -$Challenge::Info["SpeedSlayer"] = "Speed Slayer\t9\t20000\tNone"; -$Challenge::Info["HighScorer"] = "High Scorer\t9\t25000\tNone"; +$Challenge::Category[9] = "Horde 3 Challenges\tTasks related to surviving the waves of the zombie horde\t40"; + +$Challenge::Challenge[9, 0] = "15For15"; +$Challenge::IsNotMultiTier["15For15"] = true; +$Challenge::Info["15For15"] = "15 For 15\t9\t15000\tNone\tComplete Wave 15"; +$Challenge::Challenge[9, 1] = "Milestone25"; +$Challenge::IsNotMultiTier["Milestone25"] = true; +$Challenge::Info["Milestone25"] = "Milestone 25\t9\t25000\tNone\tComplete Wave 25"; +$Challenge::Challenge[9, 2] = "ArmyOf50Stopped"; +$Challenge::IsNotMultiTier["ArmyOf50Stopped"] = true; +$Challenge::Info["ArmyOf50Stopped"] = "Army Of 50 Stopped\t9\t50000\tSecond Chance Perk\tComplete Horde 3 (All 50 Waves)"; +$Challenge::Challenge[9, 3] = "Angel"; +$Challenge::IsNotMultiTier["Angel"] = true; +$Challenge::Info["Angel"] = "Angel\t9\t500\tNone\tRevive a fallen teammate in Horde"; +$Challenge::Challenge[9, 4] = "ZBomber"; +$Challenge::IsNotMultiTier["ZBomber"] = true; +$Challenge::Info["ZBomber"] = "Z-Bomber\t9\t2000\tNone\tCall in a Z-Bomb While Playing Horde"; +$Challenge::Challenge[9, 5] = "FirstBlood"; +$Challenge::IsNotMultiTier["FirstBlood"] = true; +$Challenge::Info["FirstBlood"] = "First Blood\t9\t10000\tNone\tKill the first zombie that spawns in a Horde 3 game"; +$Challenge::Challenge[9, 6] = "SpeedSlayer"; +$Challenge::IsNotMultiTier["SpeedSlayer"] = true; +$Challenge::Info["SpeedSlayer"] = "Speed Slayer\t9\t20000\tNone\tBe the featured first killer 10 times in a single game"; +$Challenge::Challenge[9, 7] = "HighScorer"; +$Challenge::IsNotMultiTier["HighScorer"] = true; +$Challenge::Info["HighScorer"] = "High Scorer\t9\t25000\tNone\tBe the featured high scorer 10 times in a single game"; //Helljump -$Challenge::Info["GroupBuster"] = "Group Buster\t10\t5000\tNone"; -$Challenge::Info["WaveDefeater"] = "Wave Defeater\t10\t50000\tNone"; -$Challenge::Info["OneK"] = "1K Soldier\t10\t10000\tNone"; -$Challenge::Info["FiveK"] = "5K Soldier\t10\t25000\tNone"; -$Challenge::Info["TenK"] = "10K Soldier\t10\t50000\tNone"; -$Challenge::Info["PointsSurge"] = "Points Surge\t10\t25000\tNone"; -$Challenge::Info["PointsJackpot"] = "Points Jackpot\t10\t50000\tNone"; -$Challenge::Info["ThatsAHind"] = "That's a Hind\t10\t5000\tNone"; -$Challenge::Info["DownBoy"] = "Down Boy... Down\t10\t5000\tNone"; -$Challenge::Info["ClassExtravaganza"] = "Class Extravaganza\t10\t100\tNone"; -$Challenge::Info["LifeGiver"] = "Giver of Life\t10\t7500\tNone"; +$Challenge::Category[10] = "Helljump Challenges\tTasks related to performing spec-ops Helljump operations\t40"; + +$Challenge::Challenge[10, 0] = "GroupBuster"; +$Challenge::IsNotMultiTier["GroupBuster"] = true; +$Challenge::Info["GroupBuster"] = "Group Buster\t10\t5000\tNone\tComplete A Group"; +$Challenge::Challenge[10, 1] = "WaveDefeater"; +$Challenge::IsNotMultiTier["WaveDefeater"] = true; +$Challenge::Info["WaveDefeater"] = "Wave Defeater\t10\t50000\tNone\tComplete A Wave"; +$Challenge::Challenge[10, 2] = "OneK"; +$Challenge::IsNotMultiTier["OneK"] = true; +$Challenge::Info["OneK"] = "1K Soldier\t10\t10000\tNone\tEarn 1,000 Points (Solo Score)"; +$Challenge::Challenge[10, 3] = "FiveK"; +$Challenge::IsNotMultiTier["FiveK"] = true; +$Challenge::Info["FiveK"] = "5K Soldier\t10\t25000\tNone\tEarn 5,000 Points (Solo Score)"; +$Challenge::Challenge[10, 4] = "TenK"; +$Challenge::IsNotMultiTier["TenK"] = true; +$Challenge::Info["TenK"] = "10K Soldier\t10\t50000\tNone\tEarn 10,000 Points (Solo Score)"; +$Challenge::Challenge[10, 5] = "PointsSurge"; +$Challenge::IsNotMultiTier["PointsSurge"] = true; +$Challenge::Info["PointsSurge"] = "Points Surge\t10\t25000\tNone\tEarn 7,500 Points (Team Score)"; +$Challenge::Challenge[10, 6] = "PointsJackpot"; +$Challenge::IsNotMultiTier["PointsJackpot"] = true; +$Challenge::Info["PointsJackpot"] = "Points Jackpot\t10\t50000\tNone\tEarn 25,000 Points (Team Score)"; +$Challenge::Challenge[10, 7] = "DownBoy"; +$Challenge::IsNotMultiTier["DownBoy"] = true; +$Challenge::Info["DownBoy"] = "Down Boy... Down\t10\t5000\tNone\tKill the wraith zombie on Strike 5"; +$Challenge::Challenge[10, 8] = "ClassExtravaganza"; +$Challenge::IsNotMultiTier["ClassExtravaganza"] = true; +$Challenge::Info["ClassExtravaganza"] = "Class Extravaganza\t10\t100\tNone\tUse a hellclass"; +$Challenge::Challenge[10, 9] = "LifeGiver"; +$Challenge::IsNotMultiTier["LifeGiver"] = true; +$Challenge::Info["LifeGiver"] = "Giver of Life\t10\t7500\tNone\tUse a Full Team Respawn beacon"; //From The Top -$Challenge::Info["SimonSays"] = "Simon Says\t11\t1000\tNone"; -$Challenge::Info["FromTheTop"] = "From The Top\t11\t1000\tNone"; -$Challenge::Info["NaturalLeader"] = "Natural Leader\t11\t2500\tNone"; -$Challenge::Info["GoldStar"] = "Gold Star\t11\t1000\tNone"; -$Challenge::Info["Faster"] = "Faster!\t11\t250\tNone"; -$Challenge::Info["EpicFailure"] = "Epic Failure\t11\t5\tNone"; -$Challenge::Info["ExpertGunner"] = "Expert AC-130 Gunner\t11\t25000\tNone"; -$Challenge::Info["Survivalist"] = "Survivalist\t11\t25000\tNone"; -$Challenge::Info["Invisibreh"] = "Shhh.. I'm Invisibreh\t11\t25000\tNone"; -$Challenge::Info["WeakGunship"] = "I have you now!\t11\t25000\tNone"; -$Challenge::Info["InvasionBuster"] = "Invade THIS!\t11\t25000\tNone"; -$Challenge::Info["SurvivalistExtreme"] = "Extreme Survivalist\t11\t50000\tNone"; +$Challenge::Category[11] = "Operation Challenges\tTasks related to performing group operations\t49"; + +$Challenge::Challenge[11, 0] = "SimonSays"; +$Challenge::IsNotMultiTier["SimonSays"] = true; +$Challenge::Info["SimonSays"] = "Simon Says\t11\t1000\tNone\tOrder an operation"; +$Challenge::Challenge[11, 1] = "FromTheTop"; +$Challenge::IsNotMultiTier["FromTheTop"] = true; +$Challenge::Info["FromTheTop"] = "From The Top\t11\t1000\tNone\tJoin an operation fireteam"; +$Challenge::Challenge[11, 2] = "NaturalLeader"; +$Challenge::IsNotMultiTier["NaturalLeader"] = true; +$Challenge::Info["NaturalLeader"] = "Natural Leader\t11\t2500\tNone\tOrder an operation, and have another player join the fireteam"; +$Challenge::Challenge[11, 3] = "GoldStar"; +$Challenge::IsNotMultiTier["GoldStar"] = true; +$Challenge::Info["GoldStar"] = "Gold Star\t11\t1000\tNone\tComplete an operation inside the time window"; +$Challenge::Challenge[11, 4] = "Faster"; +$Challenge::IsNotMultiTier["Faster"] = true; +$Challenge::Info["Faster"] = "Faster!\t11\t250\tNone\tComplete an operation, but miss the time window"; +$Challenge::Challenge[11, 5] = "EpicFailure"; +$Challenge::IsNotMultiTier["EpicFailure"] = true; +$Challenge::Info["EpicFailure"] = "Epic Failure\t11\t5\tNone\tYou failed.... :)"; +$Challenge::Challenge[11, 6] = "ExpertGunner"; +$Challenge::IsNotMultiTier["ExpertGunner"] = true; +$Challenge::Info["ExpertGunner"] = "Expert AC-130 Gunner\t11\t25000\tNone\tComplete Operation 'Rain Down'"; +$Challenge::Challenge[11, 7] = "Survivalist"; +$Challenge::IsNotMultiTier["Survivalist"] = true; +$Challenge::Info["Survivalist"] = "Survivalist\t11\t25000\tNone\tComplete Operation 'Surrounded'"; +$Challenge::Challenge[11, 8] = "Invisibreh"; +$Challenge::IsNotMultiTier["Invisibreh"] = true; +$Challenge::Info["Invisibreh"] = "Shhh.. I'm Invisibreh\t11\t25000\tNone\tComplete 'Enemy AC-130 Above' by hiding"; +$Challenge::Challenge[11, 9] = "WeakGunship"; +$Challenge::IsNotMultiTier["WeakGunship"] = true; +$Challenge::Info["WeakGunship"] = "I have you now!\t11\t25000\tNone\tComplete 'Enemy AC-130 Above' by explosive force"; +$Challenge::Challenge[11, 10] = "InvasionBuster"; +$Challenge::IsNotMultiTier["InvasionBuster"] = true; +$Challenge::Info["InvasionBuster"] = "Invade THIS!\t11\t25000\tNone\tComplete Operation 'Invasion'"; +$Challenge::Challenge[11, 11] = "SurvivalistExtreme"; +$Challenge::IsNotMultiTier["SurvivalistExtreme"] = true; +$Challenge::Info["SurvivalistExtreme"] = "Extreme Survivalist\t11\t50000\tNone\tComplete Operation 'Surrounded 2.0'"; //Prestige -$Challenge::Info["Prestige1"] = "Instructive Officer\t12\t100\tNone"; -$Challenge::Info["Prestige2"] = "Excelling Officer\t12\t250\tNone"; -$Challenge::Info["Prestige3"] = "Champion Officer\t12\t350\tNone"; -$Challenge::Info["Prestige4"] = "Prestigious Officer\t12\t500\tNone"; -$Challenge::Info["Prestige5"] = "Supreme Officer\t12\t1000\tNone"; -$Challenge::Info["Prestige6"] = "Glorious Officer\t12\t2500\tNone"; -$Challenge::Info["Prestige7"] = "Ultimate Officer\t12\t5000\tNone"; -$Challenge::Info["Prestige8"] = "Shadowing Officer\t12\t7500\tNone"; -$Challenge::Info["Prestige9"] = "Phantom Officer\t12\t10000\tNone"; -$Challenge::Info["Prestige10"] = "Brutal Officer\t12\t10000\tNone"; -$Challenge::Info["Prestige11"] = "Vengeful Officer\t12\t10000\tNone"; -$Challenge::Info["Prestige12"] = "Spectral Officer\t12\t10000\tNone"; -$Challenge::Info["Prestige13"] = "Noble Officer\t12\t10000\tNone"; -$Challenge::Info["Prestige14"] = "Masterful Officer\t12\t10000\tNone"; -$Challenge::Info["Prestige15"] = "Rising Harbinger\t12\t10000\tNone"; -$Challenge::Info["GameEnder"] = "Game Ender\t12\t5000\tNone"; +$Challenge::Category[12] = "Officer Challenges\tTasks related to officer ranks and advanced progression\tOfficer 1"; + +$Challenge::Challenge[12, 0] = "Prestige1"; +$Challenge::SetHidden[12, 0] = true; +$Challenge::HiddenMessage[12, 0] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige1"] = true; +$Challenge::Info["Prestige1"] = "Instructive Officer\t12\t100\tNone\tReach Officer Level 1"; + +$Challenge::Challenge[12, 1] = "Prestige2"; +$Challenge::SetHidden[12, 1] = true; +$Challenge::HiddenMessage[12, 1] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige2"] = true; +$Challenge::Info["Prestige2"] = "Excelling Officer\t12\t250\tNone\tReach Officer Level 2"; + +$Challenge::Challenge[12, 2] = "Prestige3"; +$Challenge::SetHidden[12, 2] = true; +$Challenge::HiddenMessage[12, 2] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige3"] = true; +$Challenge::Info["Prestige3"] = "Champion Officer\t12\t350\tNone\tReach Officer Level 3"; + +$Challenge::Challenge[12, 3] = "Prestige4"; +$Challenge::SetHidden[12, 3] = true; +$Challenge::HiddenMessage[12, 3] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige4"] = true; +$Challenge::Info["Prestige4"] = "Prestigious Officer\t12\t500\tNone\tReach Officer Level 4"; + +$Challenge::Challenge[12, 4] = "Prestige5"; +$Challenge::SetHidden[12, 4] = true; +$Challenge::HiddenMessage[12, 4] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige5"] = true; +$Challenge::Info["Prestige5"] = "Supreme Officer\t12\t1000\tNone\tReach Officer Level 5"; + +$Challenge::Challenge[12, 5] = "Prestige6"; +$Challenge::SetHidden[12, 5] = true; +$Challenge::HiddenMessage[12, 5] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige6"] = true; +$Challenge::Info["Prestige6"] = "Glorious Officer\t12\t2500\tNone\tReach Officer Level 6"; + +$Challenge::Challenge[12, 6] = "Prestige7"; +$Challenge::SetHidden[12, 6] = true; +$Challenge::HiddenMessage[12, 6] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige7"] = true; +$Challenge::Info["Prestige7"] = "Ultimate Officer\t12\t5000\tNone\tReach Officer Level 7"; + +$Challenge::Challenge[12, 7] = "Prestige8"; +$Challenge::SetHidden[12, 7] = true; +$Challenge::HiddenMessage[12, 7] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige8"] = true; +$Challenge::Info["Prestige8"] = "Shadowing Officer\t12\t7500\tNone\tReach Officer Level 8"; + +$Challenge::Challenge[12, 8] = "Prestige9"; +$Challenge::SetHidden[12, 8] = true; +$Challenge::HiddenMessage[12, 8] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige9"] = true; +$Challenge::Info["Prestige9"] = "Phantom Officer\t12\t10000\tNone\tReach Officer Level 9"; + +$Challenge::Challenge[12, 9] = "Prestige10"; +$Challenge::SetHidden[12, 9] = true; +$Challenge::HiddenMessage[12, 9] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige10"] = true; +$Challenge::Info["Prestige10"] = "Brutal Officer\t12\t10000\tNone\tReach Officer Level 10"; + +$Challenge::Challenge[12, 10] = "Prestige11"; +$Challenge::SetHidden[12, 10] = true; +$Challenge::HiddenMessage[12, 10] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige11"] = true; +$Challenge::Info["Prestige11"] = "Vengeful Officer\t12\t10000\tNone\tReach Officer Level 11"; + +$Challenge::Challenge[12, 11] = "Prestige12"; +$Challenge::SetHidden[12, 11] = true; +$Challenge::HiddenMessage[12, 11] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige12"] = true; +$Challenge::Info["Prestige12"] = "Spectral Officer\t12\t10000\tNone\tReach Officer Level 12"; + +$Challenge::Challenge[12, 12] = "Prestige13"; +$Challenge::SetHidden[12, 12] = true; +$Challenge::HiddenMessage[12, 12] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige13"] = true; +$Challenge::Info["Prestige13"] = "Noble Officer\t12\t10000\tNone\tReach Officer Level 13"; + +$Challenge::Challenge[12, 13] = "Prestige14"; +$Challenge::SetHidden[12, 13] = true; +$Challenge::HiddenMessage[12, 13] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige14"] = true; +$Challenge::Info["Prestige14"] = "Masterful Officer\t12\t10000\tNone\tReach Officer Level 14"; + +$Challenge::Challenge[12, 14] = "Prestige15"; +$Challenge::SetHidden[12, 14] = true; +$Challenge::HiddenMessage[12, 14] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::IsNotMultiTier["Prestige15"] = true; +$Challenge::Info["Prestige15"] = "Rising Harbinger\t12\t10000\tNone\tReach The Highest Officer Level (15)"; + +$Challenge::Challenge[12, 15] = "GameEnder"; +$Challenge::IsNotMultiTier["GameEnder"] = true; +$Challenge::Info["GameEnder"] = "Game Ender\t12\t5000\tNone\tUse a Fission Bomb to end a game"; //CORE @@ -256,184 +620,86 @@ $Challenge::Info["GameEnder"] = "Game Ender\t12\t5000\tNone"; //Core Functions function GameConnection::AllowedToDoNW(%client, %name) { + if($Challenge::FlagDisabled[%name]) { + return 0; + } %scriptController = %client.TWM2Core; %xp = getCurrentEXP(%client); %taskCate = getField($Challenge::Info[%name], 1); - - if(%taskCate == 5 || %taskCate == 6) { - //Special categories available for all players - return 1; + if(%taskCate $= "") { + error("AllowedToDoNW: Invalid challenge category for "@%name@", system shows: "@%taskCate@" ("@%Challenge::Info[%name]@")"); + return 0; } - - if(%taskCate == 1) { - return %xp >= $Ranks::MinPoints[13]; - } - else if(%taskCate == 2) { - return %xp >= $Ranks::MinPoints[18]; - } - else if(%taskCate == 3) { - return %xp >= $Ranks::MinPoints[23]; - } - else if(%taskCate == 4) { - return %xp >= $Ranks::MinPoints[28]; - } - else if(%taskCate == 7 || %taskCate == 8 || %taskCate == 9 || %taskCate == 10) { - return %xp >= $Ranks::MinPoints[40]; - } - else if(%taskCate == 11) { - return %xp >= $Ranks::MinPoints[59]; - } - else if(%taskCate == 12) { - return %scriptController.officer >= 1; + %categoryReq = getField($Challenge::Category[%taskCate], 2); + if(getWord(%categoryReq, 0) $= "Officer") { + return %scriptController.officer >= getWord(%categoryReq, 1); } else { - error("AllowedToDoNW: Invalid challenge category for "@%name@", system shows: "@%taskCate@" ("@%Challenge::Info[%name]@")"); + if(%categoryReq == -1) { + return 1; + } + else { + return %xp >= $Rank::MinPoints[%categoryReq]; + } } } function GameConnection::CheckNWChallengeCompletion(%client, %name) { - %scriptController = %client.TWM2Core; - if(%scriptController.challengeComplete[%name] == 1) { - return true; - } - else { - return false; - } + %scriptController = %client.TWM2Core; + if(%scriptController.challengeComplete[%name] == 1) { + return true; + } + else { + return false; + } } function CompleteNW_allPlayers(%name) { - for(%i = 0; %i < ClientGroup.getCount(); %i++) { - %client = ClientGroup.getObject(%i); - CompleteNWChallenge(%client, %name); - } + for(%i = 0; %i < ClientGroup.getCount(); %i++) { + %client = ClientGroup.getObject(%i); + CompleteNWChallenge(%client, %name); + } } function CompleteNWChallenge(%client, %name) { - if(%client $= "" || !%client) { - return; - } - if(%client.CheckNWChallengeCompletion(%name)) { - return; - } - if(!%client.AllowedToDoNW(%name)) { - return; - } - // - %scriptController = %client.TWM2Core; - %taskName = getField($Challenge::Info[%name], 0); - %taskXPGive = getField($Challenge::Info[%name], 2); - %taskReward = getField($Challenge::Info[%name], 3); - // - GainExperience(%client, %taskXPGive, "Challenge "@%taskName@" Completed "); - BottomPrint(%client, "CHALLENGE COMPLETE: "@%taskName@" \n +"@%taskXPGive@"XP, Reward: "@%taskReward@"", 2, 3); - MessageClient(%client, 'MsgSound', "~wfx/Bonuses/Nouns/General.wav"); - MessageAll('msgComplete', "\c5"@%client.namebase@" completed challenge "@%taskName@""); - // - %scriptController.challengeComplete[%name] = 1; - %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; - SaveClientFile(%client); - echo("TWM2: Client "@%client@", "@%client.nambase@", Completed Challenge "@%taskname@", File Updated."); + if(%client $= "" || !%client) { + return; + } + if(%client.CheckNWChallengeCompletion(%name)) { + return; + } + if(!%client.AllowedToDoNW(%name)) { + return; + } + // + %scriptController = %client.TWM2Core; + %taskName = getField($Challenge::Info[%name], 0); + %taskXPGive = getField($Challenge::Info[%name], 2); + %taskReward = getField($Challenge::Info[%name], 3); + // + GainExperience(%client, %taskXPGive, "Challenge "@%taskName@" Completed "); + BottomPrint(%client, "CHALLENGE COMPLETE: "@%taskName@" \n +"@%taskXPGive@"XP, Reward: "@%taskReward@"", 2, 3); + MessageClient(%client, 'MsgSound', "~wfx/Bonuses/Nouns/General.wav"); + MessageAll('msgComplete', "\c5"@%client.namebase@" completed challenge "@%taskName@""); + // + %scriptController.challengeComplete[%name] = 1; + %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave\t"; + SaveClientFile(%client); + echo("TWM2: Client "@%client@", "@%client.nambase@", Completed Challenge "@%taskname@", File Updated."); } -//Menus -function GenerateChallengesMenu(%client, %tag, %index) { - %scriptController = %client.TWM2Core; - %xp = getCurrentEXP(%client); - messageClient( %client, 'SetLineHud', "", %tag, %index, "Select a category to view challenges:"); - %index++; - // - messageClient( %client, 'SetLineHud', "", %tag, %index, "PGD Challenges (Daily/Weekly/Monthly)"); - %index++; - if(%xp >= $Ranks::MinPoints[13]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Killstreak Challenges: Tasks for calling in advanced support"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Killstreak Challenges - Reach Sergeant To Unlock"); - %index++; - } - // - if(%xp >= $Ranks::MinPoints[18]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Boss Challenges: Tasks for eliminating the toughest enemies in TWM2"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Boss Challenges - Reach Gunnary Sergeant To Unlock"); - %index++; - } - if(%xp >= $Ranks::MinPoints[23]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Wargames Challenges: Tasks for eliminating enemy players in various ways"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Wargames Challenges - Reach Lieutenant To Unlock"); - %index++; - } - // - if(%xp >= $Ranks::MinPoints[28]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Zombie Slaying Challenges: Tasks for eliminating combatants of the zombie horde"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Zombie Slaying Challenges - Reach Captain To Unlock"); - %index++; - } - // - messageClient( %client, 'SetLineHud', "", %tag, %index, "Special Event Challenges: Tasks for playing TWM2 during special events"); - %index++; - // - if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Sabotage Challenges: Tasks related to the Sabotage game mode"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Sabotage Challenges - Reach Colonel To Unlock"); - %index++; - } - // - if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Domination Challenges: Tasks related to the Domination game mode"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Domination Challenges - Reach Colonel To Unlock"); - %index++; - } - // - if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde 3 Challenges: Tasks related to surviving the waves of the zombie horde"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Horde 3 Challenges - Reach Colonel To Unlock"); - %index++; - } - // - if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helljump Challenges: Tasks related to performing spec-ops Helljump operations"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Helljump Challenges - Reach Colonel To Unlock"); - %index++; - } - // - if(%xp >= $Ranks::MinPoints[40]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "From the top: Tasks related to ordering and completing missions"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "From the top - Reach Commading Officer To Unlock"); - %index++; - } - // - if(%scriptController.officer >= 1) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges: Tasks related to officer ranks and advanced progression"); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Officer Challenges - Reach Instructive Private To Unlock"); - %index++; - } - return %index; +function fetchChallengeSubID(%name) { + %challenge = $Challenge::Info[%name]; + if(%challenge $= "") { + error("fetchChallengeSubID(): Cannot find challenge "@%name); + return -1; + } + %primaryID = getField(%challenge, 1); + for(%i = 0; $Challenge::Challenge[%primaryID, %i] !$= ""; %i++) { + if($Challenge::Challenge[%primaryID, %i] $= %name) { + return %i; + } + } + warn("fetchChallengeSubID(): There is an invalid field in the NWChallengeIndex, cannot find "@%name@" under "@%primaryID); + return -1; } \ No newline at end of file diff --git a/scripts/TWM2/Systems/scoremenucmds.cs b/scripts/TWM2/Systems/scoremenucmds.cs index fa6592f..04fbefa 100644 --- a/scripts/TWM2/Systems/scoremenucmds.cs +++ b/scripts/TWM2/Systems/scoremenucmds.cs @@ -46,13 +46,13 @@ function ConstructionGame::processGameLink(%game, %client, %arg1, %arg2, %arg3, case "OrderMisSub": %client.SCMPage = "SM"; - messageClient( %client, 'SetScoreHudSubheader', "", "Missions" ); - if(getCurrentEXP(%client) < $Ranks::MinPoints[59] && %scriptController.officer < 1) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "You must have the 'Commanding Officer' Rank To Order Missions."); + messageClient( %client, 'SetScoreHudSubheader', "", "Operations" ); + if(getCurrentEXP(%client) < $Ranks::MinPoints[49] && %scriptController.officer < 1) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "You must have the 'General' Rank To Order Operations."); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Order A Mission, Select a Mission"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Select an Operation"); %index++; %xI = 0; while(isSet($Mission::TWM2Mision[%xI])) { @@ -77,13 +77,13 @@ function ConstructionGame::processGameLink(%game, %client, %arg1, %arg2, %arg3, %task = %arg3; switch(%task) { case 1: - messageClient( %client, 'SetLineHud', "", %tag, %index, "Mission: "@getField($Mission::VarSet[""@%mission@"", "TaskDetails"], 0)@""); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Operation: "@getField($Mission::VarSet[""@%mission@"", "TaskDetails"], 0)@""); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Details: "@getField($Mission::VarSet[""@%mission@"", "TaskDetails"], 1)@""); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Difficulty: "@$Mission::VarSet[""@%mission@"", "Difficulty"]@""); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Mission Time Window: "@$Mission::VarSet[""@%mission@"", "TimeLimit"] / 60@" Minutes"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Operation Time Window: "@$Mission::VarSet[""@%mission@"", "TimeLimit"] / 60@" Minutes"); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "Required Players: "@$Mission::VarSet[""@%mission@"", "PlayerReq"]@""); %index++; @@ -91,9 +91,9 @@ function ConstructionGame::processGameLink(%game, %client, %arg1, %arg2, %arg3, %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, ""); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, "Order Mission"); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Order This Operation"); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Select A Different Mission'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Select A Different Operation'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Main Menu'); %index++; @@ -110,18 +110,18 @@ function ConstructionGame::processGameLink(%game, %client, %arg1, %arg2, %arg3, case "Missions": %client.SCMPage = "SM"; - messageClient( %client, 'SetScoreHudSubheader', "", "Missions" ); - if(getCurrentEXP(%client) < $Ranks::MinPoints[59] && %scriptController.officer < 1) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "You must have the 'Commanding Officer' Rank To Order Missions."); + messageClient( %client, 'SetScoreHudSubheader', "", "Operations" ); + if(getCurrentEXP(%client) < $Ranks::MinPoints[49] && %scriptController.officer < 1) { + messageClient( %client, 'SetLineHud', "", %tag, %index, "Order Operation: LOCKED, Requires 'General' Rank."); %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Order A Mission'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Order An Operation'); %index++; } messageClient( %client, 'SetLineHud', "", %tag, %index, ''); %index++; - messageClient( %client, 'SetLineHud', "", %tag, %index, 'Join The Mission About To Begin'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'Join The Operation About To Begin'); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, 'Return To Main Menu'); %index++; @@ -640,7 +640,7 @@ function ConstructionGame::processGameLink(%game, %client, %arg1, %arg2, %arg3, %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, 'PGD Connect Status: Connected'); + messageClient( %client, 'SetLineHud', "", %tag, %index, 'PGD Connect Status: Connected'); %index++; } messageClient( %client, 'SetLineHud', "", %tag, %index, ""); diff --git a/scripts/TWM2/cmddisplaylist.txt b/scripts/TWM2/cmddisplaylist.txt index e3bfa24..68a98f1 100644 --- a/scripts/TWM2/cmddisplaylist.txt +++ b/scripts/TWM2/cmddisplaylist.txt @@ -1,7 +1,7 @@ CMD TSSF TWM 2, The Story Continues CMD MAINPAGE TWM 2 News CMD PersControl Settings -CMD Missions Missions +CMD Missions Operations CMD PC Piece Count CMD ContSave Content Saving System CMD BL15 Blacklist 15 diff --git a/scripts/chatCommands.cs b/scripts/chatCommands.cs index 2a30a72..9df59b0 100644 --- a/scripts/chatCommands.cs +++ b/scripts/chatCommands.cs @@ -247,9 +247,9 @@ function VoteBoss_StartBoss(%BossAbbr) SpawnLordRog(%pos); case "Insignia": SpawnInsignia(%pos); - case "Trebor": - %pos = VectorAdd(%pos, "0 20 0"); // so trebor doesn't land right on top of them.. - StartTrebor(%pos); // its lots of lulz though! + case "Trevor": + %pos = VectorAdd(%pos, "0 20 0"); // so trevor doesn't land right on top of them.. + StartTrevor(%pos); // its lots of lulz though! case "Vardison": StartVardison1(%pos); case "DAVardison": @@ -278,8 +278,8 @@ function BossFullname(%BossAbbr) return "Lord Rog"; case "insignia": return "Major Insignia"; - case "trebor": - return "Lordranius Trebor"; + case "trevor": + return "Lordranius Trevor"; case "stormrider": return "Commander Stormrider"; case "gof": @@ -311,7 +311,7 @@ function isBoss(%Boss) return 1; case "insignia": return 1; - case "trebor": + case "trevor": return 1; case "vardison": return 1; diff --git a/scripts/serverCommanderMap.cs b/scripts/serverCommanderMap.cs index 8430d10..d5b8098 100644 --- a/scripts/serverCommanderMap.cs +++ b/scripts/serverCommanderMap.cs @@ -370,75 +370,4 @@ function serverCmdScopeCommanderMap(%client, %scope) %client.scopeCommanderMap(%scope); commandToClient(%client, 'ScopeCommanderMap', %scope); -} - -//From Battlelord: -function GetHigherNumber(%num1, %num2) { - //Are they equal? - if(%num1 == %num2) { - return %num1; - } - else if(%num1 > %num2) { - return %num1; - } - else { - return %num2; - } -} - -//EXP -function getMaxGainedEXP(%client) { - if($MaxGainable $= "") { - %num1 = $TWM2::BossXPAward["Yvex"]; - %num2 = $TWM2::BossXPAward["CnlWindshear"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["GhostOfLightning"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Vengenor"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["LordRog"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Insignia"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Stormrider"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Trebor"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["GhostOfFire"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Vardison3"]; - %num1 = GetHigherNumber(%num1, %num2); - $MaxGainable = %num1; - } - else { - %num1 = $TWM2::BossXPAward["Yvex"]; - %num2 = $TWM2::BossXPAward["CnlWindshear"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["GhostOfLightning"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Vengenor"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["LordRog"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Insignia"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Stormrider"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Trebor"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["GhostOfFire"]; - %num1 = GetHigherNumber(%num1, %num2); - %num2 = $TWM2::BossXPAward["Vardison3"]; - %num1 = GetHigherNumber(%num1, %num2); - //Sirens!!! We have a hack in! - //Close the server and inform Phantom139 - if($MaxGainable != %num1) { - MessageAll('MsgAlert', "\c5TWM2: Server Hack-In Detected, Max EXP Has been Tampered. ~wfx/misc/red_alert.wav"); - MessageAll('MsgAlert', "\c5TWM2: This server is forced to Satellite Mode, all EXP Gain has been canceled."); - MessageAll('MsgAlert', "\c5TWM2: An E-Mail has been dispatched to \c3Phantom139\c5 Server Shutdown in 5 Seconds."); - schedule(5000, 0, "DestroyServer"); - schedule(8000, 0, "Quit"); - } - } - return %num1; -} +} \ No newline at end of file diff --git a/scripts/weapons/Pistols/GrappleHook.cs b/scripts/weapons/Pistols/GrappleHook.cs index 8337e22..32970af 100644 --- a/scripts/weapons/Pistols/GrappleHook.cs +++ b/scripts/weapons/Pistols/GrappleHook.cs @@ -112,7 +112,7 @@ datablock ShapeBaseImageData(GrappleHookImage) { stateName[3] = "Fire"; stateTransitionOnTimeout[3] = "Reload"; - stateTimeoutValue[3] = 0.5; + stateTimeoutValue[3] = 5.0; stateFire[3] = true; stateAllowImageChange[3] = false; stateSequence[3] = "Fire"; diff --git a/serverControl.cs b/serverControl.cs index 8f6f6e6..276aaab 100644 --- a/serverControl.cs +++ b/serverControl.cs @@ -157,7 +157,7 @@ $TWM2::BossName["Vegenor"] = "General Vegenor"; $TWM2::BossName["Insignia"] = "Major Insignia"; $TWM2::BossName["Vardison"] = "Lord Vardison"; $TWM2::BossName["DAVardison"] = "Dark Archmage Vardison"; -$TWM2::BossName["Trebor"] = "Lordranius Trevor"; +$TWM2::BossName["Trevor"] = "Lordranius Trevor"; $TWM2::BossName["GoF"] = CollapseEscape("\c7The Ghost Of Fire"); $TWM2::BossName["Stormrider"] = "Commander Stormrider"; @@ -168,7 +168,7 @@ $TWM2::BossName["CnlWindshear"] = "Colonel Windshear"; $TWM2::BossName["Vegenor"] = "General Vegenor"; $TWM2::BossName["Insignia"] = "Major Insignia"; $TWM2::BossName["Vardison"] = "Lord Vardison"; -$TWM2::BossName["Trebor"] = "Lordranius Trevor"; +$TWM2::BossName["Trevor"] = "Lordranius Trevor"; $TWM2::BossName["GhostOfFire"] = "The Ghost Of Fire"; $TWM2::BossName["Stormrider"] = "Commander Stormrider"; $TWM2::BossName["GhostOfLightning"] = "The Ghost Of Lightning"; @@ -198,7 +198,7 @@ $TWM2::BossXPAward["CnlWindshear"] = 12500; // 12500 $TWM2::BossXPAward["CnlWindshearAlly"] = 1000; // 1000 $TWM2::BossXPAward["GhostOfLightning"] = 20000; // 20000 $TWM2::BossXPAward["Vengenor"] = 25000; // 25000 -$TWM2::BossXPAward["Trebor"] = 25000; // 25000 +$TWM2::BossXPAward["Trevor"] = 25000; // 25000 $TWM2::BossXPAward["LordRog"] = 30000; // 30000 $TWM2::BossXPAward["Insignia"] = 35000; // 35000 $TWM2::BossXPAward["Stormrider"] = 45000; // 45000 From 949148fb4e2cf3b12d88830c94dd35748db491c9 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Fri, 30 Jun 2017 13:26:00 -0500 Subject: [PATCH 17/29] Forgot the readme... again, lol --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d9d83ec..7621826 100644 --- a/README.md +++ b/README.md @@ -62,9 +62,14 @@ this level of authority, please contact Phantom139 on the PGD Forums, or by emai ==== MOD DEVELOPMENT HISTORY (GIT VERSIONS): -*** NOTE: For the Legacy Changelogs, please see LEGACY CHANGELOG.md *** + +PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY CHANGELOG.md 3.9 -> 3.91 (In Progress): +* Reduced the requirement to order missions to the rank of General (49) from Commanding Officer (59) + * This change also applies to the 'From The Top' Challenge Category + * In-Game, Missions have been renamed to Operations +* Fixed the incorrect internal tags for Lordranius Trevor * Lib'd the TWM2 MainControl file and PGD Connect Support files to recover some functions * The F2 Menu now detects PGD Connected accounts and will no longer show the option to PGD Connect to already connected users * No more scary scientific notion when performing /checkstats or using the F2 menu to view player experience @@ -135,8 +140,8 @@ MOD DEVELOPMENT HISTORY (GIT VERSIONS): * Still three phases to defeat, but all phases have been adjusted * Balanced to be easier, but harder... * Four difficulty options that can be set by a global variable -* Removed Darch Archmage Vardison (Was even more so prone to crashes) -* Huge Balancing Pass on Bosses, this primarily focused on boss health, boss speed, and attack damage +* Removed Dark Archmage Vardison (Was even more so prone to crashes) +* Balancing Pass on Bosses, this primarily focused on boss health, boss speed, and attack damage * Shade Lord: * Reduced Total HP * Reduced Boss Speed From 74582a675c8048bea4154b97ddf5cea2027e0e55 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Fri, 30 Jun 2017 13:37:49 -0500 Subject: [PATCH 18/29] Fixed the UAMS Error Re-Added the file that deleted the UAMS on accident, I will relocate functioning at a later point. --- README.md | 1 - scripts/TWM2/LoadMod.cs | 25 ++-- scripts/TWM2/ModObjects/UAMS.cs | 188 ++++++++++++++++++++++++++++ scripts/TWM2/Systems/MainControl.cs | 14 +++ 4 files changed, 216 insertions(+), 12 deletions(-) create mode 100644 scripts/TWM2/ModObjects/UAMS.cs diff --git a/README.md b/README.md index 7621826..60f653a 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,6 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * Addressed the bug that would allow Vardison 2.0 to summon infinite minions * Addressed the bug with Vardison 2.0 that made his Shadow Rift invincible * Removed two un-used game objects that were never completed, the Medal Seal and the UAV Control Panel - * Note: This has inadvertently introduced a new bug causing the UAMS streak to no longer correctly function, this will be addressed before the official release of 3.91 * Removed a few erraneous exec calls to non-existent files in the mod load script * Depricated the F2 Inventory Screen (Nobody ever used this) * Fixed a few bugs in the F2 Menu diff --git a/scripts/TWM2/LoadMod.cs b/scripts/TWM2/LoadMod.cs index 932e0b1..0d0d252 100644 --- a/scripts/TWM2/LoadMod.cs +++ b/scripts/TWM2/LoadMod.cs @@ -1,10 +1,10 @@ // TWM 2, Mod Load Script, Place any Scripts To Be Executed In Here -Error("********************************************"); -Error("********************************************"); -Error("******** EXECUTING TWM2 MOD SCRIPTS ********"); -Error("********************************************"); -Error("********************************************"); +echo("********************************************"); +echo("********************************************"); +echo("******** EXECUTING TWM2 MOD SCRIPTS ********"); +echo("********************************************"); +echo("********************************************"); //Mod Systems exec("serverControl.cs"); //Server Settings @@ -35,6 +35,9 @@ exec("scripts/TWM2/Systems/weaponModes.cs"); //Global Defines for Weapon exec("scripts/TWM2/AI/DroneAI.cs"); //Drones exec("scripts/TWM2/Systems/HarbingersWrath.cs"); //Harbinger's Wrath + //Mod Objects +exec("scripts/TWM2/ModObjects/UAMS.cs"); //UAMS Missile Satellite + //Mod Dependancies exec("scripts/TWM2/loadmenu.cs"); //loadscreen @@ -134,7 +137,7 @@ BuildDeconList(); //build decon. list (con tool) exec("scripts/TWM2/Bosses/LordVardison.cs"); //load him last -error("Loading custom scripts"); +echo("Loading custom scripts"); exec("scripts/Customize/CustomScripts.cs"); schedule(5500, 0, "establishPGDConnection"); @@ -143,11 +146,11 @@ cleanChallenges(); $ChallengeIndex = 0; schedule(7000, 0, "downloadChallenges"); -Error("********************************************"); -Error("********************************************"); -Error("************* EXECUTE COMPLETE *************"); -Error("********************************************"); -Error("********************************************"); +echo("********************************************"); +echo("********************************************"); +echo("************* EXECUTE COMPLETE *************"); +echo("********************************************"); +echo("********************************************"); //POST LOAD TASKS..... //OrderStreaks(); diff --git a/scripts/TWM2/ModObjects/UAMS.cs b/scripts/TWM2/ModObjects/UAMS.cs new file mode 100644 index 0000000..c457940 --- /dev/null +++ b/scripts/TWM2/ModObjects/UAMS.cs @@ -0,0 +1,188 @@ +datablock StaticShapeData(MissileShape) : StaticShapeDamageProfile { + shapeFile = "weapon_missile_projectile.dts"; + mass = 1.0; + repairRate = 0; + dynamicType = $TypeMasks::StaticShapeObjectType; + heatSignature = 0; +}; + +function CruiseMissileVehicle::onAdd(%this, %obj) { + Parent::onAdd(%this, %obj); + setTargetSensorGroup(%obj.getTarget(), %obj.team); + + %body = new StaticShape() { + scale = "20 20 20"; + datablock = MissileShape; + }; + MissionCleanup.add(%body); + %obj.mountObject(%body, 1); + %body.vehicleMounted = %obj; + + %obj.startFade(0,100,1); +} + +function CruiseMissileVehicle::deleteAllMounted(%data, %obj) { + + %body = %obj.getMountNodeObject(1); + if(!%body) { + return; + } + %body.delete(); +} +// +function CreateMissileSat(%client, %unlim, %rem) { + if(%unlim $= "" || !%unlim) { + %unlim = 0; + %rem = 0; + } + + if($Killstreak::GunshipSpawnLocation[$CurrentMission] $= "") { + %spawn = "0 -1000 400"; + } + else { + %spawn = $Killstreak::GunshipSpawnLocation[$CurrentMission]; + } + %sat = new FlyingVehicle() { + dataBlock = UAVVehicle; + position = %spawn; + rotation = "0 0 0 1"; + team = %client.team; + }; + MissionCleanUp.add(%sat); + setTargetSensorGroup(%sat.getTarget(), %client.team); + + %sat.GoPoint = 1; + GunshipForwardImpulse(%sat); + %sat.ScanLoop = schedule(500, 0, "GetNextGunshipPoint", %sat); + %client.player.lastTransformStuff = %client.player.getTransform(); + + %sat.team = %client.Team; + %sat.setOwner(%client.player); + + %sat.canLaucnhStrike = 1; + %sat.isUnlimitedSat = %unlim; + + MessageClient(%client, 'msgSatcom', "\c3UAMS: Satellite Moving to Position, Standby...."); + + if(!%unlim) { + %client.player.setPosition(VectorAdd(%x SPC %y SPC 0,$Prison::JailPos)); + + %client.setControlObject(%sat.turretObject); + %client.schedule(499, setControlObject, %sat.turretObject); + MissileSatControlLoop(%client, %sat); + } + else { + %client.setControlObject(%sat.turretObject); + commandToClient(%client, 'ControlObjectResponse', true, getControlObjectType(%sat.turretObject,%client.player)); + } + + if(%rem) { + %sat.turretObject.setAutoFire(true); + } +} + +function FireSatHornet(%sat, %slot, %source) { + %muzzlePos = %sat.getMuzzlePoint(%slot); + %muzzleVec = %sat.getMuzzleVector(%slot); + //Fiah + spawnprojectileSourceMod(HornetStrikeMissile, SeekerProjectile, %muzzlePos, %muzzleVec, %source); + ServerPlay3d(EscapePodLaunchSound, %sat.getPosition()); + ServerPlay3d(EscapePodLaunchSound2, %sat.getPosition()); +} + +function MissileSatelliteBarrel::onFire(%data, %obj, %slot) { + //echo(%obj); + if(%obj.mountobj.canLaucnhStrike) { + %client = %obj.getControllingClient(); + %source = %client.player; //muhaha + + %obj.mountobj.canLaucnhStrike = 0; + + FireSatHornet(%obj, %slot, %source); + schedule(1500, 0, "FireSatHornet", %obj, %slot, %source); + schedule(3000, 0, "FireSatHornet", %obj, %slot, %source); + + if(!%obj.mountobj.isUnlimitedSat) { + schedule(4000, 0, "MakeCruiseMissile", %client, %obj); + schedule(4000, 0, "ServerPlay3d", EscapePodLaunchSound2, %obj.getPosition()); + } + else { + schedule(30000, 0, "ResetSat", %obj.mountobj); + // + } + } + else { + if(!%obj.mountobj.isUnlimitedSat) { + return; + } + %client = %obj.getControllingClient(); + bottomPrint(%client, "Missiles are still reloading... standby.", 2, 2); + if(isObject(%client.player) && %client.player.getState() !$= "dead") { + %client.setControlObject(%client.player); + } + } +} + +function ResetSat(%sat) { + if(isObject(%sat)) { + %sat.canLaucnhStrike = 1; + } +} + +function MakeCruiseMissile(%client, %sat) { + if(%client.getControlObject() != %sat) { + return; + } + %Missile = new FlyingVehicle() { + dataBlock = "CruiseMissileVehicle"; + scale = "1 1 1"; + team = %client.team; + mountable = "0"; //drive only + }; + + setTargetSensorGroup(%Missile.getTarget(), %Missile.team); + %Missile.setTransform(vectorAdd(%sat.getPosition(), "0 0 -5") SPC rotFromTransform(%sat.getTransform())); + + %Missile.controller = %client; + %sat.GuidedMissile = %Missile; + MissionCleanup.add(%Missile); + %client.setControlObject(%Missile); + + MissileSatGuidedLoop(%client, %Missile); +} + +//just a good function to delete the satelite if the client reliquishes control +function MissileSatControlLoop(%client, %sat) { + if(!isObject(%sat)) { + if(isObject(%client.player)) { + ReMoveClientSW(%client); + } + return; + } + if((%client.getControlObject() != %sat.turretObject) && !%sat.isUnlimitedSat) { + //lets check if they are in the missile now... + if(%client.getControlObject() == %sat.turretObject.GuidedMissile) { + //MissileSatGuidedLoop(%client, %sat.turretObject.GuidedMissile); + } + //No, they reliquished all control before the guided fired... + else { + if(isObject(%client.player)) { + ReMoveClientSW(%client); + } + } + %sat.schedule(1000, "Delete"); + return; + } + //%client.setControlObject(%sat.turretObject); + schedule(100, 0, "MissileSatControlLoop", %client, %sat); +} + +function MissileSatGuidedLoop(%client, %missile) { + if(%client.getControlObject() != %missile) { + if(isObject(%client.player)) { + ReMoveClientSW(%client); + } + return; + } + schedule(100, 0, "MissileSatGuidedLoop", %client, %missile); +} \ No newline at end of file diff --git a/scripts/TWM2/Systems/MainControl.cs b/scripts/TWM2/Systems/MainControl.cs index 9b084ca..fdcb131 100644 --- a/scripts/TWM2/Systems/MainControl.cs +++ b/scripts/TWM2/Systems/MainControl.cs @@ -228,6 +228,20 @@ function TWM2Lib_MainControl(%functionName, %arguments) { } } +function ReMoveClientSW(%client) { + if(!isObject(%client.player) || %client.player.getState() $= "dead") { + return; + } + else { + %sp = Game.pickPlayerSpawn(%client, false); + //2 sec Invincibility please? + %client.player.setInvinc(1); + %client.player.schedule(2000, "setInvinc", 0); + %client.player.setTransform(%client.player.lastTransformStuff); //%sp for new spawn + %client.setControlObject(%client.player); + } +} + function ListGUIDS() { for(%i = 0; %i < ClientGroup.getCount(); %i++) { %cl = ClientGroup.getObject(%i); From 17e5696299fe2badd26cc3a703dc181b335a12ea Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Fri, 30 Jun 2017 22:19:40 -0500 Subject: [PATCH 19/29] Some attempts to fix the camera lock glitch --- scripts/vehicles/vehicle_TacticalMissile.cs | 8 +++++++- scripts/vehicles/vehicle_ac130.cs | 2 +- scripts/vehicles/vehicle_harbingerGunship.cs | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/vehicles/vehicle_TacticalMissile.cs b/scripts/vehicles/vehicle_TacticalMissile.cs index 111baa8..26dea7e 100644 --- a/scripts/vehicles/vehicle_TacticalMissile.cs +++ b/scripts/vehicles/vehicle_TacticalMissile.cs @@ -428,13 +428,19 @@ function UAVVehicle::onAdd(%this, %obj) { %obj.turretObject = %turret; %turret.team = %obj.team; %turret.base = %obj; - %turret.mountImage(MissileSatelliteBarrel,0); + %turret.mountImage(MissileSatelliteBarrel,3); setTargetSensorGroup(%turret.getTarget(),%obj.team); %turret.setInventory(MissileLauncherAmmo, 9999, true); + %turret.setAutoFire(false); + %turret.mountImage(AIAimingTurretBarrel,0); + %turret.setCloaked(true); %obj.setCloaked(true); + + setTargetSensorGroup(%turret.getTarget(), %turret.team); + setTargetNeverVisMask(%turret.getTarget(), 0xffffffff); } function UAVVehicle::deleteAllMounted(%data, %obj) { diff --git a/scripts/vehicles/vehicle_ac130.cs b/scripts/vehicles/vehicle_ac130.cs index 1248cad..671afa1 100644 --- a/scripts/vehicles/vehicle_ac130.cs +++ b/scripts/vehicles/vehicle_ac130.cs @@ -245,7 +245,7 @@ datablock TurretData(AC130GunshipTurret) : TurretDamageProfile catagory = "Turrets"; shapeFile = "turret_belly_base.dts"; preload = true; - canControl = false; + canControl = true; cmdCategory = "Tactical"; cmdIcon = CMDFlyingBomberIcon; cmdMiniIconName = "commander/MiniIcons/com_bomber_grey"; diff --git a/scripts/vehicles/vehicle_harbingerGunship.cs b/scripts/vehicles/vehicle_harbingerGunship.cs index dffcddd..ce6895c 100644 --- a/scripts/vehicles/vehicle_harbingerGunship.cs +++ b/scripts/vehicles/vehicle_harbingerGunship.cs @@ -311,7 +311,7 @@ datablock TurretData(HarbingerGunshipTurret) : TurretDamageProfile catagory = "Turrets"; shapeFile = "turret_belly_base.dts"; preload = true; - canControl = false; + canControl = true; cmdCategory = "Tactical"; cmdIcon = CMDFlyingBomberIcon; cmdMiniIconName = "commander/MiniIcons/com_bomber_grey"; From e8f761555c25cb4de9f38c32875468622edb1ca5 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Fri, 30 Jun 2017 22:52:31 -0500 Subject: [PATCH 20/29] Boss Balancing Pass Another balancing pass to the bosses in TWM2. --- README.md | 42 ++++++++++++++++---- scripts/TWM2/Bosses/GhostOfFire.cs | 25 +++++++----- scripts/TWM2/Bosses/LordRog.cs | 26 ++++-------- scripts/TWM2/Bosses/LordYvex.cs | 14 +++---- scripts/TWM2/ModObjects/UAMS.cs | 12 ++++-- scripts/TWM2/Systems/HarbingersWrath.cs | 23 +++++------ scripts/player.cs | 2 +- scripts/vehicles/vehicle_TacticalMissile.cs | 8 +--- scripts/vehicles/vehicle_ac130.cs | 2 +- scripts/vehicles/vehicle_harbingerGunship.cs | 2 +- 10 files changed, 86 insertions(+), 70 deletions(-) diff --git a/README.md b/README.md index 60f653a..64a49bb 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * Adjusted the daily challenge script to point to the correct link, effectively re-enabling the system * Addressed the bug preventing weapon challenge progress from recording * Flipped the /help public and /help additional roles, now using /help will provide the list of accessors -* Removed all aspects of daily exp recording as we are no longer capping progression in the mod +* Removed all remaining EXP capping codes as the cap was removed in 3.9 * Re-did the Challenge Menus in the F2 Menu * Renamed Weapon Challenges to just Challenges * From this menu, players now select General Tasks or Weapon Challenges @@ -100,7 +100,7 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * TWM2 Challenge System Changes * Depricated the Blacklist Challenges, and replaced it with Wargames challenges, which are focused on PvP tasks across all modes. * Let's see who can complete some of those "tough" ones :) - * Completed the Zombie Slaying Challenges, allowing players to earn some nice healthy batches of EXP for slaying zombies + * "Finally" completed the Zombie Slaying Challenges category, zombie hunters rejoice for bonus EXP! * Added boss challenges for the bosses that did not have any: * Shade Lord * Ghost of Fire @@ -111,24 +111,52 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * Addressed the bug preventing the four Vardison challenges for specific difficulty completions from actually completing * Internally, Redid the entire challenge system to automate most of it, allowing for eally easy deployment of future challenges * Added in some cool new features for these as well for things such as hidden challenges, and embedded additional requirements -* Added in the necessary hooks to enable officer ranks 10 - 15 - * Have fun! -* Re-did the Officer Promotion windows to preview the rewards upcoming at that level + * All menus are now generated via script instead of hardcoded, making fixing issues with the system much easier +* Enabled officer ranks 10 - 15 +* Re-did the Officer Promotion windows to preview the rewards upcoming at that officer level * Added in the capability to "reset" your entire TWM2 progression upon hitting max level of Officer 15 (Max Level) - * I'm currently considering replacing this with a different system, will be decided as a 3.92 feature + * This is a temporary feature that will be replaced in 3.9.2 * Depricated the Store and Money systems, these systems will become progression based unlocks for "higher" officer levels (10 - 15) * Armor effects will not return * Armor flags will return in 3.92 * Fixed the bug with Demon Lord zombies not targeting properly * Fixed a console warning bug caused by zombie objects despawning and then calling a scan method * Shifter Zombies now have a randomzied element in their teleport method -* Plasma Torpedo Cannon now requires officer level 9 (Phantom) +* Fixed a code bug with Lord Yvex which caused his death pulse to be replaced by nightmare missiles +* Plasma Torpedo Cannon now requires officer level 9 (Was 4) * Addressed the bug preventing the challenges for reaching officer ranks from completing * Weapon Balancing Pass * Grapple Hook * Slowed down the attacher projectile a bit, lowering the range * Grapple hook now requires 60% armor energy and consumes this when firing * There is now a 5 second cooldown when firing to prevent for quick escapes +* Boss Balancing Pass + * Lord Yvex + * Health reduced to 40,000 (Was 50,000) + * Nightmare time reduced to 33% of what it was (NOTE: This change also applies to Lord Vardison) + * Nightmare damage taken is unchanged + * Yvex Healing from Nightmares reduced by 50% + * Lord Rog + * Health reduced to 50,000 (Was 65,000) + * Rog's Blade of Vengeance now only restores 1000HP (Was 2500HP) + * Removed Elite Demons from his spawning pool (These minions are reserved for Lord Vardison) + * Reduced Lord Rog's Meteor Attacks to 1 and 5 meteors respectively (Was 3 and 15) + * Static Discharge Attack + * Lord Rog freeze time increased to 8.5 seconds (Was 7 seconds) + * Inflicted freeze time reduced to 10 seconds (Was 15 seconds) + * Damage per second increased to 0.6 (Was 0.5) + * This equates to a 20% damage reduction when considering the attack duration decrease + * Laser attack now only fires 25 pulses instead of 40 + * Ghost of Fire + * Now immune to death by falling under the map + * Sorry TWM1 Vets, but this strategy is no longer going to work ;) + * 1000% armor increase to all fire damage types + * This should hammer home the point to not use fire weapons on the Ghost of Fire + * Mt. Death no longer instantly triggers (No more ear rape) + * There is now a three second delay between his attack trigger and the first pulse + * Added four additional bursts to compensate + * Reduced the amount of cursed flames spawned to 1 and 3 (Was 3 and 5) + * As a reminder folks, you can block these with Flare Grenades ;) 3.8 -> 3.9: * Progression System Adjustments diff --git a/scripts/TWM2/Bosses/GhostOfFire.cs b/scripts/TWM2/Bosses/GhostOfFire.cs index 4af2f8f..2021173 100644 --- a/scripts/TWM2/Bosses/GhostOfFire.cs +++ b/scripts/TWM2/Bosses/GhostOfFire.cs @@ -374,8 +374,9 @@ datablock PlayerData(GhostFireArmor) : MediumPlayerDamageProfile maxGrenades = 1; // Max number of different grenades the player can have maxMines = 1; // Max number of different mines the player can have - damageScale[$DamageType::plasma] = 0.05; - damageScale[$DamageType::Burn] = 0.05; + damageScale[$DamageType::plasma] = 0.001; + damageScale[$DamageType::Burn] = 0.001; + damageScale[$DamageType::Fire] = 0.001; damageScale[$DamageType::Bullet] = 0.10; //I deny you shrike n0bs // Inventory restrictions @@ -461,9 +462,13 @@ function GOFPerformMove(%ghost,%closestClient,%closestDistance) { %ghost.TargetCL = %closestClient; %ghost.DistToTarg = %closestDistance; %zposition = %ghost.getPosition(); - %Zzaxis = getword(%zposition,2); - if(%Zzaxis < $zombie::falldieheight) { - %ghost.scriptkill($DamageType::Suicide); + %z = getWord(%zposition, 2); + if(%z < -300) { + %ghost.startFade(400, 0, true); + %ghost.startFade(1000, 0, false); + %ghost.setPosition(vectorAdd(vectoradd(%closestclient.player.getPosition(), "0 0 20"), TWM2Lib_MainControl("getRandomPosition", 25 TAB 1))); + %ghost.setVelocity("0 0 0"); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoF"]@": My ghostly powers allow me to laugh aside your hopes of me falling to my death..."); } %pos = %ghost.getworldboxcenter(); %closestClient = %closestClient.Player; @@ -757,8 +762,6 @@ function GOFDoRandomAttacks(%g) { case 6: if(isObject(%target.player)) { GOFAttack_FUNC("LaunchSeekfire", %g SPC %target.player SPC 1); - GOFAttack_FUNC("LaunchSeekfire", %g SPC %target.player SPC 1500); - GOFAttack_FUNC("LaunchSeekfire", %g SPC %target.player SPC 3000); messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Clensic Flames Will Persue You "@getTaggedString(%target.name)@"!"); } else { @@ -769,8 +772,6 @@ function GOFDoRandomAttacks(%g) { GOFAttack_FUNC("LaunchSeekfire", %g SPC %target.player SPC 1); GOFAttack_FUNC("LaunchSeekfire", %g SPC %target.player SPC 1500); GOFAttack_FUNC("LaunchSeekfire", %g SPC %target.player SPC 3000); - GOFAttack_FUNC("LaunchSeekfire", %g SPC %target.player SPC 4500); - GOFAttack_FUNC("LaunchSeekfire", %g SPC %target.player SPC 6000); messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": "@getTaggedString(%target.name)@", I present to you the gift, of cursed flames..."); } else { @@ -817,10 +818,14 @@ function GOFDoRandomAttacks(%g) { case 13 or 14 or 15: if(isObject(%target.player)) { %store = %target.player.getPosition(); - GOFAttack_FUNC("Ultracano", %g SPC %store); + //GOFAttack_FUNC("Ultracano", %g SPC %store); schedule(3000, 0, GOFAttack_FUNC, "Ultracano", %g SPC %store); schedule(6000, 0, GOFAttack_FUNC, "Ultracano", %g SPC %store); schedule(9000, 0, GOFAttack_FUNC, "Ultracano", %g SPC %store); + schedule(12000, 0, GOFAttack_FUNC, "Ultracano", %g SPC %store); + schedule(15000, 0, GOFAttack_FUNC, "Ultracano", %g SPC %store); + schedule(16000, 0, GOFAttack_FUNC, "Ultracano", %g SPC %store); + schedule(17000, 0, GOFAttack_FUNC, "Ultracano", %g SPC %store); messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Rise Mt. Death... Cleanse "@getTaggedString(%target.name)@"!"); } else { diff --git a/scripts/TWM2/Bosses/LordRog.cs b/scripts/TWM2/Bosses/LordRog.cs index 02b701c..3a4a9e0 100644 --- a/scripts/TWM2/Bosses/LordRog.cs +++ b/scripts/TWM2/Bosses/LordRog.cs @@ -100,7 +100,7 @@ datablock SeekerProjectileData(LordRogStiloutte) { datablock PlayerData(LordRogZombieArmor) : LightMaleHumanArmor { boundingBox = "1.63 1.63 2.6"; - maxDamage = 650.0; + maxDamage = 500.0; minImpactSpeed = 35; shapeFile = "bioderm_heavy.dts"; @@ -342,7 +342,7 @@ function LordRogAttack_FUNC(%att, %args) { } schedule(30000, 0, LordRogAttack_FUNC, "ZombieSummon", %z); //-------------------- - %type = getRandomZombieType("1 2 3 5 9 12 13 15 17"); //omit 4 in place of 17: Demon -> Elite Demon + %type = getRandomZombieType("1 2 3 4 5 9 12 13 15"); messageall('RogMsg',"\c4"@$TWM2::ZombieName[8]@": Attack my target!"); for(%i = 0; %i < 5; %i++) { %pos = vectoradd(%z.getPosition(), TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); @@ -359,7 +359,7 @@ function LordRogAttack_FUNC(%att, %args) { return; } - %type = getRandomZombieType("1 2 3 5 9 12 13 15 17"); + %type = getRandomZombieType("1 2 3 4 5 9 12 13 15"); MessageAll('MessageAll', "\c4"@$TWM2::ZombieName[8]@": Additional Reinforcements!!! NOW!"); %typeCaller = %type SPC %type SPC %type SPC %type; %callPos = vectorAdd(%z.getPosition(), "2000 0 400"); @@ -415,7 +415,7 @@ function LordRogAttack_FUNC(%att, %args) { return; } %z.laserStormSount++; - if(%z.laserStormSount < 40) { + if(%z.laserStormSount < 25) { %vec = vectorsub(%t.getworldboxcenter(), %z.getMuzzlePoint(6)); %vec = vectoradd(%vec, vectorscale(%t.getvelocity(), vectorlen(%vec)/100)); %p = new LinearFlareProjectile() { @@ -438,8 +438,6 @@ function LordRogAttack_FUNC(%att, %args) { %fpos = vectoradd(%t.getposition(), TWM2Lib_MainControl("getRandomPosition", 50 TAB 0)); %pos2 = vectoradd(%fpos, "0 0 700"); schedule(500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(1000, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(1500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); case "MeteorOblivion": %t = getWord(%args, 0); @@ -450,16 +448,6 @@ function LordRogAttack_FUNC(%att, %args) { schedule(1500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); schedule(2000, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); schedule(2500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(3000, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(3500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(4000, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(4500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(5000, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(5500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(6000, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(6500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(7000, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); - schedule(7500, 0, spawnprojectile, JTLMeteorStormFireball, GrenadeProjectile, %pos2, "0 0 -10"); case "StaticDischarge": %z = getWord(%args, 0); @@ -467,7 +455,7 @@ function LordRogAttack_FUNC(%att, %args) { return; } %z.setMoveState(true); - %z.schedule(7000, setMoveState, false); + %z.schedule(8500, setMoveState, false); %TargetSearchMask = $TypeMasks::PlayerObjectType; %c = createEmitter(%z.getPosition(), FlashLEmitter, "1 0 0"); //Rotate it %c.schedule(1000, delete); @@ -484,7 +472,7 @@ function LordRogAttack_FUNC(%att, %args) { if(!isobject(%obj) || %obj.getState() $= "dead") { return; } - if(%obj.staticTicks > 15) { + if(%obj.staticTicks > 10) { %obj.setMoveState(false); return; } @@ -492,7 +480,7 @@ function LordRogAttack_FUNC(%att, %args) { %c.schedule(1000, delete); %obj.setMoveState(true); %obj.staticTicks++; - %obj.damage(0, %obj.getPosition(), 0.05, $DamageType::Zombie); + %obj.damage(0, %obj.getPosition(), 0.6, $DamageType::Zombie); schedule(1000, 0, LordRogAttack_FUNC, "SCDLoop", %obj); } } diff --git a/scripts/TWM2/Bosses/LordYvex.cs b/scripts/TWM2/Bosses/LordYvex.cs index 18cffa5..03297fa 100644 --- a/scripts/TWM2/Bosses/LordYvex.cs +++ b/scripts/TWM2/Bosses/LordYvex.cs @@ -402,7 +402,7 @@ datablock SeekerProjectileData(YvexZombieMakerMissile) { datablock PlayerData(YvexZombieArmor) : LightMaleHumanArmor { boundingBox = "1.63 1.63 2.6"; - maxDamage = 500.0; + maxDamage = 400.0; minImpactSpeed = 35; shapeFile = "medium_male.dts"; @@ -698,7 +698,7 @@ function YvexAttack_FUNC(%att, %args) { %vec = vectorsub(%target.getworldboxcenter(),%zombie.getMuzzlePoint(0)); %vec = vectoradd(%vec, vectorscale(%target.getvelocity(),vectorlen(%vec)/100)); %p = new LinearFlareProjectile() { - dataBlock = YvexSniperShot; + dataBlock = KillerPulse; initialDirection = %vec; initialPosition = %zombie.getMuzzlePoint(0); sourceObject = %zombie; @@ -846,7 +846,7 @@ function Yvexnightmareloop(%zombie,%viewer) { %viewer.player.setMoveState(false); return; } - if(%viewer.nightmareticks > 30) { + if(%viewer.nightmareticks > 10) { %viewer.player.setMoveState(false); %viewer.nightmareticks = 0; %viewer.nightmared = 0; @@ -859,14 +859,14 @@ function Yvexnightmareloop(%zombie,%viewer) { %viewer.player.setMoveState(true); %viewer.nightmared = 1; %viewer.player.setActionThread(%emote,true); - %viewer.player.setWhiteout(1.8); - %viewer.player.setDamageFlash(1.5); + %viewer.player.setWhiteout(0.8); + %viewer.player.setDamageFlash(0.5); %zombie.playShieldEffect("1 1 1"); serverPlay3D(NightmareScreamSound, %viewer.player.position); schedule(500,0,"Yvexnightmareloop",%zombie, %viewer); - %viewer.player.damage(0, %viewer.player.position, 0.01, $DamageType::Zombie); - %zombie.setDamageLevel(%zombie.getDamageLevel() - 0.1); + %viewer.player.damage(0, %viewer.player.position, 0.03, $DamageType::Zombie); + %zombie.setDamageLevel(%zombie.getDamageLevel() - 0.15); BottomPrint(%viewer,"You are locked in "@$TWM2::ZombieName[7]@"'s Nightmare.",5,1); schedule(1, 0, "messageclient", %viewer, 'MsgClient', "~wvoice/fem1/avo.deathcry_02.wav"); diff --git a/scripts/TWM2/ModObjects/UAMS.cs b/scripts/TWM2/ModObjects/UAMS.cs index c457940..a981ca3 100644 --- a/scripts/TWM2/ModObjects/UAMS.cs +++ b/scripts/TWM2/ModObjects/UAMS.cs @@ -49,6 +49,9 @@ function CreateMissileSat(%client, %unlim, %rem) { team = %client.team; }; MissionCleanUp.add(%sat); + %sat.TurretObject.setAutoFire(false); + %sat.getDataBlock().isMountable(%sat, false); + %sat.getDataBlock().schedule(6500, "isMountable", %sat, true); setTargetSensorGroup(%sat.getTarget(), %client.team); %sat.GoPoint = 1; @@ -62,13 +65,13 @@ function CreateMissileSat(%client, %unlim, %rem) { %sat.canLaucnhStrike = 1; %sat.isUnlimitedSat = %unlim; - MessageClient(%client, 'msgSatcom', "\c3UAMS: Satellite Moving to Position, Standby...."); + MessageClient(%client, 'msgSatcom', "\c3Command: Your UAMS is entering the area, standby for control signal..."); if(!%unlim) { %client.player.setPosition(VectorAdd(%x SPC %y SPC 0,$Prison::JailPos)); - - %client.setControlObject(%sat.turretObject); - %client.schedule(499, setControlObject, %sat.turretObject); + //Phantom: For some reason, the game will freeze turrets immediately after creation + %client.setControlObject(%sat.turretObject); + commandToClient(%client, 'ControlObjectResponse', true, getControlObjectType(%sat.turretObject,%client.player)); MissileSatControlLoop(%client, %sat); } else { @@ -173,6 +176,7 @@ function MissileSatControlLoop(%client, %sat) { %sat.schedule(1000, "Delete"); return; } + %sat.turretObject.clientControl = %client; //%client.setControlObject(%sat.turretObject); schedule(100, 0, "MissileSatControlLoop", %client, %sat); } diff --git a/scripts/TWM2/Systems/HarbingersWrath.cs b/scripts/TWM2/Systems/HarbingersWrath.cs index 5451d36..cb10a2a 100644 --- a/scripts/TWM2/Systems/HarbingersWrath.cs +++ b/scripts/TWM2/Systems/HarbingersWrath.cs @@ -51,8 +51,6 @@ function StartAC130(%client, %unmanned, %unlim) { }; MissionCleanUp.add(%obj); %obj.TurretObject.barrel = "Chain"; - %obj.TurretObject.schedule(2000, SetFrozenState, false); - %obj.TurretObject.schedule(2000, SetMoveState, false); %obj.isHarbinsWrathShip = 1; %obj.isUltrAlly = 1; // ah what the heck, you should get 1000 XP for blowing one of these @@ -69,14 +67,15 @@ function StartAC130(%client, %unmanned, %unlim) { if(!%unlim) { schedule($TWM2::GunshipControlTime*1000, 0, "EndGunship", %obj, %client); if(!%unmanned) { + %obj.TurretObject.setAutoFire(false); %obj.isKillstreakVehicle = 1; - //%client.schedule(1000, "setControlObject", %obj.turretObject); - //commandToClient(%client, 'ControlObjectResponse', true, getControlObjectType(%obj.turretObject,%client.player)); + %client.setControlObject(%obj.turretObject); + commandToClient(%client, 'ControlObjectResponse', true, getControlObjectType(%obj.turretObject,%client.player)); + %obj.turretObject.clientControl = %client; %client.gunshipControlLoop = schedule(1000, 0, "GunshipControlLoop", %client, %obj); messageClient(%client, 'msgControls', "\c3GUNSHIP: Press the [Mine] key to toggle weapons"); %client.player.lastTransformStuff = %client.player.getTransform(); - //%client.player.setPosition(VectorAdd(%x SPC %y SPC 0,$Prison::JailPos)); - %client.player.getDataBlock().onCollision(%client.player, %obj, 1); + %client.player.setPosition(VectorAdd(%x SPC %y SPC 0,$Prison::JailPos)); %client.inKillstreak = 1; } @@ -108,8 +107,6 @@ function StartHarbingersWrath(%client, %unmanned, %unlim) { }; MissionCleanUp.add(%obj); %obj.TurretObject.barrel = "Chain"; - %obj.TurretObject.schedule(2000, SetFrozenState, false); - %obj.TurretObject.schedule(2000, SetMoveState, false); %obj.isHarbinsWrathShip = 1; %obj.isUltrAlly = 1; // ah what the heck, you should get 1000 XP for blowing one of these @@ -126,14 +123,15 @@ function StartHarbingersWrath(%client, %unmanned, %unlim) { if(!%unlim) { schedule($TWM2::GunshipControlTime*1000, 0, "EndGunship", %obj, %client); if(!%unmanned) { + %obj.TurretObject.setAutoFire(false); %obj.isKillstreakVehicle = 1; - //%client.schedule(1000, "setControlObject", %obj.turretObject); - //commandToClient(%client, 'ControlObjectResponse', true, getControlObjectType(%obj.turretObject,%client.player)); + %client.setControlObject(%obj.turretObject); + commandToClient(%client, 'ControlObjectResponse', true, getControlObjectType(%obj.turretObject,%client.player)); + %obj.turretObject.clientControl = %client; %client.gunshipControlLoop = schedule(1000, 0, "GunshipControlLoop", %client, %obj); messageClient(%client, 'msgControls', "\c3GUNSHIP: Press the [Mine] key to toggle weapons"); %client.player.lastTransformStuff = %client.player.getTransform(); - //%client.player.setPosition(VectorAdd(%x SPC %y SPC 0,$Prison::JailPos)); - %client.player.getDataBlock().onCollision(%client.player, %obj, 1); + %client.player.setPosition(VectorAdd(%x SPC %y SPC 0,$Prison::JailPos)); %client.inKillstreak = 1; } @@ -174,7 +172,6 @@ function EndGunship(%obj, %client) { return; } //3.7 Dismount from gunship - %client.player.unmount(); %client.inKillstreak = 0; Cancel(%obj.ScanLoop); diff --git a/scripts/player.cs b/scripts/player.cs index e9069e1..86cb6ef 100644 --- a/scripts/player.cs +++ b/scripts/player.cs @@ -3046,7 +3046,7 @@ function Armor::onCollision(%this,%obj,%col,%forceVehicleNode) return; } %obj.scriptkill($DamageType::Admin); - %col.setDamageLevel(%col.getDamageLevel() - 25.0); + %col.setDamageLevel(%col.getDamageLevel() - 10.0); %col.setVelocity("0 0 0"); if(!%obj.iszombie) { ServerPlay3d(BOVHitSound, %obj.getPosition()); diff --git a/scripts/vehicles/vehicle_TacticalMissile.cs b/scripts/vehicles/vehicle_TacticalMissile.cs index 26dea7e..111baa8 100644 --- a/scripts/vehicles/vehicle_TacticalMissile.cs +++ b/scripts/vehicles/vehicle_TacticalMissile.cs @@ -428,19 +428,13 @@ function UAVVehicle::onAdd(%this, %obj) { %obj.turretObject = %turret; %turret.team = %obj.team; %turret.base = %obj; - %turret.mountImage(MissileSatelliteBarrel,3); + %turret.mountImage(MissileSatelliteBarrel,0); setTargetSensorGroup(%turret.getTarget(),%obj.team); %turret.setInventory(MissileLauncherAmmo, 9999, true); - %turret.setAutoFire(false); - %turret.mountImage(AIAimingTurretBarrel,0); - %turret.setCloaked(true); %obj.setCloaked(true); - - setTargetSensorGroup(%turret.getTarget(), %turret.team); - setTargetNeverVisMask(%turret.getTarget(), 0xffffffff); } function UAVVehicle::deleteAllMounted(%data, %obj) { diff --git a/scripts/vehicles/vehicle_ac130.cs b/scripts/vehicles/vehicle_ac130.cs index 671afa1..1248cad 100644 --- a/scripts/vehicles/vehicle_ac130.cs +++ b/scripts/vehicles/vehicle_ac130.cs @@ -245,7 +245,7 @@ datablock TurretData(AC130GunshipTurret) : TurretDamageProfile catagory = "Turrets"; shapeFile = "turret_belly_base.dts"; preload = true; - canControl = true; + canControl = false; cmdCategory = "Tactical"; cmdIcon = CMDFlyingBomberIcon; cmdMiniIconName = "commander/MiniIcons/com_bomber_grey"; diff --git a/scripts/vehicles/vehicle_harbingerGunship.cs b/scripts/vehicles/vehicle_harbingerGunship.cs index ce6895c..dffcddd 100644 --- a/scripts/vehicles/vehicle_harbingerGunship.cs +++ b/scripts/vehicles/vehicle_harbingerGunship.cs @@ -311,7 +311,7 @@ datablock TurretData(HarbingerGunshipTurret) : TurretDamageProfile catagory = "Turrets"; shapeFile = "turret_belly_base.dts"; preload = true; - canControl = true; + canControl = false; cmdCategory = "Tactical"; cmdIcon = CMDFlyingBomberIcon; cmdMiniIconName = "commander/MiniIcons/com_bomber_grey"; From c6163b6223d2ea77b9a3453bf9675b1dd9314e0f Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Fri, 30 Jun 2017 22:55:34 -0500 Subject: [PATCH 21/29] Nerfed redundant readme text by 100% --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 64a49bb..40395da 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,6 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * No more scary scientific notion when performing /checkstats or using the F2 menu to view player experience * Addressed a security issue regarding players who are "attempting" to load code via universal rank files. * Nice try DDDX, but your fem-phantom fantasies will NOT be happening... ;) -* Another boss balancing pass * Addressed the bug that would allow Vardison 2.0 to summon infinite minions * Addressed the bug with Vardison 2.0 that made his Shadow Rift invincible * Removed two un-used game objects that were never completed, the Medal Seal and the UAV Control Panel From fec522606f593b498d12628449f2d3172cb95745 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Sat, 1 Jul 2017 15:52:11 -0500 Subject: [PATCH 22/29] Bug fixes, removal of rank requirements on officer guns --- README.md | 4 +- scripts/TWM2/Systems/AdvancedRankSystem.cs | 139 +++++++++++---------- scripts/weapons/Other/PlasmaTorpedo.cs | 2 +- scripts/weapons/Pistols/CrimsonHawk.cs | 2 +- scripts/weapons/Rifles/PulseRifle.cs | 2 +- scripts/weapons/SMGs/PulseSMG.cs | 2 +- serverControl.cs | 3 - 7 files changed, 82 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index 40395da..3c4140b 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * Addressed the bug with Vardison 2.0 that made his Shadow Rift invincible * Removed two un-used game objects that were never completed, the Medal Seal and the UAV Control Panel * Removed a few erraneous exec calls to non-existent files in the mod load script +* Fixed a bug when users reached an EXP value over 1,000,000 that would cause all of the EXP to be processed additionally from 1,000,000 + * For example, let's say I was 900,001 and gained 100,000 EXP, I would be placed at 1,100,000 instead of the correct value of 1,000,001 * Depricated the F2 Inventory Screen (Nobody ever used this) * Fixed a few bugs in the F2 Menu * Incorrect links @@ -122,7 +124,7 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * Fixed a console warning bug caused by zombie objects despawning and then calling a scan method * Shifter Zombies now have a randomzied element in their teleport method * Fixed a code bug with Lord Yvex which caused his death pulse to be replaced by nightmare missiles -* Plasma Torpedo Cannon now requires officer level 9 (Was 4) +* Officer Weapons no longer require a rank to use, you only need to reach the officer level in question and you've got it! * Addressed the bug preventing the challenges for reaching officer ranks from completing * Weapon Balancing Pass * Grapple Hook diff --git a/scripts/TWM2/Systems/AdvancedRankSystem.cs b/scripts/TWM2/Systems/AdvancedRankSystem.cs index e9108e4..6571028 100644 --- a/scripts/TWM2/Systems/AdvancedRankSystem.cs +++ b/scripts/TWM2/Systems/AdvancedRankSystem.cs @@ -9,7 +9,7 @@ function LoadRanksBase() { } function CreateClientRankFile(%client) { - if(!isSet(%client)) { + if(!isSet(%client) || %client.guid $= "") { return; } if(%client.donotupdate) { @@ -44,72 +44,80 @@ function CreateClientRankFile(%client) { } function LoadClientRankfile(%client) { - %client.donotupdate = 0; - echo("Attempting To Load "@%client.namebase@"'s Ranks File"); - %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; - if(!isFile(%file)) { - echo(""@%client.namebase@" does not have a save file, creating one."); - CreateClientRankFile(%client); - } - else { - LoadClientFile(%client); - } - //define a new script object for the client, if it does not yet exist - %soNAME = "Container_"@%client.guid@"/TWM2Client_"@%client.guid@""; - %object = nameToId(%soNAME); - if(!isObject(%object)) { - echo("TWM2 Rank/Setting Client Controller Object is non-existant, creating"); - %client.TWM2Core = new ScriptObject("TWM2Client_"@%client.guid) {}; - %client.container.add(%client.TWM2Core); - } - else { - echo("Found TWM2 Rank/Setting Client Controller for "@%client@" -> "@%object@""); - %client.TWM2Core = %object; - } - //Check Officer Challenges. - for(%i = %client.TWM2Core.officer; %i > 0; %i--) { - %oChN = "Prestige"@%i; - CompleteNWChallenge(%client, %oChN); - } - TWM2Lib_MainControl("PlayerTimeLoop", %client); //post load functions + if(!isSet(%client) || %client.guide $= "") { + messageClient(%player.client, 'LeaveMissionArea', '\c1Alert: No GUID detected on your client object, please re-connect to the server...~wfx/misc/warning_beep.wav'); + return; + } + %client.donotupdate = 0; + echo("Attempting To Load "@%client.namebase@"'s Ranks File"); + %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; + if(!isFile(%file)) { + echo(""@%client.namebase@" does not have a save file, creating one."); + CreateClientRankFile(%client); + } + else { + LoadClientFile(%client); + } + //define a new script object for the client, if it does not yet exist + %soNAME = "Container_"@%client.guid@"/TWM2Client_"@%client.guid@""; + %object = nameToId(%soNAME); + if(!isObject(%object)) { + echo("TWM2 Rank/Setting Client Controller Object is non-existant, creating"); + %client.TWM2Core = new ScriptObject("TWM2Client_"@%client.guid) {}; + %client.container.add(%client.TWM2Core); + } + else { + echo("Found TWM2 Rank/Setting Client Controller for "@%client@" -> "@%object@""); + %client.TWM2Core = %object; + } + //Check Officer Challenges. + for(%i = %client.TWM2Core.officer; %i > 0; %i--) { + %oChN = "Prestige"@%i; + CompleteNWChallenge(%client, %oChN); + } + TWM2Lib_MainControl("PlayerTimeLoop", %client); //post load functions } function UpdateClientRank(%client) { - if(!isSet(%client) || %client.guid $= "") { - return; - } - if(%client.donotupdate) { - echo("Stopped rank up check on "@%client@", server denies access (probably loading univ rank)"); - return; - } - %scriptController = %client.TWM2Core; - if($XPArray[%client] <= 0) { - return; //kill it here, no need to go into the loop - } - if(%scriptController.officer $= "") { - %scriptController.officer = 0; - } - //anti-Hack system. - %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; - //If I ever do so implement an EXP cap, here is where it is placed - %multi = $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB TWM2Lib_MainControl("FormatTWM2Time", formattimestring("yymmdd")))]; - if(!isSet(%multi) || %multi < 1) { - %multi = 1; - } - // convert it to second form - if(!isSet(%scriptController.millionxp)) { - %scriptController.millionxp = 0; - } - if((%scriptController.xp + $XPArray[%client]) >= 1000000) { - %scriptController.xp = 0; - %scriptController.millionxp++; - } - %scriptController.xp += $XPArray[%client]; + if(!isSet(%client) || %client.guid $= "") { + return; + } + if(%client.donotupdate) { + echo("Stopped rank up check on "@%client@", server denies access (probably loading univ rank)"); + return; + } + %scriptController = %client.TWM2Core; + if($XPArray[%client] <= 0) { + return; //kill it here, no need to go into the loop + } + if(%scriptController.officer $= "") { + %scriptController.officer = 0; + } + %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; + //If I ever do so implement an EXP cap, here is where it is placed + %multi = $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB TWM2Lib_MainControl("FormatTWM2Time", formattimestring("yymmdd")))]; + if(!isSet(%multi) || %multi < 1) { + %multi = 1; + } + // convert it to second form + if(!isSet(%scriptController.millionxp)) { + %scriptController.millionxp = 0; + } + if((%scriptController.xp + $XPArray[%client]) >= 1000000) { + %scriptController.xp = 0; + %scriptController.millionxp++; + $XPArray[%client] = (%scriptController.xp + $XPArray[%client]) - 1000000; + if($XPArray[%client] < 0) { + //Hmmm.... something wierd going on here... + $XPArray[%client] = 0; + } + } + %scriptController.xp += $XPArray[%client]; - checkForXPAwards(%client); - $XPArray[%client] = 0; - %j = $Rank::RankCount; - runRankUpdateLoop(%client, %j, 1); + checkForXPAwards(%client); + $XPArray[%client] = 0; + %j = $Rank::RankCount; + runRankUpdateLoop(%client, %j, 1); } function runRankUpdateLoop(%client, %j, %continue) { @@ -136,6 +144,9 @@ function runRankUpdateLoop(%client, %j, %continue) { messageclient(%client, 'Msgclient', "~wfx/Bonuses/Nouns/General.wav"); bottomPrint(%client, "Excelent work "@%name@", you have been promoted to the rank of: "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@"!", 5, 2 ); echo("Promotion: "@%name@" to Rank "@$Ranks::NewRank[%j]@", XP: "@getCurrentEXP(%client)@"."); + if(%j == $Rank::RankCount && %scriptController.officer < $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) { + messageclient(%client, 'Msgclient', "\c5Congratulations, you have reached the maximum rank in TWM2 and have unlocked the ability to enter an officer rank. To proceed, open the [F2] menu and select the Settings option."); + } SaveClientFile(%client); // if(!$TWM2::PGDConnectDisabled) { @@ -294,7 +305,7 @@ function GainExperience(%client, %variable, %tagToGain) { %variable = mFloor(%variable); // if(%multi > 1) { - messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP (X"@%multi@")"); + messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP (Bonus Multiplier: "@%multi@")"); } else { messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP"); diff --git a/scripts/weapons/Other/PlasmaTorpedo.cs b/scripts/weapons/Other/PlasmaTorpedo.cs index d72c793..055f365 100644 --- a/scripts/weapons/Other/PlasmaTorpedo.cs +++ b/scripts/weapons/Other/PlasmaTorpedo.cs @@ -50,7 +50,7 @@ datablock ShapeBaseImageData(PlasmaTorpedoImage) { emap = true; - RankRequire = $TWM2::RankRequire["SCD343"]; + //RankRequire = $TWM2::RankRequire["SCD343"]; PrestigeRequire = 9; HasChallenges = 1; diff --git a/scripts/weapons/Pistols/CrimsonHawk.cs b/scripts/weapons/Pistols/CrimsonHawk.cs index cd1ad91..1b7ac09 100644 --- a/scripts/weapons/Pistols/CrimsonHawk.cs +++ b/scripts/weapons/Pistols/CrimsonHawk.cs @@ -90,7 +90,7 @@ datablock ShapeBaseImageData(CrimsonHawkImage) HellClipCount = 10; // - RankRequire = $TWM2::RankRequire["CrimsonHawk"]; + //RankRequire = $TWM2::RankRequire["CrimsonHawk"]; PrestigeRequire = 5; //Challenges diff --git a/scripts/weapons/Rifles/PulseRifle.cs b/scripts/weapons/Rifles/PulseRifle.cs index 1a0f565..966fd4f 100644 --- a/scripts/weapons/Rifles/PulseRifle.cs +++ b/scripts/weapons/Rifles/PulseRifle.cs @@ -87,7 +87,7 @@ datablock ShapeBaseImageData(PulseRifleImage) GunName = "Pulse Semi-Automatic Rifle"; // - RankRequire = $TWM2::RankRequire["G41"]; + //RankRequire = $TWM2::RankRequire["G41"]; PrestigeRequire = 2; casing = ShellDebris; diff --git a/scripts/weapons/SMGs/PulseSMG.cs b/scripts/weapons/SMGs/PulseSMG.cs index 4d6f748..90f2967 100644 --- a/scripts/weapons/SMGs/PulseSMG.cs +++ b/scripts/weapons/SMGs/PulseSMG.cs @@ -94,7 +94,7 @@ datablock ShapeBaseImageData(PulseSMGImage) Upgrade[3] = "Silencer"; GunName = "Pulse SMG"; - RankRequire = $TWM2::RankRequire["Pg700"]; + //RankRequire = $TWM2::RankRequire["Pg700"]; PrestigeRequire = 3; casing = ShellDebris; diff --git a/serverControl.cs b/serverControl.cs index 276aaab..74d028e 100644 --- a/serverControl.cs +++ b/serverControl.cs @@ -156,7 +156,6 @@ $TWM2::BossName["GoL"] = "The Ghost Of Lightning"; $TWM2::BossName["Vegenor"] = "General Vegenor"; $TWM2::BossName["Insignia"] = "Major Insignia"; $TWM2::BossName["Vardison"] = "Lord Vardison"; -$TWM2::BossName["DAVardison"] = "Dark Archmage Vardison"; $TWM2::BossName["Trevor"] = "Lordranius Trevor"; $TWM2::BossName["GoF"] = CollapseEscape("\c7The Ghost Of Fire"); $TWM2::BossName["Stormrider"] = "Commander Stormrider"; @@ -204,7 +203,6 @@ $TWM2::BossXPAward["Insignia"] = 35000; // 35000 $TWM2::BossXPAward["Stormrider"] = 45000; // 45000 $TWM2::BossXPAward["GhostOfFire"] = 65000; // 65000 $TWM2::BossXPAward["ShadeLord"] = 70000; // 70000 -$TWM2::BossXPAward["DAVardison"] = 75000; // 75000 $TWM2::BossXPAward["Vardison3"] = 75000; // 75000 $Host::UseDevelopersList = 1; @@ -261,7 +259,6 @@ $TWM2::RankRequire["M4A1"] = 15; $TWM2::RankRequire["SCD343"] = 59; $TWM2::RankRequire["P90"] = 56; $TWM2::RankRequire["ALSWP"] = 49; -$TWM2::RankRequire["CrimsonHawk"] = 61; $TWM2::RankRequire["Stinger"] = 30; $TWM2::RankRequire["MRXX"] = 35; $TWM2::RankRequire["NapalmLauncher"] = 42; From ed25ab2dcacf3270fe6477f0a3be6d827d1144ff Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Sat, 1 Jul 2017 16:06:02 -0500 Subject: [PATCH 23/29] Fixes, 3.9.2 Prep Work Fixed the PvP Zombie Kills challenge bug, installed challenges for upcoming 3.9.2 Killstreaks --- scripts/RankStuff.cs | 2 +- scripts/TWM2/Systems/Killstreak.cs | 3 + scripts/TWM2/Systems/NWChallengeIndex.cs | 64 ++++++++++++-------- scripts/TWM2/Zombie/PlayerZombieFunctions.cs | 1 + scripts/player.cs | 2 +- 5 files changed, 45 insertions(+), 27 deletions(-) diff --git a/scripts/RankStuff.cs b/scripts/RankStuff.cs index 790a2b6..f114808 100644 --- a/scripts/RankStuff.cs +++ b/scripts/RankStuff.cs @@ -27,7 +27,7 @@ $Prestige::Rewards[5] = "Silver Armor Flag, Crimson Hawk"; $Prestige::Rewards[6] = "Blue Armor Flag"; $Prestige::Rewards[7] = "Red Armor Flag"; $Prestige::Rewards[8] = "Green Armor Flag"; -$Prestige::Rewards[9] = "Plasma Torpedo Cannon"; +$Prestige::Rewards[9] = "PulseStar Strike, Plasma Torpedo Cannon"; $Prestige::Rewards[10] = "Dartanian Elite Armor, Incendiary Cannon"; $Prestige::Rewards[11] = "VMC9 Gravity Cannon"; $Prestige::Rewards[12] = "DDV4 Plasma Launcher"; diff --git a/scripts/TWM2/Systems/Killstreak.cs b/scripts/TWM2/Systems/Killstreak.cs index 7ed42a7..12c7ba7 100644 --- a/scripts/TWM2/Systems/Killstreak.cs +++ b/scripts/TWM2/Systems/Killstreak.cs @@ -17,6 +17,9 @@ $Killstreak[14] = "Arrow IV Nuke Strike\t"@$Killstreak::Kills["Nuke", 0]@"\t"@$K $Killstreak[15] = "Z-Bomb\t-1\t"@$Killstreak::Kills["ZBomb", 1]@"\tWipe out all zombies (not bosses) in a flash."; $Killstreak[16] = "Fission Bomb\t"@$Killstreak::Kills["Fission", 0]@"\t-1\t(Matches) End the game with an explosive bang."; $Killstreak[17] = "Napalm Airstrike\t"@$Killstreak::Kills["Napalm", 0]@"\t"@$Killstreak::Kills["Napalm", 1]@"\tQuick destructive airstrike with remaining fire."; +//Coming Soon 3.9.2 +//$Killstreak[18] = "PulseStar Shield System\t"@$Killstreak::Kills["PulseStar", 0]@"\t"@$Killstreak::Kills["PulseStar", 1]@"\tAirdrop an advanced Harbinger shield system."; +//$Killstreak[19] = "LOAS\t"@$Killstreak::Kills["LOAS", 0]@"\t"@$Killstreak::Kills["LOAS", 1]@"\tControl a localized satellite to direct high powered explosive rod strikes."; //Phantom: V3.9: Order the streaks based on killcounts... function OrderStreaks() { diff --git a/scripts/TWM2/Systems/NWChallengeIndex.cs b/scripts/TWM2/Systems/NWChallengeIndex.cs index 3387b46..9e128af 100644 --- a/scripts/TWM2/Systems/NWChallengeIndex.cs +++ b/scripts/TWM2/Systems/NWChallengeIndex.cs @@ -127,21 +127,30 @@ $Challenge::Challenge[1, 44] = "Nuke3"; $Challenge::Info["Nuke3"] = "Nuke Expert III\t1\t50000\tZ-Bomb Killstreak\tCall in 25 Nukes"; $Challenge::Challenge[1, 45] = "Fission1"; $Challenge::SetRequirement[1, 45] = "Officer 1"; -$Challenge::Info["Fission1"] = "Fission Bomb Expert I\t1\t25000\tNone\tCall in 1 Fission Bomb"; +$Challenge::Info["Fission1"] = "Fission Bomb Expert I\t1\t25000\tNone\tCall in a Fission Bomb"; $Challenge::Challenge[1, 46] = "Fission2"; $Challenge::SetRequirement[1, 46] = "Officer 1"; -$Challenge::Info["Fission2"] = "Fission Bomb Expert II\t1\t50000\tNone\tCall in 2 Fission Bomb"; +$Challenge::Info["Fission2"] = "Fission Bomb Expert II\t1\t50000\tNone\tCall in 2 Fission Bombs"; $Challenge::Challenge[1, 47] = "Fission3"; $Challenge::SetRequirement[1, 47] = "Officer 1"; -$Challenge::Info["Fission3"] = "Fission Bomb Expert III\t1\t75000\tNone\tCall in 5 Fission Bomb"; -$Challenge::Challenge[1, 48] = "LOAS1"; -$Challenge::SetRequirement[1, 48] = "Officer 15"; +$Challenge::Info["Fission3"] = "Fission Bomb Expert III\t1\t75000\tNone\tCall in 5 Fission Bombs"; +$Challenge::Challenge[1, 48] = "PulseStar1"; +$Challenge::SetRequirement[1, 48] = "Officer 9"; +$Challenge::Info["PulseStar1"] = "PulseStar Expert I\t1\t5000\tNone\tCall in 15 PulseStar Shield Systems"; +$Challenge::Challenge[1, 49] = "PulseStar2"; +$Challenge::SetRequirement[1, 49] = "Officer 9"; +$Challenge::Info["PulseStar2"] = "PulseStar Expert II\t1\t10000\tNone\tCall in 30 PulseStar Shield Systems"; +$Challenge::Challenge[1, 50] = "PulseStar3"; +$Challenge::SetRequirement[1, 50] = "Officer 9"; +$Challenge::Info["PulseStar3"] = "PulseStar Expert III\t1\t25000\tNone\tCall in 50 PulseStar Shield Systems"; +$Challenge::Challenge[1, 51] = "LOAS1"; +$Challenge::SetRequirement[1, 51] = "Officer 15"; $Challenge::Info["LOAS1"] = "LOAS Expert I\t1\t25000\tNone\tCall in 5 Low Orbit Orbital Strikes (LOAS)"; -$Challenge::Challenge[1, 49] = "LOAS2"; -$Challenge::SetRequirement[1, 49] = "Officer 15"; +$Challenge::Challenge[1, 52] = "LOAS2"; +$Challenge::SetRequirement[1, 52] = "Officer 15"; $Challenge::Info["LOAS2"] = "LOAS Expert II\t1\t50000\tNone\tCall in 10 Low Orbit Orbital Strikes (LOAS)"; -$Challenge::Challenge[1, 50] = "LOAS3"; -$Challenge::SetRequirement[1, 50] = "Officer 15"; +$Challenge::Challenge[1, 53] = "LOAS3"; +$Challenge::SetRequirement[1, 53] = "Officer 15"; $Challenge::Info["LOAS3"] = "LOAS Expert III\t1\t75000\tNone\tCall in 15 Low Orbit Orbital Strikes (LOAS)"; //Bosses @@ -518,98 +527,103 @@ $Challenge::Category[12] = "Officer Challenges\tTasks related to officer ranks a $Challenge::Challenge[12, 0] = "Prestige1"; $Challenge::SetHidden[12, 0] = true; -$Challenge::HiddenMessage[12, 0] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 0] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige1"] = true; $Challenge::Info["Prestige1"] = "Instructive Officer\t12\t100\tNone\tReach Officer Level 1"; $Challenge::Challenge[12, 1] = "Prestige2"; $Challenge::SetHidden[12, 1] = true; -$Challenge::HiddenMessage[12, 1] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 1] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige2"] = true; $Challenge::Info["Prestige2"] = "Excelling Officer\t12\t250\tNone\tReach Officer Level 2"; $Challenge::Challenge[12, 2] = "Prestige3"; $Challenge::SetHidden[12, 2] = true; -$Challenge::HiddenMessage[12, 2] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 2] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige3"] = true; $Challenge::Info["Prestige3"] = "Champion Officer\t12\t350\tNone\tReach Officer Level 3"; $Challenge::Challenge[12, 3] = "Prestige4"; $Challenge::SetHidden[12, 3] = true; -$Challenge::HiddenMessage[12, 3] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 3] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige4"] = true; $Challenge::Info["Prestige4"] = "Prestigious Officer\t12\t500\tNone\tReach Officer Level 4"; $Challenge::Challenge[12, 4] = "Prestige5"; $Challenge::SetHidden[12, 4] = true; -$Challenge::HiddenMessage[12, 4] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 4] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige5"] = true; $Challenge::Info["Prestige5"] = "Supreme Officer\t12\t1000\tNone\tReach Officer Level 5"; $Challenge::Challenge[12, 5] = "Prestige6"; $Challenge::SetHidden[12, 5] = true; -$Challenge::HiddenMessage[12, 5] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 5] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige6"] = true; $Challenge::Info["Prestige6"] = "Glorious Officer\t12\t2500\tNone\tReach Officer Level 6"; $Challenge::Challenge[12, 6] = "Prestige7"; $Challenge::SetHidden[12, 6] = true; -$Challenge::HiddenMessage[12, 6] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 6] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige7"] = true; $Challenge::Info["Prestige7"] = "Ultimate Officer\t12\t5000\tNone\tReach Officer Level 7"; $Challenge::Challenge[12, 7] = "Prestige8"; $Challenge::SetHidden[12, 7] = true; -$Challenge::HiddenMessage[12, 7] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 7] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige8"] = true; $Challenge::Info["Prestige8"] = "Shadowing Officer\t12\t7500\tNone\tReach Officer Level 8"; $Challenge::Challenge[12, 8] = "Prestige9"; $Challenge::SetHidden[12, 8] = true; -$Challenge::HiddenMessage[12, 8] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 8] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige9"] = true; $Challenge::Info["Prestige9"] = "Phantom Officer\t12\t10000\tNone\tReach Officer Level 9"; $Challenge::Challenge[12, 9] = "Prestige10"; $Challenge::SetHidden[12, 9] = true; -$Challenge::HiddenMessage[12, 9] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 9] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige10"] = true; $Challenge::Info["Prestige10"] = "Brutal Officer\t12\t10000\tNone\tReach Officer Level 10"; $Challenge::Challenge[12, 10] = "Prestige11"; $Challenge::SetHidden[12, 10] = true; -$Challenge::HiddenMessage[12, 10] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 10] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige11"] = true; $Challenge::Info["Prestige11"] = "Vengeful Officer\t12\t10000\tNone\tReach Officer Level 11"; $Challenge::Challenge[12, 11] = "Prestige12"; $Challenge::SetHidden[12, 11] = true; -$Challenge::HiddenMessage[12, 11] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 11] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige12"] = true; $Challenge::Info["Prestige12"] = "Spectral Officer\t12\t10000\tNone\tReach Officer Level 12"; $Challenge::Challenge[12, 12] = "Prestige13"; $Challenge::SetHidden[12, 12] = true; -$Challenge::HiddenMessage[12, 12] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 12] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige13"] = true; $Challenge::Info["Prestige13"] = "Noble Officer\t12\t10000\tNone\tReach Officer Level 13"; $Challenge::Challenge[12, 13] = "Prestige14"; $Challenge::SetHidden[12, 13] = true; -$Challenge::HiddenMessage[12, 13] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 13] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige14"] = true; $Challenge::Info["Prestige14"] = "Masterful Officer\t12\t10000\tNone\tReach Officer Level 14"; $Challenge::Challenge[12, 14] = "Prestige15"; $Challenge::SetHidden[12, 14] = true; -$Challenge::HiddenMessage[12, 14] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; +$Challenge::HiddenMessage[12, 14] = "=== CLASSIFIED: REQUIRES CLEARANCE ==="; $Challenge::IsNotMultiTier["Prestige15"] = true; $Challenge::Info["Prestige15"] = "Rising Harbinger\t12\t10000\tNone\tReach The Highest Officer Level (15)"; $Challenge::Challenge[12, 15] = "GameEnder"; $Challenge::IsNotMultiTier["GameEnder"] = true; $Challenge::Info["GameEnder"] = "Game Ender\t12\t5000\tNone\tUse a Fission Bomb to end a game"; - +$Challenge::Challenge[12, 16] = "CastleWalls"; +$Challenge::IsNotMultiTier["CastleWalls"] = true; +$Challenge::Info["CastleWalls"] = "Castle Walls\t12\t15000\tNone\tAbsorb 100 enemy rounds with a single PulseStar Shield System"; +$Challenge::Challenge[12, 17] = "OrbitalDeath"; +$Challenge::IsNotMultiTier["OrbitalDeath"] = true; +$Challenge::Info["OrbitalDeath"] = "Orbital Death Dealer\t12\t20000\tNone\tEliminate 15 enemy players or 50 zombies with a single LOAS strike"; //CORE diff --git a/scripts/TWM2/Zombie/PlayerZombieFunctions.cs b/scripts/TWM2/Zombie/PlayerZombieFunctions.cs index 10f8666..d86e919 100644 --- a/scripts/TWM2/Zombie/PlayerZombieFunctions.cs +++ b/scripts/TWM2/Zombie/PlayerZombieFunctions.cs @@ -205,6 +205,7 @@ function DoZombPlayerMaker(%client, %type) { } // %player.zombieType = %type; + %player.isPlayerZombie = true; ZombieGroup.add(%player); return %player TAB %function; diff --git a/scripts/player.cs b/scripts/player.cs index 86cb6ef..5f30f01 100644 --- a/scripts/player.cs +++ b/scripts/player.cs @@ -3681,7 +3681,7 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am } } // - if(%targetObject.getControllingClient() !$= "") { + if(%targetObject.isPlayerZombie) { %sourceClient.TWM2Core.PvPZombieKills++; if(%sourceClient.TWM2Core.PvPZombieKills >= 100) { CompleteNWChallenge(%sourceClient, "Defectionator1"); From fa84b01691db7bd97135a2d24bf10aaf13bcf858 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Sat, 1 Jul 2017 16:13:14 -0500 Subject: [PATCH 24/29] Fixed a silly mistake --- scripts/TWM2/Systems/AdvancedRankSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/TWM2/Systems/AdvancedRankSystem.cs b/scripts/TWM2/Systems/AdvancedRankSystem.cs index 6571028..94744cb 100644 --- a/scripts/TWM2/Systems/AdvancedRankSystem.cs +++ b/scripts/TWM2/Systems/AdvancedRankSystem.cs @@ -44,8 +44,8 @@ function CreateClientRankFile(%client) { } function LoadClientRankfile(%client) { - if(!isSet(%client) || %client.guide $= "") { - messageClient(%player.client, 'LeaveMissionArea', '\c1Alert: No GUID detected on your client object, please re-connect to the server...~wfx/misc/warning_beep.wav'); + if(!isSet(%client) || %client.guid $= "") { + messageClient(%client, 'LeaveMissionArea', '\c1Alert: No GUID detected on your client object, please re-connect to the server...~wfx/misc/warning_beep.wav'); return; } %client.donotupdate = 0; From 04f85e58a6898c348dbb1106205cceedb1144325 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Sat, 1 Jul 2017 22:46:11 -0500 Subject: [PATCH 25/29] Addressed some bugs caught during playtime today --- scripts/TWM2/Bosses/LordYvex.cs | 7 ++++--- scripts/TWM2/Systems/WeaponChallenges.cs | 2 +- scripts/projectiles.cs | 10 ++++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/TWM2/Bosses/LordYvex.cs b/scripts/TWM2/Bosses/LordYvex.cs index 03297fa..788e5be 100644 --- a/scripts/TWM2/Bosses/LordYvex.cs +++ b/scripts/TWM2/Bosses/LordYvex.cs @@ -629,9 +629,10 @@ function YvexAttacks(%yvex) { if(!isObject(%yvex) || %yvex.getState() $= "dead") { return; } - %closestClient = ZombieLookForTarget(%zombie); - %closestDistance = getWord(%closestClient,1); + %closestClient = ZombieLookForTarget(%yvex); + //%closestDistance = getWord(%closestClient,1); %closestClient = getWord(%closestClient,0).Player; + %closestDistance = vectorDist(%yvex.getPosition(), %closestClient.getPosition()); if(%closestClient) { if(%closestDistance <= 150) { @@ -885,7 +886,7 @@ function Yvexnightmareloop(%zombie,%viewer) { } function KillerPulse::onCollision(%data,%projectile,%targetObject,%modifier,%position,%normal) { - if (%targetObject.getClassName() $= "Player" && %targetObject.isBoss) { + if (%targetObject.getClassName() $= "Player" && !%targetObject.isBoss) { messageall('msgkillcurse', "\c5"@getTaggedString(%targetObject.client.name)@" Took a fatal Hit from "@$TWM2::ZombieName[7]@"'s Dark Energy"); %targetObject.throwWeapon(); %targetObject.clearinventory(); diff --git a/scripts/TWM2/Systems/WeaponChallenges.cs b/scripts/TWM2/Systems/WeaponChallenges.cs index 51855cb..08175dc 100644 --- a/scripts/TWM2/Systems/WeaponChallenges.cs +++ b/scripts/TWM2/Systems/WeaponChallenges.cs @@ -158,7 +158,7 @@ function GenerateCompletedChallegnesMenu(%client, %tag, %index) { %Image = %db.getName().image; if(%Image.HasChallenges) { if(DoMedalCheck(%client, %image) == 1 && CanUseRankedWeapon(%image, %client) == 1) { - messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%Image.GunName@""); + messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%Image.GunName@""); %index++; } else { diff --git a/scripts/projectiles.cs b/scripts/projectiles.cs index ad91d45..269d354 100644 --- a/scripts/projectiles.cs +++ b/scripts/projectiles.cs @@ -17,8 +17,14 @@ // function ProjectileData::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal) { if(isObject(%targetObject)) { // Console spam fix - ToS. z0ddm0d - if(!(%targetObject.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) && (%targetObject.getDataBlock().getClassName() $= "PlayerData")) { - %damLoc = firstWord(%targetObject.getDamageLocation(%position)); + if(!(%targetObject.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) + && (%targetObject.getType() & ($TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType))) { + if(%targetObject.getType() & $TypeMasks::PlayerObjectType) { + %damLoc = firstWord(%targetObject.getDamageLocation(%position)); + } + else { + %damLoc = ""; + } %test = TWM2Damage(%projectile, %targetObject, %data.directDamage, %data.directDamageType, %damLoc, "projectile"); if(%test == 0) { return; From 66218bf83ba46c8ef98218b97ec7f4716ca2e048 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Sun, 2 Jul 2017 22:29:53 -0500 Subject: [PATCH 26/29] Prep for July 4th Added in the necessary hooks to the daily challenge system for the July 4th event. --- JTLdelDSO.bat | 2 + scripts/HordeGame.cs | 6 + scripts/TWM2/Systems/DChalg.cs | 410 ++++++++++++----------- scripts/TWM2/Systems/MainControl.cs | 13 +- scripts/TWM2/Systems/WeaponChallenges.cs | 2 - 5 files changed, 230 insertions(+), 203 deletions(-) create mode 100644 JTLdelDSO.bat diff --git a/JTLdelDSO.bat b/JTLdelDSO.bat new file mode 100644 index 0000000..aa5743c --- /dev/null +++ b/JTLdelDSO.bat @@ -0,0 +1,2 @@ +del /s /q "..\base\*.dso" +del /s /q "*.dso" diff --git a/scripts/HordeGame.cs b/scripts/HordeGame.cs index 3d6818f..05759e8 100644 --- a/scripts/HordeGame.cs +++ b/scripts/HordeGame.cs @@ -427,6 +427,12 @@ function HordeNextWave(%game, %wave) { $HordeGame::RevivesLeft++; } $HordeGame::CurrentWave = %wave; + for(%i = 0; %i < ClientGroup.getCount(); %i++) { + %cl = ClientGroup.getObject(%i); + if(%wave != 1) { + recordAction(%cl, "HORDEWAVE", %wave-1); + } + } HordeKillAllZombies(); //Cleans up the server if($HordeGame::CurrentWave == 51) { //Victory for (%i = 0; %i < ClientGroup.getCount(); %i++) { diff --git a/scripts/TWM2/Systems/DChalg.cs b/scripts/TWM2/Systems/DChalg.cs index 79ff052..7e085e0 100644 --- a/scripts/TWM2/Systems/DChalg.cs +++ b/scripts/TWM2/Systems/DChalg.cs @@ -127,80 +127,86 @@ function doChallengeKillRecording(%sourceObject, %targetObject) { } function recordAction(%client, %action, %variables) { - %ymd = formattimestring("yymmdd"); - %so = %client.TWM2Controller; - //echo(""@%client@" - "@%action@" - "@%variables@""); - // - switch$(%action) { - case "CCMP": - %so.completed[getField(%variables, 0), %ymd] = getField(%variables, 1); - case "BOSS": - %so.bossSlayCount[getField(%variables, 0), %ymd] += 1; - case "PKC": - //player kill count - if(getField(%variables, 0) $= "total") { - %so.totalPlayerKillCount[%ymd] += getField(%variables, 1); - } - else { - %so.PlayerKillCount[%ymd, getField(%variables, 1)] += getField(%variables, 2); - } - case "ZKC": - if(getField(%variables, 0) $= "total") { - %so.totalZombieKillCount[%ymd] += getField(%variables, 1); - } - else { - //a 3-case would have all of these filed - if(!isSet(getField(%variables, 3))) { - %so.ZombieKillCount[%ymd, 0, getField(%variables, 1)] += getField(%variables, 2); - } - else { - %so.ZombieKillCount[%ymd, getField(%variables, 1), getField(%variables, 2)] += getField(%variables, 3); - } - } - case "HSC": - if(getField(%variables, 0) !$= "zombie") { - %so.playerHeadshots[%ymd] += getField(%variables, 1); - } - else { - %so.zombieHeadshots[%ymd] += getField(%variables, 1); - } - case "KSCC": - %so.killstreakCalls[%ymd, getField(%variables, 0)] += getField(%variables, 1); - case "KSKC": - %so.killstreakKills[%ymd, getField(%variables, 0)] += getField(%variables, 1); - case "SKC": - %so.successiveSolo[%ymd, getField(%variables, 0)] += getField(%variables, 1); - case "SKSC": - %so.successiveStreak[%ymd, getField(%variables, 0)] += getField(%variables, 1); - case "BOMBARM": - %so.bombArm[%ymd, $CurrentMission] += 1; - %so.bombArmTotal[%ymd] += 1; - case "BOMBDIS": - %so.bombDisarm[%ymd, $CurrentMission] += 1; - %so.bombDisarmTotal[%ymd] += 1; - case "SABWIN": - %so.sabotageRoundWins[%ymd, $CurrentMission] += 1; - %so.sabotageRoundWinTotal[%ymd] += 1; - case "AREACAP": - %so.areaCapture[%ymd, $CurrentMission] += 1; - %so.areaCaptureTotal[%ymd] += 1; - case "DOMWIN": - %so.dominationRoundWins[%ymd, $CurrentMission] += 1; - %so.dominationRoundWinTotal[%ymd] += 1; - case "EXPGAIN": - %so.dailyEXPGain[%ymd] += getField(%variables, 0); - case "BACK": - if(getField(%variables, 0) $= "zombie") { - %so.zombieBackstabs[%ymd] += 1; - } - else { - %so.playerBackstabs[%ymd] += 1; - } - default: - //no action recorded - } - allCheckCompletion(%client); - updateChallengeFile(%client); + %ymd = formattimestring("yymmdd"); + %so = %client.TWM2Controller; + //echo(""@%client@" - "@%action@" - "@%variables@""); + // + switch$(%action) { + case "CCMP": + %so.completed[getField(%variables, 0), %ymd] = getField(%variables, 1); + case "BOSS": + %so.bossSlayCount[getField(%variables, 0), %ymd] += 1; + case "PKC": + //player kill count + if(getField(%variables, 0) $= "total") { + %so.totalPlayerKillCount[%ymd] += getField(%variables, 1); + } + else { + %so.PlayerKillCount[%ymd, getField(%variables, 1)] += getField(%variables, 2); + } + case "ZKC": + if(getField(%variables, 0) $= "total") { + %so.totalZombieKillCount[%ymd] += getField(%variables, 1); + } + else { + //a 3-case would have all of these filed + if(!isSet(getField(%variables, 3))) { + %so.ZombieKillCount[%ymd, 0, getField(%variables, 1)] += getField(%variables, 2); + } + else { + %so.ZombieKillCount[%ymd, getField(%variables, 1), getField(%variables, 2)] += getField(%variables, 3); + } + } + case "HSC": + if(getField(%variables, 0) !$= "zombie") { + %so.playerHeadshots[%ymd] += getField(%variables, 1); + } + else { + %so.zombieHeadshots[%ymd] += getField(%variables, 1); + } + case "KSCC": + %so.killstreakCalls[%ymd, getField(%variables, 0)] += getField(%variables, 1); + case "KSKC": + %so.killstreakKills[%ymd, getField(%variables, 0)] += getField(%variables, 1); + case "SKC": + %so.successiveSolo[%ymd, getField(%variables, 0)] += getField(%variables, 1); + case "SKSC": + %so.successiveStreak[%ymd, getField(%variables, 0)] += getField(%variables, 1); + case "BOMBARM": + %so.bombArm[%ymd, $CurrentMission] += 1; + %so.bombArmTotal[%ymd] += 1; + case "BOMBDIS": + %so.bombDisarm[%ymd, $CurrentMission] += 1; + %so.bombDisarmTotal[%ymd] += 1; + case "SABWIN": + %so.sabotageRoundWins[%ymd, $CurrentMission] += 1; + %so.sabotageRoundWinTotal[%ymd] += 1; + case "AREACAP": + %so.areaCapture[%ymd, $CurrentMission] += 1; + %so.areaCaptureTotal[%ymd] += 1; + case "HORDEWAVE": + %so.totalHordeWavesCompleted[%ymd] += 1; + %cWave = getField(%variables, 0); + if(%cWave > %so.highestHordeWave[%ymd]) { + %so.highestHordeWave[%ymd] = %cWave; + } + case "DOMWIN": + %so.dominationRoundWins[%ymd, $CurrentMission] += 1; + %so.dominationRoundWinTotal[%ymd] += 1; + case "EXPGAIN": + %so.dailyEXPGain[%ymd] += getField(%variables, 0); + case "BACK": + if(getField(%variables, 0) $= "zombie") { + %so.zombieBackstabs[%ymd] += 1; + } + else { + %so.playerBackstabs[%ymd] += 1; + } + default: + //no action recorded + } + allCheckCompletion(%client); + updateChallengeFile(%client); } function cleanChallenges() { @@ -239,129 +245,139 @@ function allCheckCompletion(%client) { } function checkCompletion(%client, %cID) { - %challenge = $Challenges::Challenge[%cID]; - %cType = trim(getField(%challenge, 0)); - %cCond = getsubstr(getField(%challenge, 3), 1, strlen(getField(%challenge, 3))); - %so = %client.TWM2Controller; - %dateStr = formattimestring("yymmdd"); - //cannot complete the same one twice :P - if(%so.completed[%cid, %dateStr]) { - return; - } - // - switch$(getWord(%cCond, 0)) { - case "E": - %killCount = getWord(%cCond, 1); - %killDB = getWord(%cCond, 2) $= "A" ? 0 : getWord(%cCond, 2); - if(%killDB != 0) { - if(%so.PlayerKillCount[%dateStr, %killDB] >= %killCount) { - %done = true; - } - } - else { - if(%so.totalPlayerKillCount[%dateStr] >= %killCount) { - %done = true; - } - } - case "Z": - %killCount = getWord(%cCond, 1); - %killedType = getWord(%cCond, 2) $= "A" ? -1 : getWord(%cCond, 2); - %killDB = getWord(%cCond, 3) $= "A" ? 0 : getWord(%cCond, 3); - if(%killDB != 0) { - if(%killedType != -1) { - if(%so.ZombieKillCount[%dateStr, %killDB, %killedType] >= %killCount) { - %done = true; - } - } - else { - if(%so.ZombieKillCount[%dateStr, %killDB, ""] >= %killCount) { - %done = true; - } - } - } - else { - if(%killedType != -1) { - if(%so.ZombieKillCount[%dateStr, 0, %killedType] >= %killCount) { - %done = true; - } - } - else { - if(%so.totalZombieKillCount[%dateStr] >= %killCount) { - %done = true; - } - } - } - case "HS": - %counter = getWord(%cCond, 1); - %type = getWord(%cCond, 2) $= "E" ? "E" : "Z"; - if(%type $= "E") { - if(%so.playerHeadshots[%dateStr] >= %counter) { - %done = true; - } - } - else { - if(%so.zombieHeadshots[%dateStr] >= %counter) { - %done = true; - } - } - case "KS": - %type = getWord(%cCond, 1); - %ammount = getWord(%cCond, 2); - if(%so.killstreakCalls[%dateStr, %type] >= %ammount) { - %done = true; - } - case "KSK": - %type = getWord(%cCond, 1); - %ammount = getWord(%cCond, 2); - if(%so.killstreakKills[%dateStr, %type] >= %ammount) { - %done = true; - } - case "SK": - %soloType = getWord(%cCond, 1); - %ammount = getWord(%cCond, 2); - if(%so.successiveSolo[%dateStr, %soloType] >= %ammount) { - %done = true; - } - case "SKS": - %streakType = getWord(%cCond, 1); - %ammount = getWord(%cCond, 2); - if(%so.successiveStreak[%dateStr, %streakType] >= %ammount) { - %done = true; - } - case "Prestige": - %level = getWord(%cCond, 1); - if(%client.TWM2Core.officer >= %level) { - %done = true; - } - case "Boss": - %name = getWord(%cCond, 1); - %amount = getWord(%cCond, 2); - if(%so.bossSlayCount[%name, %dateStr] >= %amount) { - %done = true; - } - case "Back": - %zOrA = getWord(%cCond, 1); - %amount = getWord(%cCond, 2); - if(%zOrA $= "Z") { - if(%so.zombieBackstabs[%dateStr] >= %amount) { - %done = true; + %challenge = $Challenges::Challenge[%cID]; + %cType = trim(getField(%challenge, 0)); + %cCond = getsubstr(getField(%challenge, 3), 1, strlen(getField(%challenge, 3))); + %so = %client.TWM2Controller; + %dateStr = formattimestring("yymmdd"); + //cannot complete the same one twice :P + if(%so.completed[%cid, %dateStr]) { + return; + } + // + switch$(getWord(%cCond, 0)) { + case "E": + %killCount = getWord(%cCond, 1); + %killDB = getWord(%cCond, 2) $= "A" ? 0 : getWord(%cCond, 2); + if(%killDB != 0) { + if(%so.PlayerKillCount[%dateStr, %killDB] >= %killCount) { + %done = true; + } } - } - else { - if(%so.playerBackstabs[%dateStr] >= %amount) { - %done = true; + else { + if(%so.totalPlayerKillCount[%dateStr] >= %killCount) { + %done = true; + } } - } - default: - error("Unknown challenge in parser..."); - } - if(%done) { - %cName = getField(%challenge, 1); - %CRewd = getField(%challenge, 4); - CenterPrint(%client, "CHALLENGE COMPLETED\n"@%cName@"", 3, 3); - GainExperience(%client, %cRewd, %cName@" Challenge Completed"); - recordAction(%client, "CCMP", ""@%cid@"\t1"); - } + case "Z": + %killCount = getWord(%cCond, 1); + %killedType = getWord(%cCond, 2) $= "A" ? -1 : getWord(%cCond, 2); + %killDB = getWord(%cCond, 3) $= "A" ? 0 : getWord(%cCond, 3); + if(%killDB != 0) { + if(%killedType != -1) { + if(%so.ZombieKillCount[%dateStr, %killDB, %killedType] >= %killCount) { + %done = true; + } + } + else { + if(%so.ZombieKillCount[%dateStr, %killDB, ""] >= %killCount) { + %done = true; + } + } + } + else { + if(%killedType != -1) { + if(%so.ZombieKillCount[%dateStr, 0, %killedType] >= %killCount) { + %done = true; + } + } + else { + if(%so.totalZombieKillCount[%dateStr] >= %killCount) { + %done = true; + } + } + } + case "HS": + %counter = getWord(%cCond, 1); + %type = getWord(%cCond, 2) $= "E" ? "E" : "Z"; + if(%type $= "E") { + if(%so.playerHeadshots[%dateStr] >= %counter) { + %done = true; + } + } + else { + if(%so.zombieHeadshots[%dateStr] >= %counter) { + %done = true; + } + } + case "KS": + %type = getWord(%cCond, 1); + %amount = getWord(%cCond, 2); + if(%so.killstreakCalls[%dateStr, %type] >= %amount) { + %done = true; + } + case "KSK": + %type = getWord(%cCond, 1); + %amount = getWord(%cCond, 2); + if(%so.killstreakKills[%dateStr, %type] >= %amount) { + %done = true; + } + case "SK": + %soloType = getWord(%cCond, 1); + %amount = getWord(%cCond, 2); + if(%so.successiveSolo[%dateStr, %soloType] >= %ammount) { + %done = true; + } + case "SKS": + %streakType = getWord(%cCond, 1); + %amount = getWord(%cCond, 2); + if(%so.successiveStreak[%dateStr, %streakType] >= %ammount) { + %done = true; + } + case "Horde": + %waveNum = getWord(%cCond, 1); + if(%so.highestHordeWave[%dateStr] >= %waveNum) { + %done = true; + } + case "HordeWaves": + %amount = getWord(%cCond, 1); + if(%so.totalHordeWavesCompleted[%dateStr] >= %amount) { + %done = true; + } + case "Prestige": + %level = getWord(%cCond, 1); + if(%client.TWM2Core.officer >= %level) { + %done = true; + } + case "Boss": + %name = getWord(%cCond, 1); + %amount = getWord(%cCond, 2); + if(%so.bossSlayCount[%name, %dateStr] >= %amount) { + %done = true; + } + case "Back": + %zOrA = getWord(%cCond, 1); + %amount = getWord(%cCond, 2); + if(%zOrA $= "Z") { + if(%so.zombieBackstabs[%dateStr] >= %amount) { + %done = true; + } + } + else { + if(%so.playerBackstabs[%dateStr] >= %amount) { + %done = true; + } + } + default: + error("Unknown challenge in parser..."); + } + if(%done) { + %cName = getField(%challenge, 1); + %CRewd = getField(%challenge, 4); + CenterPrint(%client, "CHALLENGE COMPLETED\n"@%cName@"", 3, 3); + GainExperience(%client, %cRewd, %cName@" Challenge Completed"); + recordAction(%client, "CCMP", ""@%cid@"\t1"); + } } //Check Multi-Completion (handles weekly & monthly challenges) @@ -441,7 +457,7 @@ function checkMultiCompletion(%client, %cID) { %done = true; } } - else { + else { if(getCurrentMonthTotal(%client, ZombieKillCount, 0 SPC %killedType) >= %killCount) { %done = true; } @@ -459,7 +475,7 @@ function checkMultiCompletion(%client, %cID) { } } } - } + } case "HS": %counter = getWord(%cCond, 1); %type = getWord(%cCond, 2) $= "E" ? "E" : "Z"; diff --git a/scripts/TWM2/Systems/MainControl.cs b/scripts/TWM2/Systems/MainControl.cs index fdcb131..6af7c76 100644 --- a/scripts/TWM2/Systems/MainControl.cs +++ b/scripts/TWM2/Systems/MainControl.cs @@ -690,18 +690,25 @@ function TWM2Damage(%projectile, %target, %amount, %dType, %damLoc, %type) { if(strStr(%SDB.getClassName(), "Turret") != -1) { if(%SDB.getName() $= "HarbingerGunshipTurret") { %projectile.sourceObject = %projectile.sourceObject.mountobj; + %sourceObject = %projectile.sourceObject; + %SDB = %sourceObject.getDataBlock(); } else if(%SDB.getName() $= "AC130GunshipTurret") { %projectile.sourceObject = %projectile.sourceObject.mountobj; + %sourceObject = %projectile.sourceObject; + %SDB = %sourceObject.getDataBlock(); } else if(%SDB.getName() $= "CentaurTurret") { %projectile.sourceObject = %projectile.sourceObject.source; + %sourceObject = %projectile.sourceObject; + %SDB = %sourceObject.getDataBlock(); } } //------------------------------------------------------ //vehicle kill checking + //NOTE: THIS DOESN'T GO HERE!!! if(strStr(%SDB.getClassName(), "Vehicle") != -1) { - if(%target.isPlayer() && %target.getState() $= "dead") { + if((%target.getType() & ($TypeMasks::PlayerObjectType)) && %target.getState() $= "dead") { %pl = %sourceObject.getMountNodeObject(0); //the pilot %cl = %pl.client; if(%cl !$= "") { @@ -717,9 +724,7 @@ function TWM2Damage(%projectile, %target, %amount, %dType, %damLoc, %type) { } } } - if(!%target.isAllyBot) { - UpdateVehicleKillFile(%cl, %SDB.getName()); - } + UpdateVehicleKillFile(%cl, %SDB.getName()); // if(%TDB $= "DemonMotherZombieArmor" && %SDB $= "CentaurVehicle") { %cl.CDLKills++; diff --git a/scripts/TWM2/Systems/WeaponChallenges.cs b/scripts/TWM2/Systems/WeaponChallenges.cs index 08175dc..d822d12 100644 --- a/scripts/TWM2/Systems/WeaponChallenges.cs +++ b/scripts/TWM2/Systems/WeaponChallenges.cs @@ -14,11 +14,9 @@ function GetWeaponChallenges(%Image, %number) { function UpdateVehicleKillFile(%client, %VDB) { if(%VDB $= "") { //Phantom139: Ha!! No more invalid Files!!! - //echo("No Vehicle Datablock"); return; } if(%client $= "") { //Phantom139: Ha! No More UE on Invalid File - //echo("No Client"); return; } %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; From 91c8b768f70d499f4b98f1377943c3d0b5ce65da Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Wed, 5 Jul 2017 21:45:03 -0500 Subject: [PATCH 27/29] 7/5/17 Fixes Numerous fixes from today, see addition notes on Readme.md for details --- README.md | 5 + scripts/HordeGame.cs | 106 ++-- scripts/TWM2/ChatCommands/Public.cs | 6 +- .../ExteriorFunctioning/ArmorDamageEffects.cs | 114 ---- scripts/TWM2/LoadMod.cs | 2 +- scripts/TWM2/Systems/DChalg.cs | 493 +++--------------- scripts/TWM2/Systems/MainControl.cs | 181 ------- scripts/TWM2/Systems/ObjectDamage.cs | 492 +++++++++++++++++ scripts/TWM2/Systems/scoremenucmds.cs | 2 +- scripts/chatCommands.cs | 3 - scripts/player.cs | 158 +----- scripts/projectiles.cs | 4 +- 12 files changed, 644 insertions(+), 922 deletions(-) delete mode 100644 scripts/TWM2/ExteriorFunctioning/ArmorDamageEffects.cs create mode 100644 scripts/TWM2/Systems/ObjectDamage.cs diff --git a/README.md b/README.md index 3c4140b..3bd96b1 100644 --- a/README.md +++ b/README.md @@ -70,9 +70,11 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * This change also applies to the 'From The Top' Challenge Category * In-Game, Missions have been renamed to Operations * Fixed the incorrect internal tags for Lordranius Trevor +* Depricated Weekly and Monthly challenges, we will only issue daily challenges from this point forward * Lib'd the TWM2 MainControl file and PGD Connect Support files to recover some functions * The F2 Menu now detects PGD Connected accounts and will no longer show the option to PGD Connect to already connected users * No more scary scientific notion when performing /checkstats or using the F2 menu to view player experience +* Both /checkStats and the F2 menu pages now display what rank number you are at along with the rank name * Addressed a security issue regarding players who are "attempting" to load code via universal rank files. * Nice try DDDX, but your fem-phantom fantasies will NOT be happening... ;) * Addressed the bug that would allow Vardison 2.0 to summon infinite minions @@ -125,7 +127,10 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * Shifter Zombies now have a randomzied element in their teleport method * Fixed a code bug with Lord Yvex which caused his death pulse to be replaced by nightmare missiles * Officer Weapons no longer require a rank to use, you only need to reach the officer level in question and you've got it! +* Addressed an additional Horde 3 out-of-game zombie spawning crash +* Cleaned up the player kill logic and moved all TWM2 specific damage and death functioning to a separate file * Addressed the bug preventing the challenges for reaching officer ranks from completing +* Addressed a bug in which vehicle bosses were not recording damage from players to the boss system correctly * Weapon Balancing Pass * Grapple Hook * Slowed down the attacher projectile a bit, lowering the range diff --git a/scripts/HordeGame.cs b/scripts/HordeGame.cs index 05759e8..cebebc5 100644 --- a/scripts/HordeGame.cs +++ b/scripts/HordeGame.cs @@ -600,6 +600,12 @@ function HordeGame::gameOver(%game) { $HordeGame::Zombiecount = 0; $HordeGame::LivingCount = 0; $HordeGame::CanSpawnZombies = 1; + + for(%i = 0; $HordeSpawnSched[%i] !$= ""; %i++) { + if(isEventPending($HordeSpawnSched[%i])) { + cancel($HordeSpawnSched[%i]); + } + } for(%i = 0; %i < ClientGroup.getCount(); %i ++) { %client = ClientGroup.getObject(%i); @@ -706,7 +712,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 1); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 1); } case 2: for(%i = 0; %i < 25; %i++) { @@ -714,7 +720,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 1); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 1); } case 3: for(%i = 0; %i < 30; %i++) { @@ -722,7 +728,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 1); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 1); } case 4: for(%i = 0; %i < 35; %i++) { @@ -730,7 +736,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 1); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 1); } case 5: for(%i = 0; %i < 40; %i++) { @@ -738,7 +744,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 1); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 1); } case 6: for(%i = 0; %i < 20; %i++) { @@ -747,7 +753,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 7: for(%i = 0; %i < 25; %i++) { @@ -756,7 +762,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 8: for(%i = 0; %i < 30; %i++) { @@ -765,7 +771,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 9: for(%i = 0; %i < 35; %i++) { @@ -774,7 +780,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 10: for(%i = 0; %i < 40; %i++) { @@ -783,7 +789,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 11: for(%i = 0; %i < 20; %i++) { @@ -792,7 +798,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 12: for(%i = 0; %i < 25; %i++) { @@ -801,7 +807,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 13: for(%i = 0; %i < 30; %i++) { @@ -810,7 +816,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 14: for(%i = 0; %i < 35; %i++) { @@ -819,7 +825,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 15: for(%i = 0; %i < 40; %i++) { @@ -828,7 +834,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 16: for(%i = 0; %i < 20; %i++) { @@ -837,7 +843,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 17: for(%i = 0; %i < 25; %i++) { @@ -846,7 +852,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 18: for(%i = 0; %i < 30; %i++) { @@ -855,7 +861,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 19: for(%i = 0; %i < 35; %i++) { @@ -864,7 +870,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 20: for(%i = 0; %i < 40; %i++) { @@ -873,7 +879,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 21: for(%i = 0; %i < 20; %i++) { @@ -882,7 +888,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 22: for(%i = 0; %i < 25; %i++) { @@ -891,7 +897,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 23: for(%i = 0; %i < 30; %i++) { @@ -900,7 +906,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 24: for(%i = 0; %i < 35; %i++) { @@ -909,7 +915,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } //The Rapier wave :D case 25: @@ -918,7 +924,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 5); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 5); } case 26: for(%i = 0; %i < 30; %i++) { @@ -933,7 +939,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 27: for(%i = 0; %i < 35; %i++) { @@ -948,7 +954,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 28: for(%i = 0; %i < 40; %i++) { @@ -963,7 +969,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 29: for(%i = 0; %i < 45; %i++) { @@ -978,7 +984,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 30: for(%i = 0; %i < 50; %i++) { @@ -993,7 +999,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 31: for(%i = 0; %i < 20; %i++) { @@ -1008,7 +1014,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 32: for(%i = 0; %i < 25; %i++) { @@ -1023,7 +1029,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 33: for(%i = 0; %i < 30; %i++) { @@ -1038,7 +1044,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 34: for(%i = 0; %i < 35; %i++) { @@ -1053,7 +1059,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 35: for(%i = 0; %i < 40; %i++) { @@ -1068,7 +1074,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 36: for(%i = 0; %i < 25; %i++) { @@ -1083,7 +1089,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 37: for(%i = 0; %i < 30; %i++) { @@ -1098,7 +1104,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 38: for(%i = 0; %i < 35; %i++) { @@ -1113,7 +1119,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 39: for(%i = 0; %i < 40; %i++) { @@ -1128,7 +1134,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 40: for(%i = 0; %i < 40; %i++) { @@ -1143,7 +1149,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } //The Lord wave :D case 41: @@ -1152,7 +1158,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 3); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 3); } //The Lord wave, 2.0 :D case 42: @@ -1161,7 +1167,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 3); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 3); } //Slasher Wave case 43: @@ -1170,7 +1176,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 11); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 11); } case 44: for(%i = 0; %i < 40; %i++) { @@ -1185,7 +1191,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 45: for(%i = 0; %i < 40; %i++) { @@ -1200,7 +1206,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 46: for(%i = 0; %i < 45; %i++) { @@ -1215,7 +1221,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } case 47: for(%i = 0; %i < 50; %i++) { @@ -1230,7 +1236,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, %type); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, %type); } //The sniper wave :p case 48: @@ -1239,7 +1245,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 9); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 9); } //The ravie wave, V2.0 :p case 49: @@ -1248,7 +1254,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 2); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 2); } //ZOMG!!!! Demon LORDS!!! RUN case 50: @@ -1257,7 +1263,7 @@ function StartHordeZombies(%mission, %wave) { %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], TWM2Lib_MainControl("getRandomPosition", 10 TAB 1)); $HordeGame::Zombiecount++; %time = 1000 * getRandom(1, 60); - schedule(%time, 0, "HordeSpawnZombies", %final, 6); + $HordeSpawnSched[%i] = schedule(%time, 0, "HordeSpawnZombies", %final, 6); } default: error("Horde: Wave Error, Wave "@%wave@" is unknown on "@%mission@""); diff --git a/scripts/TWM2/ChatCommands/Public.cs b/scripts/TWM2/ChatCommands/Public.cs index f6975fc..113216e 100644 --- a/scripts/TWM2/ChatCommands/Public.cs +++ b/scripts/TWM2/ChatCommands/Public.cs @@ -1114,11 +1114,11 @@ function parsePublicCommands(%sender, %command, %args) { } } if(%Stats >= $Ranks::MinPoints[$Rank::RankCount]) { - messageClient(%sender, 'MsgClient', "\c2Your Rank is "@%Rank@", You Currently Have "@printCurrentEXP(%sender)@" XP."); + messageClient(%sender, 'MsgClient', "\c2Your Rank is "@%Rank@" ("@%clientController.rankNumber@"), You Currently Have "@printCurrentEXP(%sender)@" XP."); return 1; } else { - messageClient(%sender, 'MsgClient', "\c2Your Rank is "@%Rank@", You Currently Have "@printCurrentEXP(%sender)@" XP. Your next rank is "@%nextrank@" and you need "@(%nextrankXP - %stats)@" XP."); + messageClient(%sender, 'MsgClient', "\c2Your Rank is "@%Rank@" ("@%clientController.rankNumber@"), You Currently Have "@printCurrentEXP(%sender)@" XP. Your next rank is "@%nextrank@" and you need "@(%nextrankXP - %stats)@" XP."); return 1; } } @@ -1136,7 +1136,7 @@ function parsePublicCommands(%sender, %command, %args) { } %Rank = ""@$Prestige::Name[%targetController.officer]@""@%targetController.rank@""; %Stats = printCurrentEXP(%target); - messageClient(%sender, 'MsgClient', "\c2"@%target.namebase@"'s Rank is "@%Rank@" and "@%target.namebase@"'s XP is "@%stats@"."); + messageClient(%sender, 'MsgClient', "\c2"@%target.namebase@"'s Rank is "@%Rank@" ("@%targetController.rankNumber@") and "@%target.namebase@"'s XP is "@%stats@"."); return 1; } diff --git a/scripts/TWM2/ExteriorFunctioning/ArmorDamageEffects.cs b/scripts/TWM2/ExteriorFunctioning/ArmorDamageEffects.cs deleted file mode 100644 index 0550b72..0000000 --- a/scripts/TWM2/ExteriorFunctioning/ArmorDamageEffects.cs +++ /dev/null @@ -1,114 +0,0 @@ -datablock ParticleData(burnParticle) { - dragCoeffiecient = 0.0; - gravityCoefficient = -0.1; - inheritedVelFactor = 0.1; - - lifetimeMS = 500; - lifetimeVarianceMS = 50; - - textureName = "special/cloudflash"; - - spinRandomMin = -10.0; - spinRandomMax = 10.0; - - colors[0] = "1 0.18 0.03 0.4"; - colors[1] = "1 0.18 0.03 0.3"; - colors[2] = "1 0.18 0.03 0.0"; - sizes[0] = 2.0; - sizes[1] = 1.0; - sizes[2] = 0.8; - times[0] = 0.0; - times[1] = 0.6; - times[2] = 1.0; -}; - -datablock ParticleEmitterData(burnEmitter) { - ejectionPeriodMS = 3; - periodVarianceMS = 0; - - ejectionOffset = 0.2; - ejectionVelocity = 10.0; - velocityVariance = 0.0; - - thetaMin = 0.0; - thetaMax = 10.0; - - particles = "burnParticle"; -}; - -function burnloop(%obj){ - if(!isobject(%obj)) { - return; - } - if(%obj.onfire == 0) { - return; - } - if(%obj.firecount >= %obj.maxfirecount){ - %obj.firecount = ""; - %obj.maxfirecount = 0; - %obj.onfire = 0; - return; - } - else { - %obj.damage(0, %obj.getposition(), 0.01, $DamageType::Burn); - %obj.lastDamagedImage = "flamerImage"; - %fire = new ParticleEmissionDummy(){ - position = vectoradd(%obj.getPosition(),"0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "BurnEmitter"; - }; - MissionCleanup.add(%fire); - %fire.schedule(100, "delete"); - %obj.firecount++; - schedule(100, %obj, "burnloop", %obj); - } -} - -function ApplyEMP(%client) { - if(%client.isEMPd) { - //applying second emp = laggy + bad - return; - } - %client.isEMPd = 1; - EMPEKill(%client.player); - //echo("EMP: applied EMP to "@%client@" - "@%client.player@""); -} - -function KillEMP(%client) { - %client.isEMPd = 0; - %client.player.stopZap(); - messageClient(%client, 'msgDieEMP', "\c5Armor: Electronic Stability has returned."); - //echo("EMP: kill EMP: "@%client@""); -} - -function EMPEKill(%obj) { - if(%obj.client.isEMPd) { - if(!isObject(%obj) || %obj.getState() $= "Dead") { - //echo("EMP: "@%obj@" dead, sending Re-EMP to "@%obj.client@""); - ReEMPLoop(%obj.client); - return; - } - %obj.setEnergyLevel(0.0); - %obj.zapObject(); - schedule(100, 0, "EMPEKill", %obj); - } - else { - %obj.stopZap(); - return; - } -} - -function ReEMPLoop(%client) { - if(!%client.isEMPd) { - //echo("EMP: RE-EMP: "@%client@" no longer EMP"); - return; - } - if(!isObject(%client.player) || %client.player.getState() $= "Dead") { - //echo("EMP: RE: dead, trying to re-loop on "@%client@""); - schedule(500, 0, "ReEMPLoop", %client); - return; - } - EMPLoop(%client.player); - EMPEKill(%client.player); - //echo("EMP: Re-EMP: "@%client@" - "@%client.player@""); -} diff --git a/scripts/TWM2/LoadMod.cs b/scripts/TWM2/LoadMod.cs index 0d0d252..afb54d2 100644 --- a/scripts/TWM2/LoadMod.cs +++ b/scripts/TWM2/LoadMod.cs @@ -11,6 +11,7 @@ exec("serverControl.cs"); //Server Settings exec("scripts/TWM2/Systems/Directorate.cs"); //Client Container Objects exec("scripts/TWM2/Systems/AdvancedRankSystem.cs"); //Adv. Ranks exec("scripts/TWM2/Systems/MainControl.cs"); //TWM2 Core Functions +exec("scripts/TWM2/Systems/ObjectDamage.cs"); //Object Damage Functioning exec("scripts/TWM2/Systems/Scoremenucmds.cs"); //Score Menu exec("scripts/TWM2/Systems/BossSystem.cs"); //Bosses exec("scripts/TWM2/Systems/Medals.cs"); //Medals @@ -65,7 +66,6 @@ exec("scripts/TWM2/ExteriorFunctioning/killTrigger.cs"); //TWM2 Kill Trigger exec("scripts/TWM2/ExteriorFunctioning/BloodEffects.cs");//TWM2 Gore Mod exec("scripts/TWM2/ExteriorFunctioning/ProtPatch.cs"); //Alv's CCM Patch exec("scripts/TWM2/ExteriorFunctioning/PConFunctions.cs");//P-Con Functions 1.7 -exec("scripts/TWM2/ExteriorFunctioning/ArmorDamageEffects.cs");//Loop Damages exec("scripts/TWM2/ExteriorFunctioning/cmdArmor.cs"); //cmdArmor patch //Chat Commands diff --git a/scripts/TWM2/Systems/DChalg.cs b/scripts/TWM2/Systems/DChalg.cs index 7e085e0..6672245 100644 --- a/scripts/TWM2/Systems/DChalg.cs +++ b/scripts/TWM2/Systems/DChalg.cs @@ -51,15 +51,16 @@ function downloadChallenges_Manual() { } function ChallengeDownload::onConnected(%this) { - %this.send(%this.request); + %this.send(%this.request); } function ChallengeDownload::onConnectFailed( %this ) { - error("Challenges: Connection failed"); + error("Challenges: Connection failed"); } function ChallengeDownload::onDisconnect(%this) { - %this.delete(); + $Challenge::PerformingTimeUpdateCall = 0; + %this.delete(); } function ChallengeDownload::onLine(%this, %line) { @@ -75,11 +76,8 @@ function ChallengeDownload::onLine(%this, %line) { if (strstr(%line, "#TIME ") != -1) { //expire date line %line = strReplace(%line, "#TIME ", ""); - echo("* Time Line: "@getField(%line, 1)@" -> "@getField(%line, 0)@" / "@getField(%line, 3)@" -> "@getField(%line, 2)@""); - $CurrentStartOfMonth = getField(%line, 1); - $CurrentMonthlyChallengeExpire = getField(%line, 0); - $CurrentWeeklyChallengeExpire = getField(%line, 2); //aka: end of week - $CurrentStartOfWeek = getField(%line, 3); + echo("* Time Line: "@getWord(%line, 0)); + $TomorrowDate = getWord(%line, 0); return; } else if (strstr(%line, "#CHLG ") != -1) { @@ -129,6 +127,7 @@ function doChallengeKillRecording(%sourceObject, %targetObject) { function recordAction(%client, %action, %variables) { %ymd = formattimestring("yymmdd"); %so = %client.TWM2Controller; + checkDateOnChallenge(%client); //echo(""@%client@" - "@%action@" - "@%variables@""); // switch$(%action) { @@ -206,7 +205,6 @@ function recordAction(%client, %action, %variables) { //no action recorded } allCheckCompletion(%client); - updateChallengeFile(%client); } function cleanChallenges() { @@ -232,16 +230,9 @@ function AddToChallenges(%line) { } function allCheckCompletion(%client) { - for(%i = 1; isSet($Challenges::Challenge[%i]); %i++) { - %cType = getField($Challenges::Challenge[%i], 0); - if(%cType == 1) { - checkCompletion(%client, %i); //daily - } - else { - checkMultiCompletion(%client, %i); - } - } - // + for(%i = 1; isSet($Challenges::Challenge[%i]); %i++) { + checkCompletion(%client, %i); + } } function checkCompletion(%client, %cID) { @@ -380,380 +371,81 @@ function checkCompletion(%client, %cID) { } } -//Check Multi-Completion (handles weekly & monthly challenges) -function checkMultiCompletion(%client, %cID) { - %challenge = $Challenges::Challenge[%cID]; - %cType = trim(getField(%challenge, 0)); - %cCond = getsubstr(getField(%challenge, 3), 1, strlen(getField(%challenge, 3))); - %so = %client.TWM2Controller; - %dateStr = formattimestring("yymmdd"); - //cannot complete the same one twice :P - if(%so.completed[%cid, %dateStr]) { - return; - } - // - switch$(getWord(%cCond, 0)) { - case "E": - %killCount = getWord(%cCond, 1); - %killDB = getWord(%cCond, 2) $= "A" ? 0 : getWord(%cCond, 2); - if(%killDB != 0) { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, PlayerKillCount, %killDB) >= %killCount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, PlayerKillCount, %killDB) >= %killCount) { - %done = true; - } - } - } - else { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, totalPlayerKillCount) >= %killCount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, totalPlayerKillCount) >= %killCount) { - %done = true; - } - } - } - case "Z": - %killCount = getWord(%cCond, 1); - %killedType = getWord(%cCond, 2) $= "A" ? -1 : getWord(%cCond, 2); - %killDB = getWord(%cCond, 3) $= "A" ? 0 : getWord(%cCond, 3); - if(%killDB != 0) { - if(%killedType != -1) { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, ZombieKillCount, %killDB SPC %killedType) >= %killCount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, ZombieKillCount, %killDB SPC %killedType) >= %killCount) { - %done = true; - } - } - } - else { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, ZombieKillCount, %killDB SPC "") >= %killCount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, ZombieKillCount, %killDB SPC "") >= %killCount) { - %done = true; - } - } - } - } - else { - if(%killedType != -1) { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, ZombieKillCount, 0 SPC %killedType) >= %killCount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, ZombieKillCount, 0 SPC %killedType) >= %killCount) { - %done = true; - } - } - } - else { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, totalZombieKillCount) >= %killCount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, totalZombieKillCount) >= %killCount) { - %done = true; - } - } - } - } - case "HS": - %counter = getWord(%cCond, 1); - %type = getWord(%cCond, 2) $= "E" ? "E" : "Z"; - if(%type $= "E") { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, playerHeadshots) >= %counter) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, playerHeadshots) >= %counter) { - %done = true; - } - } - } - else { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, zombieHeadshots) >= %counter) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, zombieHeadshots) >= %counter) { - %done = true; - } - } - } - case "KS": - %type = getWord(%cCond, 1); - %ammount = getWord(%cCond, 2); - if(%cType == 2) { - if(getCurrentWeekTotal(%client, killstreakCalls, %type) >= %ammount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, killstreakCalls, %type) >= %ammount) { - %done = true; - } - } - case "KSK": - %type = getWord(%cCond, 1); - %ammount = getWord(%cCond, 2); - if(%cType == 2) { - if(getCurrentWeekTotal(%client, killstreakKills, %type) >= %ammount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, killstreakKills, %type) >= %ammount) { - %done = true; - } - } - case "SK": - %soloType = getWord(%cCond, 1); - %ammount = getWord(%cCond, 2); - if(%cType == 2) { - if(getCurrentWeekTotal(%client, successiveSolo, %soloType) >= %ammount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, successiveSolo, %soloType) >= %ammount) { - %done = true; - } - } - case "SKS": - %streakType = getWord(%cCond, 1); - %ammount = getWord(%cCond, 2); - if(%cType == 2) { - if(getCurrentWeekTotal(%client, successiveStreak, %streakType) >= %ammount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, successiveStreak, %streakType) >= %ammount) { - %done = true; - } - } - //easy enough :) - case "Prestige": - %level = getWord(%cCond, 1); - if(%client.TWM2Core.officer >= %level) { - %done = true; - } - case "Boss": - %name = getWord(%cCond, 1); - %amount = getWord(%cCond, 2); - if(%cType == 2) { - if(getCurrentWeekTotal(%client, bossSlayCount, %name) >= %amount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, bossSlayCount, %name) >= %amount) { - %done = true; - } - } - case "Back": - %zOrA = getWord(%cCond, 1); - %amount = getWord(%cCond, 2); - if(%zOrA $= "Z") { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, zombieBackstabs) >= %amount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, zombieBackstabs) >= %amount) { - %done = true; - } - } - } - else { - if(%cType == 2) { - if(getCurrentWeekTotal(%client, playerBackstabs) >= %amount) { - %done = true; - } - } - else { - if(getCurrentMonthTotal(%client, playerBackstabs) >= %amount) { - %done = true; - } - } - } - default: - error("Unknown challenge in parser..."); - } - if(%done) { - %cName = getField(%challenge, 1); - %CRewd = getField(%challenge, 4); - CenterPrint(%client, ""@(%cType == 2 ? "WEEKLY" : "MONTHLY")@" CHALLENGE COMPLETED\n"@%cName@"", 3, 3); - GainExperience(%client, %cRewd, %cName@" Challenge Completed"); - recordAction(%client, "CCMP", ""@%cid@"\t1"); - } +function checkDateOnChallenge(%client) { + if(!%client || %client $= "") { + return; + } + %cDATE = formattimestring("yymmdd"); + %so = NameToID("Container_"@%client.guid@"/CCD_"@%client.guid); + if(%so.expireDate == %cDATE) { + //Midnight? + if(!$Challenge::PerformingTimeUpdateCall) { + echo("Challenge expiration date matches current, check for midnight update, manually expiring challenge data."); + + downloadChallenges_Manual(); + $Challenge::PerformingTimeUpdateCall = 1; + + //Manually expire the challenge data. + %so.expireDate = 0; + schedule(5000, 0, "checkDateOnChallenge", %client); + } + return; + } + if(%so.expireDate <= 0 || %so.expireDate < %cDATE) { + echo("Client daily challenge container is expired, cleaning.."); + if(isObject(%so)) { + %so.delete(); + } + %client.TWM2Controller = new ScriptObject("CCD_"@%client.guid@"") {}; + %client.container.add(%client.TWM2Controller); + if(!isSet($TomorrowDate)) { + %setTo = %cDATE + 1; + } + else { + %setTo = $TomorrowDate; + } + %client.TWM2Controller.expireDate = %setTo; + SaveClientFile(%client); //give em a save + } } -//keep a running weekly total -function getCurrentWeekTotal(%client, %field, %additional_variables) { - if(!isSet(%client) || !isSet(%field)) { - return 0; - } - %scriptObj = %client.TWM2Controller; - if(isSet(%additional_variables)) { - %var_count = getWordCount(%additional_variables); - %vStr = ""; - %integer = 0; - while(isSet(getWord(%additional_variables, %integer))) { - %vStr = %vStr @","@ getWord(%additional_variables, %integer); - %integer++; - } - } - //get the start and end day numbers of the week. - %sOW = getSubStr($CurrentStartOfWeek, 6, 2); - %eOW = %sOW + 7; //7 day total. - //if we cross over months, we don't care, because the file is killed at month's end. - %cTotal = 0; - for(%i = %sOW; %i < %eOW; %i++) { - %iStor = %i; - if(%i < 10) { - %iStor = "0"@%i; - } - %day = %year@%month@%iStor; - if(isSet(%vStr)) { - eval("%cTotal += isSet("@%scriptObj@"."@%field@"["@%day SPC %vStr@"]) ? ("@%scriptObj@"."@%field@"["@%day SPC %vStr@"]) : 0;"); - } - else { - eval("%cTotal += isSet("@%scriptObj@"."@%field@"["@%day@"]) ? ("@%scriptObj@"."@%field@"["@%day@"]) : 0;"); - } - } - return %cTotal; -} - -//keep a running monthly total -function getCurrentMonthTotal(%client, %field, %additional_variables) { - if(!isSet(%client) || !isSet(%field)) { - return 0; - } - %scriptObj = %client.TWM2Controller; - if(isSet(%additional_variables)) { - %var_count = getWordCount(%additional_variables); - %vStr = ""; - %integer = 0; - while(isSet(getWord(%additional_variables, %integer))) { - %vStr = %vStr @","@ getWord(%additional_variables, %integer); - %integer++; - } - } - // - %year = getSubStr($CurrentStartOfMonth, 0, 4); - %month = getSubStr($CurrentStartOfMonth, 4, 2); - // - %sOM = getSubStr($CurrentStartOfMonth, 6, 2); - %eOM = getSubStr($CurrentMonthlyChallengeExpire, 6, 2); - %cTotal = 0; //hold the counter at 0 - for(%i = %sOM; %i <= %eOM; %i++) { - %iStor = %i; - if(%i < 10) { - %iStor = "0"@%i; - } - %day = %year@%month@%iStor; - if(isSet(%vStr)) { - eval("%cTotal += isSet("@%scriptObj@"."@%field@"["@%day SPC %vStr@"]) ? ("@%scriptObj@"."@%field@"["@%day SPC %vStr@"]) : 0;"); - } - else { - eval("%cTotal += isSet("@%scriptObj@"."@%field@"["@%day@"]) ? ("@%scriptObj@"."@%field@"["@%day@"]) : 0;"); - } - } - // - return %cTotal; -} - - function loadChallengeData(%client) { - //Daily Challenges = Core Servers Only - if(!IsServerMain()) { - error("* Daily Challenges: Restricted To Core Servers Only"); - return; - } - // - %object = NameToID("Container_"@%client.guid@"/CCD_"@%client.guid); - if(!isObject(%object)) { - %name = "CCD_"@%client.guid@""; - %client.TWM2Controller = new ScriptObject(%name) {}; - %client.container.add(%client.TWM2Controller); - } - else { - %client.TWM2Controller = %object; - } - // - updateChallengeFile(%client); -} - -//file update -function updateChallengeFile(%client) { - if(!isSet(%client) || !ClientGroup.isMember(%client)) { - return; - } - if(%client.cannotReset) { - return; - } - //if the expry date is smaller than the current date, clear the current file for write - %so = %client.TWM2Controller; - //%file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; - //exec(%file); - // - %cDATE = formattimestring("yymmdd"); - if(%so.expireDate <= 0) { - if(isObject(%so)) { - %so.delete(); - } - %client.TWM2Controller = new ScriptObject("CCD_"@%client.guid@"") {}; - %client.container.add(%client.TWM2Controller); - // - if(!isSet($CurrentMonthlyChallengeExpire)) { - %setTo = %cDATE + 31; //temp, will auto adjust at the end of the month. - } - else { - %setTo = $CurrentMonthlyChallengeExpire; - } - %client.TWM2Controller.expireDate = %setTo; - SaveClientFile(%client); //give em a save - } - //delete if expired and ONLY if the expire is present. - if(%cDATE > %client.TWM2Controller.expireDate) { - %client.TWM2Controller.expireDate = -1; - // - echo("Daily Challenge File Expired for "@%client@", preparing new file."); - // - %client.resetAttemps++; - if(%client.resetAttemps >= 3) { - error("Client "@%client@" reset attempts > 3, disabling challenge interpreter"); - %client.cannotReset = 1; - return; - } - schedule(1500, 0, "updateChallengeFile", %client); - return; - } + //Daily Challenges = Core Servers Only + if(!IsServerMain()) { + error("* Daily Challenges: Restricted To Core Servers Only"); + return; + } + // + %cDATE = formattimestring("yymmdd"); + echo("Updating daily challenge data for "@%client); + %so = NameToID("Container_"@%client.guid@"/CCD_"@%client.guid); + if(!isObject(%so)) { + %name = "CCD_"@%client.guid@""; + %client.TWM2Controller = new ScriptObject(%name) {}; + %client.container.add(%client.TWM2Controller); + } + else { + if(%so.expireDate <= 0 || %so.expireDate < %cDATE) { + echo("Expired daily challenge data located for "@%client@", performing clean"); + if(isObject(%so)) { + %so.delete(); + } + %client.TWM2Controller = new ScriptObject("CCD_"@%client.guid@"") {}; + %client.container.add(%client.TWM2Controller); + // + if(!isSet($TomorrowDate)) { + %setTo = %cDATE + 1; + } + else { + %setTo = $TomorrowDate; + } + %client.TWM2Controller.expireDate = %setTo; + SaveClientFile(%client); //give em a save + } + else { + %client.TWM2Controller = %so; + } + } } function GenerateDWMChallengeMenu(%client, %tag, %index) { @@ -789,27 +481,6 @@ function GenerateDWMChallengeMenu(%client, %tag, %index) { %index+=2; } } - // - else if(%cType == 2) { - if(%client.TWM2Controller.completed[%i, %dateStr]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*WEEKLY* "@%cName@" - Completed"); - %index+=2; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*WEEKLY* "@%cName@" - "@%cDesc@" *"@%CRewd@"EXP"); - %index+=2; - } - } - else { - if(%client.TWM2Controller.completed[%i, %dateStr]) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*MONTHLY* "@%cName@" - Completed"); - %index+=2; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "*MONTHLY* "@%cName@" - "@%cDesc@" *"@%CRewd@"EXP"); - %index+=2; - } - } } return %index; } diff --git a/scripts/TWM2/Systems/MainControl.cs b/scripts/TWM2/Systems/MainControl.cs index 6af7c76..977c570 100644 --- a/scripts/TWM2/Systems/MainControl.cs +++ b/scripts/TWM2/Systems/MainControl.cs @@ -640,187 +640,6 @@ function E_Sigma(%from, %to, %formula) { } return %totalSum; } -//========================================================= - -//========================================================= -//TWM2 Damage Control Function -//Added in TWM2 3.8 - -//I'm mostly using this function to cut down the mess in projectiles.cs and -//to better control the current problems in the boss system. - -function TWM2Damage(%projectile, %target, %amount, %dType, %damLoc, %type) { - //terrain block - if(%target.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) { - return; - } - - %data = %projectile.getDatablock(); - %sourceObject = %projectile.sourceObject; - %sourceClient = %sourceObject.client; - %targetClient = %target.client $= "" ? 0 : %target.client; - %TDB = %target.getDatablock(); - if(isObject(%sourceObject)) { - %SDB = %sourceObject.getDatablock(); - } - else { - %SDB = ""; - } - %total = 1; - - switch$(%type) { - //Projectiles... - case "projectile": - %target.headShot = 0; //Reset first - if(%sourceClient.ActivePerk["AP Bullets"]) { - %total *= 1.5; - } - if(%targetClient != 0) { - if(%targetClient.IsActivePerk("Kevlar Armor")) { - %total *= 0.5; - } - } - if(%target.isZombie) { - if(Game.CheckModifier("Demonic") == 1) { - %total = 0.5; - } - } - //------------------------------------------------------ - //source object fixing - if(strStr(%SDB.getClassName(), "Turret") != -1) { - if(%SDB.getName() $= "HarbingerGunshipTurret") { - %projectile.sourceObject = %projectile.sourceObject.mountobj; - %sourceObject = %projectile.sourceObject; - %SDB = %sourceObject.getDataBlock(); - } - else if(%SDB.getName() $= "AC130GunshipTurret") { - %projectile.sourceObject = %projectile.sourceObject.mountobj; - %sourceObject = %projectile.sourceObject; - %SDB = %sourceObject.getDataBlock(); - } - else if(%SDB.getName() $= "CentaurTurret") { - %projectile.sourceObject = %projectile.sourceObject.source; - %sourceObject = %projectile.sourceObject; - %SDB = %sourceObject.getDataBlock(); - } - } - //------------------------------------------------------ - //vehicle kill checking - //NOTE: THIS DOESN'T GO HERE!!! - if(strStr(%SDB.getClassName(), "Vehicle") != -1) { - if((%target.getType() & ($TypeMasks::PlayerObjectType)) && %target.getState() $= "dead") { - %pl = %sourceObject.getMountNodeObject(0); //the pilot - %cl = %pl.client; - if(%cl !$= "") { - if(%target.client !$= "" && !%target.isZombie && %target.team != %pl.team) { - %cl.TWM2Core.PvPVehicleKills++; - if(%cl.TWM2Core.PvPVehicleKills >= 50) { - CompleteNWChallenge(%cl, "VehMans1"); - if(%cl.TWM2Core.PvPVehicleKills >= 100) { - CompleteNWChallenge(%cl, "VehMans2"); - if(%cl.TWM2Core.PvPVehicleKills >= 250) { - CompleteNWChallenge(%cl, "VehMans3"); - } - } - } - } - UpdateVehicleKillFile(%cl, %SDB.getName()); - // - if(%TDB $= "DemonMotherZombieArmor" && %SDB $= "CentaurVehicle") { - %cl.CDLKills++; - if(%cl.CDLKills >= 5) { - AwardClient(%cl, "19"); - } - } - } - } - } - //-------------------------------------------------------- - //Headshot checking - if(%damLoc $= "head" && %TDB.getClassName() $= "PlayerData") { - if(%data.HeadMultiplier !$= "") { - %modifier *= %data.HeadMultiplier; - } - if(%data.HeadShotKill && $TWM2::HeadshotKill) { - %target.headShot = 1; - } - if(%sourceClient !$= "") { - if(%sourceClient.UpgradeOn("HSBullets", %projectile.WeaponImageSource) && $TWM2::HeadshotKill) { - %target.headShot = 1; - } - } - if(%target.headShot) { - if(%targetClient != 0 && %targetClient.ActivePerk["Head Guard"]) { - %target.headShot = 0; - } - else { - if((!%target.isBoss && !%target.noHS) && !(%target.getShieldHealth() > 0)) { - if(%target.isZombie) { - if(%TDB $= "FZombieArmor") { - AwardClient(%sourceClient, "16"); - } - // - if(Game.CheckModifier("WheresMyHead") == 1) { - %target.headShot = 0; - } - else { - %total *= 1000; - } - } - else { - if(%target.isPilot() || %target.vehicleMounted) { - %target.headShot = 0; - } - else { - %total *= 1000; - if(%targetClient != 0) { - BottomPrint(%targetClient, "You Lost Your Head!!!", 3, 1); - //Recording... - if(%sourceClient !$= "") { - %sourceClient.TWM2Core.PvPHeadshotKills++; - if(%sourceClient.TWM2Core.PvPHeadshotKills >= 100) { - CompleteNWChallenge(%sourceClient, "HSHoncho1"); - if(%sourceClient.TWM2Core.PvPHeadshotKills >= 200) { - CompleteNWChallenge(%sourceClient, "HSHoncho2"); - if(%sourceClient.TWM2Core.PvPHeadshotKills >= 300) { - CompleteNWChallenge(%sourceClient, "HSHoncho3"); - } - } - } - } - } - } - } - } - } - } - } - else if(%damLoc $= "legs") { - if(%data.LegsMultiplier !$= "") { - %total *= %data.LegsMultiplier; - } - } - - case "explosion": - %total = 1; - if(%dType == $DamageType::RapierShield) { - if(%target == %sourceObject || %target.isZombie || %target.isBoss) { - %total = 0; - } - } - } - - %deal = %total * %amount; - if(%target.isBoss) { - if(%dType == $DamageType::SuperChaingun) { - %deal = 0; - } - %sourceClient.damageToBoss += %deal; - } - - return %total; -} - //=============================================================================== //=============================================================================== diff --git a/scripts/TWM2/Systems/ObjectDamage.cs b/scripts/TWM2/Systems/ObjectDamage.cs new file mode 100644 index 0000000..486093f --- /dev/null +++ b/scripts/TWM2/Systems/ObjectDamage.cs @@ -0,0 +1,492 @@ +//objectDamage.cs +//TWM2 3.9.1 +//By: Robert C. Fritzen (Phantom139) + +//A collection of TWM2's damage functions, object handler events, and damage over time style functioning + +//========================================================= +//CalculateProjectileDamage +// %projectile: The source projectile +// %target: The target object recieving damage +// %amount: The numeric damage amount +// %dType: The damage type flag +// %damLoc: The damage location +// %type: The type of damage (Projectile or Explosion) +// Calculates a damage modifier based on TWM2 settings (Perks, Armors, Equipment) to apply to an object struck by damage +function CalculateProjectileDamage(%projectile, %target, %amount, %dType, %damLoc, %type) { + //terrain block + if(%target.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) { + return; + } + + %data = %projectile.getDatablock(); + %sourceObject = %projectile.sourceObject; + %sourceClient = %sourceObject.client; + %targetClient = %target.client $= "" ? 0 : %target.client; + %TDB = %target.getDatablock(); + if(isObject(%sourceObject)) { + %SDB = %sourceObject.getDatablock(); + } + else { + %SDB = ""; + } + %total = 1; + + switch$(%type) { + //Projectiles... + case "projectile": + %target.headShot = 0; //Reset first + if(%sourceClient.ActivePerk["AP Bullets"]) { + %total *= 1.5; + } + if(%targetClient != 0) { + if(%targetClient.IsActivePerk("Kevlar Armor")) { + %total *= 0.5; + } + } + if(%target.isZombie) { + if(Game.CheckModifier("Demonic") == 1) { + %total = 0.5; + } + } + //------------------------------------------------------ + //source object fixing + if(strStr(%SDB.getClassName(), "Turret") != -1) { + if(%SDB.getName() $= "HarbingerGunshipTurret") { + %projectile.sourceObject = %projectile.sourceObject.mountobj; + %sourceObject = %projectile.sourceObject; + %SDB = %sourceObject.getDataBlock(); + } + else if(%SDB.getName() $= "AC130GunshipTurret") { + %projectile.sourceObject = %projectile.sourceObject.mountobj; + %sourceObject = %projectile.sourceObject; + %SDB = %sourceObject.getDataBlock(); + } + else if(%SDB.getName() $= "CentaurTurret") { + %projectile.sourceObject = %projectile.sourceObject.source; + %sourceObject = %projectile.sourceObject; + %SDB = %sourceObject.getDataBlock(); + } + } + + //-------------------------------------------------------- + //Headshot checking + if(%damLoc $= "head" && %TDB.getClassName() $= "PlayerData") { + if(%data.HeadMultiplier !$= "") { + %modifier *= %data.HeadMultiplier; + } + if(%data.HeadShotKill && $TWM2::HeadshotKill) { + %target.headShot = 1; + } + if(%sourceClient !$= "") { + if(%sourceClient.UpgradeOn("HSBullets", %projectile.WeaponImageSource) && $TWM2::HeadshotKill) { + %target.headShot = 1; + } + } + if(%target.headShot) { + if(%targetClient != 0 && %targetClient.ActivePerk["Head Guard"]) { + %target.headShot = 0; + } + else { + if((!%target.isBoss && !%target.noHS) && !(%target.getShieldHealth() > 0)) { + if(%target.isZombie) { + if(%TDB $= "FZombieArmor") { + AwardClient(%sourceClient, "16"); + } + // + if(Game.CheckModifier("WheresMyHead") == 1) { + %target.headShot = 0; + } + else { + %total *= 1000; + } + } + else { + if(%target.isPilot() || %target.vehicleMounted) { + %target.headShot = 0; + } + else { + %total *= 1000; + if(%targetClient != 0) { + BottomPrint(%targetClient, "You Lost Your Head!!!", 3, 1); + //Recording... + if(%sourceClient !$= "") { + %sourceClient.TWM2Core.PvPHeadshotKills++; + if(%sourceClient.TWM2Core.PvPHeadshotKills >= 100) { + CompleteNWChallenge(%sourceClient, "HSHoncho1"); + if(%sourceClient.TWM2Core.PvPHeadshotKills >= 200) { + CompleteNWChallenge(%sourceClient, "HSHoncho2"); + if(%sourceClient.TWM2Core.PvPHeadshotKills >= 300) { + CompleteNWChallenge(%sourceClient, "HSHoncho3"); + } + } + } + } + } + } + } + } + } + } + } + else if(%damLoc $= "legs") { + if(%data.LegsMultiplier !$= "") { + %total *= %data.LegsMultiplier; + } + } + + case "explosion": + %total = 1; + if(%dType == $DamageType::RapierShield) { + if(%target == %sourceObject || %target.isZombie || %target.isBoss) { + %total = 0; + } + } + } + + %deal = %total * %amount; + if(%target.isBoss) { + if(%dType == $DamageType::SuperChaingun) { + %deal = 0; + } + %sourceClient.damageToBoss += %deal; + } + + return %total; +} + +//========================================================= +//postObjectDestroyed +// %source: The source of what killed the object (Another object, projectile, etc) +// %targetObject: What died. +// %dType: The internal damage type flag +// %dLoc: The location of damage +function postObjectDestroyed(%source, %targetObject, %dType, %dLoc) { + if(%targetObject.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) { + //Skip terrain and interiors + return; + } + if(!isObject(%source) || %source $= "") { + %SDB = ""; + %sourceObject = 0; + %sourceClient = 0; + } + else { + %sourceDatablock = %source.getDatablock(); + if(strStr(%sourceDatablock.getName(), "Projectile") != -1) { + %sourceObject = %source.sourceObject; + } + else { + %sourceObject = %source; + } + %sourceClient = %sourceObject.client; + if(isObject(%sourceObject)) { + %SDB = %sourceObject.getDatablock(); + } + else { + %SDB = ""; + } + } + %targetClient = %targetObject.client $= "" ? 0 : %targetObject.client; + %TDB = %targetObject.getDatablock(); + //Proceed into object specific tests now... + //Killed by Vehicle. + if(strStr(%SDB.getClassName(), "Vehicle") != -1) { + if((%targetObject.getType() & ($TypeMasks::PlayerObjectType)) && %targetObject.getState() $= "dead") { + %pl = %sourceObject.getMountNodeObject(0); //the pilot + %cl = %pl.client; + if(%cl !$= "") { + if(%targetObject.client !$= "" && !%targetObject.isZombie && %targetObject.team != %pl.team) { + %cl.TWM2Core.PvPVehicleKills++; + if(%cl.TWM2Core.PvPVehicleKills >= 50) { + CompleteNWChallenge(%cl, "VehMans1"); + if(%cl.TWM2Core.PvPVehicleKills >= 100) { + CompleteNWChallenge(%cl, "VehMans2"); + if(%cl.TWM2Core.PvPVehicleKills >= 250) { + CompleteNWChallenge(%cl, "VehMans3"); + } + } + } + } + UpdateVehicleKillFile(%cl, %SDB.getName()); + // + if(%TDB $= "DemonMotherZombieArmor" && %SDB $= "CentaurVehicle") { + %cl.CDLKills++; + if(%cl.CDLKills >= 5) { + AwardClient(%cl, "19"); + } + } + } + } + } + //Is there a boss going? + if(!%targetObject.isZombie && !%targetObject.isBossMinion) { + if($TWM2::BossGoing) { + //Chalk up the kill count :P + $TWM2::BossManager.addKill(%targetObject); + } + } + if(%targetObject.isVardisonMinion) { + $TWM2::VardisonManager.minionCount--; + } + //Game modes + if($TWM2::PlayingSabo) { + if(Game.Bomb.Carrier == %targetObject) { + if(%damageType == $DamageType::FellOff) { + MessageAll('msgWhoops', "\c5SABOTAGE: Bomb Reset."); + Game.BombDropped(Game.Bomb, %targetObject); + Game.bomb.setPosition($SabotageGame::BombLocation[$CurrentMission]); + } + else { + Game.BombDropped(Game.Bomb, %targetObject); + } + } + } + //Gore Mod On? + if($TWM2::UseGoreMod) { + CreateBlood(%targetObject); + } + //Rog Rapier Shield + if(%damageType == $DamageType::RapierShield) { + if(%sourceObject.client !$= "") { + UpdateWeaponKillFile(%sourceObject.client, "rapierShieldImage"); + } + } + //Zombie Checks + if(%targetObject.isZombie) { + //Horde 3 Checks + if($TWM::PlayingHorde == 1) { + if($HordeGame::Zombiecount > 0) { + $HordeGame::Zombiecount--; + messageAll('MsgSPCurrentObjective1' ,"", "Wave "@$HordeGame::CurrentWave@" | Zombies Left: "@$HordeGame::Zombiecount@""); + } + if($HordeGame::Zombiecount <= 0) { + HordeNextWave($HordeGame::Game, $HordeGame::NextWave); + } + } + //Helljump Checks + if($TWM::PlayingHelljump == 1) { + if($HellJump::Zombiecount > 0) { + $HellJump::Zombiecount--; + messageAll('MsgSPCurrentObjective1' ,"", "[W"@$HellJump::CurrentWave@"|G"@$HellJump::CurrentGroup@"|S"@$HellJump::CurrentStrike@"] | Zombies Left: "@$HellJump::Zombiecount@""); + } + if($HellJump::Zombiecount <= 0) { + $HellJump::Game.GoNextStrike(); + } + } + //TWM Infection / PvPz Checks + if(%targetObject.isPlayerZombie) { + %sourceClient.TWM2Core.PvPZombieKills++; + if(%sourceClient.TWM2Core.PvPZombieKills >= 100) { + CompleteNWChallenge(%sourceClient, "Defectionator1"); + if(%sourceClient.TWM2Core.PvPZombieKills >= 250) { + CompleteNWChallenge(%sourceClient, "Defectionator2"); + if(%sourceClient.TWM2Core.PvPZombieKills >= 500) { + CompleteNWChallenge(%sourceClient, "Defectionator3"); + } + } + } + } + //Global Methods + Game.ZkillUpdateScore(%sourceClient, %sourceObject, %targetObject); + %sourceObject.zombiekillsinarow++; + DoZKillstreakChecks(%sourceClient); + } + //PvP Checks + else { + if(%targetObject.team != %sourceClient.team && !%targetObject.isBoss) { + if(isObject(%sourceClient) && %sourceClient.IsActivePerk("Double Down")) { + GainExperience(%sourceClient, $TWM2::KillXPGain * 2, "[D-D]Enemy Killed "); + } + else { + GainExperience(%sourceClient, $TWM2::KillXPGain, "Enemy Killed "); + } + //Zombie Kills Player + if(!%targetObject.isZombie && %sourceObject.isZombie) { + %sourceClient.TWM2Core.PvPHumanKills++; + if(%sourceClient.TWM2Core.PvPHumanKills >= 50) { + CompleteNWChallenge(%sourceClient, "Infectionator1"); + if(%sourceClient.TWM2Core.PvPHumanKills >= 100) { + CompleteNWChallenge(%sourceClient, "Infectionator2"); + if(%sourceClient.TWM2Core.PvPHumanKills >= 250) { + CompleteNWChallenge(%sourceClient, "Infectionator3"); + } + } + } + } + else { + //Player Kills Player + %sourceClient.TWM2Core.PvPKills++; + if(%sourceClient.TWM2Core.PvPKills >= 100) { + CompleteNWChallenge(%sourceClient, "Slayer1"); + if(%sourceClient.TWM2Core.PvPKills >= 250) { + CompleteNWChallenge(%sourceClient, "Slayer2"); + if(%sourceClient.TWM2Core.PvPKills >= 500) { + CompleteNWChallenge(%sourceClient, "Slayer3"); + if(%sourceClient.TWM2Core.PvPKills >= 750) { + CompleteNWChallenge(%sourceClient, "Slayer4"); + if(%sourceClient.TWM2Core.PvPKills >= 1000) { + CompleteNWChallenge(%sourceClient, "Slayer5"); + } + } + } + } + } + } + //Team Gain Perk + if(isObject(%sourceClient) && %sourceClient.IsActivePerk("Team Gain")) { + %TargetSearchMask = $TypeMasks::PlayerObjectType; + InitContainerRadiusSearch(%sourceObject.getPosition(), 20, %TargetSearchMask); //small distance + while ((%potentialTarget = ContainerSearchNext()) != 0){ + if (%potentialTarget.getPosition() != %pos) { + if(%potentialTarget.client.team == %sourceClient.team && %potentialTarget != %sourceObject) { + GainExperience(%potentialTarget.client, $TWM2::KillXPGain, "Team Gain From "@%sourceClient.namebase@" "); + } + } + } + } + //Challenges, Successive Kills, Killstreaks + doChallengeCheck(%sourceClient, %targetClient); + %sourceObject.killsinarow++; + %sourceObject.killsinarow2++; + //TWM2 3.2 -> Successive Kills + %sourceObject.kills[%damageType]++; + PerformSuccessiveKills(%sourceObject, %damageType); + // + if(%sourceObject.killsinarow2 == 10 && !(%sourceObject.isBoss || %sourceObject.isZombie)) { + MessageAll('MsgWOW', "\c2TWM2: "@%sourceClient.namebase@" is on a killsteak of 10"); + awardClient(%sourceClient, "14"); + } + if(%sourceObject.killsinarow2 == 20 && !(%sourceObject.isBoss || %sourceObject.isZombie)) { + MessageAll('MsgWOW', "\c2TWM2: "@%sourceClient.namebase@" is on a killsteak of 20"); + } + if(%sourceObject.killsinarow2 == 25 && !(%sourceObject.isBoss || %sourceObject.isZombie)) { + MessageAll('MsgWOW', "\c2TWM2: "@%sourceClient.namebase@" is on a killsteak of 25"); + } + DoKillstreakChecks(%sourceClient); + } + } + //Record Challenge Kill + doChallengeKillRecording(%sourceObject, %targetObject); + //martydom + if(%targetClient !$= "" && %targetClient != 0 && %targetClient.IsActivePerk("Martydom")) { + serverPlay3d(SatchelChargeActivateSound, %targetObject.getPosition()); + schedule(2200, 0, "MartydomExplode", %targetObject.getPosition(), %targetClient); + } +} + + +datablock ParticleData(burnParticle) { + dragCoeffiecient = 0.0; + gravityCoefficient = -0.1; + inheritedVelFactor = 0.1; + + lifetimeMS = 500; + lifetimeVarianceMS = 50; + + textureName = "special/cloudflash"; + + spinRandomMin = -10.0; + spinRandomMax = 10.0; + + colors[0] = "1 0.18 0.03 0.4"; + colors[1] = "1 0.18 0.03 0.3"; + colors[2] = "1 0.18 0.03 0.0"; + sizes[0] = 2.0; + sizes[1] = 1.0; + sizes[2] = 0.8; + times[0] = 0.0; + times[1] = 0.6; + times[2] = 1.0; +}; + +datablock ParticleEmitterData(burnEmitter) { + ejectionPeriodMS = 3; + periodVarianceMS = 0; + + ejectionOffset = 0.2; + ejectionVelocity = 10.0; + velocityVariance = 0.0; + + thetaMin = 0.0; + thetaMax = 10.0; + + particles = "burnParticle"; +}; + +function burnloop(%obj){ + if(!isobject(%obj)) { + return; + } + if(%obj.onfire == 0) { + return; + } + if(%obj.firecount >= %obj.maxfirecount){ + %obj.firecount = ""; + %obj.maxfirecount = 0; + %obj.onfire = 0; + return; + } + else { + %obj.damage(0, %obj.getposition(), 0.01, $DamageType::Burn); + %obj.lastDamagedImage = "flamerImage"; + %fire = new ParticleEmissionDummy(){ + position = vectoradd(%obj.getPosition(),"0 0 0.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "BurnEmitter"; + }; + MissionCleanup.add(%fire); + %fire.schedule(100, "delete"); + %obj.firecount++; + schedule(100, %obj, "burnloop", %obj); + } +} + +function ApplyEMP(%client) { + if(%client.isEMPd) { + //applying second emp = laggy + bad + return; + } + %client.isEMPd = 1; + EMPEKill(%client.player); + //echo("EMP: applied EMP to "@%client@" - "@%client.player@""); +} + +function KillEMP(%client) { + %client.isEMPd = 0; + %client.player.stopZap(); + messageClient(%client, 'msgDieEMP', "\c5Armor: Electronic Stability has returned."); + //echo("EMP: kill EMP: "@%client@""); +} + +function EMPEKill(%obj) { + if(%obj.client.isEMPd) { + if(!isObject(%obj) || %obj.getState() $= "Dead") { + //echo("EMP: "@%obj@" dead, sending Re-EMP to "@%obj.client@""); + ReEMPLoop(%obj.client); + return; + } + %obj.setEnergyLevel(0.0); + %obj.zapObject(); + schedule(100, 0, "EMPEKill", %obj); + } + else { + %obj.stopZap(); + return; + } +} + +function ReEMPLoop(%client) { + if(!%client.isEMPd) { + //echo("EMP: RE-EMP: "@%client@" no longer EMP"); + return; + } + if(!isObject(%client.player) || %client.player.getState() $= "Dead") { + //echo("EMP: RE: dead, trying to re-loop on "@%client@""); + schedule(500, 0, "ReEMPLoop", %client); + return; + } + EMPLoop(%client.player); + EMPEKill(%client.player); + //echo("EMP: Re-EMP: "@%client@" - "@%client.player@""); +} diff --git a/scripts/TWM2/Systems/scoremenucmds.cs b/scripts/TWM2/Systems/scoremenucmds.cs index 04fbefa..8d3fb9a 100644 --- a/scripts/TWM2/Systems/scoremenucmds.cs +++ b/scripts/TWM2/Systems/scoremenucmds.cs @@ -831,7 +831,7 @@ function ConstructionGame::processGameLink(%game, %client, %arg1, %arg2, %arg3, %timeString = ""@%daysFloored@" Days, "@%hoursFloored@" Hours, "@%timeLeft@" Minutes"; } //Card - messageClient( %client, 'SetLineHud', "", %tag, %index, "Rank: "@%rank@", XP Points: "@%XP@"."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Rank: "@%rank@" ("@%targetController.rankNumber@"), XP Points: "@%XP@"."); %index++; messageClient( %client, 'SetLineHud', "", %tag, %index, "TWM2 Time Played: "@%timeString@"."); %index++; diff --git a/scripts/chatCommands.cs b/scripts/chatCommands.cs index 9df59b0..32e056d 100644 --- a/scripts/chatCommands.cs +++ b/scripts/chatCommands.cs @@ -38,7 +38,6 @@ function VectToRot(%vec){ function addCMD(%proxy, %name, %send) { $CCHelp[%name] = ""@%send@""; $CommandGroup[%name] = %proxy; - echo("Command "@%name@" added to list under proxy "@%proxy@", Help: "@%send@""); } function chatcommands(%sender, %message) { @@ -252,8 +251,6 @@ function VoteBoss_StartBoss(%BossAbbr) StartTrevor(%pos); // its lots of lulz though! case "Vardison": StartVardison1(%pos); - case "DAVardison": - StartDAVardison(%pos); case "ShadeLord": SpawnShadeLord(%pos); default: diff --git a/scripts/player.cs b/scripts/player.cs index 5f30f01..be314ab 100644 --- a/scripts/player.cs +++ b/scripts/player.cs @@ -3593,31 +3593,9 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am //now call the "onKilled" function if the client was... you know... if(%targetObject.getState() $= "Dead") { - //Is there a boss going? - if(!%targetObject.isZombie && !%targetObject.isBossMinion) { - if($TWM2::BossGoing) { - //Chalk up the kill count :P - $TWM2::BossManager.addKill(%targetObject); - } - } - if(%targetObject.isVardisonMinion) { - $TWM2::VardisonManager.minionCount--; - } - - if($TWM2::PlayingSabo) { - if(Game.Bomb.Carrier == %targetObject) { - if(%damageType == $DamageType::FellOff) { - MessageAll('msgWhoops', "\c5SABOTAGE: Bomb Reset."); - Game.BombDropped(Game.Bomb, %targetObject); - Game.bomb.setPosition($SabotageGame::BombLocation[$CurrentMission]); - } - else { - Game.BombDropped(Game.Bomb, %targetObject); - } - } - } // where did this guy get it? - %damLoc = %targetObject.getDamageLocation(%position); + %damLoc = %targetObject.getDamageLocation(%position); + postObjectDestroyed(%sourceObject, %targetObject, %damageType, %damLoc); // should this guy be blown apart? if( %damageType == $DamageType::Explosion || @@ -3646,138 +3624,6 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am // If we were killed, max out the flash %targetObject.setDamageFlash(0.75); - - %damLoc = %targetObject.getDamageLocation(%position); - if($TWM2::UseGoreMod) { - CreateBlood(%targetObject); - } - - if(%damageType == $DamageType::RapierShield) { - if(%sourceObject.client !$= "") { - UpdateWeaponKillFile(%sourceObject.client, "rapierShieldImage"); - } - } - - if(%targetObject.isZombie) { - if($TWM::PlayingHorde == 1) { - if($HordeGame::Zombiecount > 0) { //ha! this should stop multiple waves from spawning - $HordeGame::Zombiecount--; - messageAll('MsgSPCurrentObjective1' ,"", "Wave "@$HordeGame::CurrentWave@" | Zombies Left: "@$HordeGame::Zombiecount@""); - } - //Echo("Horde: Zombie Killed, "@$HordeGame::Zombiecount@" remain."); //was used for debugging - if($HordeGame::Zombiecount <= 0) { - HordeNextWave($HordeGame::Game, $HordeGame::NextWave); //working on this - } - } - // - if($TWM::PlayingHelljump == 1) { - if($HellJump::Zombiecount > 0) { //ha! this should stop multiple waves from spawning - $HellJump::Zombiecount--; - messageAll('MsgSPCurrentObjective1' ,"", "[W"@$HellJump::CurrentWave@"|G"@$HellJump::CurrentGroup@"|S"@$HellJump::CurrentStrike@"] | Zombies Left: "@$HellJump::Zombiecount@""); - } - //Echo("Horde: Zombie Killed, "@$HordeGame::Zombiecount@" remain."); //was used for debugging - if($HellJump::Zombiecount <= 0) { - $HellJump::Game.GoNextStrike(); - } - } - // - if(%targetObject.isPlayerZombie) { - %sourceClient.TWM2Core.PvPZombieKills++; - if(%sourceClient.TWM2Core.PvPZombieKills >= 100) { - CompleteNWChallenge(%sourceClient, "Defectionator1"); - if(%sourceClient.TWM2Core.PvPZombieKills >= 250) { - CompleteNWChallenge(%sourceClient, "Defectionator2"); - if(%sourceClient.TWM2Core.PvPZombieKills >= 500) { - CompleteNWChallenge(%sourceClient, "Defectionator3"); - } - } - } - } - // - Game.ZkillUpdateScore(%sourceClient, %sourceObject, %targetObject); - %sourceObject.zombiekillsinarow++; - DoZKillstreakChecks(%sourceClient); - } - else { - if(%targetObject.team != %sourceClient.team && !%targetObject.isBoss) { - if(isObject(%sourceClient) && %sourceClient.IsActivePerk("Double Down")) { - GainExperience(%sourceClient, $TWM2::KillXPGain * 2, "[D-D]Enemy Killed "); - } - else { - GainExperience(%sourceClient, $TWM2::KillXPGain, "Enemy Killed "); - } - //Kill Recording.. - if(!%targetObject.isZombie && %sourceObject.isZombie) { - %sourceClient.TWM2Core.PvPHumanKills++; - if(%sourceClient.TWM2Core.PvPHumanKills >= 50) { - CompleteNWChallenge(%sourceClient, "Infectionator1"); - if(%sourceClient.TWM2Core.PvPHumanKills >= 100) { - CompleteNWChallenge(%sourceClient, "Infectionator2"); - if(%sourceClient.TWM2Core.PvPHumanKills >= 250) { - CompleteNWChallenge(%sourceClient, "Infectionator3"); - } - } - } - } - else { - %sourceClient.TWM2Core.PvPKills++; - if(%sourceClient.TWM2Core.PvPKills >= 100) { - CompleteNWChallenge(%sourceClient, "Slayer1"); - if(%sourceClient.TWM2Core.PvPKills >= 250) { - CompleteNWChallenge(%sourceClient, "Slayer2"); - if(%sourceClient.TWM2Core.PvPKills >= 500) { - CompleteNWChallenge(%sourceClient, "Slayer3"); - if(%sourceClient.TWM2Core.PvPKills >= 750) { - CompleteNWChallenge(%sourceClient, "Slayer4"); - if(%sourceClient.TWM2Core.PvPKills >= 1000) { - CompleteNWChallenge(%sourceClient, "Slayer5"); - } - } - } - } - } - } - //Team Gain Perk - if(isObject(%sourceClient) && %sourceClient.IsActivePerk("Team Gain")) { - %TargetSearchMask = $TypeMasks::PlayerObjectType; - InitContainerRadiusSearch(%sourceObject.getPosition(), 20, %TargetSearchMask); //small distance - while ((%potentialTarget = ContainerSearchNext()) != 0){ - if (%potentialTarget.getPosition() != %pos) { - if(%potentialTarget.client.team == %sourceClient.team && %potentialTarget != %sourceObject) { - GainExperience(%potentialTarget.client, $TWM2::KillXPGain, "Team Gain From "@%sourceClient.namebase@" "); - } - } - } - } - //End - doChallengeCheck(%sourceClient, %targetClient); - %sourceObject.killsinarow++; - %sourceObject.killsinarow2++; - //TWM2 3.2 -> Successive Kills - %sourceObject.kills[%damageType]++; - PerformSuccessiveKills(%sourceObject, %damageType); - // - if(%sourceObject.killsinarow2 == 10 && !(%sourceObject.isBoss || %sourceObject.isZombie)) { - MessageAll('MsgWOW', "\c2TWM2: "@%sourceClient.namebase@" is on a killsteak of 10"); - awardClient(%sourceClient, "14"); - } - if(%sourceObject.killsinarow2 == 20 && !(%sourceObject.isBoss || %sourceObject.isZombie)) { - MessageAll('MsgWOW', "\c2TWM2: "@%sourceClient.namebase@" is on a killsteak of 20"); - } - if(%sourceObject.killsinarow2 == 25 && !(%sourceObject.isBoss || %sourceObject.isZombie)) { - MessageAll('MsgWOW', "\c2TWM2: "@%sourceClient.namebase@" is on a killsteak of 25"); - } - DoKillstreakChecks(%sourceClient); - } - } - //Challenges! - doChallengeKillRecording(%sourceObject, %targetObject); - // - //martydom - if(%targetClient !$= "" && %targetClient.IsActivePerk("Martydom")) { - serverPlay3d(SatchelChargeActivateSound, %targetObject.getPosition()); - schedule(2200, 0, "MartydomExplode", %targetObject.getPosition(), %targetClient); - } Game.onClientKilled(%targetClient, %sourceClient, %damageType, %sourceObject, %damLoc); } else if ( %amount > 0.1 ) diff --git a/scripts/projectiles.cs b/scripts/projectiles.cs index 269d354..77443ad 100644 --- a/scripts/projectiles.cs +++ b/scripts/projectiles.cs @@ -25,7 +25,7 @@ function ProjectileData::onCollision(%data, %projectile, %targetObject, %modifie else { %damLoc = ""; } - %test = TWM2Damage(%projectile, %targetObject, %data.directDamage, %data.directDamageType, %damLoc, "projectile"); + %test = CalculateProjectileDamage(%projectile, %targetObject, %data.directDamage, %data.directDamageType, %damLoc, "projectile"); if(%test == 0) { return; } @@ -600,7 +600,7 @@ function RadiusExplosion(%explosionSource, %position, %radius, %damage, %impulse if (%dist > %radius) continue; - %modifier = TWM2Damage(%explosionSource, %targetObject, %damage, %damageType, "", "explosion"); + %modifier = CalculateProjectileDamage(%explosionSource, %targetObject, %damage, %damageType, "", "explosion"); if(%modifier == 0) { return; } From 72e1591f450ae606c1291a4b669803d1bfa0d9e9 Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Tue, 5 Sep 2017 15:54:48 -0500 Subject: [PATCH 28/29] Boss Proficiency Added the back end for the new boss proficiency system coming in 3.9b, Shade Lord proficiency is now installed. --- scripts/TWM2/Bosses/ShadeLord.cs | 928 +++++++++++++++-------------- scripts/TWM2/Systems/BossSystem.cs | 708 ++++++++++++---------- 2 files changed, 860 insertions(+), 776 deletions(-) diff --git a/scripts/TWM2/Bosses/ShadeLord.cs b/scripts/TWM2/Bosses/ShadeLord.cs index 8c6e971..a1d4c69 100644 --- a/scripts/TWM2/Bosses/ShadeLord.cs +++ b/scripts/TWM2/Bosses/ShadeLord.cs @@ -1,3 +1,16 @@ +$Boss::Proficiency["ShadeLord", 0] = "Team Bronze\t1000\tDefeat the Shade Lord with your team dying no more than 25 times"; +$Boss::ProficiencyCode["ShadeLord", 0] = "$TWM2::BossManager.bossKills < 25"; +$Boss::Proficiency["ShadeLord", 1] = "Team Silver\t5000\tDefeat the Shade Lord with your team dying no more than 15 times"; +$Boss::ProficiencyCode["ShadeLord", 1] = "$TWM2::BossManager.bossKills < 15"; +$Boss::Proficiency["ShadeLord", 2] = "Team Gold\t10000\tDefeat the Shade Lord with your team dying no more than 10 times"; +$Boss::ProficiencyCode["ShadeLord", 2] = "$TWM2::BossManager.bossKills < 10"; +$Boss::Proficiency["ShadeLord", 3] = "Unbroken\t25000\tDefeat the Shade Lord without dying, and dealing more than 15% damage to him"; +$Boss::ProficiencyCode["ShadeLord", 3] = "[bProf].bossDeaths == 0 && [dPerc] > 15"; +$Boss::Proficiency["ShadeLord", 4] = "Smite the Shadows\t50000\tDefeat the Shade Lord with the shade lord causing no deaths"; +$Boss::ProficiencyCode["ShadeLord", 4] = "$TWM2::BossManager.bossKills == 0"; +$Boss::Proficiency["ShadeLord", 5] = "Shade Buster\t7500\tDefeat the Shade Lord without dying once by the elemental shade"; +$Boss::ProficiencyCode["ShadeLord", 5] = "[bProf].shadeDeaths == 0"; + //SHADE LORD datablock ParticleData(ShadeSwordParticle) { dragCoeffiecient = 0.0; @@ -428,477 +441,478 @@ function SpawnShadeLord(%position) { } function ShadeLordFunction(%boss, %function, %args) { - switch$(%function) { + switch$(%function) { - //------------- - //Boss Attacks - //------------- - case "Att_ShadeStrike": - %target = getWord(%args, 0); - %boss.setMoveState(true); - %boss.schedule(5000, setMoveState, false); - %boss.setActionThread($Zombie::RogThread,true); - // - %bPos = %boss.getPosition(); - %start1 = vectorAdd(%bPos, "300 -300 50"); - %go = vectorAdd(%bPos, "-300 300 50"); - %interval = 15; - for(%i = 0; %i < 3; %i++) { - %neg = %i % 2 == 0 ? 1 : -1; - %start = vectorAdd(%start1, %neg*%interval*%i@" 0 0"); - %vec = vectorNormalize(vectorSub(%go,%start)); - %p = new SeekerProjectile() { - dataBlock = ShadeLordSword; - initialDirection = %vec; - initialPosition = %start; - }; - %p.sourceObject = %boss; - %p.targetedPlayer = %target; - %beacon = new BeaconObject() { - dataBlock = "SubBeacon"; - beaconType = "vehicle"; - position = %target.player.getWorldBoxCenter(); - }; - %beacon.team = 0; - %beacon.setTarget(0); - MissionCleanup.add(%beacon); - %p.setObjectTarget(%beacon); - DemonMotherMissileFollow(%target,%beacon,%p); - } + //------------- + //Boss Attacks + //------------- + case "Att_ShadeStrike": + %target = getWord(%args, 0); + %boss.setMoveState(true); + %boss.schedule(5000, setMoveState, false); + %boss.setActionThread($Zombie::RogThread,true); + // + %bPos = %boss.getPosition(); + %start1 = vectorAdd(%bPos, "300 -300 50"); + %go = vectorAdd(%bPos, "-300 300 50"); + %interval = 15; + for(%i = 0; %i < 3; %i++) { + %neg = %i % 2 == 0 ? 1 : -1; + %start = vectorAdd(%start1, %neg*%interval*%i@" 0 0"); + %vec = vectorNormalize(vectorSub(%go,%start)); + %p = new SeekerProjectile() { + dataBlock = ShadeLordSword; + initialDirection = %vec; + initialPosition = %start; + }; + %p.sourceObject = %boss; + %p.targetedPlayer = %target; + %beacon = new BeaconObject() { + dataBlock = "SubBeacon"; + beaconType = "vehicle"; + position = %target.player.getWorldBoxCenter(); + }; + %beacon.team = 0; + %beacon.setTarget(0); + MissionCleanup.add(%beacon); + %p.setObjectTarget(%beacon); + DemonMotherMissileFollow(%target,%beacon,%p); + } - case "Att_HealSequence": - %count = getWord(%args, 0); - if(!isObject(%boss) || %boss.getState() $= "dead") { - return; - } - if(%count == 0) { - %boss.setMoveState(true); - %boss.setPosition(vectorAdd(%boss.getPosition(), TWM2Lib_MainControl("getRandomPosition", 300 TAB 1))); - cancel(%boss.moveLoop); - } - if(%count < 25) { - %boss.setDamageLevel(%boss.getDamageLevel() - 0.1); - createLifeEmitter(%boss.getPosition(), PrebeamEmitter, 5000); - } - else { - %boss.schedule(3000, setMoveState, false); - %boss.moveloop = schedule(3000, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); - return; - } - schedule(200, %boss, "ShadeLordFunction", %boss, "Att_HealSequence", %count++); + case "Att_HealSequence": + %count = getWord(%args, 0); + if(!isObject(%boss) || %boss.getState() $= "dead") { + return; + } + if(%count == 0) { + %boss.setMoveState(true); + %boss.setPosition(vectorAdd(%boss.getPosition(), TWM2Lib_MainControl("getRandomPosition", 300 TAB 1))); + cancel(%boss.moveLoop); + } + if(%count < 25) { + %boss.setDamageLevel(%boss.getDamageLevel() - 0.1); + createLifeEmitter(%boss.getPosition(), PrebeamEmitter, 5000); + } + else { + %boss.schedule(3000, setMoveState, false); + %boss.moveloop = schedule(3000, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); + return; + } + schedule(200, %boss, "ShadeLordFunction", %boss, "Att_HealSequence", %count++); - case "Att_ShadeLordDecend": - %count = getWord(%args, 0); - if(%count == 0) { - cancel(%boss.moveLoop); - //%boss.rapierShield = 1; - %boss.setMoveState(true); - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - } - else if(%count > 0 && %count <= 25) { - %pos = "0 0 "@ 250 - (10 * %count); - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - %boss.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(), %pos); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter - }; - } - else if(%count == 26) { - for(%i = 0; %i < ClientGroup.getCount(); %i++) { - %cl = ClientGroup.getObject(%i); - if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { - ShadeLordFunction(%boss, "ShadeLordDropKill", %cl.player); - } - } - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - %boss.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(), "0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter - }; - } - else if(%count > 26 && %count < 40) { - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - %boss.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(), "0 0 1.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter - }; - } - else if(%count == 40) { - %boss.setMoveState(false); - %boss.moveloop = schedule(3000, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); - //flash all - for(%i = 0; %i < ClientGroup.getCount(); %i++) { - %cl = ClientGroup.getObject(%i); - if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { - %cl.player.setWhiteout(1.0); - } - } - return; - } - %count++; - schedule(300, %boss, "ShadeLordFunction", %boss, "Att_ShadeLordDecend", %count); + case "Att_ShadeLordDecend": + %count = getWord(%args, 0); + if(%count == 0) { + cancel(%boss.moveLoop); + //%boss.rapierShield = 1; + %boss.setMoveState(true); + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + } + else if(%count > 0 && %count <= 25) { + %pos = "0 0 "@ 250 - (10 * %count); + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(), %pos); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; + } + else if(%count == 26) { + for(%i = 0; %i < ClientGroup.getCount(); %i++) { + %cl = ClientGroup.getObject(%i); + if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { + ShadeLordFunction(%boss, "ShadeLordDropKill", %cl.player); + } + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(), "0 0 0.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; + } + else if(%count > 26 && %count < 40) { + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(), "0 0 1.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; + } + else if(%count == 40) { + %boss.setMoveState(false); + %boss.moveloop = schedule(3000, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); + //flash all + for(%i = 0; %i < ClientGroup.getCount(); %i++) { + %cl = ClientGroup.getObject(%i); + if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { + %cl.player.setWhiteout(1.0); + } + } + return; + } + %count++; + schedule(300, %boss, "ShadeLordFunction", %boss, "Att_ShadeLordDecend", %count); - case "Att_ShadeLordScream": - cancel(%boss.moveloop); - %boss.setMoveState(true); - %boss.schedule(5000, setMoveState, false); - //create emitter - %screamEmit = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(),"0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeLordScreamEmitter"; //ShadeStormEmitter - }; - %screamEmit.schedule(5000, "delete"); - - //knock down and throw weapons in radius. - %TargetSearchMask = $TypeMasks::PlayerObjectType; - InitContainerRadiusSearch(%boss.getPosition(), 45, %TargetSearchMask); - while ((%potentialTarget = ContainerSearchNext()) != 0) { - if(isSet(%potentialTarget.client)) { - //throw guns, knock down. - %potentialTarget.setActionThread("death1", true); - %potentialTarget.throwweapon(1); - %potentialTarget.throwweapon(0); - %potentialTarget.setMoveState(true); - %potentialTarget.schedule(3000, setMoveState, false); - } - } - // - %boss.moveloop = schedule(5000, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); + case "Att_ShadeLordScream": + cancel(%boss.moveloop); + %boss.setMoveState(true); + %boss.schedule(5000, setMoveState, false); + //create emitter + %screamEmit = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 0.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeLordScreamEmitter"; //ShadeStormEmitter + }; + %screamEmit.schedule(5000, "delete"); - //------------- - //Boss Functions - //------------- - case "ShadeLordDarkAttacks": - if(!isObject(%boss) || %boss.getState() $= "Dead") { - return; - } - if(isObject(%boss.dayCloak)) { - %boss.dayCloak.delete(); - } - if(%boss.randomFX $= "") { - %boss.randomFX = ShadeLordFunction(%boss, "ShadeStormFX", ""); - } - if(%boss.antiSky $= "") { - %boss.antiSky = ShadeLordFunction(%boss, "ShadeStormAntiSky", ""); - } - %attack = getRandom(1, 3); - switch(%attack) { - case 1: - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": SHALDORVAAAAAAAAAAAAAAH!!!!!!!"); - ShadeLordFunction(%boss, "Att_ShadeLordScream", ""); - case 2: - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": Descend Mighty Shade Storm, Destroy all who dare oppose us!"); - ShadeLordFunction(%boss, "Att_ShadeLordDecend", 0); - case 3: - %target = FindValidTarget(%boss); - MessageAll('MessageAll', "\c4"@$TWM2::BossName["ShadeLord"]@": Come forth my shade, Destroy "@getTaggedString(%target.name)@"!"); - if(isObject(%target.player)) { - ShadeLordFunction(%boss, "Att_ShadeStrike", %target.player); - } - else { - MessageAll('MessageAll', "\c4"@$TWM2::BossName["ShadeLord"]@": Hiding in death does not save you "@getTaggedString(%target.name)@""); - } - } - %boss.attacks = schedule(25000, %boss, "ShadeLordFunction", %boss, "ShadeLordDarkAttacks", ""); + //knock down and throw weapons in radius. + %TargetSearchMask = $TypeMasks::PlayerObjectType; + InitContainerRadiusSearch(%boss.getPosition(), 45, %TargetSearchMask); + while ((%potentialTarget = ContainerSearchNext()) != 0) { + if(isSet(%potentialTarget.client)) { + //throw guns, knock down. + %potentialTarget.setActionThread("death1", true); + %potentialTarget.throwweapon(1); + %potentialTarget.throwweapon(0); + %potentialTarget.setMoveState(true); + %potentialTarget.schedule(3000, setMoveState, false); + } + } + // + %boss.moveloop = schedule(5000, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); - case "ShadeLordLightAttacks": - if(!isObject(%boss) || %boss.getState() $= "Dead") { - return; - } - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - if(!isObject(%boss) || !%boss.getState() $= "dead") { - if(isObject(%boss.dayCloak)) { - %boss.dayCloak.delete(); - } - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - return; - } - %attack = getRandom(1, 2); - switch(%attack) { - case 1: - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": SHALDORVAAAAAAAAAAAAAAH!!!!!!!"); - ShadeLordFunction(%boss, "Att_ShadeLordScream", ""); - case 2: - MessageAll('MsgBossEvilness', "\c4"@$TWM2::BossName["ShadeLord"]@": Come forth, and return to me the power of the shadows!"); - ShadeLordFunction(%boss, "Att_HealSequence", 0); - } - %boss.attacks = schedule(25000, %boss, "ShadeLordFunction", %boss, "ShadeLordLightAttacks", ""); + //------------- + //Boss Functions + //------------- + case "ShadeLordDarkAttacks": + if(!isObject(%boss) || %boss.getState() $= "Dead") { + return; + } + if(isObject(%boss.dayCloak)) { + %boss.dayCloak.delete(); + } + if(%boss.randomFX $= "") { + %boss.randomFX = ShadeLordFunction(%boss, "ShadeStormFX", ""); + } + if(%boss.antiSky $= "") { + %boss.antiSky = ShadeLordFunction(%boss, "ShadeStormAntiSky", ""); + } + %attack = getRandom(1, 3); + switch(%attack) { + case 1: + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": SHALDORVAAAAAAAAAAAAAAH!!!!!!!"); + ShadeLordFunction(%boss, "Att_ShadeLordScream", ""); + case 2: + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": Descend Mighty Shade Storm, Destroy all who dare oppose us!"); + ShadeLordFunction(%boss, "Att_ShadeLordDecend", 0); + case 3: + %target = FindValidTarget(%boss); + MessageAll('MessageAll', "\c4"@$TWM2::BossName["ShadeLord"]@": Come forth my shade, Destroy "@getTaggedString(%target.name)@"!"); + if(isObject(%target.player)) { + ShadeLordFunction(%boss, "Att_ShadeStrike", %target.player); + } + else { + MessageAll('MessageAll', "\c4"@$TWM2::BossName["ShadeLord"]@": Hiding in death does not save you "@getTaggedString(%target.name)@""); + } + } + %boss.attacks = schedule(25000, %boss, "ShadeLordFunction", %boss, "ShadeLordDarkAttacks", ""); - case "ShadeStormFX": - if(!isObject(%boss) || %boss.getState() $= "Dead") { - return; - } - %bPos = %boss.getPosition(); - %start1 = vectorAdd(%bPos, "300 -300 50"); - %go = vectorAdd(%bPos, "-300 300 50"); - %interval = 15; - for(%i = 0; %i < 20; %i++) { - %neg = %i % 2 == 0 ? 1 : -1; - %start = vectorAdd(%start1, %neg*%interval*%i@" 0 0"); - %vec = vectorNormalize(vectorSub(%go,%start)); - %p = new SeekerProjectile() { - dataBlock = ShadeLordSword; - initialDirection = %vec; - initialPosition = %start; - }; - %p.sourceObject = %boss; - MissionCleanup.add(%p); - } - %boss.randomFX = schedule(getRandom(10000, 25000), %boss, "ShadeLordFunction", %boss, "ShadeStormFX", ""); - - case "ShadeStormAntiSky": - if(!isObject(%boss) || %boss.getState() $= "Dead") { - return; - } - if(!$ShadeLordBoss::AllowedNighttime) { - return; - } - %killHeight = getWord(%boss.getPosition(), 2) + 50; - for(%i = 0; %i < ClientGroup.getCount(); %i++) { - %cl = ClientGroup.getObject(%i); - if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { - if(getWord(%cl.player.getPosition(), 2) >= %killHeight) { - ShadeLordFunction(%boss, "ShadeLordDropKill", %cl.player); - } - } - } - %boss.antiSky = schedule(2500, %boss, "ShadeLordFunction", %boss, "ShadeStormAntiSky", ""); + case "ShadeLordLightAttacks": + if(!isObject(%boss) || %boss.getState() $= "Dead") { + return; + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + if(!isObject(%boss) || !%boss.getState() $= "dead") { + if(isObject(%boss.dayCloak)) { + %boss.dayCloak.delete(); + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + return; + } + %attack = getRandom(1, 2); + switch(%attack) { + case 1: + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": SHALDORVAAAAAAAAAAAAAAH!!!!!!!"); + ShadeLordFunction(%boss, "Att_ShadeLordScream", ""); + case 2: + MessageAll('MsgBossEvilness', "\c4"@$TWM2::BossName["ShadeLord"]@": Come forth, and return to me the power of the shadows!"); + ShadeLordFunction(%boss, "Att_HealSequence", 0); + } + %boss.attacks = schedule(25000, %boss, "ShadeLordFunction", %boss, "ShadeLordLightAttacks", ""); - case "ShadeLordDoDeath": - %boss.RapierShield = 1; - %boss.inDeath = 1; - if(isObject(%boss.dayCloak)) { - %boss.dayCloak.delete(); - } - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - //set on fire - %fire = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(),"0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "BurnEmitter"; - }; - MissionCleanup.add(%fire); - %fire.schedule(5000, delete); - // - %Boss.setMoveState(true); - %boss.setActionThread("death1", true); - %boss.schedule(5000, "blowup"); - %boss.schedule(5000, "scriptkill"); - schedule(4999, 0, eval, ""@%boss@".rapierShield = 0;"); - - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + case "ShadeStormFX": + if(!isObject(%boss) || %boss.getState() $= "Dead") { + return; + } + %bPos = %boss.getPosition(); + %start1 = vectorAdd(%bPos, "300 -300 50"); + %go = vectorAdd(%bPos, "-300 300 50"); + %interval = 15; + for(%i = 0; %i < 20; %i++) { + %neg = %i % 2 == 0 ? 1 : -1; + %start = vectorAdd(%start1, %neg*%interval*%i@" 0 0"); + %vec = vectorNormalize(vectorSub(%go,%start)); + %p = new SeekerProjectile() { + dataBlock = ShadeLordSword; + initialDirection = %vec; + initialPosition = %start; + }; + %p.sourceObject = %boss; + MissionCleanup.add(%p); + } + %boss.randomFX = schedule(getRandom(10000, 25000), %boss, "ShadeLordFunction", %boss, "ShadeStormFX", ""); - case "ShadeLordToggleCondition": - %flag = getWord(%args, 0); - if(!isObject(%boss) || %boss.getState() $= "dead") { - return; - } - cancel(%boss.attacks); - if(%flag) { - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - %Boss.setMoveState(true); - %Boss.setActionThread("cel4",true); - %Boss.schedule(3500, "SetMoveState", false); - skyVeryDark(); + case "ShadeStormAntiSky": + if(!isObject(%boss) || %boss.getState() $= "Dead") { + return; + } + if(!$ShadeLordBoss::AllowedNighttime) { + return; + } + %killHeight = getWord(%boss.getPosition(), 2) + 50; + for(%i = 0; %i < ClientGroup.getCount(); %i++) { + %cl = ClientGroup.getObject(%i); + if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { + if(getWord(%cl.player.getPosition(), 2) >= %killHeight) { + ShadeLordFunction(%boss, "ShadeLordDropKill", %cl.player); + } + } + } + %boss.antiSky = schedule(2500, %boss, "ShadeLordFunction", %boss, "ShadeStormAntiSky", ""); - %boss.attacks = ShadeLordFunction(%boss, "ShadeLordDarkAttacks", ""); - } - else { - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); - %Boss.setMoveState(true); - %Boss.setActionThread("death1",true); - %Boss.schedule(3000, "setActionThread", "cel4", true); - %Boss.schedule(4500, "SetMoveState", false); - skyDusk(); - - cancel(%boss.antiSky); - cancel(%boss.randomFX); - - %boss.antiSky = ""; - %boss.randomFX = ""; - %boss.attacks = schedule(4500, %boss, "ShadeLordFunction", %boss, "ShadeLordLightAttacks", ""); - } + case "ShadeLordDoDeath": + %boss.RapierShield = 1; + %boss.inDeath = 1; + if(isObject(%boss.dayCloak)) { + %boss.dayCloak.delete(); + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + //set on fire + %fire = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 0.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "BurnEmitter"; + }; + MissionCleanup.add(%fire); + %fire.schedule(5000, delete); + // + %Boss.setMoveState(true); + %boss.setActionThread("death1", true); + %boss.schedule(5000, "blowup"); + %boss.schedule(5000, "scriptkill"); + schedule(4999, 0, eval, ""@%boss@".rapierShield = 0;"); - case "ShadeLordDoMove": - if(!isobject(%boss) || %boss.getState() $= "Dead") { - if(isObject(%boss.dayCloak)) { - %boss.dayCloak.delete(); - } - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - } - return; - } - if(%boss.getDamageLeftPct() < 0.025) { - ShadeLordFunction(%boss, "ShadeLordDoDeath", ""); - } - if(%boss.getDamageLeftPct() < 0.4) { - if($ShadeLordBoss::AllowedNighttime == 1) { - $ShadeLordBoss::AllowedNighttime = 0; - ShadeLordFunction(%boss, "ShadeLordToggleCondition", 0); - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": No, You will not break the barrier of dark!"); - } - } - else { - if($ShadeLordBoss::AllowedNighttime == 0) { - $ShadeLordBoss::AllowedNighttime = 1; - ShadeLordFunction(%boss, "ShadeLordToggleCondition", 1); - MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": Awaken, mighty storm of shade, bring forth the doom of our foes!"); - } - } - if(isObject(%boss.dayCloak) && !%boss.inDeath) { - %boss.dayCloak.delete(); - %boss.dayCloak = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(),"0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "dayCloakEmitter"; //ShadeStormEmitter - }; - MissionCleanup.add(%boss.dayCloak); - } - else { - if($ShadeLordBoss::AllowedNighttime == 0) { - %boss.dayCloak = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(),"0 0 0.5"); - dataBlock = "defaultEmissionDummy"; - emitter = "dayCloakEmitter"; //ShadeStormEmitter - }; - } - } - if(isObject(%boss.shadeStorm)) { - %boss.shadeStorm.delete(); - %boss.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(),"0 0 250"); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter - }; - } - else { - if($ShadeLordBoss::AllowedNighttime == 1) { - %boss.shadeStorm = new ParticleEmissionDummy(){ - position = vectoradd(%boss.getPosition(),"0 0 250"); - dataBlock = "defaultEmissionDummy"; - emitter = "ShadeStormEmitter"; //ShadeStormEmitter - }; - } - } - %pos = %boss.getworldboxcenter(); - %closestClient = ZombieLookForTarget(%boss); - %z = getWord(%pos, 2); - if(%z < -300) { - %boss.startFade(400, 0, true); - %boss.startFade(1000, 0, false); - %boss.setPosition(vectorAdd(vectoradd(%closestclient.getPosition(), "0 0 20"), TWM2Lib_MainControl("getRandomPosition", 25 TAB 1))); - %boss.setVelocity("0 0 0"); - MessageAll('MsgVardison', "\c4"@$TWM2::BossName["ShadeLord"]@": I'm back...."); - } - %closestDistance = getWord(%closestClient,1); - %closestClient = getWord(%closestClient,0).Player; - if(%closestDistance <= $Zombie::detectDist) { - if(%closestDistance < 10) { - ShadeLordFunction(%boss, "ShadeLordDropKill", %closestClient); - MessageAll('MsgVardison', "\c4"@$TWM2::BossName["ShadeLord"]@": Feel The Vengeance of the Shadows "@getTaggedString(%closestClient.client.name)@"."); - %closestClient.setMoveState(true); - ShadeLordFunction(%boss, "ShadeLordRandomTeleport", ""); - } - if(%boss.hastarget != 1){ - %boss.hastarget = 1; - } - %vector = ZgetFacingDirection(%boss,%closestClient,%pos); - %vector = vectorscale(%vector, ($Zombie::DForwardSpeed) * 0.6); - %upvec = "150"; - %x = Getword(%vector,0); - %y = Getword(%vector,1); - %z = Getword(%vector,2); - if(%z >= ($Zombie::DForwardSpeed)) - %upvec = (%upvec * 5); - %vector = %x@" "@%y@" "@%upvec; - %boss.applyImpulse(%pos, %vector); - } - else if(%boss.hastarget == 1){ - %boss.hastarget = 0; - %boss.DemonRmove = schedule(100, %boss, "ZSetRandomMove", %boss); - } - %boss.moveloop = schedule(230, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)],%boss.getPosition()); - case "ShadeLordRandomTeleport": - if(%boss.getState() $= "dead") { - return; - } - %newPosition = vectorAdd(%boss.getPosition(), TWM2Lib_MainControl("getRandomPosition", 150 TAB 1)); - %boss.setPosition(%newPosition); + case "ShadeLordToggleCondition": + %flag = getWord(%args, 0); + if(!isObject(%boss) || %boss.getState() $= "dead") { + return; + } + cancel(%boss.attacks); + if(%flag) { + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + %Boss.setMoveState(true); + %Boss.setActionThread("cel4",true); + %Boss.schedule(3500, "SetMoveState", false); + skyVeryDark(); - case "ShadeLordDropKill": - %target = getWord(%args, 0); - %incoming = vectorAdd(%target.getPosition(), vectorAdd(TWM2Lib_MainControl("getRandomPosition", 70 TAB 1), "0 0 250")); - %vec = vectorNormalize(vectorSub(%target.getPosition(),%incoming)); - %p = new SeekerProjectile() { - dataBlock = ShadeLordSword; - initialDirection = %vec; - initialPosition = %incoming; - }; - %p.sourceObject = %boss; - %p.targetedPlayer = %target; - %beacon = new BeaconObject() { - dataBlock = "SubBeacon"; - beaconType = "vehicle"; - position = %target.getWorldBoxCenter(); - }; - %beacon.team = 0; - %beacon.setTarget(0); - MissionCleanup.add(%beacon); - %p.setObjectTarget(%beacon); - DemonMotherMissileFollow(%target,%beacon,%p); + %boss.attacks = ShadeLordFunction(%boss, "ShadeLordDarkAttacks", ""); + } + else { + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + Serverplay3D($Ion::ThunderSound[mFloor(getRandom() * $Ion::ThunderSoundCount)], %boss.getPosition()); + %Boss.setMoveState(true); + %Boss.setActionThread("death1",true); + %Boss.schedule(3000, "setActionThread", "cel4", true); + %Boss.schedule(4500, "SetMoveState", false); + skyDusk(); - //------------- - //Misc Functions - //------------- - case "DoReturnMissile": - %ini = getWord(%args, 0); - %src = getWord(%args, 1); - %final = vectorAdd(%ini.getPosition(), vectorAdd(TWM2Lib_MainControl("getRandomPosition", 70 TAB 1), "0 0 250")); - %vec = vectorNormalize(vectorSub(%final, %ini.getPosition())); - %p = new SeekerProjectile() { - dataBlock = ShadeLordSword; - initialDirection = %vec; - initialPosition = vectorAdd(%ini.getPosition(), "0 0 3"); - }; - %p.sourceObject = %src; + cancel(%boss.antiSky); + cancel(%boss.randomFX); - default: - error("ShadeLordFunction(): Non-existent SL function call "@%function@"."); + %boss.antiSky = ""; + %boss.randomFX = ""; + %boss.attacks = schedule(4500, %boss, "ShadeLordFunction", %boss, "ShadeLordLightAttacks", ""); + } - } + case "ShadeLordDoMove": + if(!isobject(%boss) || %boss.getState() $= "Dead") { + if(isObject(%boss.dayCloak)) { + %boss.dayCloak.delete(); + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + } + return; + } + if(%boss.getDamageLeftPct() < 0.025) { + ShadeLordFunction(%boss, "ShadeLordDoDeath", ""); + } + if(%boss.getDamageLeftPct() < 0.4) { + if($ShadeLordBoss::AllowedNighttime == 1) { + $ShadeLordBoss::AllowedNighttime = 0; + ShadeLordFunction(%boss, "ShadeLordToggleCondition", 0); + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": No, You will not break the barrier of dark!"); + } + } + else { + if($ShadeLordBoss::AllowedNighttime == 0) { + $ShadeLordBoss::AllowedNighttime = 1; + ShadeLordFunction(%boss, "ShadeLordToggleCondition", 1); + MessageAll('MsgBossSpawn', "\c4"@$TWM2::BossName["ShadeLord"]@": Awaken, mighty storm of shade, bring forth the doom of our foes!"); + } + } + if(isObject(%boss.dayCloak) && !%boss.inDeath) { + %boss.dayCloak.delete(); + %boss.dayCloak = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 0.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "dayCloakEmitter"; //ShadeStormEmitter + }; + MissionCleanup.add(%boss.dayCloak); + } + else { + if($ShadeLordBoss::AllowedNighttime == 0) { + %boss.dayCloak = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 0.5"); + dataBlock = "defaultEmissionDummy"; + emitter = "dayCloakEmitter"; //ShadeStormEmitter + }; + } + } + if(isObject(%boss.shadeStorm)) { + %boss.shadeStorm.delete(); + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 250"); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; + } + else { + if($ShadeLordBoss::AllowedNighttime == 1) { + %boss.shadeStorm = new ParticleEmissionDummy(){ + position = vectoradd(%boss.getPosition(),"0 0 250"); + dataBlock = "defaultEmissionDummy"; + emitter = "ShadeStormEmitter"; //ShadeStormEmitter + }; + } + } + %pos = %boss.getworldboxcenter(); + %closestClient = ZombieLookForTarget(%boss); + %z = getWord(%pos, 2); + if(%z < -300) { + %boss.startFade(400, 0, true); + %boss.startFade(1000, 0, false); + %boss.setPosition(vectorAdd(vectoradd(%closestclient.getPosition(), "0 0 20"), TWM2Lib_MainControl("getRandomPosition", 25 TAB 1))); + %boss.setVelocity("0 0 0"); + MessageAll('MsgVardison', "\c4"@$TWM2::BossName["ShadeLord"]@": I'm back...."); + } + %closestDistance = getWord(%closestClient,1); + %closestClient = getWord(%closestClient,0).Player; + if(%closestDistance <= $Zombie::detectDist) { + if(%closestDistance < 10) { + ShadeLordFunction(%boss, "ShadeLordDropKill", %closestClient); + MessageAll('MsgVardison', "\c4"@$TWM2::BossName["ShadeLord"]@": Feel The Vengeance of the Shadows "@getTaggedString(%closestClient.client.name)@"."); + //%closestClient.setMoveState(true); + ShadeLordFunction(%boss, "ShadeLordRandomTeleport", ""); + } + if(%boss.hastarget != 1){ + %boss.hastarget = 1; + } + %vector = ZgetFacingDirection(%boss,%closestClient,%pos); + %vector = vectorscale(%vector, ($Zombie::DForwardSpeed) * 0.6); + %upvec = "150"; + %x = Getword(%vector,0); + %y = Getword(%vector,1); + %z = Getword(%vector,2); + if(%z >= ($Zombie::DForwardSpeed)) { + %upvec = (%upvec * 5); + } + %vector = %x@" "@%y@" "@%upvec; + %boss.applyImpulse(%pos, %vector); + } + else if(%boss.hastarget == 1){ + %boss.hastarget = 0; + %boss.DemonRmove = schedule(100, %boss, "ZSetRandomMove", %boss); + } + %boss.moveloop = schedule(230, %boss, "ShadeLordFunction", %boss, "ShadeLordDoMove", ""); + + case "ShadeLordRandomTeleport": + if(%boss.getState() $= "dead") { + return; + } + %newPosition = vectorAdd(%boss.getPosition(), TWM2Lib_MainControl("getRandomPosition", 150 TAB 1)); + %boss.setPosition(%newPosition); + + case "ShadeLordDropKill": + %target = getWord(%args, 0); + %incoming = vectorAdd(%target.getPosition(), vectorAdd(TWM2Lib_MainControl("getRandomPosition", 70 TAB 1), "0 0 250")); + %vec = vectorNormalize(vectorSub(%target.getPosition(),%incoming)); + %p = new SeekerProjectile() { + dataBlock = ShadeLordSword; + initialDirection = %vec; + initialPosition = %incoming; + }; + %p.sourceObject = %boss; + %p.targetedPlayer = %target; + %beacon = new BeaconObject() { + dataBlock = "SubBeacon"; + beaconType = "vehicle"; + position = %target.getWorldBoxCenter(); + }; + %beacon.team = 0; + %beacon.setTarget(0); + MissionCleanup.add(%beacon); + %p.setObjectTarget(%beacon); + DemonMotherMissileFollow(%target,%beacon,%p); + + //------------- + //Misc Functions + //------------- + case "DoReturnMissile": + %ini = getWord(%args, 0); + %src = getWord(%args, 1); + %final = vectorAdd(%ini.getPosition(), vectorAdd(TWM2Lib_MainControl("getRandomPosition", 70 TAB 1), "0 0 250")); + %vec = vectorNormalize(vectorSub(%final, %ini.getPosition())); + %p = new SeekerProjectile() { + dataBlock = ShadeLordSword; + initialDirection = %vec; + initialPosition = vectorAdd(%ini.getPosition(), "0 0 3"); + }; + %p.sourceObject = %src; + + default: + error("ShadeLordFunction(): Non-existent SL function call "@%function@"."); + + } } diff --git a/scripts/TWM2/Systems/BossSystem.cs b/scripts/TWM2/Systems/BossSystem.cs index ac87d75..c98aecb 100644 --- a/scripts/TWM2/Systems/BossSystem.cs +++ b/scripts/TWM2/Systems/BossSystem.cs @@ -1,340 +1,410 @@ -function InitiateBoss(%Boss, %name) { - if($TWM::PlayingHorde || $TWM::PlayingHelljump) { - error("SERVER: Cannot initiate boss, in horde/helljump"); - return; - } - - if(!isObject($TWM2::BossManager)) { - $TWM2::BossManager = new scriptObject() { - class = "BossManager"; - }; - } - if(!%Boss.isMultiPhaseBoss && !%Boss.isFirstPhase) { - $TWM2::BossManager.bossKills = 0; - } - $TWM2::BossManager.bossObject = %Boss; - $TWM2::BossManager.activeBoss = %name; +//BossSystem.cs +//Robert C. Fritzen (Phantom139) +//TWM 2 - $TWM2::BossGoing = 1; - switch$(%name) { - case "Yvex": - %print = "BOSS BATTLE \n LORD YVEX"; - case "CnlWindshear": - %print = "BOSS BATTLE \n COLONEL WINDSHEAR"; - case "GhostOfLightning": - %print = "BOSS BATTLE \n GHOST OF LIGHTNING"; - case "Vengenor": - %print = "BOSS BATTLE \n GENERAL VENGENOR"; - case "LordRog": - %print = "BOSS BATTLE \n LORD ROG"; - case "Insignia": - %print = "BOSS BATTLE \n MAJOR INSIGNIA"; - case "Vardison1": - %print = "BOSS BATTLE \n LORD VARDISON"; - case "Vardison2": - %print = "BOSS ALERT \n LORD VARDISON HAS ENTERED HIS SECOND FORM"; - case "Vardison3": - %print = "BOSS ALERT \n LORD VARDISON HAS ENTERED HIS FINAL FORM"; - case "Trevor": - %print = "BOSS BATTLE \n LORDRANIUS TREVOR"; - case "Stormrider": - %print = "CLASSIC BOSS BATTLE \n COMMANDER STORMRIDER"; - case "GhostOfFire": - %print = "CLASSIC BOSS BATTLE \n GHOST OF FIRE"; - case "ShadeLord": - %print = "BOSS BATTLE \n THE SHADE LORD"; - } - //INITIATE TO CLIENTS - %count = ClientGroup.getCount(); - for(%i = 0; %i < %count; %i++) { - %cl = ClientGroup.getObject(%i); - BottomPrint(%cl, ""@%print@"", 5, 3); - %cl.damageToBoss = 0; - } - %boss.isBoss = 1; // the isBoss Flag helps us out with things - BossCheckUp(%boss, %name); - - if($BossMaxHealth[%name] $= "") { - $BossMaxHealth[%name] = %boss.getMaxDamage(); - } +function InitiateBoss(%Boss, %name) { + if($TWM::PlayingHorde || $TWM::PlayingHelljump) { + error("SERVER: Cannot initiate boss, in horde/helljump"); + return; + } + + if(!isObject($TWM2::BossManager)) { + $TWM2::BossManager = new scriptObject() { + class = "BossManager"; + }; + } + if(!%Boss.isMultiPhaseBoss && !%Boss.isFirstPhase) { + $TWM2::BossManager.bossKills = 0; + } + $TWM2::BossManager.bossObject = %Boss; + $TWM2::BossManager.activeBoss = %name; + + $TWM2::BossGoing = 1; + switch$(%name) { + case "Yvex": + %print = "BOSS BATTLE \n LORD YVEX"; + case "CnlWindshear": + %print = "BOSS BATTLE \n COLONEL WINDSHEAR"; + case "GhostOfLightning": + %print = "BOSS BATTLE \n GHOST OF LIGHTNING"; + case "Vengenor": + %print = "BOSS BATTLE \n GENERAL VENGENOR"; + case "LordRog": + %print = "BOSS BATTLE \n LORD ROG"; + case "Insignia": + %print = "BOSS BATTLE \n MAJOR INSIGNIA"; + case "Vardison1": + %print = "BOSS BATTLE \n LORD VARDISON"; + case "Vardison2": + %print = "BOSS ALERT \n LORD VARDISON HAS ENTERED HIS SECOND FORM"; + case "Vardison3": + %print = "BOSS ALERT \n LORD VARDISON HAS ENTERED HIS FINAL FORM"; + case "Trevor": + %print = "BOSS BATTLE \n LORDRANIUS TREVOR"; + case "Stormrider": + %print = "CLASSIC BOSS BATTLE \n COMMANDER STORMRIDER"; + case "GhostOfFire": + %print = "CLASSIC BOSS BATTLE \n GHOST OF FIRE"; + case "ShadeLord": + %print = "BOSS BATTLE \n THE SHADE LORD"; + } + //INITIATE TO CLIENTS + %count = ClientGroup.getCount(); + for(%i = 0; %i < %count; %i++) { + %cl = ClientGroup.getObject(%i); + BottomPrint(%cl, ""@%print@"", 5, 3); + %cl.damageToBoss = 0; + resetBossProficiency(%cl); + } + %boss.isBoss = 1; // the isBoss Flag helps us out with things + BossCheckUp(%boss, %name); + + if($BossMaxHealth[%name] $= "") { + $BossMaxHealth[%name] = %boss.getMaxDamage(); + } +} + +function resetBossProficiency(%client) { + if(isObject(%client.bossProficiency)) { + %client.bossProficiency.delete(); + } + %client.bossProficiency = new ScriptObject() { + class = "BossProficiency"; + name = "ClientBossProficiency_" + %client; + client = %client; + }; } function BossCheckUp(%boss, %name) { - %percentage = (mFloor(%boss.getDamageLeft()*100) / mFloor(%boss.getMaxDamage()*100)) * 100; - MessageAll('MsgSPCurrentObjective1', "", "Boss Battle: "@$TWM2::BossName[%name]@" [Boss Kill Count: "@$TWM2::BossManager.bossKills@"]"); - MessageAll('MsgSPCurrentObjective2', "", "Boss HP: "@mFloor(%boss.getDamageLeft()*100)@"/"@mFloor(%boss.getMaxDamage()*100)@" ("@%percentage@"%)"); + %percentage = (mFloor(%boss.getDamageLeft()*100) / mFloor(%boss.getMaxDamage()*100)) * 100; + MessageAll('MsgSPCurrentObjective1', "", "Boss Battle: "@$TWM2::BossName[%name]@" [Boss Kill Count: "@$TWM2::BossManager.bossKills@"]"); + MessageAll('MsgSPCurrentObjective2', "", "Boss HP: "@mFloor(%boss.getDamageLeft()*100)@"/"@mFloor(%boss.getMaxDamage()*100)@" ("@%percentage@"%)"); - if(%name !$= "CnlWindshear" && %name !$= "Trevor" && %name !$= "Stormrider") { - if(!isObject(%boss) || %boss.getState() $= "dead") { - if(%name $= "Vardison1") { - %count = ClientGroup.getCount(); - for(%i = 0; %i < %count; %i++) { - %cl = ClientGroup.getObject(%i); - recordAction(%cl, "BOSS", "Vardison1"); - } - SpawnVardison2(%boss.getPosition()); - return; - } - if(%name $= "Vardison2") { - %count = ClientGroup.getCount(); - for(%i = 0; %i < %count; %i++) { - %cl = ClientGroup.getObject(%i); - recordAction(%cl, "BOSS", "Vardison2"); - } - SpawnVardison3(%boss.getPosition()); - return; - } - //the boss has been defeated, horrah!!! - %count = ClientGroup.getCount(); - for(%i = 0; %i < %count; %i++) { - %cl = ClientGroup.getObject(%i); - if(%cl.damageToBoss > 0) { - %cl.GiveBossAward(%name); - } - } - $TWM2::BossGoing = 0; - MessageAll('MsgSPCurrentObjective1', "", "Welcome to TWM2!"); - MessageAll('MsgSPCurrentObjective2', "", "Phantom139, DoL, Signal360"); - return; - } - schedule(1000, 0, "BossCheckUp", %boss, %name); - } - else { - if(!isObject(%boss)) { - %count = ClientGroup.getCount(); - for(%i = 0; %i < %count; %i++) { - %cl = ClientGroup.getObject(%i); - if(%cl.damageToBoss) { - %cl.GiveBossAward(%name); - } - } - MessageAll('MsgSPCurrentObjective1', "", "Welcome to TWM2!"); - MessageAll('MsgSPCurrentObjective2', "", "Phantom139, DoL, Signal360"); - $TWM2::BossGoing = 0; - return; - } - schedule(1000, 0, "BossCheckUp", %boss, %name); - } + if(%name !$= "CnlWindshear" && %name !$= "Trevor" && %name !$= "Stormrider") { + if(!isObject(%boss) || %boss.getState() $= "dead") { + if(%name $= "Vardison1") { + %count = ClientGroup.getCount(); + for(%i = 0; %i < %count; %i++) { + %cl = ClientGroup.getObject(%i); + recordAction(%cl, "BOSS", "Vardison1"); + } + SpawnVardison2(%boss.getPosition()); + return; + } + if(%name $= "Vardison2") { + %count = ClientGroup.getCount(); + for(%i = 0; %i < %count; %i++) { + %cl = ClientGroup.getObject(%i); + recordAction(%cl, "BOSS", "Vardison2"); + } + SpawnVardison3(%boss.getPosition()); + return; + } + //the boss has been defeated, horrah!!! + %count = ClientGroup.getCount(); + for(%i = 0; %i < %count; %i++) { + %cl = ClientGroup.getObject(%i); + if(%cl.damageToBoss > 0) { + %cl.GiveBossAward(%name); + } + } + $TWM2::BossGoing = 0; + MessageAll('MsgSPCurrentObjective1', "", "Welcome to TWM2!"); + MessageAll('MsgSPCurrentObjective2', "", "Phantom139, DoL, Signal360"); + return; + } + schedule(1000, 0, "BossCheckUp", %boss, %name); + } + else { + if(!isObject(%boss)) { + %count = ClientGroup.getCount(); + for(%i = 0; %i < %count; %i++) { + %cl = ClientGroup.getObject(%i); + if(%cl.damageToBoss) { + %cl.GiveBossAward(%name); + } + } + MessageAll('MsgSPCurrentObjective1', "", "Welcome to TWM2!"); + MessageAll('MsgSPCurrentObjective2', "", "Phantom139, DoL, Signal360"); + $TWM2::BossGoing = 0; + return; + } + schedule(1000, 0, "BossCheckUp", %boss, %name); + } } function GameConnection::GiveBossAward(%client, %bossName) { - %scriptController = %client.TWM2Core; - %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; - //you earn less EXP every time you defeat a specific boss, so tread lightly on those defeat counts :) - - %damageCount = %client.damageToBoss; - %maxHP = $BossMaxHealth[%bossName]; - - %percentage = (%damageCount / %maxHP) * 100; - if(%percentage > 5) { - recordAction(%client, "BOSS", %bossName); - - if(!isSet(%scriptController.bossDefeatCount[%bossName])) { - %scriptController.bossDefeatCount[%bossName] = 0; - } - if(%bossName $= "Yvex") { - AwardClient(%client, "1"); - } - else if(%bossName $= "CnlWindshear") { - AwardClient(%client, "8"); - } - else if(%bossName $= "GhostOfLightning") { - AwardClient(%client, "9"); - } - else if(%bossName $= "Vengenor") { - AwardClient(%client, "10"); - } - else if(%bossName $= "LordRog") { - AwardClient(%client, "11"); - } - else if(%bossName $= "Insignia") { - AwardClient(%client, "12"); - } - else if(%bossName $= "GhostOfFire") { - AwardClient(%client, "27"); - } - else if(%bossName $= "Stormrider") { - AwardClient(%client, "28"); - } - else if(%bossName $= "ShadeLord") { - AwardClient(%client, "30"); - } - //VARDISON - else if(%bossName $= "Vardison3") { - AwardClient(%client, 13); - if($TWM2::VardisonDifficulty == 1) { - CompleteNWChallenge(%client, "VardEasy"); - } - else if($TWM2::VardisonDifficulty == 2) { - CompleteNWChallenge(%client, "VardNorm"); - } - else if($TWM2::VardisonDifficulty == 3) { - CompleteNWChallenge(%client, "VardHard"); - } - else if($TWM2::VardisonDifficulty == 4) { - CompleteNWChallenge(%client, "VardWtf"); - } - } - else if(%bossName $= "Trevor") { - AwardClient(%client, 15); - } - //rank writing - %scriptController.bossDefeatCount[%bossName]++; - %scriptController.save(%file); + %scriptController = %client.TWM2Core; + %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; + //you earn less EXP every time you defeat a specific boss, so tread lightly on those defeat counts :) - %award = mFloor($TWM2::BossXPAward[%bossName] / %scriptController.bossDefeatCount[%bossName]); - GainExperience(%client, %award, ""@%bossName@" defeated, congratulations! "); - CheckBossChallenge(%client, %bossName); - } - else { - MessageClient(%client, 'msgFailed', "\c5Command: The boss was defeated, however your input to the team effort was minimal... you must provide support to your allies in need."); - MessageClient(%client, 'msgFailed', "\c2Data: You inflicted "@%percentage@"% damage to the boss, in order to be eligable for rewards, you must inflict at least 5%."); - } + %damageCount = %client.damageToBoss; + %maxHP = $BossMaxHealth[%bossName]; + + %percentage = (%damageCount / %maxHP) * 100; + if(%percentage > 5) { + recordAction(%client, "BOSS", %bossName); + + if(!isSet(%scriptController.bossDefeatCount[%bossName])) { + %scriptController.bossDefeatCount[%bossName] = 0; + } + if(%bossName $= "Yvex") { + AwardClient(%client, "1"); + } + else if(%bossName $= "CnlWindshear") { + AwardClient(%client, "8"); + } + else if(%bossName $= "GhostOfLightning") { + AwardClient(%client, "9"); + } + else if(%bossName $= "Vengenor") { + AwardClient(%client, "10"); + } + else if(%bossName $= "LordRog") { + AwardClient(%client, "11"); + } + else if(%bossName $= "Insignia") { + AwardClient(%client, "12"); + } + else if(%bossName $= "GhostOfFire") { + AwardClient(%client, "27"); + } + else if(%bossName $= "Stormrider") { + AwardClient(%client, "28"); + } + else if(%bossName $= "ShadeLord") { + AwardClient(%client, "30"); + } + //VARDISON + else if(%bossName $= "Vardison3") { + AwardClient(%client, 13); + if($TWM2::VardisonDifficulty == 1) { + CompleteNWChallenge(%client, "VardEasy"); + } + else if($TWM2::VardisonDifficulty == 2) { + CompleteNWChallenge(%client, "VardNorm"); + } + else if($TWM2::VardisonDifficulty == 3) { + CompleteNWChallenge(%client, "VardHard"); + } + else if($TWM2::VardisonDifficulty == 4) { + CompleteNWChallenge(%client, "VardWtf"); + } + } + else if(%bossName $= "Trevor") { + AwardClient(%client, 15); + } + //rank writing + %scriptController.bossDefeatCount[%bossName]++; + %scriptController.save(%file); + + %award = mFloor($TWM2::BossXPAward[%bossName] / %scriptController.bossDefeatCount[%bossName]); + GainExperience(%client, %award, ""@%bossName@" defeated, congratulations! "); + CheckBossChallenge(%client, %bossName); + CheckBossProficiency(%client, %bossName); + } + else { + MessageClient(%client, 'msgFailed', "\c5Command: The boss was defeated, however your input to the team effort was minimal... you must provide support to your allies in need."); + MessageClient(%client, 'msgFailed', "\c2Data: You inflicted "@%percentage@"% damage to the boss, in order to be eligable for rewards, you must inflict at least 5%."); + } } function FindValidTarget(%boss, %counter) { //This is usefull - if(%counter $= "") { - %counter = 10; //10 attempts - } - for(%i = 0; %i < %counter; %i++) { - %test = ClientGroup.getObject(getRandom(0, ClientGroup.getCount())); - if(isObject(%test)) { - %tPL = %test.getControlObject(); - if(isObject(%tPL)) { - if(isPlayer(%tPL)) { - if(%tPL.getState() !$= "dead") { - //Got one! - return %test; - } - } - else { - return %test; - } - } - } - } - return -1; //Found nothing. + if(%counter $= "") { + %counter = 10; //10 attempts + } + for(%i = 0; %i < %counter; %i++) { + %test = ClientGroup.getObject(getRandom(0, ClientGroup.getCount())); + if(isObject(%test)) { + %tPL = %test.getControlObject(); + if(isObject(%tPL)) { + if(isPlayer(%tPL)) { + if(%tPL.getState() !$= "dead") { + //Got one! + return %test; + } + } + else { + return %test; + } + } + } + } + return -1; //Found nothing. } function CheckBossChallenge(%client, %boss) { - %scriptController = %client.TWM2Core; - %dc = %scriptController.bossDefeatCount[%boss]; - switch$(%boss) { - case "Yvex": - if(%dc >= 3) { - CompleteNWChallenge(%client, "Yvex1"); - } - if(%dc >= 5) { - CompleteNWChallenge(%client, "Yvex2"); - } - if(%dc >= 10) { - CompleteNWChallenge(%client, "Yvex3"); - } - case "CnlWindshear": - if(%dc >= 3) { - CompleteNWChallenge(%client, "CWS1"); - } - if(%dc >= 5) { - CompleteNWChallenge(%client, "CWS2"); - } - if(%dc >= 10) { - CompleteNWChallenge(%client, "CWS3"); - } - case "GhostOfLightning": - if(%dc >= 3) { - CompleteNWChallenge(%client, "GOL1"); - } - if(%dc >= 5) { - CompleteNWChallenge(%client, "GOL2"); - } - if(%dc >= 10) { - CompleteNWChallenge(%client, "GOL3"); - } - case "GhostOfFire": - if(%dc >= 1) { - CompleteNWChallenge(%client, "GOF1"); - } - if(%dc >= 3) { - CompleteNWChallenge(%client, "GOF2"); - } - if(%dc >= 5) { - CompleteNWChallenge(%client, "GOF3"); - } - case "Vegenor": - if(%dc >= 3) { - CompleteNWChallenge(%client, "Veg1"); - } - if(%dc >= 5) { - CompleteNWChallenge(%client, "Veg2"); - } - if(%dc >= 10) { - CompleteNWChallenge(%client, "Veg3"); - } - case "LordRog": - if(%dc >= 2) { - CompleteNWChallenge(%client, "LRog1"); - } - if(%dc >= 4) { - CompleteNWChallenge(%client, "LRog2"); - } - if(%dc >= 7) { - CompleteNWChallenge(%client, "LRog3"); - } - case "Insignia": - if(%dc >= 2) { - CompleteNWChallenge(%client, "Ins1"); - } - if(%dc >= 4) { - CompleteNWChallenge(%client, "Ins2"); - } - if(%dc >= 7) { - CompleteNWChallenge(%client, "Ins3"); - } - case "Vardison3": - if(%dc >= 1) { - CompleteNWChallenge(%client, "Vard1"); - } - if(%dc >= 3) { - CompleteNWChallenge(%client, "Vard2"); - } - if(%dc >= 5) { - CompleteNWChallenge(%client, "Vard3"); - } - case "Stormrider": - if(%dc >= 3) { - CompleteNWChallenge(%client, "Stormrider1"); - } - if(%dc >= 5) { - CompleteNWChallenge(%client, "Stormrider2"); - } - if(%dc >= 10) { - CompleteNWChallenge(%client, "Stormrider3"); - } - case "Trevor": - if(%dc >= 2) { - CompleteNWChallenge(%client, "Trev1"); - } - if(%dc >= 4) { - CompleteNWChallenge(%client, "Trev2"); - } - if(%dc >= 7) { - CompleteNWChallenge(%client, "Trev3"); - } - case "ShadeLord": - if(%dc >= 1) { - CompleteNWChallenge(%client, "ShadeLord1"); - } - if(%dc >= 2) { - CompleteNWChallenge(%client, "ShadeLord2"); - } - if(%dc >= 3) { - CompleteNWChallenge(%client, "ShadeLord3"); - } - } + %scriptController = %client.TWM2Core; + %dc = %scriptController.bossDefeatCount[%boss]; + switch$(%boss) { + case "Yvex": + if(%dc >= 3) { + CompleteNWChallenge(%client, "Yvex1"); + } + if(%dc >= 5) { + CompleteNWChallenge(%client, "Yvex2"); + } + if(%dc >= 10) { + CompleteNWChallenge(%client, "Yvex3"); + } + case "CnlWindshear": + if(%dc >= 3) { + CompleteNWChallenge(%client, "CWS1"); + } + if(%dc >= 5) { + CompleteNWChallenge(%client, "CWS2"); + } + if(%dc >= 10) { + CompleteNWChallenge(%client, "CWS3"); + } + case "GhostOfLightning": + if(%dc >= 3) { + CompleteNWChallenge(%client, "GOL1"); + } + if(%dc >= 5) { + CompleteNWChallenge(%client, "GOL2"); + } + if(%dc >= 10) { + CompleteNWChallenge(%client, "GOL3"); + } + case "GhostOfFire": + if(%dc >= 1) { + CompleteNWChallenge(%client, "GOF1"); + } + if(%dc >= 3) { + CompleteNWChallenge(%client, "GOF2"); + } + if(%dc >= 5) { + CompleteNWChallenge(%client, "GOF3"); + } + case "Vegenor": + if(%dc >= 3) { + CompleteNWChallenge(%client, "Veg1"); + } + if(%dc >= 5) { + CompleteNWChallenge(%client, "Veg2"); + } + if(%dc >= 10) { + CompleteNWChallenge(%client, "Veg3"); + } + case "LordRog": + if(%dc >= 2) { + CompleteNWChallenge(%client, "LRog1"); + } + if(%dc >= 4) { + CompleteNWChallenge(%client, "LRog2"); + } + if(%dc >= 7) { + CompleteNWChallenge(%client, "LRog3"); + } + case "Insignia": + if(%dc >= 2) { + CompleteNWChallenge(%client, "Ins1"); + } + if(%dc >= 4) { + CompleteNWChallenge(%client, "Ins2"); + } + if(%dc >= 7) { + CompleteNWChallenge(%client, "Ins3"); + } + case "Vardison3": + if(%dc >= 1) { + CompleteNWChallenge(%client, "Vard1"); + } + if(%dc >= 3) { + CompleteNWChallenge(%client, "Vard2"); + } + if(%dc >= 5) { + CompleteNWChallenge(%client, "Vard3"); + } + case "Stormrider": + if(%dc >= 3) { + CompleteNWChallenge(%client, "Stormrider1"); + } + if(%dc >= 5) { + CompleteNWChallenge(%client, "Stormrider2"); + } + if(%dc >= 10) { + CompleteNWChallenge(%client, "Stormrider3"); + } + case "Trevor": + if(%dc >= 2) { + CompleteNWChallenge(%client, "Trev1"); + } + if(%dc >= 4) { + CompleteNWChallenge(%client, "Trev2"); + } + if(%dc >= 7) { + CompleteNWChallenge(%client, "Trev3"); + } + case "ShadeLord": + if(%dc >= 1) { + CompleteNWChallenge(%client, "ShadeLord1"); + } + if(%dc >= 2) { + CompleteNWChallenge(%client, "ShadeLord2"); + } + if(%dc >= 3) { + CompleteNWChallenge(%client, "ShadeLord3"); + } + } +} + +function CheckBossProficiency(%client, %bossName) { + if(!%client || %client $= "" || !isObject(%client)) { + return; + } + if(%bossName $= "") { + return; + } + //Proficiency: Added TWM2 3.9.2 + // Awards clients for completing feats during the boss fight + MessageClient(%client, 'msgTag', "\c5==== PROFICIENCY AWARDS ===="); + %count = 0; + %totalEXP = 0; + + %damageCount = %client.damageToBoss; + %maxHP = $BossMaxHealth[%bossName]; + %dPerc = (%damageCount / %maxHP) * 100; + + for(%i = 0; $Boss::Proficiency[%bossName, %i] !$= ""; %i++) { + //Proficiency Code Inputs: + // [bossName]: Name of the boss, internally + // [client]: client ID + // [bProf]: client's boss proficiency object + // [dPerc]: client's damage percentage + %prof = $Boss::Proficiency[%bossName, %i]; + %pName = getField(%prof, 0); + %pExp = getField(%prof, 1); + %pDesc = getField(%prof, 2); + %code = $Boss::ProficiencyCode[%bossName, %i]; + %eCode = strReplace(%code, "[bossName]", %bossName); + %eCode = strReplace(%eCode, "[client]", %client); + %eCode = strReplace(%eCode, "[bProf]", %client.bossProficiency); + %eCode = strReplace(%eCode, "[dPerc]", %dPerc); + //Generate the code and eval it + %evalCode = "return "@%eCode@";"; + %award = eval(%evalCode); + if(%award == true) { + %totalEXP += %pExp; + GainExperience(%client, %pExp, %pName); + %count++; + MessageClient(%client, 'msgFailed', "\c5* "@%pName@": "@%pDesc); + } + } + if(!%count) { + MessageClient(%client, 'msgFailed', "\c5* No Awards Were Earned, Try Again Next Time!"); + } + else { + MessageClient(%client, 'msgFailed', "\c5* Summary: You earned "@%count@" proficiency awards, totaling "@%totalEXP@"EXP points, well done!"); + } } function BossManager::addKill(%this, %tObj) { - %this.bossKills++; + %this.bossKills++; + if(isObject(%tObj.client.bossProficiency)) { + %tObj.client.bossProficiency.bossDeaths++; + } } //Load The Boss Files From 35948ca38a3b052e09ef378ee4b549dee7c64dac Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Tue, 5 Sep 2017 16:20:27 -0500 Subject: [PATCH 29/29] Update README.md Finalize README.md for 3.91, release to master. --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3bd96b1..d20a529 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Web Sites/Pages: * https://github.com/PhantomGamesDevelopment/TWM2/ : Official Git Repostitory * http://www.phantomdev.net : Offical Website -Current Version: 3.91 {Development} +Current Version: 3.91 ==== @@ -65,7 +65,7 @@ MOD DEVELOPMENT HISTORY (GIT VERSIONS): PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY CHANGELOG.md -3.9 -> 3.91 (In Progress): +3.9 -> 3.91: * Reduced the requirement to order missions to the rank of General (49) from Commanding Officer (59) * This change also applies to the 'From The Top' Challenge Category * In-Game, Missions have been renamed to Operations @@ -131,11 +131,10 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY * Cleaned up the player kill logic and moved all TWM2 specific damage and death functioning to a separate file * Addressed the bug preventing the challenges for reaching officer ranks from completing * Addressed a bug in which vehicle bosses were not recording damage from players to the boss system correctly -* Weapon Balancing Pass - * Grapple Hook - * Slowed down the attacher projectile a bit, lowering the range - * Grapple hook now requires 60% armor energy and consumes this when firing - * There is now a 5 second cooldown when firing to prevent for quick escapes +* Grapple Hook + * Slowed down the attacher projectile a bit, lowering the range + * Grapple hook now requires 60% armor energy and consumes this when firing + * There is now a 5 second cooldown when firing to prevent for quick escapes * Boss Balancing Pass * Lord Yvex * Health reduced to 40,000 (Was 50,000)