前のほうで出てた
} elsif ($switch eq "009E") {
$ID = substr($msg, 2, 4);
$type = unpack("S1",substr($msg, 6, 2));
$coords{'x'} = unpack("S1", substr($msg, 9, 2));
$coords{'y'} = unpack("S1", substr($msg, 11, 2));
$dist = distance(\%coords, \%{$chars[$config{'char'}]{'pos_to'}});
 if ($dist < 3) {
  sendTake(\$remote_socket, $ID);
 }
これだけどいれる場所は
約3558行目あたり
print "Item Exists: $items{$ID}{'name'} ($items{$ID}{'binID'}) x $items{$ID}{'amount'}\n";
のこれと
if (!%{$items{$ID}}) {
の間とすり替えでOKですか?