How to find packets
Ok, in this tutorial I'll show you how to find packets, let's start!
We must go to the function that handel the packets that the swf receive, it's located in net->ConnectionManager.html.
There are too much letters I know.
We must search "private function onData(event: DataEvent) : void" this is the function we need.
There are a lot of _loc_ but we must search for something special: _loc_3.
Code:
var _loc_2:* = String(event.data); _loc_3 = _loc_2.split(ATTRIBUTE_SEPERATOR)
Code:
switch(_loc_3[1])
Ok, let's take a look at the first case:
Code:
case ServerCommands.PET:
Code:
public static const PET:String = "PET";
Code:
this.petAssembly.assembleCommand(_loc_3);
Code:
public function assembleCommand(param1:Array) : void
{
var _loc_2:* = param1[2];
if (this.delegateDict[_loc_2] != null)
{
var _loc_3:* = this.delegateDict;
_loc_3[_loc_2](param1);
}
else
{
this.playSound(73);
}// end else if
return;
}// end function
Code:
if (this.delegateDict[_loc_2] != null)
Code:
var _loc_2:* = param1[2];
Code:
private function initDelegateDict() : void
Code:
this.delegateDict[ServerCommands.REPAIR_PET] = this.assemblePetRepair;
Code:
public static const REPAIR_PET:String = "R";
Code:
private function assemblePetRepair(param1:Array) : void
{
this.playSound(71);
this.toggleRepairButtonVisbility(false);
return;
}// end function
Code:
private function assembleStopLaserAttack(param1:Array) : void
{
var _loc_2:* = 2;
var _loc_3:* = int(param1[++_loc_2]);
var _loc_4:* = this.main.screenManager.map; _loc_4.getCombatManager().removeLaserAttack(_loc_3);
return;
}// end function
Code:
var _loc_3:* = int(param1[++_loc_2]);
Code:
var _loc_4:* = this.main.screenManager.map; _loc_4.getCombatManager().removeLaserAttack(_loc_3);
Code:
public function removeLaserAttack(param1:int, param2:Boolean = true) : void
{
var _loc_3:* = this.laserAttacks[int(param1)];
if (_loc_3 != null)
{
if (param2)
{
_loc_3.cleanup();
}// end if
delete this.laserAttacks[int(param1)];
}// end if
return;
}// end function
Easy right? Maybe it's a bit boring but it's easy, I think this is called reverse engeneery.
What do we know now?
-How to find packets
-Pet repair packet: 0|PET|R
-Stop pet laser attack packet: 0|PET|SL| petID
See you!!







