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

View file

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

View file

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

View file

@ -135,23 +135,23 @@ function ConstructionToolImage::changeMode(%this, %obj, %key) {
switch(%key) {
case 1:
//Mine Modes
%obj.client.constructionToolMode++;
%obj.client.constructionToolMode2 = 0;
if (%obj.client.constructionToolMode >= 4)
%obj.client.constructionToolMode = 0;
%obj.constructionToolMode++;
%obj.constructionToolMode2 = 0;
if (%obj.constructionToolMode >= 4)
%obj.constructionToolMode = 0;
case 2:
//Grenade Modes
%obj.client.constructionToolMode2++;
if (%obj.client.constructionToolMode == 0 && %obj.client.constructionToolMode2 == 2)
%obj.client.constructionToolMode2 = 0;
if (%obj.client.constructionToolMode == 1 && %obj.client.constructionToolMode2 == 2)
%obj.client.constructionToolMode2 = 0;
if (%obj.client.constructionToolMode == 2 && %obj.client.constructionToolMode2 == 6)
%obj.client.constructionToolMode2 = 0;
if (%obj.client.constructionToolMode == 3 && %obj.client.constructionToolMode2 == 4)
%obj.client.constructionToolMode2 = 0;
%obj.constructionToolMode2++;
if (%obj.constructionToolMode == 0 && %obj.constructionToolMode2 == 2)
%obj.constructionToolMode2 = 0;
if (%obj.constructionToolMode == 1 && %obj.constructionToolMode2 == 2)
%obj.constructionToolMode2 = 0;
if (%obj.constructionToolMode == 2 && %obj.constructionToolMode2 == 6)
%obj.constructionToolMode2 = 0;
if (%obj.constructionToolMode == 3 && %obj.constructionToolMode2 == 4)
%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

View file

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