# Send Packet Open Buying Store
Code: Select all
sub sendOpenBuying {
my ($self, $title, $items, $zeny) = @_;
my $length = 0x59 + 0x08 * @{$items};
my $msg = pack("C*", 0x11, 0x08).
pack("v*", $length).
pack("V*", $zeny).
pack("C*", 0x01).
pack("a80", stringToBytes($title));
foreach my $item (@{$items}) {
$msg .= pack("v1", $item->{nameID}).
pack("v1", $item->{amount}).
pack("V1", $item->{price});
}
$self->sendToServer($msg);
}