ask for data format
src\Network\Receive\ServerType0.pm
src\Network\Send\ServerType0.pm
src\Commands.pm
'0131' => ['vender_found', 'a4 A80', [qw(ID title)]],
what is qw?
i assume qw is packet contains
that i can select packet ID or title
$args->{ID}
$args->{title}
if i unpack $args i find 3101 (swap?) that meaning case 0131?
sub vender_found {
my ($self, $args) = @_;
my $ID = $args->{ID};
my $arg = $args;
my $un = unpack("H*",$args);
my $raw = $args->{RAW_MSG};
my $unr = unpack("h*",$raw);
my $idi = unpack("I*",$ID);
my $idx = unpack("H*",$ID);
my $title = $args->{title};
my $player = Actor::get($ID);
my $name = $player->name;
my $pid = $player->{binID};
message TF("ID = %s\narg = %s\nun = %s\nraw = %s\nunr = %s\nidi = %s\nidx = %s\ntitle = %s\nname = %s\npid = %s\n",$ID, $arg, $un, $raw, $unr, $idi, $idx, $title, $name, $pid);
if (!$venderLists{$ID} || !%{$venderLists{$ID}}) {
binAdd(\@venderListsID, $ID);
Plugins::callHook('packet_vender', {
ID => $ID,
arg => $args,
un => $un,
raw => $raw,
unr => $unr,
idi => $idi,
idx => $idx,
title => $title,
name => $name,
pid => $pid
});
}
$venderLists{$ID}{title} = bytesToString($args->{title});
$venderLists{$ID}{id} = $ID;
}
the log messages contains:
the thing i want to ask
what is $args that contains HASH(0x4d6a05c)
and meaning of HASH(0x4d6a05c) and how to process this data?
ID = _T*
arg = HASH(0x4d6a05c)
un = 484153482830783464366130356329
raw = 1☺_T* -23:06 GPL kosongin
Kafra
unr =
31015f542a002d32333a30362047504c206b6f736f6e67696e204b6166726100000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000
idi = 2774111
idx = 5f542a00
title = -23:06 GPL kosongin Kafra
name = Unknown #2774111
pid = 102
pl 102
------------------ Player Info ------------------
Unknown #2774111 (102)
Account ID: 2774111 (Hex: 5F 54 2A 00)
Party:
Guild:
Guild title:
Position: 181, 116 (Utara of you: 8 degrees)
Level: 64 Distance: 13.2
Sex: Laki-Laki Class: Alchemist
-------------------------------------------------
Body direction: Utara (0) Head direction: Utara (0)
Weapon: Unknown #13424
Shield: None
Upper headgear: Nothing Middle headgear: Nothing
Lower headgear: Nothing Hair color: Coklat Gelap (0)
Walk speed: 0.15 secs per block
Player is sitting.
------------------- Statuses --------------------
Statuses: Level 1 Cart
-------------------------------------------------
when i try to visit vender list by name of vender id
i try
eval $messageSender->sendEnteringVender((0x4c5b184))
Undefined subroutine &main::HASH called at (eval 300) line 1.
eval $messageSender->sendEnteringVender(0x4c5b184)
i got dc
at src\Network\Send\ServerType0.pm
sub sendEnteringVender {
my ($self, $ID) = @_;
my $msg = pack("C*", 0x30, 0x01) . $ID;
$self->sendToServer($msg);
debug "Sent Entering Vender: ".getHex($ID)."\n", "sendPacket", 2;
debug " $self $ID\n", "sendPacket", 2;
}
Sent Entering Vender: 5D 1C 1D 00
Network::Send::idRO=HASH(0x4c5b184) ]∟↔
what code format i need to fill data eval $messageSender->sendEnteringVender(?????)
i try to simply entering vender just by comand with venderID
without scan vender index same as command.pm sub cmdVender {
but not yet to work
ask for data format src\Network\Receive\ServerType0.pm
Moderator: Moderators
Re: ask for data format src\Network\Receive\ServerType0.pm
'qw' is like an Enum in Perl.
so the packet upack each key, and name them according to what contained in 'qw'
you should read the 'perlman' (Perl Manual) on pack/unpack before asking such questions.
so the packet upack each key, and name them according to what contained in 'qw'
you should read the 'perlman' (Perl Manual) on pack/unpack before asking such questions.
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Re: ask for data format src\Network\Receive\ServerType0.pm
Actually, it's just a list.kLabMouse wrote:'qw' is like an Enum in Perl
qw(ab cd ef) === 'ab', 'cd', 'ef'