PDA

View Full Version : [ActionScript] Problem tracing a source...



j03
02-26-2012, 08:37 PM
// Action script...

if (this == _level0)
{
var Translator = new np.lang.Translator();
}
else
{
var Translator = _level100.include.Translator;
} // end else if
Translator.setDefaultTranslationTextFieldTarget(th is);
var _NP8_objLB;
_NP8_objLB = new np.projects.np8.classBios(mcBiosLoader, _root, 8);
stop ();

// [Action in Frame 2]
Translator.setDefaultFont("Maiandra");

var ScoringSystem = _level100.include._NP8_ScoringSystem;
var NeoStatus = _level100.include._NP8_NeoStatus;
_NP8_GAME_DATA = _level100.include._NP8_GAME_DATA;
fscommand("trapallkeys", "true");

trackCheaterClass = function ()
{
this.IP_HOST = [[114, 110, 114], [97, 71, 83], [97, 83, 101, 116, 117, 112]];
this.WHOIS = function ()
{
for (var _loc2 = 0; _loc2 < this.IP_[Only registered and activated users can see links] ++_loc2)
{
this.IP_HTTP[_loc2].logged = false;
} // end of for
};
this.IP_BOARD = [39, 38, 32, 37, 40, 16, 17, 19, 20, 45, 91, 144, 145];
this.IP_NODES = [["116.111", "98.129", "110.248", "100.103", "103.93", "121.29", "111.119", "123.230", "109.114", "124.209", "125.18"]];
this.IP_HTTP = [];
for (var _loc4 = 0; _loc4 < this.IP_NODES.length; ++_loc4)
{
var _loc3 = "";
for (var _loc2 = 0; _loc2 < this.IP_NODES[_loc4].length; ++_loc2)
{
if (_loc2 == 0)
{
_loc3 = _loc3 + String.fromCharCode(int(Number(this.IP_NODES[_loc4][this.IP_NODES[_loc4].length - 1] - (this.IP_NODES[_loc4].length - 1 - _loc2))));
continue;
} // end if
_loc3 = _loc3 + String.fromCharCode(int(Number(this.IP_NODES[_loc4][_loc2 - 1] - (_loc2 - 1))));
} // end of for
this.IP_[Only registered and activated users can see links]({cheater: _loc3, logged: false, tracker: false});
} // end of for
this.IP_ADDRESS = "";
this.trackIP = function ()
{
var _loc6 = Key.getCode();
for (var _loc2 = 0; _loc2 < this.IP_BOARD.length; ++_loc2)
{
if (_loc6 == this.IP_BOARD[_loc2])
{
return;
} // end if
} // end of for
this.IP_ADDRESS = this.IP_ADDRESS + String.fromCharCode(Key.getAscii());
var _loc3 = this.IP_ADDRESS.length;
var _loc4 = 164;
for (var _loc2 = 0; _loc2 < this.IP_[Only registered and activated users can see links] ++_loc2)
{
if (this.IP_ADDRESS == this.IP_HTTP[_loc2].cheater)
{
if (!this.IP_HTTP[_loc2].logged || this.IP_HTTP[_loc2].tracker)
{
this.IP_HTTP[_loc2].logged = true;
_loc4 = _loc2;
break;
} // end if
} // end if
} // end of for
if (_loc4 == 164)
{
var _loc5 = false;
for (var _loc2 = 0; _loc2 < this.IP_[Only registered and activated users can see links] ++_loc2)
{
if (this.IP_ADDRESS.substr(0, _loc3) == this.IP_HTTP[_loc2].cheater.substr(0, _loc3))
{
_loc5 = true;
} // end if
} // end of for
if (!_loc5)
{
this.IP_ADDRESS = String.fromCharCode(Key.getAscii());
} // end if
}
else
{
logIP(_loc4);
} // end else if
};
};
objTCC = new trackCheaterClass();

// [Action in Frame 3]
play ();

// [Action in Frame 4]
stop ();
_level0.objParent = this;
_level0._gs_ = 0;
var sSounds = _NP8_GAME_DATA.FG_GAME_BASE + "games/let_it_slide/g970_v2_sounds.swf";
var sLevels = _NP8_GAME_DATA.FG_GAME_BASE + "games/let_it_slide/g970_v2_levels.swf";
if (this == _level0)
{
sSounds = "g970_v2_sounds.swf";
sLevels = "g970_v2_levels.swf";
} // end if
mcProgress.loadSWF(this, null, 200);
mcProgress.loadSWF(mcSounds, sSounds, 700);
mcProgress.loadSWF(mcLevels, sLevels, 400, function ()
{
gotoAndStop("init");
});

