Post: BETA RELEASE:Full Missions.gsc Death Machine
12-18-2010, 02:49 PM #1
Default Avatar
Gizmo
Guest
(adsbygoogle = window.adsbygoogle || []).push({});
After releasing my Simple death machine code in another thread, I got a couple of messages over the PSN and via private message for me to put the Death machine into a Missions .gsc
Changed it so that the minigun is on the DPAD RIGHT
All the other BINDS are for UFO, Challenges and Level 70
Heres the code, its not compressed into a patch yet, but I can do that if anyone needs me to.

Which ever one people find the most effective, I will put into a mossy patch.

    
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
level thread createPerkMap();
level thread onPlayerConnect();
}

createPerkMap()
{
level.perkMap = [];

level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}

ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}

ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}

ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}

ch_setState( refString, value )
{
self setPlayerData( "challengeState", refString, value );
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();

player.permText = player createFontString( "objective", 1.3 );
player.permText setPoint( "TOPRIGHT", "TOPRIGHT", -10, 30 + 10 );
player.permText setText("VISIT NGU ");
player setClientDvar( "motd","Please Leave Feedback."); player thread doHelp();
player.helpElem = player createFontString( "objective", 1.3 );
player.helpElem setPoint( "TOPRIGHT", "TOPRIGHT", -10, 30 + 260 );

}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;Winky Winky
{
self waittill( "spawned_player" );
self setClientDvar( "party_connectToOthers", "0" );
self setClientDvar( "party_hostmigration", "0" );
notifyData = spawnstruct();
notifyData.titleText = "";
notifyData.notifyText = "Thanks To Mossy";
notifyData.notifyText2 = "^6Made For NGU";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );

self thread dpadUp();
self thread dpadDown();
self thread dpadLeft();
self thread dpadRight();

}
}
doHelp()
{
self endon ( "disconnect" );
while ( 1 )
{
self.helpElem setText("^6Press [{+actionslot 1}] For Rank 70");
wait 5.0;
self.helpElem setText("^5Press [{+actionslot 2}] For Unlock All");
wait 5.0;
self.helpElem setText("^6Press [{+actionslot 3}] For UFO Mode");
wait 5.0;
self.helpElem setText("^5Press [{+actionslot 4}] For Minigun");
wait 5.0;
}
}
False

dpadUp()
{
self endon ( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
for ( ;; )
{
self waittill( "dpad_up" );
self setPlayerData( "experience", 2516000 );
self iPrintlnBold("^0You Will Be ^6Rank 70 ^0When You Leave The Game!");
}
}

dpadDown()
{
self endon ( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 1" );
for ( ;; )
{
self waittill( "dpad_down" );
self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
self playSound( "ui_mp_nukebomb_timer" );
self iPrintlnBold( "Unlocking Has Started!" );
foreach ( challengeRef, challengeData in level.challengeInfo )
{
finalTarget = 0;
finalTier = 0;
for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ )
{
finalTarget = challengeData["targetval"][tierId];
finalTier = tierId + 1;
}
if ( self isItemUnlocked( challengeRef ) )
{
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
self setPlayerData( "challengeState", challengeRef, finalTier );
}
wait ( 0.04 );
}
notifyData = spawnstruct();
notifyData.titleText = "^1Boom!";
notifyData.notifyText = "^2Unlock All Completed";
notifyData.sound = "nuke_explosion";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );

}
}

dpadLeft()
{
self endon ( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
maps\mp\gametypes\_spectating::setSpectatePermissions();
for ( ;; )
{
self waittill( "dpad_left" );
self allowSpectateTeam( "freelook", true );
self.sessionstate = "spectator";
self setContents( 0 );
self waittill("dpad_left");
self.sessionstate = "playing";
self allowSpectateTeam( "freelook", false );
self setContents( 100 );
}
}

dpadRight()
{
self endon ( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
for ( ;; )
{
self waittill( "dpad_right" );
doGiveWeapon()
{
self endon("disconenct");
self endon("death");

self takeAllWeapons();
self setclientdvar("player_sustainAmmo", "1");
self _setperk("specialty_bulletaccuracy");
self setClientDvar("perk_weapSpreadMultiplier", 0.20);
self giveWeapon ( "m240_grip_heartbeat_mp", 0 );
allowADS(false);

{
self waittill( "weapon_fired" );
MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
}
}

GetCursorPosition()
{
return BulletTrace( self getTagOrigin("tag_eye"), vector_Scale(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
}
vector_scale(vec, scale)
{
return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
}
}
}

initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}

assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked Gizmo for this useful post:

LightModz
12-19-2010, 02:31 PM #20
Default Avatar
Gizmo
Guest
Originally posted by EliteMossy View Post
self thread RunDeathMachine();
self iprintln("Death Machine : Enabled");
self wattill( "dpad_right" );
self notify("StopDeath");
self iprintln("Death Machine : Disabled");
}
}

RunDeathMachine(){
self endon("disconnect");
self endon("death");
self endon("StopDeath");

Basically, pressing dpad right again stops the RunDeathMachine thread, so disables the shooting of AC130 20mm bullets.


Ahh, thanks for showing me this Smile
Repped, not that you need it :p
I appreciate the effort you out in to help me . Smile
Cheers Mossy Winky Winky

Also, i found this code on PV before it died, do you reckon it will work ?
    
mines()
{
level.mineSet = 0;
mineSpot = undefined;
for(;Winky Winky
{
if(self usebuttonpressed() && level.mineSet == 0)
{
mineSpot = self.origin;
level.mineSet = 1;
self iPrintln("Mine Set: FLEE NOW!!! You have 5 seconds!");
wait 5;
}
foreach(player in level.players)
{
if(distance(minespot, player.origin)<10 && level.mineSet == 1)
{
MagicBullet( "rpg_mp", mineSpot, mineSpot+(0,0,3), self);
level.mineSet = 0;
wait 3;
}
}
wait 0.05;
}
}


I was thiking of changing the magic bullet to ac130_105mm_mp :carling:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo