Bug fixes, removal of rank requirements on officer guns

This commit is contained in:
Robert Fritzen 2017-07-01 15:52:11 -05:00
parent c6163b6223
commit fec522606f
7 changed files with 82 additions and 72 deletions

View file

@ -79,6 +79,8 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY
* Addressed the bug with Vardison 2.0 that made his Shadow Rift invincible * 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 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 * Removed a few erraneous exec calls to non-existent files in the mod load script
* Fixed a bug when users reached an EXP value over 1,000,000 that would cause all of the EXP to be processed additionally from 1,000,000
* For example, let's say I was 900,001 and gained 100,000 EXP, I would be placed at 1,100,000 instead of the correct value of 1,000,001
* Depricated the F2 Inventory Screen (Nobody ever used this) * Depricated the F2 Inventory Screen (Nobody ever used this)
* Fixed a few bugs in the F2 Menu * Fixed a few bugs in the F2 Menu
* Incorrect links * Incorrect links
@ -122,7 +124,7 @@ PLEASE NOTE: For the Legacy (Pre-GitHub Versions) Changelogs, please see LEGACY
* Fixed a console warning bug caused by zombie objects despawning and then calling a scan method * Fixed a console warning bug caused by zombie objects despawning and then calling a scan method
* Shifter Zombies now have a randomzied element in their teleport method * Shifter Zombies now have a randomzied element in their teleport method
* Fixed a code bug with Lord Yvex which caused his death pulse to be replaced by nightmare missiles * Fixed a code bug with Lord Yvex which caused his death pulse to be replaced by nightmare missiles
* Plasma Torpedo Cannon now requires officer level 9 (Was 4) * Officer Weapons no longer require a rank to use, you only need to reach the officer level in question and you've got it!
* Addressed the bug preventing the challenges for reaching officer ranks from completing * Addressed the bug preventing the challenges for reaching officer ranks from completing
* Weapon Balancing Pass * Weapon Balancing Pass
* Grapple Hook * Grapple Hook

View file

@ -9,7 +9,7 @@ function LoadRanksBase() {
} }
function CreateClientRankFile(%client) { function CreateClientRankFile(%client) {
if(!isSet(%client)) { if(!isSet(%client) || %client.guid $= "") {
return; return;
} }
if(%client.donotupdate) { if(%client.donotupdate) {
@ -44,72 +44,80 @@ function CreateClientRankFile(%client) {
} }
function LoadClientRankfile(%client) { function LoadClientRankfile(%client) {
%client.donotupdate = 0; if(!isSet(%client) || %client.guide $= "") {
echo("Attempting To Load "@%client.namebase@"'s Ranks File"); messageClient(%player.client, 'LeaveMissionArea', '\c1Alert: No GUID detected on your client object, please re-connect to the server...~wfx/misc/warning_beep.wav');
%file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; return;
if(!isFile(%file)) { }
echo(""@%client.namebase@" does not have a save file, creating one."); %client.donotupdate = 0;
CreateClientRankFile(%client); echo("Attempting To Load "@%client.namebase@"'s Ranks File");
} %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave";
else { if(!isFile(%file)) {
LoadClientFile(%client); echo(""@%client.namebase@" does not have a save file, creating one.");
} CreateClientRankFile(%client);
//define a new script object for the client, if it does not yet exist }
%soNAME = "Container_"@%client.guid@"/TWM2Client_"@%client.guid@""; else {
%object = nameToId(%soNAME); LoadClientFile(%client);
if(!isObject(%object)) { }
echo("TWM2 Rank/Setting Client Controller Object is non-existant, creating"); //define a new script object for the client, if it does not yet exist
%client.TWM2Core = new ScriptObject("TWM2Client_"@%client.guid) {}; %soNAME = "Container_"@%client.guid@"/TWM2Client_"@%client.guid@"";
%client.container.add(%client.TWM2Core); %object = nameToId(%soNAME);
} if(!isObject(%object)) {
else { echo("TWM2 Rank/Setting Client Controller Object is non-existant, creating");
echo("Found TWM2 Rank/Setting Client Controller for "@%client@" -> "@%object@""); %client.TWM2Core = new ScriptObject("TWM2Client_"@%client.guid) {};
%client.TWM2Core = %object; %client.container.add(%client.TWM2Core);
} }
//Check Officer Challenges. else {
for(%i = %client.TWM2Core.officer; %i > 0; %i--) { echo("Found TWM2 Rank/Setting Client Controller for "@%client@" -> "@%object@"");
%oChN = "Prestige"@%i; %client.TWM2Core = %object;
CompleteNWChallenge(%client, %oChN); }
} //Check Officer Challenges.
TWM2Lib_MainControl("PlayerTimeLoop", %client); //post load functions for(%i = %client.TWM2Core.officer; %i > 0; %i--) {
%oChN = "Prestige"@%i;
CompleteNWChallenge(%client, %oChN);
}
TWM2Lib_MainControl("PlayerTimeLoop", %client); //post load functions
} }
function UpdateClientRank(%client) { function UpdateClientRank(%client) {
if(!isSet(%client) || %client.guid $= "") { if(!isSet(%client) || %client.guid $= "") {
return; return;
} }
if(%client.donotupdate) { if(%client.donotupdate) {
echo("Stopped rank up check on "@%client@", server denies access (probably loading univ rank)"); echo("Stopped rank up check on "@%client@", server denies access (probably loading univ rank)");
return; return;
} }
%scriptController = %client.TWM2Core; %scriptController = %client.TWM2Core;
if($XPArray[%client] <= 0) { if($XPArray[%client] <= 0) {
return; //kill it here, no need to go into the loop return; //kill it here, no need to go into the loop
} }
if(%scriptController.officer $= "") { if(%scriptController.officer $= "") {
%scriptController.officer = 0; %scriptController.officer = 0;
} }
//anti-Hack system. %file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave";
%file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave"; //If I ever do so implement an EXP cap, here is where it is placed
//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")))];
%multi = $EXPMulti[$TWM2Core_Code, formattimestring("yymmdd"), sha1sum($TWM2Core_Code TAB TWM2Lib_MainControl("FormatTWM2Time", formattimestring("yymmdd")))]; if(!isSet(%multi) || %multi < 1) {
if(!isSet(%multi) || %multi < 1) { %multi = 1;
%multi = 1; }
} // convert it to second form
// convert it to second form if(!isSet(%scriptController.millionxp)) {
if(!isSet(%scriptController.millionxp)) { %scriptController.millionxp = 0;
%scriptController.millionxp = 0; }
} if((%scriptController.xp + $XPArray[%client]) >= 1000000) {
if((%scriptController.xp + $XPArray[%client]) >= 1000000) { %scriptController.xp = 0;
%scriptController.xp = 0; %scriptController.millionxp++;
%scriptController.millionxp++; $XPArray[%client] = (%scriptController.xp + $XPArray[%client]) - 1000000;
} if($XPArray[%client] < 0) {
%scriptController.xp += $XPArray[%client]; //Hmmm.... something wierd going on here...
$XPArray[%client] = 0;
}
}
%scriptController.xp += $XPArray[%client];
checkForXPAwards(%client); checkForXPAwards(%client);
$XPArray[%client] = 0; $XPArray[%client] = 0;
%j = $Rank::RankCount; %j = $Rank::RankCount;
runRankUpdateLoop(%client, %j, 1); runRankUpdateLoop(%client, %j, 1);
} }
function runRankUpdateLoop(%client, %j, %continue) { function runRankUpdateLoop(%client, %j, %continue) {
@ -136,6 +144,9 @@ function runRankUpdateLoop(%client, %j, %continue) {
messageclient(%client, 'Msgclient', "~wfx/Bonuses/Nouns/General.wav"); messageclient(%client, 'Msgclient', "~wfx/Bonuses/Nouns/General.wav");
bottomPrint(%client, "Excelent work "@%name@", you have been promoted to the rank of: "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@"!", 5, 2 ); bottomPrint(%client, "Excelent work "@%name@", you have been promoted to the rank of: "@$Prestige::Name[%scriptController.officer]@""@$Ranks::NewRank[%j]@"!", 5, 2 );
echo("Promotion: "@%name@" to Rank "@$Ranks::NewRank[%j]@", XP: "@getCurrentEXP(%client)@"."); echo("Promotion: "@%name@" to Rank "@$Ranks::NewRank[%j]@", XP: "@getCurrentEXP(%client)@".");
if(%j == $Rank::RankCount && %scriptController.officer < $OfficerCap[$TWM2Core_Code, sha1sum(formattimestring("yymmdd"))]) {
messageclient(%client, 'Msgclient', "\c5Congratulations, you have reached the maximum rank in TWM2 and have unlocked the ability to enter an officer rank. To proceed, open the [F2] menu and select the Settings option.");
}
SaveClientFile(%client); SaveClientFile(%client);
// //
if(!$TWM2::PGDConnectDisabled) { if(!$TWM2::PGDConnectDisabled) {
@ -294,7 +305,7 @@ function GainExperience(%client, %variable, %tagToGain) {
%variable = mFloor(%variable); %variable = mFloor(%variable);
// //
if(%multi > 1) { if(%multi > 1) {
messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP (X"@%multi@")"); messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP (Bonus Multiplier: "@%multi@")");
} }
else { else {
messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP"); messageClient(%client, 'msgClient', "\c5TWM2: "@%tagToGain@"\c3+"@%variable@" EXP");

View file

@ -50,7 +50,7 @@ datablock ShapeBaseImageData(PlasmaTorpedoImage) {
emap = true; emap = true;
RankRequire = $TWM2::RankRequire["SCD343"]; //RankRequire = $TWM2::RankRequire["SCD343"];
PrestigeRequire = 9; PrestigeRequire = 9;
HasChallenges = 1; HasChallenges = 1;

View file

@ -90,7 +90,7 @@ datablock ShapeBaseImageData(CrimsonHawkImage)
HellClipCount = 10; HellClipCount = 10;
// //
RankRequire = $TWM2::RankRequire["CrimsonHawk"]; //RankRequire = $TWM2::RankRequire["CrimsonHawk"];
PrestigeRequire = 5; PrestigeRequire = 5;
//Challenges //Challenges

View file

@ -87,7 +87,7 @@ datablock ShapeBaseImageData(PulseRifleImage)
GunName = "Pulse Semi-Automatic Rifle"; GunName = "Pulse Semi-Automatic Rifle";
// //
RankRequire = $TWM2::RankRequire["G41"]; //RankRequire = $TWM2::RankRequire["G41"];
PrestigeRequire = 2; PrestigeRequire = 2;
casing = ShellDebris; casing = ShellDebris;

View file

@ -94,7 +94,7 @@ datablock ShapeBaseImageData(PulseSMGImage)
Upgrade[3] = "Silencer"; Upgrade[3] = "Silencer";
GunName = "Pulse SMG"; GunName = "Pulse SMG";
RankRequire = $TWM2::RankRequire["Pg700"]; //RankRequire = $TWM2::RankRequire["Pg700"];
PrestigeRequire = 3; PrestigeRequire = 3;
casing = ShellDebris; casing = ShellDebris;

View file

@ -156,7 +156,6 @@ $TWM2::BossName["GoL"] = "The Ghost Of Lightning";
$TWM2::BossName["Vegenor"] = "General Vegenor"; $TWM2::BossName["Vegenor"] = "General Vegenor";
$TWM2::BossName["Insignia"] = "Major Insignia"; $TWM2::BossName["Insignia"] = "Major Insignia";
$TWM2::BossName["Vardison"] = "Lord Vardison"; $TWM2::BossName["Vardison"] = "Lord Vardison";
$TWM2::BossName["DAVardison"] = "Dark Archmage Vardison";
$TWM2::BossName["Trevor"] = "Lordranius Trevor"; $TWM2::BossName["Trevor"] = "Lordranius Trevor";
$TWM2::BossName["GoF"] = CollapseEscape("\c7The Ghost Of Fire"); $TWM2::BossName["GoF"] = CollapseEscape("\c7The Ghost Of Fire");
$TWM2::BossName["Stormrider"] = "Commander Stormrider"; $TWM2::BossName["Stormrider"] = "Commander Stormrider";
@ -204,7 +203,6 @@ $TWM2::BossXPAward["Insignia"] = 35000; // 35000
$TWM2::BossXPAward["Stormrider"] = 45000; // 45000 $TWM2::BossXPAward["Stormrider"] = 45000; // 45000
$TWM2::BossXPAward["GhostOfFire"] = 65000; // 65000 $TWM2::BossXPAward["GhostOfFire"] = 65000; // 65000
$TWM2::BossXPAward["ShadeLord"] = 70000; // 70000 $TWM2::BossXPAward["ShadeLord"] = 70000; // 70000
$TWM2::BossXPAward["DAVardison"] = 75000; // 75000
$TWM2::BossXPAward["Vardison3"] = 75000; // 75000 $TWM2::BossXPAward["Vardison3"] = 75000; // 75000
$Host::UseDevelopersList = 1; $Host::UseDevelopersList = 1;
@ -261,7 +259,6 @@ $TWM2::RankRequire["M4A1"] = 15;
$TWM2::RankRequire["SCD343"] = 59; $TWM2::RankRequire["SCD343"] = 59;
$TWM2::RankRequire["P90"] = 56; $TWM2::RankRequire["P90"] = 56;
$TWM2::RankRequire["ALSWP"] = 49; $TWM2::RankRequire["ALSWP"] = 49;
$TWM2::RankRequire["CrimsonHawk"] = 61;
$TWM2::RankRequire["Stinger"] = 30; $TWM2::RankRequire["Stinger"] = 30;
$TWM2::RankRequire["MRXX"] = 35; $TWM2::RankRequire["MRXX"] = 35;
$TWM2::RankRequire["NapalmLauncher"] = 42; $TWM2::RankRequire["NapalmLauncher"] = 42;