Post: Optimized Camo Unlocker?
10-22-2015, 12:00 AM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); I want to create an "optimized" camo unlocker code and I need the attributestable.csv as well as the statsmilestones1.csv files for it. Where do I get them so that I can look at them? Credits for the improved code below using String tables goes to CraigChrist8239:
    unlockAllWeaponCamos()
{
attributestable = tablelookupfindcoreasset("mp/attributestable.csv");

for(i = 0; i < 450; i++)
{
curWeaponType = tablelookupcolumnforrow(attributestable, i, 0);
curWeaponName = undefined;

switch(curWeaponType)
{
case "weapon_pistol":
case "weapon_smg":
case "weapon_assault":
case "weapon_projectile":
case "weapon_sniper":
case "weapon_shotgun":
case "weapon_lmg":
case "weapon_cqb":
curWeaponName = tablelookupcolumnforrow(attributestable, i, 1) + "_mp";
break;
}

if(isdefined(curWeaponName))
{
self unlockallcamos(curWeaponName);
wait 0.1;
}
}
}

// Sucks, needs optimization as well especially since some guns don't have certain attributes...
unlockallcamos(i)
{
self addweaponstat(i, "headshots", 5000 );
self addweaponstat(i, "kills", 5000 );
self addweaponstat(i, "direct_hit_kills", 100 );
self addweaponstat(i, "revenge_kill", 2500 );
self addweaponstat(i, "noAttKills", 2500 );
self addweaponstat(i, "noPerkKills", 2500 );
self addweaponstat(i, "multikill_2", 2500 );
self addweaponstat(i, "killstreak_5", 2500 );
self addweaponstat(i, "challenges", 5000 );
self addweaponstat(i, "multikill_2", 2500 );
self addweaponstat(i, "killstreak_5", 2500 );
self addweaponstat(i, "challenges", 5000 );
self addweaponstat(i, "longshot_kill", 750 );
self addweaponstat(i, "direct_hit_kills", 120);
self addweaponstat(i, "destroyed_aircraft_under20s", 120);
self addweaponstat(i, "destroyed_5_aircraft", 120);
self addweaponstat(i, "destroyed_aircraft", 120);
self addweaponstat(i, "kills_from_cars", 120);
self addweaponstat(i, "destroyed_2aircraft_quickly", 120);
self addweaponstat(i, "destroyed_controlled_killstreak", 120);
self addweaponstat(i, "destroyed_qrdrone", 120);
self addweaponstat(i, "destroyed_aitank", 120);
self addweaponstat(i, "multikill_3", 120);
self addweaponstat(i, "score_from_blocked_damage", 140);
self addweaponstat(i, "shield_melee_while_enemy_shooting", 140);
self addweaponstat(i, "hatchet_kill_with_shield_equiped", 140);
self addweaponstat(i, "noLethalKills", 140);
self addweaponstat(i, "ballistic_knife_kill",5000);
self addweaponstat(i, "kill_retrieved_blade", 160);
self addweaponstat(i, "ballistic_knife_melee", 160);
self addweaponstat(i, "kills_from_cars", 170);
self addweaponstat(i, "crossbow_kill_clip", 170);
self addweaponstat(i, "backstabber_kill", 190);
self addweaponstat(i, "kill_enemy_with_their_weapon", 190);
self addweaponstat(i, "kill_enemy_when_injured", 190);
self addweaponstat(i, "primary_mastery",10000);
self addweaponstat(i, "secondary_mastery",10000);
self addweaponstat(i, "weapons_mastery",10000);
self addweaponstat(i, "kill_enemy_one_bullet_shotgun", 5000);
self addweaponstat(i, "kill_enemy_one_bullet_sniper", 5000);
}
(adsbygoogle = window.adsbygoogle || []).push({});
11-22-2015, 11:44 PM #2
BullyWiiPlaza
Climbing up the ladder
Bump! So here's the code I came up with:
    unlockAllWeaponCamos()
{
self endon("disconnect");

self thread maps\mp\gametypes\_hud_message::hintMessage("^1Unlocking all camos...");

weaponIdStructs = level.tbl_weaponIDs;
weaponsCount = weaponIdStructs.size;

// Unlock camos for each weapon
for(weaponIndex = 0; weaponIndex < weaponsCount; weaponIndex++)
{
weaponIdStruct = weaponIdStructs[weaponIndex];
self unlockAllWeaponCamos(weaponIdStruct["reference"], weaponIdStruct["group"]);

wait 2;
}

self thread maps\mp\gametypes\_hud_message::hintMessage("^2All weapon camos unlocked!");
}

unlockAllWeaponCamos(baseWeaponName, weaponType)
{
statsTable = tableLookupFindCoreAsset("mp/statsmilestones1.csv");
unlocksCount = 224;
unlocksStartingRow = 2;

weaponName = baseWeaponName + "_mp";

// Iterate the entire challenges table
for(rowIndex = unlocksStartingRow; rowIndex < unlocksStartingRow + unlocksCount; rowIndex++)
{
weaponTypeColumn = 3;
challengeTypesColumn = weaponTypeColumn + 1;
challengeTypesRequirementsColumn = challengeTypesColumn + 2;
rowNumber = rowIndex - 2;

currentWeaponType = tableLookupColumnForRow(statsTable, rowNumber, weaponTypeColumn);

// Do not apply wrong weapon stats
if(weaponType == currentWeaponType)
{
// Read challenge type and requirements in order to complete them
challengeType = tableLookupColumnForRow(statsTable, rowNumber, challengeTypesColumn);
challengeTypeRequirements = tableLookupColumnForRow(statsTable, rowNumber, challengeTypesRequirementsColumn);
// self iPrintln(weaponName + " " + challengeType + " " + challengeTypeRequirements);
self addWeaponStat(weaponName, challengeType, challengeTypeRequirements);
}
}
}

It looks epic and all but for some reason it doesn't work. I believe that all weapons and challenge data are retrieved successfully but the unlock medals do not popup on-screen, also it does not unlock a single camo. Note that the script has to be ran on public. You can uncomment the
    self iPrintln
if you want to see debugging output but beware, the loop runs faster than you can read. The You must login or register to view this content. released here however works fine, all medals popup on-screen and the camos are really unlocked on my profile. Also, they stick. Can someone please take a look to see why my optimized script is failing? It would be great if I could use it instead and maybe speed up the unlock process? It takes about 15 minutes to complete with the "old" version. Thanks Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo