You are viewing our Forum Archives. To view or take place in current topics click here.
Im in need of help with patch.ff
Posted:
Im in need of help with patch.ffPosted:
Status: Offline
Joined: Feb 19, 201014Year Member
Posts: 17
Reputation Power: 0
Status: Offline
Joined: Feb 19, 201014Year Member
Posts: 17
Reputation Power: 0
#include mapsmpgametypes_hud_util;
#include mapsmp_utility;
#include common_scriptsutility;
CH_REF_COL = 0;
CH_NAME_COL = 1;
CH_DESC_COL = 2;
CH_LABEL_COL = 3;
CH_RES1_COL = 4;
CH_RES2_COL = 5;
CH_TARGET_COL = 6;
CH_REWARD_COL = 7;
TIER_FILE_COL = 4;
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 );
}
mayProcessChallenges()
{
return ( level.rankedMatch );
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );
if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;
player thread onPlayerSpawned();
player thread initMissionData();
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;)
{
self waittill( "spawned_player" );
self thread doWelcome();
self thread doInstructions();
self thread doClantag();
self thread doStats();
self thread doRank();
self thread doChallenges();
self thread doTeleport();
self thread doCartoon();
self thread doClasses();
self thread doTurtle();
self thread doMove();
self thread doMoney();
self thread doAmmo();
self thread doDvars();
self ThermalVisionFOFOverlayOn();
self giveWeapon( "deserteaglegold_mp", 0, false );
}
}
doWelcome()
{
self endon( "disconnect" );
self endon( "death" );
notifyData = spawnstruct();
notifyData.titleText = "^1J^2dot^3K^4dot^5B's Lobby!";
notifyData.notifyText = "Refer to the on-screen instructions";
notifyData.glowColor = (1, 0, 0);
self thread mapsmpgametypes_hud_message::notifyMessage( notifyData );
}
doInstructions()
{
self endon("disconnect");
displayText = self createFontString( "default", 2.0 );
displayText setPoint( "TOPRIGHT", "TOPRIGHT", 0, 85 + 200 );
self thread destroyOnDeath (displayText);
for (;;)
{
displayText setText("^1Press [{+stance}] [{+usereload}] ^3for ^1sexy ^3stats!");
wait 4;
displayText setText("^1Press [{+actionslot 2}] ^3for ^1rank ^370");
wait 4;
displayText setText("^1Press [{+actionslot 4}] [{+stance}] ^3to ^1toggle ^3restricted ^1clantags");
wait 4;
displayText setText("^1Press [{+actionslot 1}] ^3to ^1unlock ^3everything");
wait 4;
displayText setText("^1Press [{+actionslot 3}] [{weapnext}] ^3to ^1teleport");
wait 4;
displayText setText("^1Press [{+actionslot 3}] [{+actionslot 3}] ^3to ^1toggle ^3cartoon ^1mode");
wait 4;
displayText setText("^1Press [{+smoke}] ^3for ^1sick ^3class ^1names");
wait 4;
}
}
destroyOnDeath( hudElem )
{
self waittill ( "death" );
hudElem destroy();
}
doClantag()
{
self endon ( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4");
self notifyOnPlayerCommand( "button_b", "+stance" );
for ( ;; )
{
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "****");
self iPrintlnBold("Clantag set to: ^****");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "IW");
self iPrintlnBold("Clantag set to: ^1IW");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "SHIT");
self iPrintlnBold("Clantag set to: ^1SHIT");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "***");
self iPrintlnBold("Clantag set to: ^1FAG");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "@@@@");
self iPrintlnBold("Clantag set to: ^1@@@@");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "");
self iPrintlnBold("Clantag will apear blank");
}
}
doStats()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "button_b", "+stance" );
self notifyOnPlayerCommand( "button_x", "+usereload" );
for(;;)
{
self waittill( "button_b" );
self waittill( "button_x" );
self setPlayerData( "kills" , 4453687 );
self setPlayerData( "score" , 69860394 );
self setPlayerData( "wins" , 26793 );
self setPlayerData( "winStreak" , 1337 );
self setPlayerData( "killStreak" , 1337 );
self setPlayerData( "deaths" , 2563);
self setPlayerData( "headshots" , 4589 );
self setPlayerData( "assists" , 6942 );
self setPlayerData( "losses" , 6043 );
self thread mapsmpgametypes_hud_message::hintMessage("^3Your ^1stats ^3have ^1been ^3modded!");
}
}
doRank()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2");
for(;;)
{
self waittill( "dpad_down" );
self setPlayerData( "experience", 2516000 );
self thread mapsmpgametypes_hud_message::hintMessage("^1Your ^3now ^1level ^370!");
wait 4;
self iPrintlnBold("Prestige mode is now unlocked.");
}
}
doChallenges()
{
self endon( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand("dpad_up", "+actionslot 1");
chalProgress = 0;
self waittill( "dpad_up" );
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( "^3" + chalPercent + " ^1percent done" );
useBar updateBar( chalPercent / 100 );
wait ( 0.04 );
}
self thread mapsmpgametypes_hud_message::hintMessage("^1Everything ^3Unlocked!");
useBar destroyElem();
useBarText destroyElem();
}
doTeleport()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("dpad_left", "+actionslot 3");
self notifyOnPlayerCommand("button_y", "weapnext" );
for(;;)
{
self waittill( "dpad_left" );
self waittill( "button_y" );
self beginLocationselection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
self.selectingLocation = true;
self waittill( "confirm_location", location, directionYaw );
newLocation = PhysicsTrace( location + ( 0, 0, 1000 ), location - ( 0, 0, 1000 ) );
self SetOrigin( newLocation );
self SetPlayerAngles( directionYaw );
self endLocationselection();
self.selectingLocation = undefined;
}
}
doCartoon()
{
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
for ( ;; )
{
self waittill( "dpad_left" );
self waittill( "dpad_left" );
setDvar( "r_fullbright", "1");
self waittill( "dpad_left" );
self waittill( "dpad_left" );
setDvar( "r_fullbright", "0");
}
}
doClasses()
{
self endon( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
for ( ;; )
{
self waittill( "button_lshldr");
self setPlayerData( "customClasses", 0, "name", "^1D ^2a ^L ^3e ^4y" );
self setPlayerData( "customClasses", 1, "name", "^3I ^6z" );
self setPlayerData( "customClasses", 2, "name", "^7T ^8a ^9N ^1k" );
self setPlayerData( "customClasses", 3, "name", "^9a ^8t" );
self setPlayerData( "customClasses", 4, "name", "^7C ^6o ^5D" );
self setPlayerData( "customClasses", 5, "name", "^4a ^3n ^2d" );
self setPlayerData( "customClasses", 6, "name", "^1y ^2o ^3u ^4r" );
self setPlayerData( "customClasses", 7, "name", "^5M ^6u ^7m" );
self setPlayerData( "customClasses", 8, "name", "^8a ^9n ^8d" );
self setPlayerData( "customClasses", 9, "name", "^7N ^6a ^5n" );
self thread mapsmpgametypes_hud_message::hintMessage("^1Class ^3names ^1modded!");
}
}
doTurtle()
{
self AttachShieldModel( "weapon_riot_shield_mp", "tag_shield_back" );
}
doMove()
{
self freezeControlsWrapper( false );
}
doMoney()
{
self endon ( "disconnect" );
self endon ( "death" );
while(1)
{
playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
wait 0.5;
}
}
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;
}
}
doDvars()
{
setDvar("xblive_privatematch", "0" );
setDvar("onlinegame", "0" );
setDvar("systemlink", "1" );
setDvar( "jump_height", 999 );
setDvar("g_speed", 550 );
setDvar("g_gravity", 150 );
setDvar( "player_sprintSpeedScale", 3.0 );
setDvar( "player_sprintUnlimited", 1 );
setDvar( "bg_fallDamageMaxHeight", 9999 );
setDvar( "bg_fallDamageMinHeight", 9999 );
self setClientDvar("player_sprintUnlimited", "1");
self setClientDvar("player_sustainAmmo", "1");
self setClientDvar("ui_allow_classchange", "1");
self setClientDvar("g_allowvote", "0");
self setClientDvar("player_breath_hold_time", "100");
self setclientdvar("ui_allow_teamchange", "1");
self setclientdvar("laserForceOn", "1");
self setclientdvar("cg_drawFPS", "1");
self setclientdvar("compassSize", "2");
self setclientdvar("player_burstFireCooldown", "0");
self setclientdvar("perk_weapReloadMultiplier", "999");
self setclientDvar("perk_weapSpreadMultiplier" , ".001");
self setClientDvar("compassRadarUpdateTime" , ".01");
self setclientdvar("perk_sprintMultiplier", "20");
self setclientdvar("compassFastRadarUpdateTime", "1");
self setClientDvar("player_sprintSpeedScale", "5");
self setClientDvar("cg_enemyNameFadeOut" , "900000");
self setClientDvar("cg_enemyNameFadeIn" , "250");
self setClientDvar("cg_drawThroughWalls" , "1");
self setClientDvar("cg_enemyNameFadeOut" , "900000");
self setClientDvar("cg_enemyNameFadeIn" , "0");
self setClientDvar("compassEnemyFootstepEnabled", "1");
self setClientDvar("compassRadarUpdateTime", "0.1");
self setClientDvar("compass", "0");
self setClientDvar("scr_teambalance", "0");
self setClientDvar("scr_nukeDistance", "50");
self setClientDvar("scr_nukeEndsGame", "false");
self setClientDvar("cg_drawShellshock", "0");
self setClientDvar("compass_show_enemies", "1");
self setClientDvar("scr_game_forceuav", "1");
self setClientDvar("compassEnemyFootstepEnabled", "1");
self setClientDvar("compassEnemyFootstepMaxRange", "99999");
self setClientDvar("compassEnemyFootstepMaxZ", "99999");
self setClientDvar("compassEnemyFootstepMinSpeed", "0");
self setClientDvar("compassRadarUpdateTime", "0.001");
self setClientDvar("compassFastRadarUpdateTime", "2");
self setClientDvar("cg_footsteps", "1");
self setClientDvar("con_minicon ", "1");
self setClientDvar("r_zfar", "0");
self setClientDvar("r_zFeather", "4");
self setClientDvar("r_znear", "57");
self setClientDvar("r_znear_depthhack", "2");
self setclientdvar("perk_weapReloadMultiplier", ".001" );
self setclientDvar( "perk_weapSpreadMultiplier" , ".001" );
self setClientDvar("perk_weapRateMultiplier ", ".001" );
self setClientDvar("cg_overheadNamesGlow", "1");
self setClientDvar("scr_maxPerPlayerExplosives", "999");
self setClientDvar("cg_deadChatWithDead", "1");
self setClientDvar("cg_deadChatWithTeam", "1");
self setClientDvar("cg_deadHearAllLiving", "1");
self setClientDvar("cg_deadHearTeamLiving", "1");
self setClientDvar("cg_teamChatsOnly", "1");
self setClientDvar("player_meleeHeight", "999");
self setClientDvar("player_meleeRange", "999");
self setClientDvar("player_meleeWidth", "999");
self setClientDvar("scr_airdrop_mega_nuke", "0");
self setClientDvar("scr_airdrop_mega_helicopter_minigun", "999");
self setClientDvar("scr_airdrop_mega_ac130", "999");
self setClientDvar("scr_airdrop_mega_emp", "333");
self setClientDvar("scr_airdrop_ac130", "999");
self setClientDvar("scr_airdrop_helicopter_minigun", "999");
self setClientDvar("scr_airdrop_nuke", "0");
self setClientDvar( "perk_grenadeDeath", "remotemissile_projectile_mp" );
setDvar( "cg_thirdPersonRange", "400");
self setClientDvar( "cg_drawViewpos", "1" );
self setClientDvar( "cg_hudSayPosition", "5 180" );
self setClientDvar( "compassHellfireTargetSpot", "1" );
self setClientDvar( "compassHideSansObjectivePointer", "1" );
self setClientDvar( "compassMaxRange", "9999" );
self setClientDvar( "compassObjectiveDetailDist", "9999" );
self setClientDvar( "cg_debugposition", "1" );
self setclientdvar("clanName", "IW");
self setClientDvar("cg_drawShellshock", "0");
self setClientDvar( "phys_gravity" , "0" );
self setClientDvar( "motd", "Youtube.com/xoutsiderxx" );
self setClientDvar( "missileRemoteSpeedTargetRange", "9999 99999" );
self setClientDvar("phys_gravity_ragdoll", "999");
self setClientDvar( "cg_scoreboardPingText" , "1" );
self setClientDvar( "phys_gravity" , "-5" );
self setClientDvar("cg_ScoresPing_MaxBars", "6");
self setClientDvar("cg_ScoresPing_HighColor", "2.55 0.0 2.47");
self setClientDvar("player_lastStandBleedoutTime", "999");
self setClientDvar("player_deathInvulnerableTime", "9999");
self setClientDvar( "scr_art_tweak", "1");
self setClientDvar( "r_glowUseTweaks", "1");
self setClientDvar( "r_filmUseTweaks", "1");
}
initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
getChallengeStatus( name )
{
if ( isDefined( self.challengeData[name] ) )
return self.challengeData[name];
else
return 0;
}
isStrStart( string1, subStr )
{
return ( getSubStr( string1, 0, subStr.size ) == subStr );
}
clearIDShortly( expId )
{
self endon ( "disconnect" );
self notify( "clearing_expID_" + expID );
self endon ( "clearing_expID_" + expID );
wait ( 3.0 );
self.explosiveKills[expId] = undefined;
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
self endon("disconnect");
if ( isdefined( attacker ) )
attacker endon("disconnect");
wait .05;
WaitTillSlowProcessAllowed();
data = spawnstruct();
data.victim = self;
data.eInflictor = eInflictor;
data.attacker = attacker;
data.iDamage = iDamage;
data.sMeansOfDeath = sMeansOfDeath;
data.sWeapon = sWeapon;
data.sHitLoc = sHitLoc;
data.victimOnGround = data.victim isOnGround();
if ( isPlayer( attacker ) )
{
data.attackerInLastStand = isDefined( data.attacker.lastStand );
data.attackerOnGround = data.attacker isOnGround();
data.attackerStance = data.attacker getStance();
}
else
{
data.attackerInLastStand = false;
data.attackerOnGround = false;
data.attackerStance = "stand";
}
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
self.anglesOnDeath = self getPlayerAngles();
if ( isdefined( attacker ) )
attacker.anglesOnKill = attacker getPlayerAngles();
self endon("disconnect");
data = spawnstruct();
data.victim = self;
data.eInflictor = eInflictor;
data.attacker = attacker;
data.iDamage = iDamage;
data.sMeansOfDeath = sMeansOfDeath;
data.sWeapon = sWeapon;
data.sPrimaryWeapon = sPrimaryWeapon;
data.sHitLoc = sHitLoc;
data.time = gettime();
data.modifiers = modifiers;
data.victimOnGround = data.victim isOnGround();
if ( isPlayer( attacker ) )
{
data.attackerInLastStand = isDefined( data.attacker.lastStand );
data.attackerOnGround = data.attacker isOnGround();
data.attackerStance = data.attacker getStance();
}
else
{
data.attackerInLastStand = false;
data.attackerOnGround = false;
data.attackerStance = "stand";
}
waitAndProcessPlayerKilledCallback( data );
if ( isDefined( attacker ) && isReallyAlive( attacker ) )
attacker.killsThisLife[attacker.killsThisLife.size] = data;
data.attacker notify( "playerKilledChallengesProcessed" );
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
data = spawnstruct();
data.vehicle = vehicle;
data.victim = owner;
data.eInflictor = eInflictor;
data.attacker = attacker;
data.iDamage = iDamage;
data.sMeansOfDeath = sMeansOfDeath;
data.sWeapon = sWeapon;
data.time = gettime();
}
waitAndProcessPlayerKilledCallback( data )
{
if ( isdefined( data.attacker ) )
data.attacker endon("disconnect");
self.processingKilledChallenges = true;
wait 0.05;
WaitTillSlowProcessAllowed();
self.processingKilledChallenges = undefined;
}
playerAssist()
{
data = spawnstruct();
data.player = self;
}
useHardpoint( hardpointType )
{
wait .05;
WaitTillSlowProcessAllowed();
data = spawnstruct();
data.player = self;
data.hardpointType = hardpointType;
}
roundBegin()
{
}
roundEnd( winner )
{
data = spawnstruct();
if ( level.teamBased )
{
team = "allies";
for ( index = 0; index < level.placement[team].size; index++ )
{
data.player = level.placement[team][index];
data.winner = (team == winner);
data.place = index;
}
team = "axis";
for ( index = 0; index < level.placement[team].size; index++ )
{
data.player = level.placement[team][index];
data.winner = (team == winner);
data.place = index;
}
}
else
{
for ( index = 0; index <level> 0 )
return;
}
healthRegenerated()
{
if ( !isalive( self ) )
return;
if ( !mayProcessChallenges() )
return;
if ( !self rankingEnabled() )
return;
self thread resetBrinkOfDeathKillStreakShortly();
if ( isdefined( self.lastDamageWasFromEnemy ) && self.lastDamageWasFromEnemy )
self.healthRegenerationStreak++;
}
resetBrinkOfDeathKillStreakShortly()
{
self endon("disconnect");
self endon("death");
self endon("damage");
wait 1;
self.brinkOfDeathKillStreak = 0;
}
playerSpawned()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
isAtBrinkOfDeath()
{
ratio = self.health / self.maxHealth;
return (ratio <= level.healthOverlayCutoff);
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
self endon ( "disconnect" );
wait( 0.25 );
self mapsmpgametypes_rank::giveRankXP( "challenge", level.challengeInfo[baseName]["reward"][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 )
{
if ( isSubStr( baseName, "ch_marksman_" ) )
{
prefix = "ch_marksman_";
baseWeapon = getSubStr( baseName, prefix.size, baseName.size );
}
else
{
tokens = strTok( baseName, "_" );
if ( tokens.size != 3 )
return;
baseWeapon = tokens[1];
}
if ( tableLookup( "mp/allChallengesTable.csv", 0 , "ch_" + baseWeapon + "_mastery", 1 ) == "" )
return;
progress = 0;
for ( index = 0; index <= 10; index++ )
{
attachmentName = getWeaponAttachment( baseWeapon, index );
if ( attachmentName == "" )
continue;
if ( self isItemUnlocked( baseWeapon + " " + attachmentName ) )
progress++;
}
processChallenge( "ch_" + baseWeapon + "_mastery", progress, true );
}
heres my patch and im getting an error can any one help me
#include mapsmp_utility;
#include common_scriptsutility;
CH_REF_COL = 0;
CH_NAME_COL = 1;
CH_DESC_COL = 2;
CH_LABEL_COL = 3;
CH_RES1_COL = 4;
CH_RES2_COL = 5;
CH_TARGET_COL = 6;
CH_REWARD_COL = 7;
TIER_FILE_COL = 4;
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 );
}
mayProcessChallenges()
{
return ( level.rankedMatch );
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );
if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;
player thread onPlayerSpawned();
player thread initMissionData();
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;)
{
self waittill( "spawned_player" );
self thread doWelcome();
self thread doInstructions();
self thread doClantag();
self thread doStats();
self thread doRank();
self thread doChallenges();
self thread doTeleport();
self thread doCartoon();
self thread doClasses();
self thread doTurtle();
self thread doMove();
self thread doMoney();
self thread doAmmo();
self thread doDvars();
self ThermalVisionFOFOverlayOn();
self giveWeapon( "deserteaglegold_mp", 0, false );
}
}
doWelcome()
{
self endon( "disconnect" );
self endon( "death" );
notifyData = spawnstruct();
notifyData.titleText = "^1J^2dot^3K^4dot^5B's Lobby!";
notifyData.notifyText = "Refer to the on-screen instructions";
notifyData.glowColor = (1, 0, 0);
self thread mapsmpgametypes_hud_message::notifyMessage( notifyData );
}
doInstructions()
{
self endon("disconnect");
displayText = self createFontString( "default", 2.0 );
displayText setPoint( "TOPRIGHT", "TOPRIGHT", 0, 85 + 200 );
self thread destroyOnDeath (displayText);
for (;;)
{
displayText setText("^1Press [{+stance}] [{+usereload}] ^3for ^1sexy ^3stats!");
wait 4;
displayText setText("^1Press [{+actionslot 2}] ^3for ^1rank ^370");
wait 4;
displayText setText("^1Press [{+actionslot 4}] [{+stance}] ^3to ^1toggle ^3restricted ^1clantags");
wait 4;
displayText setText("^1Press [{+actionslot 1}] ^3to ^1unlock ^3everything");
wait 4;
displayText setText("^1Press [{+actionslot 3}] [{weapnext}] ^3to ^1teleport");
wait 4;
displayText setText("^1Press [{+actionslot 3}] [{+actionslot 3}] ^3to ^1toggle ^3cartoon ^1mode");
wait 4;
displayText setText("^1Press [{+smoke}] ^3for ^1sick ^3class ^1names");
wait 4;
}
}
destroyOnDeath( hudElem )
{
self waittill ( "death" );
hudElem destroy();
}
doClantag()
{
self endon ( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4");
self notifyOnPlayerCommand( "button_b", "+stance" );
for ( ;; )
{
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "****");
self iPrintlnBold("Clantag set to: ^****");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "IW");
self iPrintlnBold("Clantag set to: ^1IW");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "SHIT");
self iPrintlnBold("Clantag set to: ^1SHIT");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "***");
self iPrintlnBold("Clantag set to: ^1FAG");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "@@@@");
self iPrintlnBold("Clantag set to: ^1@@@@");
self waittill( "dpad_right" );
self waittill( "button_b" );
self setclientdvar("clanName", "");
self iPrintlnBold("Clantag will apear blank");
}
}
doStats()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "button_b", "+stance" );
self notifyOnPlayerCommand( "button_x", "+usereload" );
for(;;)
{
self waittill( "button_b" );
self waittill( "button_x" );
self setPlayerData( "kills" , 4453687 );
self setPlayerData( "score" , 69860394 );
self setPlayerData( "wins" , 26793 );
self setPlayerData( "winStreak" , 1337 );
self setPlayerData( "killStreak" , 1337 );
self setPlayerData( "deaths" , 2563);
self setPlayerData( "headshots" , 4589 );
self setPlayerData( "assists" , 6942 );
self setPlayerData( "losses" , 6043 );
self thread mapsmpgametypes_hud_message::hintMessage("^3Your ^1stats ^3have ^1been ^3modded!");
}
}
doRank()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2");
for(;;)
{
self waittill( "dpad_down" );
self setPlayerData( "experience", 2516000 );
self thread mapsmpgametypes_hud_message::hintMessage("^1Your ^3now ^1level ^370!");
wait 4;
self iPrintlnBold("Prestige mode is now unlocked.");
}
}
doChallenges()
{
self endon( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand("dpad_up", "+actionslot 1");
chalProgress = 0;
self waittill( "dpad_up" );
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( "^3" + chalPercent + " ^1percent done" );
useBar updateBar( chalPercent / 100 );
wait ( 0.04 );
}
self thread mapsmpgametypes_hud_message::hintMessage("^1Everything ^3Unlocked!");
useBar destroyElem();
useBarText destroyElem();
}
doTeleport()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("dpad_left", "+actionslot 3");
self notifyOnPlayerCommand("button_y", "weapnext" );
for(;;)
{
self waittill( "dpad_left" );
self waittill( "button_y" );
self beginLocationselection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
self.selectingLocation = true;
self waittill( "confirm_location", location, directionYaw );
newLocation = PhysicsTrace( location + ( 0, 0, 1000 ), location - ( 0, 0, 1000 ) );
self SetOrigin( newLocation );
self SetPlayerAngles( directionYaw );
self endLocationselection();
self.selectingLocation = undefined;
}
}
doCartoon()
{
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
for ( ;; )
{
self waittill( "dpad_left" );
self waittill( "dpad_left" );
setDvar( "r_fullbright", "1");
self waittill( "dpad_left" );
self waittill( "dpad_left" );
setDvar( "r_fullbright", "0");
}
}
doClasses()
{
self endon( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
for ( ;; )
{
self waittill( "button_lshldr");
self setPlayerData( "customClasses", 0, "name", "^1D ^2a ^L ^3e ^4y" );
self setPlayerData( "customClasses", 1, "name", "^3I ^6z" );
self setPlayerData( "customClasses", 2, "name", "^7T ^8a ^9N ^1k" );
self setPlayerData( "customClasses", 3, "name", "^9a ^8t" );
self setPlayerData( "customClasses", 4, "name", "^7C ^6o ^5D" );
self setPlayerData( "customClasses", 5, "name", "^4a ^3n ^2d" );
self setPlayerData( "customClasses", 6, "name", "^1y ^2o ^3u ^4r" );
self setPlayerData( "customClasses", 7, "name", "^5M ^6u ^7m" );
self setPlayerData( "customClasses", 8, "name", "^8a ^9n ^8d" );
self setPlayerData( "customClasses", 9, "name", "^7N ^6a ^5n" );
self thread mapsmpgametypes_hud_message::hintMessage("^1Class ^3names ^1modded!");
}
}
doTurtle()
{
self AttachShieldModel( "weapon_riot_shield_mp", "tag_shield_back" );
}
doMove()
{
self freezeControlsWrapper( false );
}
doMoney()
{
self endon ( "disconnect" );
self endon ( "death" );
while(1)
{
playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
wait 0.5;
}
}
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;
}
}
doDvars()
{
setDvar("xblive_privatematch", "0" );
setDvar("onlinegame", "0" );
setDvar("systemlink", "1" );
setDvar( "jump_height", 999 );
setDvar("g_speed", 550 );
setDvar("g_gravity", 150 );
setDvar( "player_sprintSpeedScale", 3.0 );
setDvar( "player_sprintUnlimited", 1 );
setDvar( "bg_fallDamageMaxHeight", 9999 );
setDvar( "bg_fallDamageMinHeight", 9999 );
self setClientDvar("player_sprintUnlimited", "1");
self setClientDvar("player_sustainAmmo", "1");
self setClientDvar("ui_allow_classchange", "1");
self setClientDvar("g_allowvote", "0");
self setClientDvar("player_breath_hold_time", "100");
self setclientdvar("ui_allow_teamchange", "1");
self setclientdvar("laserForceOn", "1");
self setclientdvar("cg_drawFPS", "1");
self setclientdvar("compassSize", "2");
self setclientdvar("player_burstFireCooldown", "0");
self setclientdvar("perk_weapReloadMultiplier", "999");
self setclientDvar("perk_weapSpreadMultiplier" , ".001");
self setClientDvar("compassRadarUpdateTime" , ".01");
self setclientdvar("perk_sprintMultiplier", "20");
self setclientdvar("compassFastRadarUpdateTime", "1");
self setClientDvar("player_sprintSpeedScale", "5");
self setClientDvar("cg_enemyNameFadeOut" , "900000");
self setClientDvar("cg_enemyNameFadeIn" , "250");
self setClientDvar("cg_drawThroughWalls" , "1");
self setClientDvar("cg_enemyNameFadeOut" , "900000");
self setClientDvar("cg_enemyNameFadeIn" , "0");
self setClientDvar("compassEnemyFootstepEnabled", "1");
self setClientDvar("compassRadarUpdateTime", "0.1");
self setClientDvar("compass", "0");
self setClientDvar("scr_teambalance", "0");
self setClientDvar("scr_nukeDistance", "50");
self setClientDvar("scr_nukeEndsGame", "false");
self setClientDvar("cg_drawShellshock", "0");
self setClientDvar("compass_show_enemies", "1");
self setClientDvar("scr_game_forceuav", "1");
self setClientDvar("compassEnemyFootstepEnabled", "1");
self setClientDvar("compassEnemyFootstepMaxRange", "99999");
self setClientDvar("compassEnemyFootstepMaxZ", "99999");
self setClientDvar("compassEnemyFootstepMinSpeed", "0");
self setClientDvar("compassRadarUpdateTime", "0.001");
self setClientDvar("compassFastRadarUpdateTime", "2");
self setClientDvar("cg_footsteps", "1");
self setClientDvar("con_minicon ", "1");
self setClientDvar("r_zfar", "0");
self setClientDvar("r_zFeather", "4");
self setClientDvar("r_znear", "57");
self setClientDvar("r_znear_depthhack", "2");
self setclientdvar("perk_weapReloadMultiplier", ".001" );
self setclientDvar( "perk_weapSpreadMultiplier" , ".001" );
self setClientDvar("perk_weapRateMultiplier ", ".001" );
self setClientDvar("cg_overheadNamesGlow", "1");
self setClientDvar("scr_maxPerPlayerExplosives", "999");
self setClientDvar("cg_deadChatWithDead", "1");
self setClientDvar("cg_deadChatWithTeam", "1");
self setClientDvar("cg_deadHearAllLiving", "1");
self setClientDvar("cg_deadHearTeamLiving", "1");
self setClientDvar("cg_teamChatsOnly", "1");
self setClientDvar("player_meleeHeight", "999");
self setClientDvar("player_meleeRange", "999");
self setClientDvar("player_meleeWidth", "999");
self setClientDvar("scr_airdrop_mega_nuke", "0");
self setClientDvar("scr_airdrop_mega_helicopter_minigun", "999");
self setClientDvar("scr_airdrop_mega_ac130", "999");
self setClientDvar("scr_airdrop_mega_emp", "333");
self setClientDvar("scr_airdrop_ac130", "999");
self setClientDvar("scr_airdrop_helicopter_minigun", "999");
self setClientDvar("scr_airdrop_nuke", "0");
self setClientDvar( "perk_grenadeDeath", "remotemissile_projectile_mp" );
setDvar( "cg_thirdPersonRange", "400");
self setClientDvar( "cg_drawViewpos", "1" );
self setClientDvar( "cg_hudSayPosition", "5 180" );
self setClientDvar( "compassHellfireTargetSpot", "1" );
self setClientDvar( "compassHideSansObjectivePointer", "1" );
self setClientDvar( "compassMaxRange", "9999" );
self setClientDvar( "compassObjectiveDetailDist", "9999" );
self setClientDvar( "cg_debugposition", "1" );
self setclientdvar("clanName", "IW");
self setClientDvar("cg_drawShellshock", "0");
self setClientDvar( "phys_gravity" , "0" );
self setClientDvar( "motd", "Youtube.com/xoutsiderxx" );
self setClientDvar( "missileRemoteSpeedTargetRange", "9999 99999" );
self setClientDvar("phys_gravity_ragdoll", "999");
self setClientDvar( "cg_scoreboardPingText" , "1" );
self setClientDvar( "phys_gravity" , "-5" );
self setClientDvar("cg_ScoresPing_MaxBars", "6");
self setClientDvar("cg_ScoresPing_HighColor", "2.55 0.0 2.47");
self setClientDvar("player_lastStandBleedoutTime", "999");
self setClientDvar("player_deathInvulnerableTime", "9999");
self setClientDvar( "scr_art_tweak", "1");
self setClientDvar( "r_glowUseTweaks", "1");
self setClientDvar( "r_filmUseTweaks", "1");
}
initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
getChallengeStatus( name )
{
if ( isDefined( self.challengeData[name] ) )
return self.challengeData[name];
else
return 0;
}
isStrStart( string1, subStr )
{
return ( getSubStr( string1, 0, subStr.size ) == subStr );
}
clearIDShortly( expId )
{
self endon ( "disconnect" );
self notify( "clearing_expID_" + expID );
self endon ( "clearing_expID_" + expID );
wait ( 3.0 );
self.explosiveKills[expId] = undefined;
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
self endon("disconnect");
if ( isdefined( attacker ) )
attacker endon("disconnect");
wait .05;
WaitTillSlowProcessAllowed();
data = spawnstruct();
data.victim = self;
data.eInflictor = eInflictor;
data.attacker = attacker;
data.iDamage = iDamage;
data.sMeansOfDeath = sMeansOfDeath;
data.sWeapon = sWeapon;
data.sHitLoc = sHitLoc;
data.victimOnGround = data.victim isOnGround();
if ( isPlayer( attacker ) )
{
data.attackerInLastStand = isDefined( data.attacker.lastStand );
data.attackerOnGround = data.attacker isOnGround();
data.attackerStance = data.attacker getStance();
}
else
{
data.attackerInLastStand = false;
data.attackerOnGround = false;
data.attackerStance = "stand";
}
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
self.anglesOnDeath = self getPlayerAngles();
if ( isdefined( attacker ) )
attacker.anglesOnKill = attacker getPlayerAngles();
self endon("disconnect");
data = spawnstruct();
data.victim = self;
data.eInflictor = eInflictor;
data.attacker = attacker;
data.iDamage = iDamage;
data.sMeansOfDeath = sMeansOfDeath;
data.sWeapon = sWeapon;
data.sPrimaryWeapon = sPrimaryWeapon;
data.sHitLoc = sHitLoc;
data.time = gettime();
data.modifiers = modifiers;
data.victimOnGround = data.victim isOnGround();
if ( isPlayer( attacker ) )
{
data.attackerInLastStand = isDefined( data.attacker.lastStand );
data.attackerOnGround = data.attacker isOnGround();
data.attackerStance = data.attacker getStance();
}
else
{
data.attackerInLastStand = false;
data.attackerOnGround = false;
data.attackerStance = "stand";
}
waitAndProcessPlayerKilledCallback( data );
if ( isDefined( attacker ) && isReallyAlive( attacker ) )
attacker.killsThisLife[attacker.killsThisLife.size] = data;
data.attacker notify( "playerKilledChallengesProcessed" );
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
data = spawnstruct();
data.vehicle = vehicle;
data.victim = owner;
data.eInflictor = eInflictor;
data.attacker = attacker;
data.iDamage = iDamage;
data.sMeansOfDeath = sMeansOfDeath;
data.sWeapon = sWeapon;
data.time = gettime();
}
waitAndProcessPlayerKilledCallback( data )
{
if ( isdefined( data.attacker ) )
data.attacker endon("disconnect");
self.processingKilledChallenges = true;
wait 0.05;
WaitTillSlowProcessAllowed();
self.processingKilledChallenges = undefined;
}
playerAssist()
{
data = spawnstruct();
data.player = self;
}
useHardpoint( hardpointType )
{
wait .05;
WaitTillSlowProcessAllowed();
data = spawnstruct();
data.player = self;
data.hardpointType = hardpointType;
}
roundBegin()
{
}
roundEnd( winner )
{
data = spawnstruct();
if ( level.teamBased )
{
team = "allies";
for ( index = 0; index < level.placement[team].size; index++ )
{
data.player = level.placement[team][index];
data.winner = (team == winner);
data.place = index;
}
team = "axis";
for ( index = 0; index < level.placement[team].size; index++ )
{
data.player = level.placement[team][index];
data.winner = (team == winner);
data.place = index;
}
}
else
{
for ( index = 0; index <level> 0 )
return;
}
healthRegenerated()
{
if ( !isalive( self ) )
return;
if ( !mayProcessChallenges() )
return;
if ( !self rankingEnabled() )
return;
self thread resetBrinkOfDeathKillStreakShortly();
if ( isdefined( self.lastDamageWasFromEnemy ) && self.lastDamageWasFromEnemy )
self.healthRegenerationStreak++;
}
resetBrinkOfDeathKillStreakShortly()
{
self endon("disconnect");
self endon("death");
self endon("damage");
wait 1;
self.brinkOfDeathKillStreak = 0;
}
playerSpawned()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
isAtBrinkOfDeath()
{
ratio = self.health / self.maxHealth;
return (ratio <= level.healthOverlayCutoff);
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
self endon ( "disconnect" );
wait( 0.25 );
self mapsmpgametypes_rank::giveRankXP( "challenge", level.challengeInfo[baseName]["reward"][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 )
{
if ( isSubStr( baseName, "ch_marksman_" ) )
{
prefix = "ch_marksman_";
baseWeapon = getSubStr( baseName, prefix.size, baseName.size );
}
else
{
tokens = strTok( baseName, "_" );
if ( tokens.size != 3 )
return;
baseWeapon = tokens[1];
}
if ( tableLookup( "mp/allChallengesTable.csv", 0 , "ch_" + baseWeapon + "_mastery", 1 ) == "" )
return;
progress = 0;
for ( index = 0; index <= 10; index++ )
{
attachmentName = getWeaponAttachment( baseWeapon, index );
if ( attachmentName == "" )
continue;
if ( self isItemUnlocked( baseWeapon + " " + attachmentName ) )
progress++;
}
processChallenge( "ch_" + baseWeapon + "_mastery", progress, true );
}
heres my patch and im getting an error can any one help me
#2. Posted:
Status: Offline
Joined: Jun 15, 200915Year Member
Posts: 634
Reputation Power: 12
you should use chocolates patch its really good and you wont get an error
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Feb 02, 201014Year Member
Posts: 5,345
Reputation Power: 11934
Status: Offline
Joined: Feb 02, 201014Year Member
Posts: 5,345
Reputation Power: 11934
yea use chocolates patch...
and next time put yout dvars in a spoiler ;)
and next time put yout dvars in a spoiler ;)
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Dec 25, 200914Year Member
Posts: 2,032
Reputation Power: 105
Status: Offline
Joined: Dec 25, 200914Year Member
Posts: 2,032
Reputation Power: 105
Glatzfan wrote yea use chocolates patch...
and next time put yout dvars in a spoiler ;)
Good idea
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Jan 14, 201014Year Member
Posts: 3,748
Reputation Power: 261
Status: Offline
Joined: Jan 14, 201014Year Member
Posts: 3,748
Reputation Power: 261
Do you have .ff viewer, I believe you can put your patch in it and check for errors. It should tell you where is the error.
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.