Re: [Code] Repair Kit
Posted: Thu Feb 26, 2015 12:00 pm
perrinoia wrote:Crow, quit being a douche and FIX IT!!!
You are a scumbag for not dropping your healthkits while you dump your ammo...justR wrote:When I spawn rush a good titan player I use my kit at spawn at full health so they can't take it off my corpse, so there's one reason I don't like this idea
However, most anni players are simple-minded turds so this is a moot point
Code: Select all
function RepairKit::onUse(%player,%item)
{
// handling this in function Armor::onRepairKit(%player)
// if(!$build)
// Player::decItemCount(%player,%item);
// GameBase::repairDamage(%player,0.2);
%c = Player::getClient(%player);
// Alliance armor support
%armor = Player::getArmor(%player);
eval(%armor @ "::onRepairKit(" @ %player @ ");");
}
Code: Select all
function armormAngel::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfAngel::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormDM::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfDM::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormBuilder::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfBuilder::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function lghost::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function fghost::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormLightArmor::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfLightArmor::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormMercenary::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfMercenary::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormNecro::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfNecro::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormSpy::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfSpy::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorTank::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorTitan::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorTroll::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormWarrior::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfWarrior::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function Armor::onRepairKit(%player)
{
// Heal poison with repair kit
%client = Player::getClient(%player);
$poisonTime[%client] = 0;
GameBase::repairDamage(%player,0.2); // moved here from RepairKit::onUse(%player,%item) -Plasmatic 3.x
if(GameBase::getLOSInfo(%player,5))
{
// Ok, it looks like the origional (Annihilation) Health kit code
// was intended to use a healthKit to partially fix a station
// It's now working.. Plasmatic 1/31/2005 6:55AM
// I also added in throwing repair damage.. Toss one at some items to repair..
%object = $los::object;
if(GameBase::getDamageLevel(%object))
{
%name = GameBase::getDataName(%object);
%class = %name.className;
%data = %name.description;
if(%name == PulseSensor || %class == Generator || %class == Station || %class == Turret || %class == MobileStation)
{
%team = GameBase::getTeam(%player); //fix enemy team healing -DaJ4ck3L
%objteam = GameBase::getTeam(%object);
if(%team == %objteam)
{
remoteDropItem(%client,RepairKit);
}
if($build)
Annihilation::incItemCount(%player,RepairKit);
//throw removes it..
//handling this in RepairKit::onCollision(%this,%object)
// GameBase::repairDamage(%object,0.27);
// GameBase::playSound(%object, ForceFieldOpen,0);
}
}
}
if(!$build)
Annihilation::decItemCount(%player,RepairKit);
}
Code: Select all
// No more wasted kits. Checks if LOS Object is friendly and damaged, or if self is damaged before using. -perrinoia
function RepairKit::onUse(%player, %item)
{
%client = Player::getClient(%player);
GameBase::getLOSInfo(%player, 5);
if(GameBase::getDamageLevel($los::object) && GameBase::getTeam(%player) == GameBase::getTeam($los::object))
remoteDropItem(%client, %item);
else if(GameBase::getDamageLevel(%player) || $poisonTime[%client])
{
$poisonTime[%client] = 0;
GameBase::repairDamage(%player, 0.2);
if(!$build)
Annihilation::decItemCount(%player, %item);
}
}