1. Buka src/Network/Receive/serverType0.pm
2. Lalu tekan tombol [CTRL] + F (Search) Cari kata berikut sub inventory_items_stackable {
3. Nah pada
sub inventory_items_stackable {
my ($self, $args) = @_;
return unless changeToInGameState();
for my $item ($self->parse_items_stackable($args)) {
my ($local_item, $add);
unless($local_item = $char->inventory->getByServerIndex($item->{index})) {
$local_item = new Actor::Item();
$add = 1;
}
for (keys %$item) {
$local_item->{$_} = $item->{$_};
}
if (defined $char->{arrow} && $local_item->{index} == $char->{arrow}) {
$local_item->{equipped} = 32768;
$char->{equipment}{arrow} = $local_item;
}
$local_item->{name} = itemName($local_item);
$char->inventory->add($local_item) if ($add);
debug "Inventory: $local_item->{name} ($local_item->{invIndex}) x $local_item->{amount} - " .
"$itemTypes_lut{$local_item->{type}}\n", "parseMsg";
Plugins::callHook('packet_inventory', {index => $local_item->{invIndex}, item => $local_item});
}
$ai_v{'inventory_time'} = time + 1;
$ai_v{'cart_time'} = time + 1;
}
Itulah yang harus diganti dengan berikut ini
sub inventory_items_stackable {
my ($self, $args) = @_;
return unless changeToInGameState();
my $newmsg;
$self->decrypt(\$newmsg, substr($args->{RAW_MSG}, 4));
my $msg = substr($args->{RAW_MSG}, 0, 4).$newmsg;
my $unpack = $self->items_stackable($args);
for (my $i = 4; $i < $args->{RAW_MSG_SIZE}; $i += $unpack->{len}) {
my ($item, $local_item, $add);
@{$item}{@{$unpack->{keys}}} = unpack($unpack->{types}, substr($msg, $i, $unpack->{len}));
unless($local_item = $char->inventory->getByServerIndex($item->{index})) {
$local_item = new Actor::Item();
$add = 1;
}
foreach (@{$unpack->{keys}}) {
$local_item->{$_} = $item->{$_};
}
if (defined $char->{arrow} && $local_item->{index} == $char->{arrow}) {
$local_item->{equipped} = 32768;
$char->{equipment}{arrow} = $local_item;
}
$local_item->{name} = itemName($local_item);
$char->inventory->add($local_item) if ($add);
debug "Inventory: $local_item->{name} ($local_item->{invIndex}) x $local_item->{amount} - " .
"$itemTypes_lut{$local_item->{type}}\n", "parseMsg";
Plugins::callHook('packet_inventory', {index => $local_item->{invIndex}, item => $local_item});
}
$ai_v{'inventory_time'} = time + 1;
$ai_v{'cart_time'} = time + 1;
}