Skip to content

Commit

Permalink
add attackLooters_dist (OpenKore#3788)
Browse files Browse the repository at this point in the history
  • Loading branch information
elvisoliveira authored Sep 15, 2023
1 parent ad601ad commit bb4dd45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions control/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ attackCanSnipe 0
attackCheckLOS 0
attackRouteMaxPathDistance 13
attackLooters 0
attackLooters_dist 1
attackChangeTarget 1
aggressiveAntiKS 0

Expand Down
2 changes: 1 addition & 1 deletion src/Network/Receive.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bb4dd45

Please sign in to comment.