diff --git a/control/config.txt b/control/config.txt index ed6a1e2ea7..b8d26f6d31 100644 --- a/control/config.txt +++ b/control/config.txt @@ -86,6 +86,7 @@ attackCanSnipe 0 attackCheckLOS 0 attackRouteMaxPathDistance 13 attackLooters 0 +attackLooters_dist 1 attackChangeTarget 1 aggressiveAntiKS 0 diff --git a/src/Network/Receive.pm b/src/Network/Receive.pm index d37402fe22..4e4f904718 100644 --- a/src/Network/Receive.pm +++ b/src/Network/Receive.pm @@ -7052,7 +7052,7 @@ sub item_disappeared { || ($control->{attack_sp} ne "" && $control->{attack_sp} > $char->{sp}) ); } - if (distance($item->{pos}, $monster->{pos}) == 0) { + if (distance($item->{pos}, $monster->{pos}) <= ($config{attackLooters_dist} || 0)) { attack($monster->{ID}); message TF("Attack Looter: %s looted %s\n", $monster->nameIdx, $item->{name}), "looter"; last;