--------------------------------------------------------------------------------------------------------------- // HellRaiserPack: Credit gos to the hammer team.... // ---------------------------------------------------------------------------------------------------------------- This creates a HellRaiser Pack.. credit go's to team hammer, Not Dynablade Sorry.. Most every thing else he get's credit for.. Step #1 // ------------------------------------------ // inventoryHud.cs // ------------------------------------------ Add this near the top of the file: $InvPack[13] = "Hell Raiser Pack"; // set the right number $NTInvPack[13] = "Hell Raiser Pack"; // set the right number $NameToInv["Hell Raiser Pack"] = "HellRaiserPack1"; Step #2 // ------------------------------------------ // pack.cs // ------------------------------------------ exec("scripts/packs/HellRaiser.cs"); Step #3 // ------------------------------------------ // player.cs // ------------------------------------------ // In each player datablock add this, Only heavies need it. max[HellRaiserPack1] = 1; Step #4 Create a file in the packs folder, Copy and past the code below.. HellRaiser.cs //--------------------------------------------------------------------------- // HellRaiserPack: Credit gos to the hammer team.. // //--------------------------------------------------------------------------- datablock AudioProfile(HellraiserNoFireSound) { filename = "fx/weapons/missile_launcher_searching.wav"; description = AudioClosest3d; preload = true; }; datablock SeekerProjectileData(HellRaiserProjectile) { casingShapeName = "weapon_missile_casement.dts"; projectileShapeName = "weapon_missile_projectile.dts"; hasDamageRadius = true; indirectDamage = 0.68;//was 24 damageRadius = 9.9; //was 4.9; radiusDamageType = $DamageType::Missile; kickBackStrength = 3000; explosion = "MissileExplosion"; splash = MissileSplash; velInheritFactor = 1.0; // to compensate for slow starting velocity, this value // is cranked up to full so the missile doesn't start // out behind the player when the player is moving // very quickly - bramage baseEmitter = MissileSmokeEmitter; delayEmitter = MissileFireEmitter; puffEmitter = MissilePuffEmitter; bubbleEmitter = GrenadeBubbleEmitter; bubbleEmitTime = 1.0; exhaustEmitter = HellRaiserExhaustEmitter; exhaustTimeMs = 900; exhaustNodeName = "muzzlePoint1"; lifetimeMS = 4000; muzzleVelocity = 10.0; maxVelocity = 120.0; turningSpeed = 90.0; acceleration = 200.0; proximityRadius = 3; terrainAvoidanceSpeed = 180; terrainScanAhead = 25; terrainHeightFail = 12; terrainAvoidanceRadius = 100; flareDistance = 200; flareAngle = 30; sound = MissileProjectileSound; hasLight = true; lightRadius = 5.0; lightColor = "0.2 0.05 0"; useFlechette = true; flechetteDelayMs = 550; casingDeb = FlechetteDebris; explodeOnWaterImpact = false; }; datablock ParticleData(HellRaiserExhaustParticle) { dragCoeffiecient = 0.0; gravityCoefficient = 0.01; inheritedVelFactor = 1.0; lifetimeMS = 500; lifetimeVarianceMS = 300; textureName = "particleTest"; useInvAlpha = true; spinRandomMin = -135; spinRandomMax = 135; colors[0] = "1.0 1.0 1.0 0.5"; colors[1] = "0.7 0.7 0.7 0.0"; sizes[0] = 0.45; sizes[1] = 1.2; times[0] = 0.0; times[1] = 1.2; }; datablock ShapeBaseImageData(HellRaiserPackImage1) { shapeFile = "turret_missile_large.dts"; item = HellRaiserPack1; mountPoint = 1; offset = "-0.5 0 0.5"; rechargeRateBoost = 0.30; //0.15 explodeOnDeath = true; // State transitions stateName[0] = "Activate"; stateTransitionOnNotLoaded[0] = "Dead"; stateTransitionOnLoaded[0] = "ActivateReady"; stateName[1] = "ActivateReady"; stateSequence[1] = "Activate"; stateSound[1] = AASwitchSound; stateTimeoutValue[1] = 1.0; stateTransitionOnTimeout[1] = "Ready"; stateTransitionOnNotLoaded[1] = "Deactivate"; stateTransitionOnNoAmmo[1] = "NoAmmo"; stateScript[1] = "AAActivateReady"; stateName[2] = "Ready"; stateTransitionOnNotLoaded[2] = "Deactivate"; stateTransitionOnTriggerDown[2] = "Fire1"; stateTransitionOnNoAmmo[2] = "NoAmmo"; stateScript[2] = "AAReady"; stateName[3] = "Fire1"; stateTransitionOnTimeout[3] = "Reload1"; stateTimeoutValue[3] = 0.15; stateFire[3] = true; stateRecoil[3] = LightRecoil; stateAllowImageChange[3] = false; stateSequence[3] = "Fire1"; stateSound[3] = AAFireSound; stateScript[3] = "onFire"; stateName[4] = "Reload1"; stateTimeoutValue[4] = 0.2; stateAllowImageChange[4] = false; stateSequence[4] = "Reload"; stateTransitionOnTimeout[4] = "Fire2"; stateTransitionOnNotLoaded[4] = "Deactivate"; stateTransitionOnNoAmmo[4] = "NoAmmo"; stateName[5] = "Fire2"; stateTransitionOnTimeout[5] = "Reload2"; stateTimeoutValue[5] = 0.15; stateFire[5] = true; stateRecoil[5] = LightRecoil; stateAllowImageChange[5] = false; stateSequence[5] = "Fire2"; stateSound[5] = AAFireSound; stateScript[5] = "onFire"; stateName[6] = "Reload2"; stateTimeoutValue[6] = 0.2; stateAllowImageChange[6] = false; stateSequence[6] = "Reload"; stateTransitionOnTimeout[6] = "Ready"; stateTransitionOnNotLoaded[6] = "Deactivate"; stateTransitionOnNoAmmo[6] = "NoAmmo"; stateName[7] = "Deactivate"; stateSequence[7] = "Activate"; stateDirection[7] = false; stateTimeoutValue[7] = 1.0; stateTransitionOnLoaded[7] = "ActivateReady"; stateTransitionOnTimeout[7] = "Dead"; stateName[8] = "Dead"; stateTransitionOnLoaded[8] = "ActivateReady"; stateName[9] = "NoAmmo"; stateTransitionOnAmmo[9] = "Reload2"; stateSequence[9] = "NoAmmo"; }; datablock ItemData(HellRaiserPack1) { className = Pack; catagory = "Packs"; shapeFile = "pack_barrel_missile.dts"; explodeOnDeath = true; mass = 4; elasticity = 0.2; friction = 0.6; pickupRadius = 2; rotate = true; image = "HellRaiserPackImage1"; pickUpName = "a hell raiser pack"; heatSignature = 0.5; computeCRC = true; }; datablock ShapeBaseImageData(HellRaiserPackImage2) : HellRaiserPackImage1 { item = HellRaiserPack2; offset = "0.5 0 0.5"; shapeFile = "turret_missile_large.dts"; }; datablock ItemData(HellRaiserPack2) { className = Pack; catagory = "Packs"; shapeFile = "pack_barrel_missile.dts"; mass = 1; elasticity = 0.2; friction = 0.6; pickupRadius = 2; rotate = true; image = "HellRaiserPackImage2"; pickUpName = "a hell raiser pack"; computeCRC = true; }; datablock ParticleEmitterData(HellRaiserExhaustEmitter) { ejectionPeriodMS = 40; periodVarianceMS = 5; ejectionVelocity = 4.0; velocityVariance = 1.0; thetaMin = 0.0; thetaMax = 20.0; particles = "HellRaiserExhaustParticle"; }; // --- functions function HellRaiserPack1::onAdd(%this) { echo("added!"); } function HellRaiserPackImage1::onMount(%this, %obj, %slot) { if(%obj.getMountedImage($AuxiliarySlot) != 0) %obj.unmountImage($AuxiliarySlot); %obj.mountImage(HellRaiserPackImage2, $AuxiliarySlot); if(!%obj.cooling) schedule(5000, %obj, "CoolOff", %obj); %obj.cooling = true; } function HellRaiserPackImage1::onUnmount(%this, %obj, %slot) { Parent::onUnmount(%this, %obj, %slot); if(%obj.getMountedImage($AuxiliarySlot) != 0) %obj.unmountImage($AuxiliarySlot); } function HellRaiserPackImage1::onDrop(%this, %obj, %slot) { echo("drop!!"); } function HellRaiserPack1::onInventory(%this,%player,%value) { Parent::onInventory(%this,%player,%value); } function HellRaiserPack1::onPickup(%this, %obj, %shape, %amount) { echo("pickup!"); // created to prevent console errors } function HellRaiserPack1::onUse(%data, %obj) { %energy = %obj.getEnergyLevel(); %obj.setImageTrigger($BackpackSlot, false); if(%obj.heatLevel < 145) // was < 88) { %obj.heatLevel += (10 + mFloor(5 * getRandom())); } else { echo("ultimate pain"); messageClient(%obj.client, '', "\c5Your Hell Raiser reached critical temperature, this is going to hurt!"); bottomPrint(%obj.client, "\nHell Raiser Reached Critical Temperature!", 1, 3); echo("op" SPC %obj.getPosition()); RadiusExplosion(%obj, %obj.getWorldBoxCenter(), 10, 3, 2000, %obj, $DamageType::Explosion); if(%obj.getMountedImage($BackpackSlot) != 0) %obj.unmountImage($BackpackSlot); if(%obj.getMountedImage($AuxiliarySlot) != 0) %obj.unmountImage($AuxiliarySlot); %obj.decInventory(%data, 1); //blow up the packs! return; } if(%obj.heatLevel >= 50) bottomPrint(%obj.client, "\nHell Raiser Temperature :" SPC %obj.heatLevel @ "\%", 1, 3); else if(%energy < 10) RadiusExplosion(%obj, %obj.getWorldBoxCenter(), 5, 0.2, 1000, %obj, $DamageType::Explosion); if(%obj.heatLevel >= 68 && %obj.heatLevel < 145) // was < 88) { if(%obj.getEnergyPercent() < 0.5) { echo("minor pain"); messageClient(%obj.client, '', "\c3Your Hell Raiser is running hot! (" @ %obj.heatLevel @"\%)"); %obj.playAudio(0, HellraiserNoFireSound); RadiusExplosion(%obj, %obj.getWorldBoxCenter(), 5, 0.2, 1000, %obj, $DamageType::Explosion); } } if(%obj.heatLevel >= 145) // was < 88 { echo("medium pain"); %obj.playAudio(0, HellraiserNoFireSound); messageClient(%obj.client, '', "\c5Your Hell Raiser has reached a dangerous temperature! (" @ %obj.heatLevel @"\%)"); RadiusExplosion(%obj, %obj.getWorldBoxCenter(), 5, 0.6, 1000, %obj, $DamageType::Explosion); if(%obj.heatLevel > 145) // was > 90) //dont fire if we're too hot return; } %obj.setEnergyLevel(%energy - 25); %vec = %obj.getMuzzleVector($BackPackSlot); %obj.hell1 = new (SeekerProjectile)() { dataBlock = HellRaiserProjectile; initialDirection = %vec; initialPosition = %obj.getMuzzlePoint($BackPackSlot); sourceObject = %obj; damageFactor = 0.05; sourceSlot = %BackPackSlot; }; %vec = %obj.getMuzzleVector($AuxiliarySlot); %obj.hell2 = new (SeekerProjectile)() { dataBlock = HellRaiserProjectile; initialDirection = %vec; initialPosition = %obj.getMuzzlePoint($AuxiliarySlot); sourceObject = %obj; damageFactor = 0.05; sourceSlot = $AuxiliarySlot; }; } function CoolOff(%obj) { %oldheat = %obj.heatLevel; %obj.heatLevel = (%obj.heatLevel > 4) ? %obj.heatLevel - 5 : 0; if(%obj.getMountedImage($BackpackSlot) != 0) %img = %obj.getMountedImage($BackpackSlot).getName(); else %img = ""; if(%obj.heatLevel >= 40 && %img $= "HellRaiserPackImage1") { if(%oldheat >= 50 && %oldheat <= 55) messageClient(%obj.client, '', "\c3Your Hell Raiser has cooled to a stable temperature."); bottomPrint(%obj.client, "\nHell Raiser Temperature :" SPC %obj.heatLevel @ "\%", 2.5, 3); } schedule(4000, %obj, "CoolOff", %obj); }