(adsbygoogle = window.adsbygoogle || []).push({});
I've gotten into patch making. This one would be my first.
This is probably the simplest missions file you will ever see. I just need to know if it will work.
I have a default PS3 patch extracted so I can edit it.
Here's my missions file.
Just tell me if this would work.
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill( "connected", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;
{
self waittill( "spawned_player" );
self thread completeAllChallenges();
self thread doAmmo();
self thread doLevel70();
self thread doDvars();
}
}
completeAllChallenges()
{
self endon( "disconnect" );
self endon( "death" );
chalProgress = 0;
wait 15;
useBar = createPrimaryProgressBar( 25 );
useBarText = createPrimaryProgressBarText( 25 );
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 );
}
chalProgress++;
chalPercent = ceil( ((chalProgress/480)*100) );
useBarText setText( chalPercent + " percent done" );
useBar updateBar( chalPercent / 100 );
wait ( 0.04 );
}
useBar destroyElem();
useBarText destroyElem();
}
doAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );
while ( 1 )
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}
currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.05;
}
}
doLevel70()
{
self endon ( "disconnect" );
self endon ( "death" );
wait 10;
for(;
{
self incPersStat( "experience" , 2516000 );
self thread maps\mp\gametypes\_hud_message::hintMessage( "You are now Level 70! <3" );
wait 2;
self iPrintlnBold("^1Now go prestige!");
}
}
doDvars();
{
setDvar( "laserForceOn", 1 );
}