What's new

Unlock all Challenges

  • Thread starter iSnipeGaming
  • Start date
  • Views 2,749
I

iSnipeGaming

Newbie
Messages
13
Reaction score
0
Points
35
Code:
UnlockallChallenges()
{
self endon("disconnect");


notifyAll = 1;
challengeTypes = [];
challengeTypes[0] = "marksman";
challengeTypes[1] = "expert";

for ( weaponNum = 0; weaponNum < 64; weaponNum++ )
{
if ( isDefined( level.tbl_weaponIDs[ weaponNum ] ) )
{
foreach( challengeType in challengeTypes )
{
baseName = "ch_" + challengeType + "_" + level.tbl_weaponIDs[ weaponNum ][ "reference" ] + "_";
numLevels = getChallengeLevels( baseName );

if ( numLevels > 1 )
{
refString = baseName + numLevels;
self.challengeData[baseName + "1"] = 255;
}
else
{
refString = baseName;
self.challengeData[baseName] = 255;
}

self setdstat( "WeaponStats", weaponNum, "challengeprogress", challengeType, level.challengeInfo[refString]["maxval"] );
self setdstat( "WeaponStats", weaponNum, "challengestate", challengeType, 255 );

if( notifyAll == 1 )
{
self thread milestoneNotify( level.challengeInfo[refString]["tier"], level.challengeInfo[refString]["index"], weaponNum, level.challengeInfo[refString]["tier"] );
}
wait .05;
}
}
}

for(c=0;c<self.challengeData.size;c++)
{
baseName = self.challengeData[c];
numLevels = getChallengeLevels( baseName );

if ( numLevels > 1 )
{
refString = baseName + numLevels;
self.challengeData[baseName + "1"] = 255;
}
else
{
refString = baseName;
self.challengeData[baseName] = 255;
}

self setdstat( "ChallengeStats", refString, "challengeprogress", level.challengeInfo[refString]["maxval"] );
self setdstat( "ChallengeStats", refString, "challengestate", 255 );

if( notifyAll == 1 )
{
self thread milestoneNotify( level.challengeInfo[refString]["tier"], level.challengeInfo[refString]["index"], 0, level.challengeInfo[refString]["tier"] );
}
wait .05;
}
notifyData = spawnstruct();
"notifyData.titleText = "Challenges Done";
notifyData.notifyText = "<Edited the advertising out by Ells";
notifyData.notifyText = "<Lets keep it to Se7ensins.com";
notifyData.duration = 2;" 
self thread notifyMessage( notifyData );
}
Have fun!
 
Diesel

Diesel

I love the smell of Diesel in the morning
Messages
1,872
Reaction score
441
Points
220
i spy some advertising in that patch.
 
yermommy

yermommy

Enthusiast
Messages
489
Reaction score
45
Points
95
LOL
"notifyData.titleText = "Challenges Done";
notifyData.notifyText = "<Edited the advertising out by Ells";
notifyData.notifyText = "<Lets keep it to Se7ensins.com";
notifyData.duration = 2;"
 
Apathy

Apathy

Member
Programmer Modder Hardened Veteran
Messages
3,007
Reaction score
920
Points
455
Code:
UnlockallChallenges()
{
self endon("disconnect");


notifyAll = 1;
challengeTypes = [];
challengeTypes[0] = "marksman";
challengeTypes[1] = "expert";

for ( weaponNum = 0; weaponNum < 64; weaponNum++ )
{
if ( isDefined( level.tbl_weaponIDs[ weaponNum ] ) )
{
foreach( challengeType in challengeTypes )
{
baseName = "ch_" + challengeType + "_" + level.tbl_weaponIDs[ weaponNum ][ "reference" ] + "_";
numLevels = getChallengeLevels( baseName );

if ( numLevels > 1 )
{
refString = baseName + numLevels;
self.challengeData[baseName + "1"] = 255;
}
else
{
refString = baseName;
self.challengeData[baseName] = 255;
}

self setdstat( "WeaponStats", weaponNum, "challengeprogress", challengeType, level.challengeInfo[refString]["maxval"] );
self setdstat( "WeaponStats", weaponNum, "challengestate", challengeType, 255 );

if( notifyAll == 1 )
{
self thread milestoneNotify( level.challengeInfo[refString]["tier"], level.challengeInfo[refString]["index"], weaponNum, level.challengeInfo[refString]["tier"] );
}
wait .05;
}
}
}

for(c=0;c<self.challengeData.size;c++)
{
baseName = self.challengeData[c];
numLevels = getChallengeLevels( baseName );

if ( numLevels > 1 )
{
refString = baseName + numLevels;
self.challengeData[baseName + "1"] = 255;
}
else
{
refString = baseName;
self.challengeData[baseName] = 255;
}

self setdstat( "ChallengeStats", refString, "challengeprogress", level.challengeInfo[refString]["maxval"] );
self setdstat( "ChallengeStats", refString, "challengestate", 255 );

if( notifyAll == 1 )
{
self thread milestoneNotify( level.challengeInfo[refString]["tier"], level.challengeInfo[refString]["index"], 0, level.challengeInfo[refString]["tier"] );
}
wait .05;
}
notifyData = spawnstruct();
"notifyData.titleText = "Challenges Done";
notifyData.notifyText = "<Edited the advertising out by Ells";
notifyData.notifyText = "<Lets keep it to Se7ensins.com";
notifyData.duration = 2;" 
self thread notifyMessage( notifyData );
}
Have fun!
ahaloa's much?
 
Z

zy0n

Enthusiast
Messages
900
Reaction score
449
Points
165
And for you all to know... this doesnt even work...
If you'd take closer examination of the second for loop you'd see that
it doesn't even sort through the 'self.challengeData' array correctly.
 
Top Bottom
Login
Register