Could you tell me where do you get the modified packet ids from (or how) ?
Here's an example of what I am talking about:
Code: Select all
sub new {
my ($class) = @_;
my $self = $class->SUPER::new(@_);
my %packets = (
'0202' => ['actor_look_at', 'v C', [qw(head body)]],
'022D' => ['map_login', 'a4 a4 a4 V C', [qw(accountID charID sessionID tick sex)]],
'035F' => ['sync', 'V', [qw(time)]],
'0361' => ['homunculus_command', 'v C', [qw(commandType, commandID)]],
'0362' => ['item_drop', 'v2', [qw(index amount)]],
'0364' => ['storage_item_remove', 'v V', [qw(index amount)]],
'0369' => ['actor_action', 'a4 C', [qw(targetID type)]],
'0437' => ['character_move', 'a3', [qw(coords)]],
'0438' => ['skill_use_location', 'v4', [qw(lv skillID x y)]],
'07E4' => ['item_take', 'a4', [qw(ID)]],
'07EC' => ['storage_item_add', 'v V', [qw(index amount)]],
'0802' => ['party_join_request_by_name', 'a24', [qw(partyName)]],
'096A' => ['actor_info_request', 'a4', [qw(ID)]],
);
$self->{packet_list}{$_} = $packets{$_} for keys %packets;
my %handlers = qw(
master_login 02B0
actor_look_at 0202
map_login 022D
sync 035F
homunculus_command 0361
item_drop 0362
storage_item_remove 0364
actor_action 0369
character_move 0437
skill_use_location 0438
item_take 07E4
storage_item_add 07EC
party_join_request_by_name 0802
actor_info_request 096A
);
$self->{packet_lut}{$_} = $handlers{$_} for keys %handlers;
return $self;
}