Addtl. Fixes

This commit is contained in:
Robert Fritzen 2014-08-02 17:59:47 -05:00
parent 9cfcf412db
commit 3536406329
5 changed files with 76 additions and 68 deletions

View file

@ -269,18 +269,24 @@ function parseSuperAdminCommands(%sender, %command, %args) {
messageclient(%sender, 'MsgClient', '\c2No such player.'); messageclient(%sender, 'MsgClient', '\c2No such player.');
return 1; return 1;
} }
if(!isSet(%target.ksListInstance)) {
%target.ksListInstance = initList();
}
%cAmt = 0;
%sw = getWord(%args,1); %sw = getWord(%args,1);
switch$(%sw) { switch$(%sw) {
case "UAV": case "UAV":
%target.HasUAV = 1; %target.AwardKillstreak(1, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a UAV Recon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a UAV Recon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a UAV Beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a UAV Beacon.");
case "Airstrike": case "Airstrike":
%target.HasAirstrike = 1; %target.AwardKillstreak(2, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" an airstrike beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" an airstrike beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you an airstrike."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you an airstrike.");
case "UAMS": case "UAMS":
%target.HasGM = 1; %target.AwardKillstreak(3, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a UAMS beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a UAMS beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a UAMS Strike."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a UAMS Strike.");
case "UnlimUAMS": case "UnlimUAMS":
@ -288,7 +294,7 @@ function parseSuperAdminCommands(%sender, %command, %args) {
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a fully loaded UAMS."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a fully loaded UAMS.");
CreateMissileSat(%target, 1); CreateMissileSat(%target, 1);
case "Helicopter": case "Helicopter":
%target.HasHeli = 1; %target.AwardKillstreak(4, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Helicopter beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Helicopter beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Helicopter beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Helicopter beacon.");
case "HeliGunner": case "HeliGunner":
@ -296,7 +302,7 @@ function parseSuperAdminCommands(%sender, %command, %args) {
messageClient(%sender, 'MsgClient', "\c2You made "@%target.namebase@" a chopper gunner."); messageClient(%sender, 'MsgClient', "\c2You made "@%target.namebase@" a chopper gunner.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" has granted you Helicopter Gunner Access."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" has granted you Helicopter Gunner Access.");
case "Harbingers": case "Harbingers":
%target.HasHarbinsWrath = 1; %target.AwardKillstreak(9, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Harbinger's Wrath beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Harbinger's Wrath beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Harbinger's Wrath beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Harbinger's Wrath beacon.");
case "UnlimHarbin": case "UnlimHarbin":
@ -308,51 +314,51 @@ function parseSuperAdminCommands(%sender, %command, %args) {
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you AC-130 gunship support."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you AC-130 gunship support.");
startAC130(%target, 1, 1); startAC130(%target, 1, 1);
case "GunHeli": case "GunHeli":
%target.HasGunshipHeli = 1; %target.AwardKillstreak(7, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Gunship Helicopter beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Gunship Helicopter beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Gunship Helicopter beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Gunship Helicopter beacon.");
case "Apache": case "Apache":
%target.HasChopperGunner = 1; %target.AwardKillstreak(10, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" an Apache Gunner beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" an Apache Gunner beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you an Apache Gunner beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you an Apache Gunner beacon.");
case "Artillery": case "Artillery":
%target.HasArtillery = 1; %target.AwardKillstreak(12, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Centaur Artillery beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Centaur Artillery beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Centaur Artillery beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Centaur Artillery beacon.");
case "Nuke": case "Nuke":
%target.HasNuke = 1; %target.AwardKillstreak(14, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Nuclear Strike beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Nuclear Strike beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Nuclear Strike beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Nuclear Strike beacon.");
case "ZBomb": case "ZBomb":
%target.HasZBomb = 1; %target.AwardKillstreak(15, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Zombie-Bomb beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Zombie-Bomb beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Zombie-Bomb beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Zombie-Bomb beacon.");
case "Harrier": case "Harrier":
%target.HasHarrier = 1; %target.AwardKillstreak(5, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Harrier Airstrike beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Harrier Airstrike beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Harrier Airstrike beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Harrier Airstrike beacon.");
case "Stealth": case "Stealth":
%target.HasSlthAirstrike = 1; %target.AwardKillstreak(8, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Stealth Airstrike beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Stealth Airstrike beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Stealth Airstrike beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Stealth Airstrike beacon.");
case "AC130": case "AC130":
%target.HasAcGunner = 1; %target.AwardKillstreak(11, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" an AC-130 beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" an AC-130 beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you an AC-130 beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you an AC-130 beacon.");
case "SatNuke": case "SatNuke":
%target.HasOLS = 1; %target.AwardKillstreak(6, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Orbital Laser Strike beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Orbital Laser Strike beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Orbital Laser Strike beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Orbital Laser Strike beacon.");
case "Fission": case "Fission":
%target.HasFission = 1; %target.AwardKillstreak(16, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Fission Bomb :D."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Fission Bomb :D.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Fission Bomb :D."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Fission Bomb :D.");
case "EMP": case "EMP":
%target.HasMassEMP = 1; %target.AwardKillstreak(13, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Mass EMP Beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Mass EMP Beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Mass EMP Beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Mass EMP Beacon.");
case "Napalm": case "Napalm":
%target.HasNapalmHarrier = 1; %target.AwardKillstreak(17, -1);
messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Napalm Airstrike beacon."); messageClient(%sender, 'MsgClient', "\c2You gave "@%target.namebase@" a Napalm Airstrike beacon.");
messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Napalm Airstrike beacon."); messageClient(%target, 'MsgClient', "\c2"@%sender.namebase@" gave you a Napalm Airstrike beacon.");
default: default:

View file

@ -435,6 +435,9 @@ function GameConnection::AwardKillstreak(%client, %streakVal, %plz) {
%client.player.killsinarow = 0; //reset for moar killstreaks! %client.player.killsinarow = 0; //reset for moar killstreaks!
} }
} }
else if(%plz == -1) {
//From //giveKSSW
}
else { else {
if(!$TWM::PlayingHellJump) { if(!$TWM::PlayingHellJump) {
if(%client.IsHighestZStreak(%streakVal)) { if(%client.IsHighestZStreak(%streakVal)) {

View file

@ -102,19 +102,18 @@ datablock ShapeBaseImageData(EditGunImage) {
function EditGunImage::onMount(%this, %obj, %slot) { function EditGunImage::onMount(%this, %obj, %slot) {
Parent::onMount(%this, %obj, %slot); Parent::onMount(%this, %obj, %slot);
DispEditorToolInfo(%obj); if(!isSet(%obj.EditPMode)) {
if(!isSet(%obj.client.EditPMode)) { %obj.EditPMode = 0;
%obj.client.EditPMode = 0;
} }
if(!isSet(%obj.client.EditSMode)) { if(!isSet(%obj.EditSMode)) {
%obj.client.EditSMode = 0; %obj.EditSMode = 0;
} }
//Phantom139: Added //Phantom139: Added
%obj.hasMineModes = 1; %obj.hasMineModes = 1;
%obj.hasGrenadeModes = 1; %obj.hasGrenadeModes = 1;
//Phantom139: End //Phantom139: End
%obj.UsingEditTool = true; %obj.UsingEditTool = true;
displayWeaponInfo(%this, %obj, %obj.client.EditPMode, %obj.client.EditSMode); displayWeaponInfo(%this, %obj, %obj.EditPMode, %obj.EditSMode);
} }
function EditGunImage::onunmount(%this,%obj,%slot) { function EditGunImage::onunmount(%this,%obj,%slot) {
@ -160,25 +159,25 @@ function EditGunImage::changeMode(%this, %obj, %key) {
switch(%key) { switch(%key) {
case 1: case 1:
//Mine Modes //Mine Modes
%obj.client.EditPMode++; %obj.EditPMode++;
%obj.client.EditSMode = 0; %obj.EditSMode = 0;
if (%obj.client.EditPMode >= 5) if (%obj.EditPMode >= 5)
%obj.client.EditPMode = 0; %obj.EditPMode = 0;
case 2: case 2:
//Grenade Modes //Grenade Modes
%obj.client.EditSMode++; %obj.EditSMode++;
if (%obj.client.EditPMode == 0 && %obj.client.EditSMode == 21) if (%obj.EditPMode == 0 && %obj.EditSMode == 21)
%obj.client.EditSMode = 0; %obj.EditSMode = 0;
if (%obj.client.EditPMode == 1 && %obj.client.EditSMode == 21) if (%obj.EditPMode == 1 && %obj.EditSMode == 21)
%obj.client.EditSMode = 0; %obj.EditSMode = 0;
if (%obj.client.EditPMode == 2 && %obj.client.EditSMode == 5) if (%obj.EditPMode == 2 && %obj.EditSMode == 5)
%obj.client.EditSMode = 0; %obj.EditSMode = 0;
if (%obj.client.EditPMode == 3 && %obj.client.EditSMode == 4) if (%obj.EditPMode == 3 && %obj.EditSMode == 4)
%obj.client.EditSMode = 0; %obj.EditSMode = 0;
if (%obj.client.EditPMode == 4 && %obj.client.EditSMode == 2) if (%obj.EditPMode == 4 && %obj.EditSMode == 2)
%obj.client.EditSMode = 0; %obj.EditSMode = 0;
} }
displayWeaponInfo(%this, %obj, %obj.client.EditPMode, %obj.client.EditSMode); displayWeaponInfo(%this, %obj, %obj.EditPMode, %obj.EditSMode);
} }
//Editor Tool Functioning //Editor Tool Functioning

View file

@ -135,23 +135,23 @@ function ConstructionToolImage::changeMode(%this, %obj, %key) {
switch(%key) { switch(%key) {
case 1: case 1:
//Mine Modes //Mine Modes
%obj.client.constructionToolMode++; %obj.constructionToolMode++;
%obj.client.constructionToolMode2 = 0; %obj.constructionToolMode2 = 0;
if (%obj.client.constructionToolMode >= 4) if (%obj.constructionToolMode >= 4)
%obj.client.constructionToolMode = 0; %obj.constructionToolMode = 0;
case 2: case 2:
//Grenade Modes //Grenade Modes
%obj.client.constructionToolMode2++; %obj.constructionToolMode2++;
if (%obj.client.constructionToolMode == 0 && %obj.client.constructionToolMode2 == 2) if (%obj.constructionToolMode == 0 && %obj.constructionToolMode2 == 2)
%obj.client.constructionToolMode2 = 0; %obj.constructionToolMode2 = 0;
if (%obj.client.constructionToolMode == 1 && %obj.client.constructionToolMode2 == 2) if (%obj.constructionToolMode == 1 && %obj.constructionToolMode2 == 2)
%obj.client.constructionToolMode2 = 0; %obj.constructionToolMode2 = 0;
if (%obj.client.constructionToolMode == 2 && %obj.client.constructionToolMode2 == 6) if (%obj.constructionToolMode == 2 && %obj.constructionToolMode2 == 6)
%obj.client.constructionToolMode2 = 0; %obj.constructionToolMode2 = 0;
if (%obj.client.constructionToolMode == 3 && %obj.client.constructionToolMode2 == 4) if (%obj.constructionToolMode == 3 && %obj.constructionToolMode2 == 4)
%obj.client.constructionToolMode2 = 0; %obj.constructionToolMode2 = 0;
} }
displayWeaponInfo(%this, %obj, %obj.client.constructionToolMode, %obj.client.constructionToolMode2, "[REPA] "@%obj.client.RotateAngle); displayWeaponInfo(%this, %obj, %obj.constructionToolMode, %obj.constructionToolMode2, "[REPA] "@%obj.client.RotateAngle);
} }
//Phantom139: End //Phantom139: End

View file

@ -210,13 +210,13 @@ function SuperChaingunImage::onFire(%data,%obj,%slot) {
function SuperChaingunImage::onMount(%this,%obj,%slot) { function SuperChaingunImage::onMount(%this,%obj,%slot) {
%obj.usingSuperChaingun = true; %obj.usingSuperChaingun = true;
if (!%obj.client.superChaingunMode) if (!%obj.superChaingunMode)
%obj.client.superChaingunMode = 0; %obj.superChaingunMode = 0;
if (!%obj.client.superChaingunMode2) if (!%obj.superChaingunMode2)
%obj.client.superChaingunMode2 = 0; %obj.superChaingunMode2 = 0;
%obj.hasMineModes = 1; %obj.hasMineModes = 1;
%obj.hasGrenadeModes = 1; %obj.hasGrenadeModes = 1;
displayWeaponInfo(%this, %obj, %obj.client.superChaingunMode, %obj.client.superChaingunMode2); displayWeaponInfo(%this, %obj, %obj.superChaingunMode, %obj.superChaingunMode2);
WeaponImage::onMount(%this,%obj,%slot); WeaponImage::onMount(%this,%obj,%slot);
} }
@ -231,17 +231,17 @@ function SuperChaingunImage::changeMode(%this, %obj, %key) {
switch(%key) { switch(%key) {
case 1: case 1:
//Mine Modes //Mine Modes
%obj.client.superChaingunMode++; %obj.superChaingunMode++;
%obj.client.superChaingunMode2 = 0; %obj.superChaingunMode2 = 0;
if (%obj.client.superChaingunMode > 6 - (5 * $host::nopulseSCG)) if (%obj.superChaingunMode > 6 - (5 * $host::nopulseSCG))
%obj.client.superChaingunMode = 0; %obj.superChaingunMode = 0;
case 2: case 2:
//Grenade Modes //Grenade Modes
%obj.client.superChaingunMode2++; %obj.superChaingunMode2++;
if(%obj.client.superChaingunMode != 1) if(%obj.superChaingunMode != 1)
%obj.client.superChaingunMode2 = 0; %obj.superChaingunMode2 = 0;
if (%obj.client.superChaingunMode == 1 && %obj.client.superChaingunMode2 == 2) if (%obj.superChaingunMode == 1 && %obj.superChaingunMode2 == 2)
%obj.client.superChaingunMode2 = 0; %obj.superChaingunMode2 = 0;
} }
displayWeaponInfo(%this, %obj, %obj.client.superChaingunMode, %obj.client.superChaingunMode2); displayWeaponInfo(%this, %obj, %obj.superChaingunMode, %obj.superChaingunMode2);
} }