mirror of
https://github.com/PhantomGamesDevelopment/TWM2.git
synced 2026-07-15 08:24:38 +00:00
Prep for July 4th
Added in the necessary hooks to the daily challenge system for the July 4th event.
This commit is contained in:
parent
04f85e58a6
commit
66218bf83b
5 changed files with 230 additions and 203 deletions
2
JTLdelDSO.bat
Normal file
2
JTLdelDSO.bat
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
del /s /q "..\base\*.dso"
|
||||||
|
del /s /q "*.dso"
|
||||||
|
|
@ -427,6 +427,12 @@ function HordeNextWave(%game, %wave) {
|
||||||
$HordeGame::RevivesLeft++;
|
$HordeGame::RevivesLeft++;
|
||||||
}
|
}
|
||||||
$HordeGame::CurrentWave = %wave;
|
$HordeGame::CurrentWave = %wave;
|
||||||
|
for(%i = 0; %i < ClientGroup.getCount(); %i++) {
|
||||||
|
%cl = ClientGroup.getObject(%i);
|
||||||
|
if(%wave != 1) {
|
||||||
|
recordAction(%cl, "HORDEWAVE", %wave-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
HordeKillAllZombies(); //Cleans up the server
|
HordeKillAllZombies(); //Cleans up the server
|
||||||
if($HordeGame::CurrentWave == 51) { //Victory
|
if($HordeGame::CurrentWave == 51) { //Victory
|
||||||
for (%i = 0; %i < ClientGroup.getCount(); %i++) {
|
for (%i = 0; %i < ClientGroup.getCount(); %i++) {
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,12 @@ function recordAction(%client, %action, %variables) {
|
||||||
case "AREACAP":
|
case "AREACAP":
|
||||||
%so.areaCapture[%ymd, $CurrentMission] += 1;
|
%so.areaCapture[%ymd, $CurrentMission] += 1;
|
||||||
%so.areaCaptureTotal[%ymd] += 1;
|
%so.areaCaptureTotal[%ymd] += 1;
|
||||||
|
case "HORDEWAVE":
|
||||||
|
%so.totalHordeWavesCompleted[%ymd] += 1;
|
||||||
|
%cWave = getField(%variables, 0);
|
||||||
|
if(%cWave > %so.highestHordeWave[%ymd]) {
|
||||||
|
%so.highestHordeWave[%ymd] = %cWave;
|
||||||
|
}
|
||||||
case "DOMWIN":
|
case "DOMWIN":
|
||||||
%so.dominationRoundWins[%ymd, $CurrentMission] += 1;
|
%so.dominationRoundWins[%ymd, $CurrentMission] += 1;
|
||||||
%so.dominationRoundWinTotal[%ymd] += 1;
|
%so.dominationRoundWinTotal[%ymd] += 1;
|
||||||
|
|
@ -306,28 +312,38 @@ function checkCompletion(%client, %cID) {
|
||||||
}
|
}
|
||||||
case "KS":
|
case "KS":
|
||||||
%type = getWord(%cCond, 1);
|
%type = getWord(%cCond, 1);
|
||||||
%ammount = getWord(%cCond, 2);
|
%amount = getWord(%cCond, 2);
|
||||||
if(%so.killstreakCalls[%dateStr, %type] >= %ammount) {
|
if(%so.killstreakCalls[%dateStr, %type] >= %amount) {
|
||||||
%done = true;
|
%done = true;
|
||||||
}
|
}
|
||||||
case "KSK":
|
case "KSK":
|
||||||
%type = getWord(%cCond, 1);
|
%type = getWord(%cCond, 1);
|
||||||
%ammount = getWord(%cCond, 2);
|
%amount = getWord(%cCond, 2);
|
||||||
if(%so.killstreakKills[%dateStr, %type] >= %ammount) {
|
if(%so.killstreakKills[%dateStr, %type] >= %amount) {
|
||||||
%done = true;
|
%done = true;
|
||||||
}
|
}
|
||||||
case "SK":
|
case "SK":
|
||||||
%soloType = getWord(%cCond, 1);
|
%soloType = getWord(%cCond, 1);
|
||||||
%ammount = getWord(%cCond, 2);
|
%amount = getWord(%cCond, 2);
|
||||||
if(%so.successiveSolo[%dateStr, %soloType] >= %ammount) {
|
if(%so.successiveSolo[%dateStr, %soloType] >= %ammount) {
|
||||||
%done = true;
|
%done = true;
|
||||||
}
|
}
|
||||||
case "SKS":
|
case "SKS":
|
||||||
%streakType = getWord(%cCond, 1);
|
%streakType = getWord(%cCond, 1);
|
||||||
%ammount = getWord(%cCond, 2);
|
%amount = getWord(%cCond, 2);
|
||||||
if(%so.successiveStreak[%dateStr, %streakType] >= %ammount) {
|
if(%so.successiveStreak[%dateStr, %streakType] >= %ammount) {
|
||||||
%done = true;
|
%done = true;
|
||||||
}
|
}
|
||||||
|
case "Horde":
|
||||||
|
%waveNum = getWord(%cCond, 1);
|
||||||
|
if(%so.highestHordeWave[%dateStr] >= %waveNum) {
|
||||||
|
%done = true;
|
||||||
|
}
|
||||||
|
case "HordeWaves":
|
||||||
|
%amount = getWord(%cCond, 1);
|
||||||
|
if(%so.totalHordeWavesCompleted[%dateStr] >= %amount) {
|
||||||
|
%done = true;
|
||||||
|
}
|
||||||
case "Prestige":
|
case "Prestige":
|
||||||
%level = getWord(%cCond, 1);
|
%level = getWord(%cCond, 1);
|
||||||
if(%client.TWM2Core.officer >= %level) {
|
if(%client.TWM2Core.officer >= %level) {
|
||||||
|
|
|
||||||
|
|
@ -690,18 +690,25 @@ function TWM2Damage(%projectile, %target, %amount, %dType, %damLoc, %type) {
|
||||||
if(strStr(%SDB.getClassName(), "Turret") != -1) {
|
if(strStr(%SDB.getClassName(), "Turret") != -1) {
|
||||||
if(%SDB.getName() $= "HarbingerGunshipTurret") {
|
if(%SDB.getName() $= "HarbingerGunshipTurret") {
|
||||||
%projectile.sourceObject = %projectile.sourceObject.mountobj;
|
%projectile.sourceObject = %projectile.sourceObject.mountobj;
|
||||||
|
%sourceObject = %projectile.sourceObject;
|
||||||
|
%SDB = %sourceObject.getDataBlock();
|
||||||
}
|
}
|
||||||
else if(%SDB.getName() $= "AC130GunshipTurret") {
|
else if(%SDB.getName() $= "AC130GunshipTurret") {
|
||||||
%projectile.sourceObject = %projectile.sourceObject.mountobj;
|
%projectile.sourceObject = %projectile.sourceObject.mountobj;
|
||||||
|
%sourceObject = %projectile.sourceObject;
|
||||||
|
%SDB = %sourceObject.getDataBlock();
|
||||||
}
|
}
|
||||||
else if(%SDB.getName() $= "CentaurTurret") {
|
else if(%SDB.getName() $= "CentaurTurret") {
|
||||||
%projectile.sourceObject = %projectile.sourceObject.source;
|
%projectile.sourceObject = %projectile.sourceObject.source;
|
||||||
|
%sourceObject = %projectile.sourceObject;
|
||||||
|
%SDB = %sourceObject.getDataBlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
//vehicle kill checking
|
//vehicle kill checking
|
||||||
|
//NOTE: THIS DOESN'T GO HERE!!!
|
||||||
if(strStr(%SDB.getClassName(), "Vehicle") != -1) {
|
if(strStr(%SDB.getClassName(), "Vehicle") != -1) {
|
||||||
if(%target.isPlayer() && %target.getState() $= "dead") {
|
if((%target.getType() & ($TypeMasks::PlayerObjectType)) && %target.getState() $= "dead") {
|
||||||
%pl = %sourceObject.getMountNodeObject(0); //the pilot
|
%pl = %sourceObject.getMountNodeObject(0); //the pilot
|
||||||
%cl = %pl.client;
|
%cl = %pl.client;
|
||||||
if(%cl !$= "") {
|
if(%cl !$= "") {
|
||||||
|
|
@ -717,9 +724,7 @@ function TWM2Damage(%projectile, %target, %amount, %dType, %damLoc, %type) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!%target.isAllyBot) {
|
|
||||||
UpdateVehicleKillFile(%cl, %SDB.getName());
|
UpdateVehicleKillFile(%cl, %SDB.getName());
|
||||||
}
|
|
||||||
//
|
//
|
||||||
if(%TDB $= "DemonMotherZombieArmor" && %SDB $= "CentaurVehicle") {
|
if(%TDB $= "DemonMotherZombieArmor" && %SDB $= "CentaurVehicle") {
|
||||||
%cl.CDLKills++;
|
%cl.CDLKills++;
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,9 @@ function GetWeaponChallenges(%Image, %number) {
|
||||||
|
|
||||||
function UpdateVehicleKillFile(%client, %VDB) {
|
function UpdateVehicleKillFile(%client, %VDB) {
|
||||||
if(%VDB $= "") { //Phantom139: Ha!! No more invalid Files!!!
|
if(%VDB $= "") { //Phantom139: Ha!! No more invalid Files!!!
|
||||||
//echo("No Vehicle Datablock");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(%client $= "") { //Phantom139: Ha! No More UE on Invalid File
|
if(%client $= "") { //Phantom139: Ha! No More UE on Invalid File
|
||||||
//echo("No Client");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
%file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave";
|
%file = ""@$TWM::RanksDirectory@"/"@%client.guid@"/Saved.TWMSave";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue