Weapon System Update

Updated the weapon system's rank and medal checking systems to be much
more streamlined, added a few extra goodies to the system as well.
This commit is contained in:
Robert Fritzen 2017-12-21 19:20:33 -06:00
parent bae29e9297
commit 0ad6bd6eba
19 changed files with 618 additions and 707 deletions

View file

@ -129,6 +129,9 @@ PLEASE NOTE: I've moved all old changelogs into the version_history folder. This
* General Enhancements * General Enhancements
* Centralized some of the datablocks that were shared across the mod to allow for easier access / modification * Centralized some of the datablocks that were shared across the mod to allow for easier access / modification
* Centralized the demon lord's missile seeking logic that was used across multiple zombies & bosses to allow for easier access and editing * Centralized the demon lord's missile seeking logic that was used across multiple zombies & bosses to allow for easier access and editing
* Streamlined all weapon rank, medal checks into one single function
* Added the capability to restrict via challenge as well
* Re-did the inventory hud logic to be much cleaner and readable
* Modified the vote logic in admin.cs to clean up a ton of redundant if/else paths * Modified the vote logic in admin.cs to clean up a ton of redundant if/else paths
* Re-did the player collision logic in player.cs to make things a whole lot easier to modify in the future * Re-did the player collision logic in player.cs to make things a whole lot easier to modify in the future
* Did a pass through all of the weapon files, cleaning the code up and making each unique weapon have its own damage type. * Did a pass through all of the weapon files, cleaning the code up and making each unique weapon have its own damage type.
@ -139,6 +142,7 @@ PLEASE NOTE: I've moved all old changelogs into the version_history folder. This
* All 'Boss' level enemies will now have gold text in their name. * All 'Boss' level enemies will now have gold text in their name.
* The Helljump 'Oh Lordy' modifier has been changed to 'Reduces the cooldown time of the Zombie Lord's Photon Cannon by 50%'. * The Helljump 'Oh Lordy' modifier has been changed to 'Reduces the cooldown time of the Zombie Lord's Photon Cannon by 50%'.
* The RSA Laser Rifle has been renamed to the 'UR-22 Laser Rifle' * The RSA Laser Rifle has been renamed to the 'UR-22 Laser Rifle'
* The Pistol Weapon Slot is now called the Sidearm Slot
* General Bug Fixes * General Bug Fixes
* Addressed the issue when gaining more than 1 million EXP that would result in your total EXP being reset by the difference between 1 million exp and your current exp. * Addressed the issue when gaining more than 1 million EXP that would result in your total EXP being reset by the difference between 1 million exp and your current exp.
* Fixed the bug in which picking up weapon clips with an empty weapon would not automatically trigger weapon reload on that weapon. * Fixed the bug in which picking up weapon clips with an empty weapon would not automatically trigger weapon reload on that weapon.

View file

@ -804,6 +804,48 @@ datablock TracerProjectileData(SniperZombieAcidShot) {
emap = true; emap = true;
}; };
datablock TracerProjectileData(SniperZombieAcidSidearmShot) {
doDynamicClientHits = true;
projectileShapeName = "";
directDamage = 0.0;
directDamageType = $DamageType::ZAcid;
hasDamageRadius = true;
indirectDamage = 0.06;
damageRadius = 2.0;
kickBackStrength = 0.0;
radiusDamageType = $DamageType::ZAcid;
sound = BlasterProjectileSound;
explosion = ZAcidBallExplosion;
ImageSource = "AcidCannonImage";
dryVelocity = 100.0;
wetVelocity = 100.0;
velInheritFactor = 1.0;
fizzleTimeMS = 400;
lifetimeMS = 500;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = true;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = -1;
activateDelayMS = 100;
tracerLength = 5;
tracerAlpha = false;
tracerMinPixels = 3;
tracerColor = "0 1 0 1";
tracerTex[0] = "special/landSpikeBolt";
tracerTex[1] = "special/landSpikeBoltCross";
tracerWidth = 0.3;
crossSize = 0.79;
crossViewAng = 0.990;
renderCross = true;
emap = true;
};
datablock TracerProjectileData(FlareguideSniperZombieAcidShot) { datablock TracerProjectileData(FlareguideSniperZombieAcidShot) {
doDynamicClientHits = true; doDynamicClientHits = true;

View file

@ -481,67 +481,6 @@ function serverCmdCheckendTilt(%client) {
} }
function DoMedalCheck(%client, %image) {
//
if(%client.isAIControlled()) {
return 1;
}
//
switch$(%image) {
case "BOVImage":
if(%client.hasMedal(11)) {
return 1;
}
else {
return 0;
}
case "LD06SavagerImage":
if(%client.hasMedal(1)) {
return 1;
}
else {
return 0;
}
case "IonLauncherImage" or "IonRifleImage" or "ConcussionGunImage":
if(%client.hasMedal(9)) {
return 1;
}
else {
return 0;
}
case "flamerImage":
if(%client.hasMedal(10)) {
return 1;
}
else {
return 0;
}
case "ShadowRifleImage":
if(%client.hasMedal(13)) {
return 1;
}
else {
return 0;
}
case "NapalmImage":
if(%client.hasMedal(27)) {
return 1;
}
else {
return 0;
}
case "MiniColliderCannonImage" or "PlasmasaberImage":
if(%client.hasMedal(15)) {
return 1;
}
else {
return 0;
}
default:
return 1;
}
}
//ARMOR UPDATE //ARMOR UPDATE
function updateArmorList(%client, %armorList) { function updateArmorList(%client, %armorList) {
if(!$Host::Purebuild) { if(!$Host::Purebuild) {

View file

@ -332,6 +332,8 @@ $Challenge::Challenge[5, 11] = "HuntersAsPrey";
$Challenge::Info["HuntersAsPrey"] = "Hunters As Prey\t5\t5000\tNone\tComplete the 'Air Raid' flashpoint operation."; $Challenge::Info["HuntersAsPrey"] = "Hunters As Prey\t5\t5000\tNone\tComplete the 'Air Raid' flashpoint operation.";
$Challenge::IsNotMultiTier["HuntersAsPrey"] = true; $Challenge::IsNotMultiTier["HuntersAsPrey"] = true;
$Challenge::Challenge[5, 12] = "ThroughTheFlare"; $Challenge::Challenge[5, 12] = "ThroughTheFlare";
$Challenge::SetHidden[5, 12] = true;
$Challenge::HiddenMessage[5, 12] = "<color:BB0000>=== CLASSIFIED: DELTA OPS CLEARANCE LEVEL ===";
$Challenge::Info["ThroughTheFlare"] = "Through The Flare\t5\t15000\tNLS-22 Acid Sniper\tFind and kill the Flareguide Mini-Boss during a living world session"; $Challenge::Info["ThroughTheFlare"] = "Through The Flare\t5\t15000\tNLS-22 Acid Sniper\tFind and kill the Flareguide Mini-Boss during a living world session";
$Challenge::IsNotMultiTier["ThroughTheFlare"] = true; $Challenge::IsNotMultiTier["ThroughTheFlare"] = true;

View file

@ -155,7 +155,7 @@ function GenerateCompletedChallegnesMenu(%client, %tag, %index) {
if(%db.getName().classname $= "Weapon") { if(%db.getName().classname $= "Weapon") {
%Image = %db.getName().image; %Image = %db.getName().image;
if(%Image.HasChallenges) { if(%Image.HasChallenges) {
if(DoMedalCheck(%client, %image) == 1 && CanUseRankedWeapon(%image, %client) == 1) { if(CanUseWeapon(%image, %client) == 1) {
messageClient( %client, 'SetLineHud', "", %tag, %index, "<a:gamelink\tWeaponUpgradesSub\t"@%Image@"\t1>"@%Image.GunName@"</a>"); messageClient( %client, 'SetLineHud', "", %tag, %index, "<a:gamelink\tWeaponUpgradesSub\t"@%Image@"\t1>"@%Image.GunName@"</a>");
%index++; %index++;
} }
@ -182,7 +182,7 @@ function GenerateWeaponChallegnesMenu(%client, %tag, %index) {
if(%kills $= "") { if(%kills $= "") {
%kills = 0; %kills = 0;
} }
if(DoMedalCheck(%client, %image) == 1 && CanUseRankedWeapon(%image, %client) == 1) { if(CanUseWeapon(%image, %client) == 1) {
messageClient( %client, 'SetLineHud', "", %tag, %index, "<a:gamelink\tWeaponTasksSub\t"@%Image@"\t1>"@%Image.GunName@"</a> - Kills: "@%kills@""); messageClient( %client, 'SetLineHud', "", %tag, %index, "<a:gamelink\tWeaponTasksSub\t"@%Image@"\t1>"@%Image.GunName@"</a> - Kills: "@%kills@"");
%index++; %index++;
} }

View file

@ -863,7 +863,7 @@ function ConstructionGame::processGameLink(%game, %client, %arg1, %arg2, %arg3,
if(%kills $= "") { if(%kills $= "") {
%kills = 0; %kills = 0;
} }
if(DoMedalCheck(%client, %image) == 1 && CanUseRankedWeapon(%image, %client) == 1) { if(CanUseWeapon(%image, %client) == 1) {
messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%Image.GunName@" - Kills: "@%kills@""); messageClient( %client, 'SetLineHud', "", %tag, %index, ""@%Image.GunName@" - Kills: "@%kills@"");
%index++; %index++;
} }

View file

@ -1,87 +1,136 @@
// //
function CanUseRankedWeapon(%WImg, %client) { function CanUseWeapon(%WImg, %client) {
if(%client.isHarb || %client.isAIControlled()) { if(%client.isHarb || %client.isAIControlled()) {
return 1; return 1;
} }
// //
if(!$TWM2::AllowSnipers) { if(!$TWM2::AllowSnipers) {
if(strstr(%WImg.getName(), "SniperRifle") != -1) { if(strstr(%WImg.getName(), "SniperRifle") != -1) {
return 0; return 0;
} }
} }
// %clientController = %client.TWM2Core;
%clientController = %client.TWM2Core; %WImg2 = %WImg.getName();
%WImg2 = %WImg.getName(); //Medal Tests
if($Host::RankSystem == 0) { if(%WImg2.MedalRequire) {
return 1; if(!%client.hasMedal(%WImg2.MedalRequire)) {
} //Deny access by medal.
else { return 3;
//PRESTIGE CHECKS (added 2.4) }
if(%WImg2.PrestigeRequire $= "") { }
if(%WImg2.RankRequire $= "") { //Challenge Tests
return 1; if(%WImg2.ChallengeRequire !$= "") {
} if(!%client.CheckNWChallengeCompletion(%WImg2.ChallengeRequire)) {
else { //Deny access by challenge.
%xpHas = getCurrentEXP(%client); return 4;
%xpNeed = $Ranks::MinPoints[%WImg2.RankRequire]; }
if(%xpNeed > %xpHas || (isSet(%WImg2.RankRequire) ? %clientController.rankNumber < %WImg2.RankRequire : false )) { }
return 0; //Rank Tests
} if($Host::RankSystem == 0) {
else { return 1;
return 1; }
} else {
} //PRESTIGE CHECKS (added 2.4)
} if(%WImg2.PrestigeRequire $= "") {
else { if(%WImg2.RankRequire $= "") {
%prestige = %clientController.officer; return 1;
%prestigeNeed = %WImg2.PrestigeRequire; }
if(%prestige < %prestigeNeed) { else {
return 2; //new case check %xpHas = getCurrentEXP(%client);
} %xpNeed = $Ranks::MinPoints[%WImg2.RankRequire];
else { if(%xpNeed > %xpHas || (isSet(%WImg2.RankRequire) ? %clientController.rankNumber < %WImg2.RankRequire : false )) {
if(%WImg2.RankRequire $= "") { return 0;
return 1; }
} else {
else { return 1;
%xpHas = getCurrentEXP(%client); }
%xpNeed = $Ranks::MinPoints[%WImg2.RankRequire]; }
if(%xpNeed > %xpHas || (isSet(%WImg2.RankRequire) ? %clientController.rankNumber < %WImg2.RankRequire: false )) { }
return 0; else {
} %prestige = %clientController.officer;
else { %prestigeNeed = %WImg2.PrestigeRequire;
return 1; if(%prestige < %prestigeNeed) {
} return 2; //new case check
} }
} else {
} if(%WImg2.RankRequire $= "") {
} return 1;
}
else {
%xpHas = getCurrentEXP(%client);
%xpNeed = $Ranks::MinPoints[%WImg2.RankRequire];
if(%xpNeed > %xpHas || (isSet(%WImg2.RankRequire) ? %clientController.rankNumber < %WImg2.RankRequire: false )) {
return 0;
}
else {
return 1;
}
}
}
}
}
} }
function PerformWeaponRankCheck(%WImg, %Plyr, %slot) { function PerformWeaponMountChecks(%WImg, %Plyr, %slot) {
if(%Plyr.isZombie || %Plyr.isSoldier || %Plyr.client.isAiControlled()) { if(%Plyr.isZombie || %Plyr.isSoldier || %Plyr.client.isAiControlled()) {
return; //Wraith AI return; //Wraith AI
} }
%clientController = %plyr.client.TWM2Core; %client = %plyr.client;
%xpHas = getCurrentEXP(%Plyr.client); %clientController = %client.TWM2Core;
%xpNeed = $Ranks::MinPoints[%WImg.RankRequire]; //Perform Rank Checks
%prestigeNeed = %WImg.PrestigeRequire; %xpHas = getCurrentEXP(%Plyr.client);
if(CanUseRankedWeapon(%WImg, %Plyr.client) == 2) { %xpNeed = $Ranks::MinPoints[%WImg.RankRequire];
BottomPrint(%Plyr.client, "Officer Level Required \nYou need Officer Level: "@%prestigeNeed@" to use this weapon", 3, 3); %prestigeNeed = %WImg.PrestigeRequire;
%Plyr.use(%WImg.Item);
%Plyr.throwweapon(1); %hideReason = %WImg.hideExistence;
%Plyr.throwweapon(0);
return; %weaponTestReturnCode = CanUseWeapon(%WImg, %Plyr.client);
} if(%weaponTestReturnCode != 1) {
else if(CanUseRankedWeapon(%WImg, %Plyr.client) == 0) { %Plyr.use(%WImg.Item);
BottomPrint(%Plyr.client, "You cannot use this weapon, XP too low \nYou need: "@%xpNeed - %xpHas@" More XP to use this weapon", 3, 3); %Plyr.throwweapon(1);
%Plyr.use(%WImg.Item); %Plyr.throwweapon(0);
%Plyr.throwweapon(1); switch(%weaponTestReturnCode) {
%Plyr.throwweapon(0); //Return Code 0: XP Too Low
return; case 0:
} if(%hideReason == true) {
else { BottomPrint(%Plyr.client, "Weapon Access Denied\nYou cannot use this weapon\nFurther information is classified", 3, 3);
//lalala, we can use it! }
} else {
BottomPrint(%Plyr.client, "Weapon Access Denied\nRequired Rank\nYou need: "@%xpNeed - %xpHas@" More XP to use this weapon", 3, 3);
}
break;
//Return Code 2: Officer Level Too Low
case 2:
if(%hideReason == true) {
BottomPrint(%Plyr.client, "Weapon Access Denied\nYou cannot use this weapon\nFurther information is classified", 3, 3);
}
else {
BottomPrint(%Plyr.client, "Weapon Access Denied\nOfficer Level Required\nYou need Officer Level: "@%prestigeNeed@" to use this weapon", 3, 3);
}
break;
//Return Code 3: Player does not have required medal
case 3:
if(%hideReason == true) {
BottomPrint(%Plyr.client, "Weapon Access Denied\nYou cannot use this weapon\nFurther information is classified", 3, 3);
}
else {
BottomPrint(%Plyr.client, "Weapon Access Denied\nMedal Required\nYou do not own the '"@$MedalName[%WImg.MedalRequire]@"' Medal", 3, 3);
}
break;
//Return Code 4: Player does not have required challenge
case 4:
if(%hideReason == true) {
BottomPrint(%Plyr.client, "Weapon Access Denied\nYou cannot use this weapon\nFurther information is classified", 3, 3);
}
else {
BottomPrint(%Plyr.client, "Weapon Access Denied\nChallenge Required\nYou do not own the '"@getField($Challenge::Info[%WImg.ChallengeRequire], 0)@"' Medal", 3, 3);
}
break;
}
}
} }
function AttemptReload(%WImg, %Plyr, %slot) { function AttemptReload(%WImg, %Plyr, %slot) {

View file

@ -2,6 +2,28 @@
$TWM2::ArmorHasCollisionFunction[SniperZombieArmor] = false; $TWM2::ArmorHasCollisionFunction[SniperZombieArmor] = false;
$TWM2::ArmorHasCollisionFunction[FlareguideSniperZombieArmor] = false; $TWM2::ArmorHasCollisionFunction[FlareguideSniperZombieArmor] = false;
datablock ShapeBaseImageData(ZSniperImage1) {
shapeFile = "weapon_sniper.dts";
emap = true;
armThread = looksn;
};
datablock ShapeBaseImageData(ZSniperImage2) {
shapeFile = "weapon_targeting.dts";
offset = "0.0 1.0 0.41";
rotation = "90 0 0 90";
armThread = looksn;
emap = true;
};
datablock ShapeBaseImageData(ZSniperImage3) {
shapeFile = "weapon_elf.dts";
offset = "0.0 0.3 0";
rotation = "1 0 0 90";
armThread = looksn;
emap = true;
};
datablock PlayerData(SniperZombieArmor) : LightMaleHumanArmor { datablock PlayerData(SniperZombieArmor) : LightMaleHumanArmor {
boundingBox = "1.63 1.63 2.6"; boundingBox = "1.63 1.63 2.6";
maxDamage = 2.5; maxDamage = 2.5;
@ -29,6 +51,99 @@ datablock PlayerData(SniperZombieArmor) : LightMaleHumanArmor {
max[Grenade] = 0; max[Grenade] = 0;
}; };
function SniperZombieArmor::AI(%datablock, %zombie) {
//Sniper Zombie AI:
// Unlike other zombies, the sniper zombie will continue to hunt their target until killed.
// The sniper zombie will employ preferential targeting against enemy snipers first
//
// TWM2 3.9.2: Prior to this version, the sniper would run away when approached,
// now, the sniper is armed with a new acid sidearm that fires quick pulses and will
// employ strafing moves as well
if(!isObject(%zombie) || %zombie.getState() $= "dead") {
return;
}
%pos = %zombie.getWorldBoxCenter();
if(!%zombie.hasTarget) {
%preferSniper = getRandom(1, 10);
if(%preferSniper > 3) {
for(%i = 0; %i < ClientGroup.getCount(%i); %i++) {
%check = ClientGroup.getObject(%i);
if(isObject(%check.player) && %check.player.getState() !$= "dead") {
//Check their weapon
}
}
}
else {
%closestClient = TWM2Lib_Zombie_Core("lookForTarget", %zombie);
%closestDistance = getWord(%closestClient, 1);
if(isObject(%closestClient.player) && %closestClient.player.getState() !$= "dead") {
%zombie.hasTarget = 1;
%zombie.targetPlayer = %closestClient.player;
}
}
}
%zombie.moveloop = %datablock.Move(%zombie);
}
function SniperZombieArmor::Move(%datablock, %zombie) {
if(!isObject(%zombie) || %zombie.getState() $= "dead") {
return;
}
%pos = %zombie.getWorldBoxCenter();
%closestClient = TWM2Lib_Zombie_Core("lookForTarget", %zombie);
%closestDistance = getWord(%closestClient, 1);
%closestClient = getWord(%closestClient, 0).Player;
if(%closestDistance <= $zombie::detectDist) {
if(%zombie.hastarget != 1) {
%zombie.hastarget = 1;
}
TWM2Lib_Zombie_Core("playZAudio", %zombie, 100, 40);
%vector = TWM2Lib_Zombie_Core("zombieGetFacingDirection", %zombie, %closestClient.getPosition());
if(Game.CheckModifier("SuperLunge") == 1) {
%ld = $Zombie::LungeDistance * 5;
}
else {
%ld = $Zombie::LungeDistance;
}
if(%closestDistance <= %ld && %zombie.canjump == 1) {
%vector = vectorScale(%vector, 4);
}
%vector = vectorScale(%vector, %zombie.speed);
%upvec = "150";
if(%closestDistance <= %ld && %zombie.canjump == 1) {
%upvec *= 2;
TWM2Lib_Zombie_Core("setZFlag", %zombie, "canJump", 0);
schedule($Zombie::BaseJumpCooldown, 0, TWM2Lib_Zombie_Core, "setZFlag", %zombie, "canJump", 1);
}
%x = Getword(%vector, 0);
%y = Getword(%vector, 1);
%z = Getword(%vector, 2);
if(%z >= 600) {
%upvec = (%upvec * 5);
}
%vector = %x@" "@%y@" "@%upvec;
%zombie.applyImpulse(%pos, %vector);
}
else if(%zombie.hastarget == 1) {
%zombie.hastarget = 0;
%zombie.zombieRmove = schedule(%zombie.updateTimeFrequency, %zombie, "TWM2Lib_Zombie_Core", "zRandomMoveLoop", %zombie);
}
%zombie.moveloop = %datablock.schedule(%zombie.updateTimeFrequency, "Move", %zombie);
}
//*****************************************************************
//*****************************************************************
// FLAREGUIDE SNIPER ZOMBIE
//
// This is contained within this file as it requries the sniper zombie
// datablock in order to load, therefore we'll just leave it down here
//
//*****************************************************************
//*****************************************************************
datablock PlayerData(FlareguideSniperZombieArmor) : SniperZombieArmor { datablock PlayerData(FlareguideSniperZombieArmor) : SniperZombieArmor {
boundingBox = "1.63 1.63 2.6"; boundingBox = "1.63 1.63 2.6";
maxDamage = 20.0; maxDamage = 20.0;
@ -48,27 +163,7 @@ datablock PlayerData(FlareguideSniperZombieArmor) : SniperZombieArmor {
max[Grenade] = 0; max[Grenade] = 0;
}; };
datablock ShapeBaseImageData(ZSniperImage1) {
shapeFile = "weapon_sniper.dts";
emap = true;
armThread = looksn;
};
datablock ShapeBaseImageData(ZSniperImage2) {
shapeFile = "weapon_targeting.dts";
offset = "0.0 1.0 0.41";
rotation = "90 0 0 90";
armThread = looksn;
emap = true;
};
datablock ShapeBaseImageData(ZSniperImage3) {
shapeFile = "weapon_elf.dts";
offset = "0.0 0.3 0";
rotation = "1 0 0 90";
armThread = looksn;
emap = true;
};
function SniperZombiemovetotarget(%zombie){ function SniperZombiemovetotarget(%zombie){
if(!isobject(%zombie)) if(!isobject(%zombie))

View file

@ -653,562 +653,347 @@ function InventoryScreen::addLine( %this, %tag, %lineNum, %type, %count )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
function InventoryScreen::updateHud( %this, %client, %tag ) { function InventoryScreen::updateHud( %this, %client, %tag ) {
%noSniperRifle = true; %noSniperRifle = true;
%armor = getArmorDatablock( %client, $NameToInv[%client.favorites[0]] ); %armor = getArmorDatablock( %client, $NameToInv[%client.favorites[0]] );
if (!%client.isAdmin && !%client.isSuperAdmin) { if (!%client.isAdmin && !%client.isSuperAdmin) {
if ($Host::Purebuild == 1) { if ($Host::Purebuild == 1) {
%client.favorites[0] = "Purebuild"; %client.favorites[0] = "Purebuild";
%armor = getArmorDatablock( %client , "Pure"); %armor = getArmorDatablock( %client , "Pure");
} }
else { else {
if (%client.favorites[0] $= "Purebuild") if (%client.favorites[0] $= "Purebuild") {
%client.favorites[0] = "Scout"; %client.favorites[0] = "Scout";
}
} }
} }
if ( %client.lastArmor !$= %armor ) if ( %client.lastArmor !$= %armor ) {
{ %client.lastArmor = %armor;
%client.lastArmor = %armor; for ( %x = 0; %x < %client.lastNumFavs; %x++ ) {
for ( %x = 0; %x < %client.lastNumFavs; %x++ ) messageClient( %client, 'RemoveLineHud', "", 'inventoryScreen', %x );
messageClient( %client, 'RemoveLineHud', "", 'inventoryScreen', %x ); }
%setLastNum = true; %setLastNum = true;
} }
%cmt = $CurrentMissionType; %cmt = $CurrentMissionType;
//Auto-Inv Load //Auto-Inv Load
if($Host::PureBuild) { if($Host::PureBuild) {
buyFavorites(%client); buyFavorites(%client);
} }
//Create - ARMOR - List //Create - ARMOR - List
%armorList = %client.favorites[0]; %armorList = %client.favorites[0];
for ( %y = 0; $InvArmor[%y] !$= ""; %y++ ) for ( %y = 0; $InvArmor[%y] !$= ""; %y++ ) {
if ( $InvArmor[%y] !$= %client.favorites[0] ) if ( $InvArmor[%y] !$= %client.favorites[0] ) {
%armorList = %armorList TAB $InvArmor[%y]; %armorList = %armorList TAB $InvArmor[%y];
if($TWM::PlayingInfection) }
%armorList = InfectionArmors(%client, %armorList); }
else if($TWM::PlayingInfection) {
%armorList = updateArmorList(%client, %armorList); %armorList = InfectionArmors(%client, %armorList);
}
else {
%armorList = updateArmorList(%client, %armorList);
}
//Create - WEAPON - List
for ( %y = 0; $InvWeapon[%y] !$= ""; %y++ ) {
%notFound = true;
for ( %i = 0; %i < getFieldCount( %client.weaponIndex ); %i++ ) {
%WInv = $NameToInv[$InvWeapon[%y]];
if ( ( $InvWeapon[%y] $= %client.favorites[getField( %client.weaponIndex,%i )] ) || !%armor.max[%WInv] ) {
%notFound = false;
break;
}
}
if ( !($InvBanList[%cmt, %WInv]) ) {
if ( %notFound && %weaponList $= "" ) {
%useCode = CanUseWeapon(%client, %WInv.Image);
if(%useCode == 1) {
%weaponList = $InvWeapon[%y];
}
}
else if ( %notFound ) {
%useCode = CanUseWeapon(%client, %WInv.Image);
if(%useCode == 1) {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
}
}
//Create - WEAPON - List //Create - PISTOL - List
//You are not permitted to use any part of this code... %pistolList = "";
//Find your own method of doing this... If I find this in your if ( getFieldCount( %client.pistolIndex ) ) {
//code, I will sue you for copywrite infrigment, so shoo :) %pistolList = %client.favorites[getField( %client.pistolIndex, 0 )];
%prestige = %client.TWM2Core.officer; }
if(%client.TWM2Core.officer $= "") { else {
%client.TWM2Core.officer = 0; %pistolList = "EMPTY";
%prestige = %client.TWM2Core.officer; %client.numFavs++;
} }
%xpHas = getCurrentEXP(%client); for ( %y = 0; $InvPistol[%y] !$= ""; %y++ ) {
if(!$Host::RankSystem) { //it's off %PistolInv = $NameToInv[$InvPistol[%y]];
for ( %y = 0; $InvWeapon[%y] !$= ""; %y++ ) { if ( ( $InvPistol[%y] !$= %client.favorites[getField( %client.pistolIndex, 0 )]) && !($InvBanList[%cmt, %PistolInv])) {
%notFound = true; %useCode = CanUseWeapon(%client, %PistolInv.Image);
for ( %i = 0; %i < getFieldCount( %client.weaponIndex ); %i++ ) { if(%useCode == 1) {
%WInv = $NameToInv[$InvWeapon[%y]]; %pistolList = %pistolList TAB $InvPistol[%y];
if ( ( $InvWeapon[%y] $= %client.favorites[getField( %client.weaponIndex,%i )] ) || !%armor.max[%WInv] ) { }
%notFound = false; }
break; }
}
}
if ( !($InvBanList[%cmt, %WInv]) ) { //Create - MELEE - List
if ( %notFound && %weaponList $= "" ) { if(%client.favorites[0] !$= "Purebuild") {
if(%WInv.Image.MedalRequire) { if ( getFieldCount( %client.meleeIndex ) ) {
%canUse = DoMedalCheck(%client, %WInv.Image); %meleeList = %client.favorites[getField( %client.meleeIndex, 0 )];
if(%canUse) { }
%weaponList = $InvWeapon[%y];
}
}
else {
%weaponList = $InvWeapon[%y];
}
}
else if ( %notFound ) {
if(%WInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %WInv.Image);
if(%canUse) {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
else {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
}
}
}
else { //It's on
for ( %y = 0; $InvWeapon[%y] !$= ""; %y++ ) {
%notFound = true;
for ( %i = 0; %i < getFieldCount( %client.weaponIndex ); %i++ ) {
%WInv = $NameToInv[$InvWeapon[%y]];
if ( ( $InvWeapon[%y] $= %client.favorites[getField( %client.weaponIndex,%i )] ) || !%armor.max[%WInv] ) {
%notFound = false;
break;
}
}
if ( !($InvBanList[%cmt, %WInv]) ) {
if ( %notFound && %weaponList $= "" ) {
//New Rank Check
if(%WInv.Image.RankRequire $= "") {
%xpNeed = 0;
}
else {
%xpNeed = $Ranks::MinPoints[%WInv.Image.RankRequire];
}
//
if(%WInv.Image.PrestigeRequire $= "") {
%prestigeNeed = 0;
}
else {
%prestigeNeed = %WInv.Image.PrestigeRequire;
}
if(%prestigeNeed $= "" || %prestigeNeed == 0) {
if(%xpNeed $= "" || %xpNeed == 0) {
if(%WInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %WInv.Image);
if(%canUse) {
%weaponList = $InvWeapon[%y];
}
}
else {
%weaponList = $InvWeapon[%y];
}
}
else {
if (%xpHas >= %xpNeed){
if(%WInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %WInv.Image);
if(%canUse) {
%weaponList = $InvWeapon[%y];
}
}
else {
%weaponList = $InvWeapon[%y];
}
}
}
}
else {
if(%prestige >= %prestigeNeed) {
if(%xpNeed $= "" || %xpNeed == 0) {
if(%WInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %WInv.Image);
if(%canUse) {
%weaponList = $InvWeapon[%y];
}
}
else {
%weaponList = $InvWeapon[%y];
}
}
else {
if (%xpHas >= %xpNeed && (isSet(%WInv.Image.RankRequire) ? %client.TWM2Core.rankNumber >= %WInv.Image.RankRequire: true )){
if(%WInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %WInv.Image);
if(%canUse) {
%weaponList = $InvWeapon[%y];
}
}
else {
%weaponList = $InvWeapon[%y];
}
}
}
}
}
}
else if ( %notFound ) {
//New Rank Check
if(%WInv.Image.RankRequire $= "") {
%xpNeed = 0;
}
else {
%xpNeed = $Ranks::MinPoints[%WInv.Image.RankRequire];
}
//
if(%WInv.Image.PrestigeRequire $= "") {
%prestigeNeed = 0;
}
else {
%prestigeNeed = %WInv.Image.PrestigeRequire;
}
if(%prestigeNeed $= "" || %prestigeNeed == 0) {
if(%xpNeed == 0) {
if(%WInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %WInv.Image);
if(%canUse) {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
else {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
else {
if (%xpHas >= %xpNeed){
if(%WInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %WInv.Image);
if(%canUse) {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
else {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
}
}
else {
if(%prestige >= %prestigeNeed) {
if(%xpNeed $= "" || %xpNeed == 0) {
if(%WInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %WInv.Image);
if(%canUse) {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
else {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
else {
if (%xpHas >= %xpNeed && (isSet(%WInv.Image.RankRequire) ? %client.TWM2Core.rankNumber >= %WInv.Image.RankRequire: true )){
if(%WInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %WInv.Image);
if(%canUse) {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
else {
%weaponList = %weaponList TAB $InvWeapon[%y];
}
}
}
}
}
}
}
}
}
//Create - PISTOL - List
//read above
%pistolList = "";
if ( getFieldCount( %client.pistolIndex ) )
%pistolList = %client.favorites[getField( %client.pistolIndex, 0 )];
else {
%pistolList = "EMPTY";
%client.numFavs++;
}
for ( %y = 0; $InvPistol[%y] !$= ""; %y++ ) {
%PistolInv = $NameToInv[$InvPistol[%y]];
if ( ( $InvPistol[%y] !$= %client.favorites[getField( %client.pistolIndex, 0 )])
&& !($InvBanList[%cmt, %PistolInv])) {
if(%PistolInv.Image.RankRequire $= "") {
%xpNeed = 0;
}
else {
%xpNeed = $Ranks::MinPoints[%PistolInv.Image.RankRequire];
}
//
if(%PistolInv.Image.PrestigeRequire $= "")
%prestigeNeed = 0;
}
else {
%prestigeNeed = %PistolInv.Image.PrestigeRequire;
}
//
if(%PistolInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %PistolInv.Image);
}
else {
%canUse = 1;
}
if(%canUse) {
//XP Check Here
if(%prestige >= %prestigeNeed) {
if(%xpHas > %xpNeed && (isSet(%PistolInv.Image.RankRequire) ? %client.TWM2Core.rankNumber >= %PistolInv.Image.RankRequire : true )) {
%pistolList = %pistolList TAB $InvPistol[%y];
}
}
}
}
// %pistolList = CheckPistolPrereqs(%client, %pistolList);
//Create - MELEE - List
//Once again, Read Above
if(%client.favorites[0] !$= "Purebuild") {
if ( getFieldCount( %client.meleeIndex ) )
%meleeList = %client.favorites[getField( %client.meleeIndex, 0 )];
else {
%meleeList = "EMPTY";
%client.numFavs++;
}
for ( %y = 0; $InvMelee[%y] !$= ""; %y++ ) {
%meleeInv = $NameToInv[$InvMelee[%y]];
if ( ( $InvMelee[%y] !$= %client.favorites[getField( %client.meleeIndex, 0 )]) &&
%armor.max[%meleeInv] && !($InvBanList[%cmt, %meleeInv])) {
if(%meleeInv.Image.MedalRequire) {
%canUse = DoMedalCheck(%client, %meleeInv.Image);
}
else {
%canUse = 1;
}
if(%canUse) {
%meleeList = %meleeList TAB $InvMelee[%y];
}
}
}
}
//Create - PACK - List
if ( getFieldCount( %client.packIndex ) )
%packList = %client.favorites[getField( %client.packIndex, 0 )];
else
{
%packList = "EMPTY";
%client.numFavs++;
}
for ( %y = 0; $InvPack[%y] !$= ""; %y++ )
{
%PInv = $NameToInv[$InvPack[%y]];
if ( ( $InvPack[%y] !$= %client.favorites[getField( %client.packIndex, 0 )]) &&
%armor.max[%PInv] && !($InvBanList[%cmt, %PInv]))
%packList = %packList TAB $Invpack[%y];
}
//Create - Construction - List
if(%client.favorites[0] $= "Purebuild" || %client.favorites[0] $= "Tech") {
if ( %noSniperRifle ) {
if ( getFieldCount( %client.depIndex ) )
%depList = %client.favorites[getField( %client.depIndex, 0 )];
else { else {
%depList = "EMPTY"; %meleeList = "EMPTY";
%client.numFavs++; %client.numFavs++;
} }
for ( %y = 0; $InvDep[%y] !$= ""; %y++ ) { for ( %y = 0; $InvMelee[%y] !$= ""; %y++ ) {
%DInv = $NameToInv[$InvDep[%y]]; %meleeInv = $NameToInv[$InvMelee[%y]];
if ( ( $InvDep[%y] !$= %client.favorites[getField( %client.depIndex, 0 )]) && if ( ( $InvMelee[%y] !$= %client.favorites[getField( %client.meleeIndex, 0 )]) && %armor.max[%meleeInv] && !($InvBanList[%cmt, %meleeInv])) {
%armor.max[%DInv] && !($InvBanList[%cmt, %DInv])) %useCode = CanUseWeapon(%client, %meleeInv.Image);
%depList = %depList TAB $InvDep[%y]; if(%useCode == 1) {
%meleeList = %meleeList TAB $InvMelee[%y];
}
}
} }
} }
}
//Create - GRENADE - List //Create - PACK - List
for ( %y = 0; $InvGrenade[%y] !$= ""; %y++ ) if ( getFieldCount( %client.packIndex ) ) {
{ %packList = %client.favorites[getField( %client.packIndex, 0 )];
%notFound = true; }
for(%i = 0; %i < getFieldCount( %client.grenadeIndex ); %i++) else {
{ %packList = "EMPTY";
%GInv = $NameToInv[$InvGrenade[%y]]; %client.numFavs++;
if ( ( $InvGrenade[%y] $= %client.favorites[getField( %client.grenadeIndex, %i )] ) || !%armor.max[%GInv] ) }
{ for ( %y = 0; $InvPack[%y] !$= ""; %y++ ) {
%notFound = false; %PInv = $NameToInv[$InvPack[%y]];
break; if ( ( $InvPack[%y] !$= %client.favorites[getField( %client.packIndex, 0 )]) && %armor.max[%PInv] && !($InvBanList[%cmt, %PInv])) {
} %packList = %packList TAB $Invpack[%y];
} }
if ( !($InvBanList[%cmt, %GInv]) ) }
{
if ( %notFound && %grenadeList $= "" )
%grenadeList = $InvGrenade[%y];
else if ( %notFound )
%grenadeList = %grenadeList TAB $InvGrenade[%y];
}
}
// CheckNadePrereqs(%client, %grenadeList);
//Create - MINE - List //Create - Construction - List
for ( %y = 0; $InvMine[%y] !$= "" ; %y++ ) if(%client.favorites[0] $= "Purebuild" || %client.favorites[0] $= "Tech") {
{ if ( %noSniperRifle ) {
%notFound = true; if ( getFieldCount( %client.depIndex ) ) {
%MInv = $NameToInv[$InvMine[%y]]; %depList = %client.favorites[getField( %client.depIndex, 0 )];
for ( %i = 0; %i < getFieldCount( %client.mineIndex ); %i++ ) }
if ( ( $InvMine[%y] $= %client.favorites[getField( %client.mineIndex, %i )] ) || !%armor.max[%MInv] ) else {
{ %depList = "EMPTY";
%notFound = false; %client.numFavs++;
break; }
} for ( %y = 0; $InvDep[%y] !$= ""; %y++ ) {
%DInv = $NameToInv[$InvDep[%y]];
if ( ( $InvDep[%y] !$= %client.favorites[getField( %client.depIndex, 0 )]) && %armor.max[%DInv] && !($InvBanList[%cmt, %DInv])) {
%depList = %depList TAB $InvDep[%y];
}
}
}
}
if ( !($InvBanList[%cmt, %MInv]) ) //Create - GRENADE - List
{ for ( %y = 0; $InvGrenade[%y] !$= ""; %y++ ) {
if ( %notFound && %mineList $= "" ) %notFound = true;
%mineList = $InvMine[%y]; for(%i = 0; %i < getFieldCount( %client.grenadeIndex ); %i++) {
else if ( %notFound ) %GInv = $NameToInv[$InvGrenade[%y]];
%mineList = %mineList TAB $InvMine[%y]; if ( ( $InvGrenade[%y] $= %client.favorites[getField( %client.grenadeIndex, %i )] ) || !%armor.max[%GInv] ) {
} %notFound = false;
} break;
}
}
if ( !($InvBanList[%cmt, %GInv]) ) {
if ( %notFound && %grenadeList $= "" ) {
%grenadeList = $InvGrenade[%y];
}
else if ( %notFound ) {
%grenadeList = %grenadeList TAB $InvGrenade[%y];
}
}
}
//Send - ARMOR - List //Create - MINE - List
%client.numFavsCount++; for ( %y = 0; $InvMine[%y] !$= "" ; %y++ ) {
messageClient( %client, 'SetLineHud', "", %tag, 0, "Armor:", %armorList, armor, %client.numFavsCount ); %notFound = true;
%lineCount = 1; %MInv = $NameToInv[$InvMine[%y]];
for ( %i = 0; %i < getFieldCount( %client.mineIndex ); %i++ ) {
if ( ( $InvMine[%y] $= %client.favorites[getField( %client.mineIndex, %i )] ) || !%armor.max[%MInv] ) {
%notFound = false;
break;
}
}
if ( !($InvBanList[%cmt, %MInv]) ) {
if ( %notFound && %mineList $= "" ) {
%mineList = $InvMine[%y];
}
else if ( %notFound ) {
%mineList = %mineList TAB $InvMine[%y];
}
}
}
//Send - WEAPONS - List //Send - ARMOR - List
// echo(%armor); %client.numFavsCount++;
%toCount = %armor.MaxWeapons; messageClient( %client, 'SetLineHud', "", %tag, 0, "Armor:", %armorList, armor, %client.numFavsCount );
//if(%client.IsActivePerk("OverKill") == 1) { %lineCount = 1;
// %toCount++;
//}
for ( %x = 0; %x < %toCount; %x++ )
{
%client.numFavsCount++;
if ( %x < getFieldCount( %client.weaponIndex ) )
{
%list = %client.favorites[getField( %client.weaponIndex,%x )];
if ( %list $= Invalid )
{
%client.favorites[%client.numFavs] = "INVALID";
%client.weaponIndex = %client.weaponIndex TAB %client.numFavs;
}
}
else
{
%list = "EMPTY";
%client.favorites[%client.numFavs] = "EMPTY";
%client.weaponIndex = %client.weaponIndex TAB %client.numFavs;
%client.numFavs++;
}
if ( %list $= empty )
%list = %list TAB %weaponList;
else
%list = %list TAB %weaponList TAB "EMPTY";
messageClient( %client, 'SetLineHud', "", %tag, %x + %lineCount, "Weapon Slot " @ %x + 1 @ ": ", %list , weapon, %client.numFavsCount );
}
%lineCount = %lineCount + %toCount;
//Send - PISTOL - List //Send - WEAPONS - List
//if(%client.IsActivePerk("OverKill") == 0) { // echo(%armor);
%client.numFavsCount++; %toCount = %armor.MaxWeapons;
if ( getField( %pistolList, 0 ) !$= empty && %noSniperRifle ) //if(%client.IsActivePerk("OverKill") == 1) {
%pistolList = %pistolList TAB "EMPTY"; // %toCount++;
%pistolText = %pistolList; //}
%pistolOverFlow = ""; for ( %x = 0; %x < %toCount; %x++ ) {
if ( strlen( %pistolList ) > 255 ) { %client.numFavsCount++;
%pistolText = getSubStr( %pistolList, 0, 255 ); if ( %x < getFieldCount( %client.weaponIndex ) ) {
%pistolOverFlow = getSubStr( %pistolList, 255, 512 ); %list = %client.favorites[getField( %client.weaponIndex,%x )];
} if ( %list $= Invalid ) {
messageClient( %client, 'SetLineHud', "", %tag, %lineCount, "Pistol:", %pistolText, pistol, %client.numFavsCount, %pistolOverFlow ); %client.favorites[%client.numFavs] = "INVALID";
%lineCount++; %client.weaponIndex = %client.weaponIndex TAB %client.numFavs;
//} }
//else { }
else {
%list = "EMPTY";
%client.favorites[%client.numFavs] = "EMPTY";
%client.weaponIndex = %client.weaponIndex TAB %client.numFavs;
%client.numFavs++;
}
if ( %list $= empty ) {
%list = %list TAB %weaponList;
}
else {
%list = %list TAB %weaponList TAB "EMPTY";
}
messageClient( %client, 'SetLineHud', "", %tag, %x + %lineCount, "Weapon Slot " @ %x + 1 @ ": ", %list, weapon, %client.numFavsCount );
}
%lineCount = %lineCount + %toCount;
//} //Send - PISTOL - List
if(%client.favorites[0] !$= "Purebuild") { //if(%client.IsActivePerk("OverKill") == 0) {
%client.numFavsCount++; %client.numFavsCount++;
if ( getField( %meleeList, 0 ) !$= empty && %noSniperRifle ) if ( getField( %pistolList, 0 ) !$= empty && %noSniperRifle ) {
%meleeList = %meleeList TAB "EMPTY"; %pistolList = %pistolList TAB "EMPTY";
%meleeText = %meleeList; }
%meleeOverFlow = ""; %pistolText = %pistolList;
if ( strlen( %meleeList ) > 255 ) { %pistolOverFlow = "";
%meleeText = getSubStr( %meleeList, 0, 255 ); if ( strlen( %pistolList ) > 255 ) {
%meleeOverFlow = getSubStr( %meleeList, 255, 512 ); %pistolText = getSubStr( %pistolList, 0, 255 );
} %pistolOverFlow = getSubStr( %pistolList, 255, 512 );
messageClient( %client, 'SetLineHud', "", %tag, %lineCount, "Melee:", %meleeText, melee, %client.numFavsCount, %meleeOverFlow ); }
%lineCount++; messageClient( %client, 'SetLineHud', "", %tag, %lineCount, "Sidearm: ", %pistolText, pistol, %client.numFavsCount, %pistolOverFlow );
} %lineCount++;
//}
//else {
//Send - PACK - List //}
%client.numFavsCount++; if(%client.favorites[0] !$= "Purebuild") {
if ( getField( %packList, 0 ) !$= empty && %noSniperRifle ) %client.numFavsCount++;
%packList = %packList TAB "EMPTY"; if ( getField( %meleeList, 0 ) !$= empty && %noSniperRifle ) {
%packText = %packList; %meleeList = %meleeList TAB "EMPTY";
%packOverFlow = ""; }
if ( strlen( %packList ) > 255 ) %meleeText = %meleeList;
{ %meleeOverFlow = "";
%packText = getSubStr( %packList, 0, 255 ); if ( strlen( %meleeList ) > 255 ) {
%packOverFlow = getSubStr( %packList, 255, 512 ); %meleeText = getSubStr( %meleeList, 0, 255 );
} %meleeOverFlow = getSubStr( %meleeList, 255, 512 );
messageClient( %client, 'SetLineHud', "", %tag, %lineCount, "Pack:", %packText, pack, %client.numFavsCount, %packOverFlow ); }
%lineCount++; messageClient( %client, 'SetLineHud', "", %tag, %lineCount, "Melee: ", %meleeText, melee, %client.numFavsCount, %meleeOverFlow );
%lineCount++;
}
//Send - Construction - List //Send - PACK - List
if(%client.favorites[0] $= "Purebuild" || %client.favorites[0] $= "Tech") { %client.numFavsCount++;
%client.numFavsCount++; if ( getField( %packList, 0 ) !$= empty && %noSniperRifle ) {
if ( getField( %depList, 0 ) !$= empty && %noSniperRifle ) %packList = %packList TAB "EMPTY";
%depList = %depList TAB "EMPTY"; }
%depText = %depList; %packText = %packList;
%depOverFlow = ""; %packOverFlow = "";
if ( strlen( %depList ) > 255 ) { if ( strlen( %packList ) > 255 ) {
%depText = getSubStr( %depList, 0, 255 ); %packText = getSubStr( %packList, 0, 255 );
%depOverFlow = getSubStr( %depList, 255, 512 ); %packOverFlow = getSubStr( %packList, 255, 512 );
} }
messageClient( %client, 'SetLineHud', "", %tag, %lineCount, "Builder Pack:", %depText, dep, %client.numFavsCount, %depOverFlow ); messageClient( %client, 'SetLineHud', "", %tag, %lineCount, "Pack: ", %packText, pack, %client.numFavsCount, %packOverFlow );
%lineCount++; %lineCount++;
}
for( %x = 0; %x < %armor.maxGrenades; %x++ ) //Send - Construction - List
{ if(%client.favorites[0] $= "Purebuild" || %client.favorites[0] $= "Tech") {
%client.numFavsCount++; %client.numFavsCount++;
if ( %x < getFieldCount( %client.grenadeIndex ) ) if ( getField( %depList, 0 ) !$= empty && %noSniperRifle ) {
{ %depList = %depList TAB "EMPTY";
%list = %client.favorites[getField( %client.grenadeIndex, %x )]; }
if (%list $= Invalid) %depText = %depList;
{ %depOverFlow = "";
%client.favorites[%client.numFavs] = "INVALID"; if ( strlen( %depList ) > 255 ) {
%client.grenadeIndex = %client.grenadeIndex TAB %client.numFavs; %depText = getSubStr( %depList, 0, 255 );
} %depOverFlow = getSubStr( %depList, 255, 512 );
} }
else messageClient( %client, 'SetLineHud', "", %tag, %lineCount, "Builder Pack: ", %depText, dep, %client.numFavsCount, %depOverFlow );
{ %lineCount++;
%list = "EMPTY"; }
%client.favorites[%client.numFavs] = "EMPTY";
%client.grenadeIndex = %client.grenadeIndex TAB %client.numFavs;
%client.numFavs++;
}
if ( %list $= empty ) //Send - GRENADE - List
%list = %list TAB %grenadeList; for( %x = 0; %x < %armor.maxGrenades; %x++ ) {
else %client.numFavsCount++;
%list = %list TAB %grenadeList TAB "EMPTY"; if ( %x < getFieldCount( %client.grenadeIndex ) ) {
%list = %client.favorites[getField( %client.grenadeIndex, %x )];
if (%list $= Invalid) {
%client.favorites[%client.numFavs] = "INVALID";
%client.grenadeIndex = %client.grenadeIndex TAB %client.numFavs;
}
}
else {
%list = "EMPTY";
%client.favorites[%client.numFavs] = "EMPTY";
%client.grenadeIndex = %client.grenadeIndex TAB %client.numFavs;
%client.numFavs++;
}
messageClient( %client, 'SetLineHud', "", %tag, %x + %lineCount, "Grenade:", %list, grenade, %client.numFavsCount ); if ( %list $= empty ) {
} %list = %list TAB %grenadeList;
%lineCount = %lineCount + %armor.maxGrenades; }
else {
%list = %list TAB %grenadeList TAB "EMPTY";
}
messageClient( %client, 'SetLineHud', "", %tag, %x + %lineCount, "Grenade: ", %list, grenade, %client.numFavsCount );
}
%lineCount = %lineCount + %armor.maxGrenades;
for ( %x = 0; %x < %armor.maxMines; %x++ ) //Send - MINE - List
{ for ( %x = 0; %x < %armor.maxMines; %x++ ) {
%client.numFavsCount++; %client.numFavsCount++;
if ( %x < getFieldCount( %client.mineIndex ) ) if ( %x < getFieldCount( %client.mineIndex ) ) {
{ %list = %client.favorites[getField( %client.mineIndex, %x )];
%list = %client.favorites[getField( %client.mineIndex, %x )]; if ( %list $= Invalid ) {
if ( %list $= Invalid ) %client.favorites[%client.numFavs] = "INVALID";
{ %client.mineIndex = %client.mineIndex TAB %client.numFavs;
%client.favorites[%client.numFavs] = "INVALID"; }
%client.mineIndex = %client.mineIndex TAB %client.numFavs; }
} else {
} %list = "EMPTY";
else %client.favorites[%client.numFavs] = "EMPTY";
{ %client.mineIndex = %client.mineIndex TAB %client.numFavs;
%list = "EMPTY"; %client.numFavs++;
%client.favorites[%client.numFavs] = "EMPTY"; }
%client.mineIndex = %client.mineIndex TAB %client.numFavs;
%client.numFavs++;
}
if ( %list !$= Invalid ) if ( %list !$= Invalid ) {
{ if ( %list $= empty ) {
if ( %list $= empty ) %list = %list TAB %mineList;
%list = %list TAB %mineList; }
else if ( %mineList !$= "" ) else if ( %mineList !$= "" ) {
%list = %list TAB %mineList TAB "EMPTY"; %list = %list TAB %mineList TAB "EMPTY";
else }
%list = %list TAB "EMPTY"; else {
} %list = %list TAB "EMPTY";
}
}
messageClient( %client, 'SetLineHud', "", %tag, %x + %lineCount, "Mine:", %list, mine, %client.numFavsCount ); messageClient( %client, 'SetLineHud', "", %tag, %x + %lineCount, "Mine: ", %list, mine, %client.numFavsCount );
} }
if ( %setLastNum ) if ( %setLastNum ) {
%client.lastNumFavs = %client.numFavs; %client.lastNumFavs = %client.numFavs;
}
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View file

@ -384,13 +384,7 @@ function WeaponImage::onMount(%this,%obj,%slot) {
return; return;
} }
if(!DoMedalCheck(%obj.client, %this.getName()) && !%obj.client.isHarb) { PerformWeaponMountChecks(%this, %obj, %slot);
BottomPrint(%obj.client, "You cannot use this weapon, Medal Required.", 3, 3);
%obj.throwweapon(1);
%obj.throwweapon(0);
}
PerformWeaponRankCheck(%this, %obj, %slot);
PerformUpgradeCheck(%this.getName(), %obj); PerformUpgradeCheck(%this.getName(), %obj);
//messageClient(%obj.client, 'MsgWeaponMount', "", %this, %obj, %slot); //messageClient(%obj.client, 'MsgWeaponMount', "", %this, %obj, %slot);

View file

@ -72,7 +72,7 @@ datablock ShapeBaseImageData(BOVImage) {
fireEnergy = 20; fireEnergy = 20;
minEnergy = 30; minEnergy = 30;
MedalRequire = 1; MedalRequire = 11;
stateName[0] = "Activate"; stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady"; stateTransitionOnTimeout[0] = "ActivateReady";

View file

@ -84,7 +84,7 @@ datablock ShapeBaseImageData(PlasmasaberImage) {
projectile = EnergyBolt; projectile = EnergyBolt;
projectileType = EnergyProjectile; projectileType = EnergyProjectile;
MedalRequire = 1; MedalRequire = 15;
// State Data // State Data
stateName[0] = "Activate"; stateName[0] = "Activate";

View file

@ -186,7 +186,7 @@ datablock ShapeBaseImageData(flamerImage) {
GunName = "A|V|X Flamethrower"; GunName = "A|V|X Flamethrower";
// //
MedalRequire = 1; MedalRequire = 10;
projectile = FlamethrowerBolt; projectile = FlamethrowerBolt;
projectileType = LinearFlareProjectile; projectileType = LinearFlareProjectile;

View file

@ -53,7 +53,7 @@ datablock ShapeBaseImageData(IonLauncherImage) {
GunName = "LUX-4 Ion Launcher"; GunName = "LUX-4 Ion Launcher";
// //
MedalRequire = 1; MedalRequire = 9;
isSeeker = true; isSeeker = true;
seekRadius = 1000; seekRadius = 1000;

View file

@ -20,7 +20,7 @@ datablock ShapeBaseImageData(IonRifleImage) {
projectileType = SniperProjectile; projectileType = SniperProjectile;
armThread = looksn; armThread = looksn;
MedalRequire = 1; MedalRequire = 9;
usesEnergy = true; usesEnergy = true;
minEnergy = 6; minEnergy = 6;

View file

@ -9,7 +9,7 @@ datablock ShapeBaseImageData(MiniColliderCannonImage) {
emap = true; emap = true;
MedalRequire = 1; MedalRequire = 15;
HasChallenges = 1; HasChallenges = 1;
ChallengeCt = 8; ChallengeCt = 8;

View file

@ -1,8 +1,8 @@
datablock TracerProjectileData(M1Bullet) { datablock TracerProjectileData(NLS22AcidPulse) {
doDynamicClientHits = true; doDynamicClientHits = true;
directDamage = 0.65; directDamage = 0.65;
directDamageType = $DamageType::M1; directDamageType = $DamageType::AcidSniper;
explosion = "ChaingunExplosion"; explosion = "ChaingunExplosion";
splash = ChaingunSplash; splash = ChaingunSplash;
HeadMultiplier = 1.5; HeadMultiplier = 1.5;
@ -67,7 +67,7 @@ datablock ShapeBaseImageData(NLS22AcidSniperImage) {
mass = 10; mass = 10;
item = NLS22AcidSniper; item = NLS22AcidSniper;
ammo = NLS22AcidSniperAmmo; ammo = NLS22AcidSniperAmmo;
projectile = M1Bullet; projectile = NLS22AcidPulse;
projectileType = TracerProjectile; projectileType = TracerProjectile;
emap = true; emap = true;
@ -95,7 +95,8 @@ datablock ShapeBaseImageData(NLS22AcidSniperImage) {
GunName = "NLS-22 Acid Sniper Rifle"; GunName = "NLS-22 Acid Sniper Rifle";
// //
RankRequire = $TWM2::RankRequire["M1"]; ChallengeRequire = "ThroughTheFlare";
hideExistence = true;
casing = ShellDebris; casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0"; shellExitDir = "1.0 0.3 1.0";
@ -207,7 +208,7 @@ function NLS22AcidSniperImage::onUnmount(%this,%obj,%slot) {
%obj.unmountImage(7); %obj.unmountImage(7);
} }
function M1SniperRifleImage::onFire(%data, %obj, %slot) { function NLS22AcidSniperImage::onFire(%data, %obj, %slot) {
if(!$TWM2::AllowSnipers) { if(!$TWM2::AllowSnipers) {
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2); bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
%obj.throwweapon(1); %obj.throwweapon(1);

View file

@ -28,7 +28,7 @@ datablock ShapeBaseImageData(NapalmImage) {
projectileType = LinearProjectile; projectileType = LinearProjectile;
RankRequire = $TWM2::RankRequire["NapalmLauncher"]; RankRequire = $TWM2::RankRequire["NapalmLauncher"];
MedalRequire = 1; MedalRequire = 27;
//ClipStuff //ClipStuff
ClipName = "NapalmClip"; ClipName = "NapalmClip";

View file

@ -70,7 +70,7 @@ datablock ShapeBaseImageData(ShadowRifleImage) {
projectile = ShadowRifleBolt; projectile = ShadowRifleBolt;
projectileType = LinearFlareProjectile; projectileType = LinearFlareProjectile;
MedalRequire = 1; MedalRequire = 13;
usesEnergy = true; usesEnergy = true;
minEnergy = 6; minEnergy = 6;