diff --git a/control/config.txt b/control/config.txt index b8d26f6d31..8945eada52 100644 --- a/control/config.txt +++ b/control/config.txt @@ -382,6 +382,9 @@ mercenary_attackAuto 2 mercenary_attackAuto_party 1 mercenary_attackAuto_notInTown 1 mercenary_attackAuto_inLockOnly 1 +mercenary_attackAuto_notWhile_storageAuto 1 +mercenary_attackAuto_notWhile_buyAuto 1 +mercenary_attackAuto_notWhile_sellAuto 1 mercenary_attackAuto_considerDamagedAggressive 0 mercenary_attackBeyondMaxDistance_waitForAgressive 1 mercenary_attackAuto_onlyWhenSafe 0 @@ -442,6 +445,9 @@ homunculus_attackAuto 2 homunculus_attackAuto_party 1 homunculus_attackAuto_notInTown 1 homunculus_attackAuto_inLockOnly 1 +homunculus_attackAuto_notWhile_storageAuto 1 +homunculus_attackAuto_notWhile_buyAuto 1 +homunculus_attackAuto_notWhile_sellAuto 1 homunculus_attackAuto_considerDamagedAggressive 0 homunculus_attackBeyondMaxDistance_waitForAgressive 1 homunculus_attackAuto_onlyWhenSafe 0 diff --git a/src/AI/Slave.pm b/src/AI/Slave.pm index b552637d19..033287297c 100644 --- a/src/AI/Slave.pm +++ b/src/AI/Slave.pm @@ -375,6 +375,9 @@ sub processAutoAttack { && ((AI::action ne "move" && AI::action ne "route") || blockDistance($char->{pos_to}, $slave->{pos_to}) <= $config{$slave->{configPrefix}.'followDistanceMax'}) && (!$config{$slave->{configPrefix}.'attackAuto_notInTown'} || !$field->isCity) && ($config{$slave->{configPrefix}.'attackAuto_inLockOnly'} <= 1 || $field->baseName eq $config{'lockMap'}) + && (!$config{$slave->{configPrefix}.'attackAuto_notWhile_storageAuto'} || !AI::inQueue("storageAuto")) + && (!$config{$slave->{configPrefix}.'attackAuto_notWhile_buyAuto'} || !AI::inQueue("buyAuto")) + && (!$config{$slave->{configPrefix}.'attackAuto_notWhile_sellAuto'} || !AI::inQueue("sellAuto")) ) { # If we're in tanking mode, only attack something if the person we're tanking for is on screen.