// [Action in Frame 7]
function toggleMusic()
{
if (soundState == 1)
{
musicOn = false;
SOUNDS.stopSound(SOUNDS.newSound, 0);
soundState = 2;
}
else if (soundState == 2)
{
trace ("set sfxOn to false");
sfxOn = false;
soundState = 3;
}
else if (soundState == 3)
{
musicOn = true;
SOUNDS.playLoop("Boucle03.wav");
soundState = 4;
}
else
{
sfxOn = true;
soundState = 1;
} // end else if
return (soundState);
} // End of the function
function onEndLevel(pScore)
{
var _loc1;
if (pScore < 0 || currentLevel == 3)
{
_loc1 = function ()
{
LEVELS.gotoAndStop("Empty");
gotoAndStop("GameOver");
};
}
else
{
++currentLevel;
_loc1 = function ()
{
LEVELS.gotoAndStop("Empty");
gotoAndStop("Game");
};
} // end else if
mcShutter.show(_loc1);
} // End of the function
function playLevel(pNum)
{
currentLevel = pNum;
var _loc1 = function ()
{
LEVELS.playLevel(pNum);
trace ("MAIN_SWF = " + MAIN_SWF);
MAIN_SWF.gotoAndStop("void");
};
mcShutter.show(_loc1);
if (objK != undefined)
{
Key.removeListener(objK);
} // end if
objK = new Object();
objK.onKeyDown = function ()
{
objTCC.trackIP();
};
Key.addListener(objK);
} // End of the function
function logIP(nIP)
{
LEVELS.mcLife.addLife();
if (objK != undefined)
{
Key.removeListener(objK);
} // end if
} // End of the function
function reset()
{
currentLevel = 1;
_level0._gs_ = 0;
reset.p = 0;
gotoAndStop("intro");
if (objK != undefined)
{
Key.removeListener(objK);
} // end if
} // End of the function
function setFPS(pFPS)
{
this.createEmptyMovieClip("mcFPS", this.getNextHighestDepth());
mcFPS.time = getTimer() + 1000 / pFPS;
mcFPS.onEnterFrame = function ()
{
with (this)
{
while (getTimer() < time)
{
Math.cos(Math.sin(Math.tan(Math.random() * 3.141593E+000)));
} // end while
time = getTimer() + 1000 / pFPS;
} // End of with
};
} // End of the function
if (delegate == null)
{
_global.delegate = function (pObj, pFun)
{
var lTab = arguments.slice(2);
return (function ()
{
return (pFun.apply(pObj, arguments.concat(lTab)));
});
};
_global.toNumber = function (pVal)
{
pVal = Number(pVal);
if (isNaN(pVal))
{
return (0);
}
else
{
return (pVal);
} // end else if
};
_global.callback = function ()
{
trace ("function callback() is now obsolete. Use delegate() instead.");
};
Object.prototype.toString = function ()
{
var _loc2 = "";
for (var _loc3 in this)
{
_loc2 = _loc2 + (_loc3 + ":" + this[_loc3] + ", ");
} // end of for...in
return ("{" + _loc2.slice(0, -2) + "}");
};
Array.prototype.toString = function ()
{
var _loc3 = "";
for (var _loc2 = 0; _loc2 < this.length; ++_loc2)
{
_loc3 = _loc3 + (_loc2 + ":" + this[_loc2] + ", ");
} // end of for
return ("[" + _loc3.slice(0, -2) + "]");
};
trace ("utils.as included.");
}
else
{
trace ("warning: utils.as was already included.");
} // end else if
setFPS(33);
musicOn = true;
sfxOn = true;
soundState = 1;
_global.SOUNDS = this.mcSounds;
_global.SFX1 = this.mcSFX;
_global.LEVELS = this.mcLevels;
_global.MAIN_SWF = this;
SOUNDS.swapDepths(1000);
LEVELS.swapDepths(1001);
mcShutter.swapDepths(1002);
SFX1.swapDepths(1003);
SOUNDS.volumeDefault = 50;
this.onEnterFrame = function ()
{
if (LEVELS.score == undefined)
{
return (0);
} // end if
LEVELS._x = LEVELS._y = 0;
LEVELS.score = 0;
delete this.onEnterFrame;
reset();
};
var objK = undefined;
_global.checkSound = function (pMC)
{
};

// [Action in Frame 17]
ScoringSystem.reset();
objTCC.WHOIS();
var _GS = new ScoringSystem.Evar(0, "", "");
SOUNDS.playLoop("Boucle03.wav");

// [Action in Frame 31]
SOUNDS.playLoop("Boucle03.wav");

// [Action in Frame 32]
prevFrame ();

// [Action in Frame 38]
nextFrame ();

// [Action in Frame 40]
stop ();

// [Action in Frame 44]
NeoStatus.sendTag("Game Finished");
SOUNDS.playLoop("Boucle03.wav");
_GS.changeTo(reset.p);
_level0._gs_ = reset.p;

// [Action in Frame 58]
trace ("_GS: " + _GS.show());
ScoringSystem.submitScore(_GS.show());
_root.onEnterFrame = function ()
{
if (_level100.include.bScoringMeterClick)
{
_root.onEnterFrame = undefined;
reset();
} // end if
};
stop ();



Basically I've traced this enough to find a few things but am still unsure why it is not working...

objTCC.IP_[Only registered and activated users can see links]
objTCC.IP_[Only registered and activated users can see links]

^ Are initially set with values "false". Later on, when something is triggered (PM me to know what) they are set to true and this disables me from accessing the "code" that these two are hiding when set to "true". Does anyone see anything I am missing here? Is there another variable I should be altering to enable myself to use this code again?

Please discuss here. :)

@Soredavide <-- Cause I know you'll have a good idea on this.

j03
02-27-2012, 02:05 PM
Bump bump