GiMMLi's Scripting Tutorials

Adding a Shotgun  
Making a SHOTGUN!

//========To make a shotgun, first create a new.cs file.

// this is done by making a txt file, then saveas, whatever.cs,

// then under the server.cs look for the lines, exec();

//==And add at the bottom of the exec(); list, exec(Whatever);

//====Then you add the regular stuff to the item.cs



//=========================

$boom1DamageType = 15;

//==========================

BulletData boom1bullet

{

bulletShapeName = "bullet.dts";

explosionTag = bulletExp0;

expRandCycle = 3;

mass = 0.05;

bulletHoleIndex = 0;

damageClass = 0; // 0 impact, 1, radius

damageValue = 0.11;

damageType = $boom1DamageType;

aimDeflection = 0.01;

muzzleVelocity = 425.0;

totalTime = 1.5;

inheritedVelocityScale = 1.0;

isVisible = False;

tracerPercentage = 1.0;

tracerLength = 30;

};







//========================================== $ItemMax[larmor, boom1] = 1;

$ItemMax[marmor, boom1] = 1;

$ItemMax[harmor, boom1] = 1;

$ItemMax[lfemale, boom1] = 1;

$ItemMax[mfemale, boom1] = 1;

$ItemMax[larmor, boom1Ammo] = 10;

$ItemMax[marmor, boom1Ammo] = 10;

$ItemMax[harmor, boom1Ammo] = 10;

$ItemMax[lfemale, boom1Ammo] = 10;

$ItemMax[mfemale, boom1Ammo] = 10;

//===========================================

ItemData boom1Ammo

{

description = "12-guage shells";

className = "Ammo";

shapeFile = "ammo1";

heading = "0NewWeapon";

shadowDetailMask = 4;

price = 1;

};

ItemImageData boom1Image

{

shapeFile = "shotgun";

mountPoint = 0;

weaponType = 0; // Spinning

reloadTime = 0;

spinUpTime = 0.5;

spinDownTime = 3;

fireTime = 0.9;

ammoType = boom1Ammo;

projectileType = "Undefined"; //The New bullet type, look at ProjData.cs

accuFire = false;

lightType = 3; // Weapon Fire

lightRadius = 3;

lightTime = 1;

lightColor = { 0.6, 1, 1 };

sfxFire = SoundFireChaingun;

sfxActivate = SoundPickUpWeapon;

sfxSpinUp = SoundSpinUp;

sfxSpinDown = SoundSpinDown;

};

ItemData boom1

{

description = "12-GuageAuto";

className = "Weapon";

shapeFile = "shotgun";

hudIcon = "chain"; // put something like abcabc, for the machine gun ull see

heading = "0NewWeapon"; //IN the invy station, it is lettered in order,ex. #Whatever

shadowDetailMask = 4;

imageType = boom1Image;

price = 500;

showWeaponBar = true;

};

function boom1Image::onFire(%player, %slot)

{

%AmmoCount = Player::getItemCount(%player,

$WeaponAmmo[boom1]);

if(%AmmoCount > 0)

{

%client = player::getclient(%player);

%clientName = client::GetName(%client);

%trans = GameBase::getMuzzleTransform(%player);

%vel = Item::getVelocity(%player);

Player::decItemCount(%player,"boom1Ammo",1);



Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

Projectile::spawnProjectile("boom1bullet",%trans,%player,%vel);

}

}



$DamageScale[larmor, $boom1DamageType] = 0.4;

$DamageScale[marmor, $boom1DamageType] = 0.3;

$DamageScale[harmor, $boom1DamageType] = 0.2;

$DamageScale[lfemale, $boom1DamageType] = 0.4;

$DamageScale[mfemale, $boom1DamageType] = 0.3;





$DamageScale[Scout, $boom1DamageType] = 0.4;

$DamageScale[LAPC, $boom1DamageType] = 0.2;

$DamageScale[HAPC, $boom1DamageType] = 0.1;



$InvList[boom1] = 1;

$InvList[boom1Ammo] = 1;

$RemoteInvList[boom1] = 1;

$RemoteInvList[boom1Ammo] = 1;



$deathMsg[$boom1DamageType, 0] = "%1 made it look easy killing, while %2 made it look easy dying!";

$deathMsg[$boom1DamageType, 1] = "%2 just found out why %1 calls it %3 boomstick!";

$deathMsg[$boom1DamageType, 2] = "%2 bites the dust!";

$deathMsg[$boom1DamageType, 3] = "%1 drops to the ground after shooting %2 forcefully up the rectum.";

The Realm is owned and maintained by {FA}GiMMLi J (c)1999

The Realm's {FA}Demon logo is sole property of GiMMLi's Realm any duplication or modifications of this trade mark are Strictly prohibited. Violators will be prosecuted!

Tribes is a trademark of the Dynamix and Sierra Co.

Hosted by www.Geocities.ws

1