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 8f3f6e5..0000000 Binary files a/TWM2.tsdev and /dev/null differ diff --git a/scripts/DominationGame.cs b/scripts/DominationGame.cs index cc14938..4151410 100644 --- a/scripts/DominationGame.cs +++ b/scripts/DominationGame.cs @@ -375,12 +375,12 @@ function DominationGame::CheckIntermit(%game) { function DominationGame::pickTeamSpawn(%game, %team) { if(%team == 1) { - %pos = vectorAdd($DominationGame::SpawnLocation1[$CurrentMission],GetRandomPosition(5,1)); + %pos = vectorAdd($DominationGame::SpawnLocation1[$CurrentMission], TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %pos = vectorAdd(%pos,"0 0 5"); return %pos; } else if(%team == 2) { - %pos = vectorAdd($DominationGame::SpawnLocation2[$CurrentMission],GetRandomPosition(5,1)); + %pos = vectorAdd($DominationGame::SpawnLocation2[$CurrentMission], TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %pos = vectorAdd(%pos,"0 0 5"); return %pos; } diff --git a/scripts/HelljumpGame.cs b/scripts/HelljumpGame.cs index bbf2e27..845f0ca 100644 --- a/scripts/HelljumpGame.cs +++ b/scripts/HelljumpGame.cs @@ -66,7 +66,7 @@ function HelljumpGame::pickPlayerSpawn(%game, %client, %respawn) { // place this client on his own team, '%respawn' does not ever seem to be used //we no longer care whether it is a respawn since all spawns use same points. %loc = $HellJump::SpawnGraph[$CurrentMission]; - %position = vectorAdd(%loc,VectorAdd(getRandomPosition(20,1), "0 0 10")); + %position = vectorAdd(%loc,VectorAdd(TWM2Lib_MainControl("getRandomPosition", 20 TAB 1), "0 0 10")); return %position;//return %game.pickTeamSpawn(%client.team); } @@ -1106,7 +1106,7 @@ function HelljumpGame::GoNextStrike(%game) { function HelljumpGame::DefineProperSpawnPos(%game, %loc) { %zCheck = GetTerrainHeight(%loc); %zProper = %zCheck + 10; - %p1 = getRandomPosition(40, 1); + %p1 = TWM2Lib_MainControl("getRandomPosition", 40 TAB 1); %p2 = vectorAdd(%loc, %p1); %zCheck2 = GetTerrainHeight(%p2); %zProperf = %zCheck2 + 10; @@ -2843,15 +2843,6 @@ function GenerateHelljumpChallengeMenu(%client, %tag, %index) { %index++; } // - if(%client.CheckNWChallengeCompletion("ThatsAHind")) { - messageClient( %client, 'SetLineHud', "", %tag, %index, "That's a Hind - Done."); - %index++; - } - else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "That's a Hind - Use a Hind Pilot Killstreak in Helljump."); - %index++; - } - // if(%client.CheckNWChallengeCompletion("DownBoy")) { messageClient( %client, 'SetLineHud', "", %tag, %index, "Down Boy... Down - Done."); %index++; diff --git a/scripts/HordeGame.cs b/scripts/HordeGame.cs index 7c03694..a854370 100644 --- a/scripts/HordeGame.cs +++ b/scripts/HordeGame.cs @@ -41,7 +41,7 @@ function HordeGame::pickPlayerSpawn(%game, %client, %respawn) { // place this client on his own team, '%respawn' does not ever seem to be used //we no longer care whether it is a respawn since all spawns use same points. %loc = $HordeGame::SpawnGraph[$CurrentMission]; - %position = vectorAdd(%loc,VectorAdd(getRandomPosition(20,1), "0 0 10")); + %position = vectorAdd(%loc,VectorAdd(TWM2Lib_MainControl("getRandomPosition", 20 TAB 1), "0 0 10")); return %position;//return %game.pickTeamSpawn(%client.team); } @@ -695,7 +695,7 @@ function StartHordeZombies(%mission, %wave) { case 1: for(%i = 0; %i < 20; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -703,7 +703,7 @@ function StartHordeZombies(%mission, %wave) { case 2: for(%i = 0; %i < 25; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -711,7 +711,7 @@ function StartHordeZombies(%mission, %wave) { case 3: for(%i = 0; %i < 30; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -719,7 +719,7 @@ function StartHordeZombies(%mission, %wave) { case 4: for(%i = 0; %i < 35; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -727,7 +727,7 @@ function StartHordeZombies(%mission, %wave) { case 5: for(%i = 0; %i < 40; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -736,7 +736,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 20; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,2); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -745,7 +745,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 25; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,2); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -754,7 +754,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 30; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,2); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -763,7 +763,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 35; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,2); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -772,7 +772,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 40; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,2); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -781,7 +781,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 20; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,3); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -790,7 +790,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 25; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,3); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -799,7 +799,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 30; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,3); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -808,7 +808,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 35; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,3); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -817,7 +817,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 40; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,3); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -826,7 +826,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 20; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,4); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -835,7 +835,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 25; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,4); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -844,7 +844,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 30; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,4); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -853,7 +853,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 35; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,4); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -862,7 +862,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 40; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,4); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -871,7 +871,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 20; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,5); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -880,7 +880,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 25; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,5); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -889,7 +889,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 30; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,5); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -898,7 +898,7 @@ function StartHordeZombies(%mission, %wave) { for(%i = 0; %i < 35; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); %type = getRandom(1,5); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -907,7 +907,7 @@ function StartHordeZombies(%mission, %wave) { case 25: for(%i = 0; %i < 25; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -922,7 +922,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -937,7 +937,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -952,7 +952,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -967,7 +967,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -982,7 +982,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -997,7 +997,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1012,7 +1012,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1027,7 +1027,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1042,7 +1042,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1057,7 +1057,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1072,7 +1072,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1087,7 +1087,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1102,7 +1102,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1117,7 +1117,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1132,7 +1132,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1141,7 +1141,7 @@ function StartHordeZombies(%mission, %wave) { case 41: for(%i = 0; %i < 25; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1150,7 +1150,7 @@ function StartHordeZombies(%mission, %wave) { case 42: for(%i = 0; %i < 40; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1159,7 +1159,7 @@ function StartHordeZombies(%mission, %wave) { case 43: for(%i = 0; %i < 40; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1174,7 +1174,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1189,7 +1189,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1204,7 +1204,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1219,7 +1219,7 @@ function StartHordeZombies(%mission, %wave) { %type = 12; } } - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1228,7 +1228,7 @@ function StartHordeZombies(%mission, %wave) { case 48: for(%i = 0; %i < 30; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1237,7 +1237,7 @@ function StartHordeZombies(%mission, %wave) { case 49: for(%i = 0; %i < 45; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); @@ -1246,7 +1246,7 @@ function StartHordeZombies(%mission, %wave) { case 50: for(%i = 0; %i < 15; %i++) { %pt = getRandom(1,$HordeGame::ZombiePtCnts[%mission]); - %final = vectoradd($HordeGame::ZombieStartPt[%mission, %pt], GetRandomPosition(10,1)); + %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); diff --git a/scripts/InfectionGame.cs b/scripts/InfectionGame.cs index 28080e8..1896f37 100644 --- a/scripts/InfectionGame.cs +++ b/scripts/InfectionGame.cs @@ -25,7 +25,7 @@ function InfectionGame::allowsProtectedStatics(%game) { } function InfectionGame::pickTeamSpawn(%game, %team) { - %pos = vectorAdd($InfectionGame::SpawnLocation[$CurrentMission], GetRandomPosition(5,1)); + %pos = vectorAdd($InfectionGame::SpawnLocation[$CurrentMission], TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %pos = vectorAdd(%pos,"0 0 5"); return %pos; } diff --git a/scripts/RankStuff.cs b/scripts/RankStuff.cs index a7d8aae..6cab42c 100644 --- a/scripts/RankStuff.cs +++ b/scripts/RankStuff.cs @@ -11,7 +11,12 @@ $Prestige::Name[6] = "Glorious "; $Prestige::Name[7] = "Ultimate "; $Prestige::Name[8] = "Shadowing "; $Prestige::Name[9] = "Phantom "; -$Prestige::Name[10] = "(*) Phantom "; +$Prestige::Name[10] = "Brutal "; +$Prestige::Name[11] = "Vengeful "; +$Prestige::Name[12] = "Spectral "; +$Prestige::Name[13] = "Noble "; +$Prestige::Name[14] = "Masterful "; +$Prestige::Name[15] = "Harbinger "; $Ranks::MinPoints[0] = 0; $Ranks::NewRank[0] = "Private"; @@ -333,7 +338,7 @@ function SortTopRanks(%dlOBJ) { function DoNameChangeChecks(%client) { if(!$TWM2::UseRankTags) { - CheckGUID(%client); + TWM2Lib_MainControl("CheckGUID", %client); return; } %stillLooking = 1; diff --git a/scripts/SabotageGame.cs b/scripts/SabotageGame.cs index dc3a964..81ecd50 100644 --- a/scripts/SabotageGame.cs +++ b/scripts/SabotageGame.cs @@ -484,11 +484,11 @@ function SabotageGame::pickTeamSpawn(%game, %team) { if(%team == 1) { if(!isObject(%game.TeamObjective[1])) { //stops the pre-game fall - %pos = vectorAdd($SabotageGame::ObjectiveLocation1[$CurrentMission],GetRandomPosition(5,1)); + %pos = vectorAdd($SabotageGame::ObjectiveLocation1[$CurrentMission], TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %pos = vectorAdd(%pos,"0 0 5"); } else { - %pos = vectorAdd(%game.TeamObjective[1].getPosition(),GetRandomPosition(5,1)); + %pos = vectorAdd(%game.TeamObjective[1].getPosition(), TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %pos = vectorAdd(%pos,"0 0 4"); } return %pos; @@ -496,11 +496,11 @@ function SabotageGame::pickTeamSpawn(%game, %team) { else if(%team == 2) { if(!isObject(%game.TeamObjective[2])) { //stops the pre-game fall - %pos = vectorAdd($SabotageGame::ObjectiveLocation2[$CurrentMission],GetRandomPosition(5,1)); + %pos = vectorAdd($SabotageGame::ObjectiveLocation2[$CurrentMission], TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %pos = vectorAdd(%pos,"0 0 5"); } else { - %pos = vectorAdd(%game.TeamObjective[2].getPosition(),GetRandomPosition(5,1)); + %pos = vectorAdd(%game.TeamObjective[2].getPosition(), TWM2Lib_MainControl("getRandomPosition", 5 TAB 1)); %pos = vectorAdd(%pos,"0 0 4"); } return %pos; @@ -594,7 +594,7 @@ function GenerateSabotageChallengeMenu(%client, %tag, %index) { %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed - Disarm a enemy bomb."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Bomb Disarmed - Disarm an enemy bomb."); %index++; } // @@ -621,7 +621,7 @@ function GenerateSabotageChallengeMenu(%client, %tag, %index) { %index++; } else { - messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five - Win 3 Rounds Of Sabotage."); + messageClient( %client, 'SetLineHud', "", %tag, %index, "Three For Five - Win 3 Rounds Of Sabotage in a match."); %index++; } // diff --git a/scripts/TWM2/ArmorFunctions.cs b/scripts/TWM2/ArmorFunctions.cs index 0c60872..276dd9c 100644 --- a/scripts/TWM2/ArmorFunctions.cs +++ b/scripts/TWM2/ArmorFunctions.cs @@ -613,7 +613,7 @@ function SummonerZombieArmor::onTrigger(%data, %player, %triggerNum, %val) { %type = 12; } } - %SumPos = vectorAdd(VectorAdd(GetRandomPosition(20, 1), "0 0 7"), %player.getPosition()); + %SumPos = vectorAdd(VectorAdd(TWM2Lib_MainControl("getRandomPosition", 20 TAB 1), "0 0 7"), %player.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/Bosses/ColonelWindshear.cs b/scripts/TWM2/Bosses/ColonelWindshear.cs index 26719bc..e4b838f 100644 --- a/scripts/TWM2/Bosses/ColonelWindshear.cs +++ b/scripts/TWM2/Bosses/ColonelWindshear.cs @@ -1,8 +1,8 @@ //This sets up the drone and the functions needed to start the drone. function StartWindshear(%pos){ - %team = 6; - %rotation = "1 0 0 0"; - %skill = 10; + %team = 6; + %rotation = "1 0 0 0"; + %skill = 10; %Drone = new FlyingVehicle() { dataBlock = WindshearPlatform; @@ -176,7 +176,7 @@ function WindshearAttacks(%drone) { schedule(8100, 0, "WindshearAttack_FUNC", "Flare", %drone); schedule(8200, 0, "WindshearAttack_FUNC", "Flare", %drone); schedule(8300, 0, "WindshearAttack_FUNC", "Flare", %drone); - MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": Did you actually think, your fucking missiles could hit me?"); + MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": Did you actually think those missiles could hit me?"); case 2: %target = DroneFindNearestPilot(2000,%drone); if(%target.player) { @@ -196,10 +196,10 @@ function WindshearAttacks(%drone) { schedule(8100, 0, "WindshearAttack_FUNC", "SidewinderLaunch", %drone SPC %target.player SPC 1); schedule(8200, 0, "WindshearAttack_FUNC", "SidewinderLaunch", %drone SPC %target.player SPC 1); schedule(8300, 0, "WindshearAttack_FUNC", "SidewinderLaunch", %drone SPC %target.player SPC 1); - MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": You fuckin' Chasing me "@getTaggedString(%target.name)@"!?!? WATCH THIS BITCH!!!"); + MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": I've got missiles with "@getTaggedString(%target.name)@"'s name on them"); } else { - MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": FUCK, My missile strike was ready."); + MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": No missiles for now...."); } case 3: %target = DroneFindNearestPilot(2000,%drone); @@ -215,21 +215,21 @@ function WindshearAttacks(%drone) { schedule(1200, 0, "WindshearAttack_FUNC", "SidewinderLaunch", %drone SPC %target.player SPC 1); schedule(1300, 0, "WindshearAttack_FUNC", "SidewinderLaunch", %drone SPC %target.player SPC 1); schedule(1400, 0, "WindshearAttack_FUNC", "SidewinderLaunch", %drone SPC %target.player SPC 1); - MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": I'ma kill me a fuckin' "@getTaggedString(%target.name)@"!"); + MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": I'ma kill me a "@getTaggedString(%target.name)@"!"); } else { schedule(700, 0, "WindshearAttack_FUNC", "Flare", %drone); schedule(1400, 0, "WindshearAttack_FUNC", "Flare", %drone); schedule(2100, 0, "WindshearAttack_FUNC", "Flare", %drone); schedule(2800, 0, "WindshearAttack_FUNC", "Flare", %drone); - MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": FUCK!!! Oh well, Flares will fucking do..."); + MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": FLARES!"); } default: schedule(700, 0, "WindshearAttack_FUNC", "Flare", %drone); schedule(1400, 0, "WindshearAttack_FUNC", "Flare", %drone); schedule(2100, 0, "WindshearAttack_FUNC", "Flare", %drone); schedule(2800, 0, "WindshearAttack_FUNC", "Flare", %drone); - MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": FUCK!!! Oh well, Flares will fucking do..."); + MessageAll('MessageAll', "\c4"@$TWM2::BossName["Windshear"]@": FLARES! NOW!!!"); } } diff --git a/scripts/TWM2/Bosses/GeneralVegenor.cs b/scripts/TWM2/Bosses/GeneralVegenor.cs index fc29bb4..0128656 100644 --- a/scripts/TWM2/Bosses/GeneralVegenor.cs +++ b/scripts/TWM2/Bosses/GeneralVegenor.cs @@ -199,9 +199,9 @@ function Vegenormovetotarget(%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('msgAntiFall', "\c4"@$TWM2::BossName["Vegenor"]@": Fuck Falling!!!!"); + MessageAll('msgAntiFall', "\c4"@$TWM2::BossName["Vegenor"]@": Falling, How about no..."); } %closestDistance = getWord(%closestClient,1); %closestClient = getWord(%closestClient,0).Player; @@ -272,7 +272,7 @@ function VegenorAttack_FUNC(%att, %args) { messageall('MsgSummon',"\c4"@$TWM2::BossName["Vegenor"]@": Hunt them all down"); } 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); } @@ -311,7 +311,7 @@ function VegenorAttack_FUNC(%att, %args) { DemonMotherMissileFollow(%Tobj, %beacon,%p); case "MeteorDrop": %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, VegenorFireMeteor, GrenadeProjectile, %pos2, "0 0 -10"); } diff --git a/scripts/TWM2/Bosses/GhostOfFire.cs b/scripts/TWM2/Bosses/GhostOfFire.cs index 73a5fae..4af2f8f 100644 --- a/scripts/TWM2/Bosses/GhostOfFire.cs +++ b/scripts/TWM2/Bosses/GhostOfFire.cs @@ -603,12 +603,12 @@ function GOFAttack_FUNC(%att, %args) { return; } %cP = %g.getPosition(); - %nP = getRandomPosition(55, 0); + %nP = TWM2Lib_MainControl("getRandomPosition", 55 TAB 0); %nP2 = vectorAdd(%np, "0 0 100"); %fP = vectorAdd(%cP, %nP2); GOFAttack_FUNC("FireBlast", %g TAB %cP); %g.setTransform(%fP); - messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": ehehehehe.. Burn out..."); + messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Experience the glorious flames.."); case "Flamecano": %g = getWord(%args, 0); @@ -717,7 +717,7 @@ function GOFDoRandomAttacks(%g) { case 2: if(isObject(%target.player)) { GOFAttack_FUNC("Fireball", %g SPC %target.player); - messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Lets see how you dodge this, "@getTaggedString(%target.name)@"."); + messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Hey "@getTaggedString(%target.name)@", Dodge this!"); } else { messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Frightened of this? Good."); @@ -729,7 +729,7 @@ function GOFDoRandomAttacks(%g) { schedule(800, 0, GOFAttack_FUNC, "Fireball", %g SPC %target.player); schedule(1200, 0, GOFAttack_FUNC, "Fireball", %g SPC %target.player); schedule(1600, 0, GOFAttack_FUNC, "Fireball", %g SPC %target.player); - messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Flame Storm "@getTaggedString(%target.name)@", cooked up nicely for you."); + messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": I have a Flame Storm cooked up nicely for "@getTaggedString(%target.name)@", enjoy..."); } else { messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": I love Fire.. it's Good your scared."); @@ -741,7 +741,7 @@ function GOFDoRandomAttacks(%g) { schedule(800, 0, GOFAttack_FUNC, "FireBlast", %g TAB vectorAdd(%target.player.getPosition(), "0 0 35")); schedule(1200, 0, GOFAttack_FUNC, "FireBlast", %g TAB vectorAdd(%target.player.getPosition(), "0 0 40")); schedule(1600, 0, GOFAttack_FUNC, "FireBlast", %g TAB vectorAdd(%target.player.getPosition(), "0 0 45")); - messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Engage Dictator Strike!!!"); + messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Hear that, it's the sound of exploding fire ending your life..."); } else { messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Frightened Of Fire? Good."); @@ -771,7 +771,7 @@ function GOFDoRandomAttacks(%g) { 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"]@": Clensic Flames Will Persue You "@getTaggedString(%target.name)@", MANY FLAMES!"); + messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": "@getTaggedString(%target.name)@", I present to you the gift, of cursed flames..."); } else { messageall('TheFireMsg',"\c4"@$TWM2::BossName["GoF"]@": Darn, I Love Mega Cursed Fire."); diff --git a/scripts/TWM2/Bosses/GhostOfLightning.cs b/scripts/TWM2/Bosses/GhostOfLightning.cs index 1c8eea4..b78faea 100644 --- a/scripts/TWM2/Bosses/GhostOfLightning.cs +++ b/scripts/TWM2/Bosses/GhostOfLightning.cs @@ -148,7 +148,7 @@ function SpawnGhostOfLightning(%position) { Datablock = "LightningGhostArmor"; }; %Cpos = vectorAdd(%position, "0 0 5"); - MessageAll('MsgDarkraireturn', "\c4"@$TWM2::BossName["GoL"]@": It's time to show you the shocking power of electricity"); + MessageAll('msgBossAlertreturn', "\c4"@$TWM2::BossName["GoL"]@": It's time to show you the shocking power of electricity"); %command = "GoLmovetotarget"; InitiateBoss(%Ghost, "GhostOfLightning"); @@ -185,12 +185,12 @@ function GoLmovetotarget(%Ghost){ %Ghost.startFade(1000, 0, false); %Ghost.setPosition(vectorAdd(%ghost.getPosition(), "0 0 500")); %Ghost.setVelocity("0 0 0"); - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": I'm back!!!"); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": I'm back!!!"); } %closestDistance = getWord(%closestClient,1); %closestClient = getWord(%closestClient,0).Player; if(%closestDistance < 20) { - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": I don't think so!"); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": I don't think so!"); //ATTACK %p = new ShockLanceProjectile() { dataBlock = GoLShocker; @@ -207,7 +207,7 @@ function GoLmovetotarget(%Ghost){ // %Ghost.startFade(400, 0, true); %Ghost.startFade(1000, 0, false); - %new = VectorAdd(%Ghost.getPosition(), GetRandomPosition(50, 1)); + %new = VectorAdd(%Ghost.getPosition(), TWM2Lib_MainControl("getRandomPosition", 50 TAB 1)); %new = VectorAdd(%new, "0 0 5"); %Ghost.setPosition(%new); %Ghost.setVelocity("0 0 0"); @@ -243,10 +243,10 @@ function DoGoLAttacks(%ghost) { %target = FindValidTarget(%ghost); if(!isObject(%target.player)) { schedule(35000, 0, "DoGoLAttacks", %ghost); - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": Meh, no targets for me."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": Meh, no targets for me."); return; } - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": Lightning Strike Away!!!"); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": Lightning Strike Away!!!"); %p = discharge2(%target.player.getPosition(),"0 0 -1"); %p.setEnergyPercentage(1); addToShock(%p); @@ -255,10 +255,10 @@ function DoGoLAttacks(%ghost) { %target = FindValidTarget(%ghost); if(!isObject(%target.player)) { schedule(35000, 0, "DoGoLAttacks", %ghost); - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": Meh, no targets for me."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": Meh, no targets for me."); return; } - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": Watch Electricity Chase You!!!"); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": Watch Electricity Chase You!!!"); %vec = vectorNormalize(vectorSub(%target.player.getPosition(),%ghost.getPosition())); %p = new SeekerProjectile() { dataBlock = IonMissile; @@ -281,10 +281,10 @@ function DoGoLAttacks(%ghost) { %target = FindValidTarget(%ghost); if(!isObject(%target.player)) { schedule(35000, 0, "DoGoLAttacks", %ghost); - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": Meh, no targets for me."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": Meh, no targets for me."); return; } - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": Die Now..."); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": Die Now..."); %target = %target.player; %p = new ShockLanceProjectile() { dataBlock = GoLShocker; @@ -299,10 +299,10 @@ function DoGoLAttacks(%ghost) { %totalDamage = 50; %target.getDataBlock().damageObject(%target, %ghost, %target.getPosition(), %totalDamage, $DamageType::ShockLance); case 4: - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": Its Storm Time"); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": Its Storm Time"); ionStorm(35 , 1000); case 5: - MessageAll('msgDarkraiAttack', "\c4"@$TWM2::BossName["GoL"]@": Lightning Missiles For ALL!!"); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::BossName["GoL"]@": Lightning Missiles For ALL!!"); for(%i = 0; %i < ClientGroup.getCount(); %i++) { %cl = ClientGroup.getObject(%i); if(isObject(%cl.player) && %cl.player.getState() !$= "dead") { diff --git a/scripts/TWM2/Bosses/LordRog.cs b/scripts/TWM2/Bosses/LordRog.cs index 3c10036..02b701c 100644 --- a/scripts/TWM2/Bosses/LordRog.cs +++ b/scripts/TWM2/Bosses/LordRog.cs @@ -245,7 +245,7 @@ function SpawnLordRog(%position) { Datablock = "LordRogZombieArmor"; }; %Cpos = vectorAdd(%position, "0 0 5"); - MessageAll('MsgDarkraireturn', "\c4"@$TWM2::ZombieName[8]@": I AM ALIVE!!! I SHALL KILL YOU ALL"); + MessageAll('msgBossAlertreturn', "\c4"@$TWM2::ZombieName[8]@": I AM ALIVE!!! I SHALL KILL YOU ALL"); %zombie.iszombie = 1; StartLRAbilities(%zombie); @@ -285,9 +285,9 @@ function LordRogmovetotarget(%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::ZombieName[8]@": You think I will fall to my death!?!?"); + MessageAll('msgBossAlertAttack', "\c4"@$TWM2::ZombieName[8]@": You think I will fall to my death!?!?"); } %closestDistance = getWord(%closestClient,1); %closestClient = getWord(%closestClient,0).Player; @@ -345,7 +345,7 @@ function LordRogAttack_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::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