mirror of
https://github.com/seppukudevelopment/seppuku
synced 2025-02-12 09:38:59 +00:00
CrystalAura: Added attackLocalDistance
This commit is contained in:
parent
205fb54e81
commit
0b910c4bda
@ -48,6 +48,7 @@ public final class CrystalAuraModule extends Module {
|
||||
public final Value<Float> attackDelay = new Value<Float>("AttackDelay", new String[]{"AttackDelay", "AttackDel", "Del"}, "The delay to attack in milliseconds", 50.0f, 0.0f, 500.0f, 1.0f);
|
||||
public final Value<Float> attackRadius = new Value<Float>("AttackRadius", new String[]{"ARange", "HitRange", "AttackDistance", "AttackRange", "ARadius"}, "The maximum range to attack crystals", 4.0f, 0.0f, 7.0f, 0.1f);
|
||||
public final Value<Float> attackMaxDistance = new Value<Float>("AttackMaxDistance", new String[]{"AMaxRange", "MaxAttackRange", "AMaxRadius", "AMD", "AMR"}, "Range around the enemy crystals will be attacked", 8.0f, 1.0f, 20.0f, 1.0f);
|
||||
public final Value<Float> attackLocalDistance = new Value<Float>("AttackLocalDistance", new String[]{"ALocalRange", "LocalAttackRange", "ALocalRadius", "ALD", "ALR"}, "Enemy must be within this range to start attacking", 8.0f, 1.0f, 20.0f, 1.0f);
|
||||
public final Value<Boolean> attackWhenEmpty = new Value<Boolean>("AttackWhenEmpty", new String[]{"AWhenEmpty"}, "Continue to attack other crystals when we don't have any left", true);
|
||||
public final Value<Boolean> place = new Value<Boolean>("Place", new String[]{"AutoPlace"}, "Automatically place crystals", true);
|
||||
public final Value<Boolean> placeRapid = new Value<Boolean>("PlaceRapid", new String[]{"RapidPlace"}, "Remove place delay", true);
|
||||
@ -110,6 +111,12 @@ public final class CrystalAuraModule extends Module {
|
||||
|
||||
switch (event.getStage()) {
|
||||
case PRE:
|
||||
if (this.currentAttackPlayer != null && this.currentAttackEntity != null) {
|
||||
if (this.currentAttackPlayer.getDistance(this.currentAttackEntity) > this.attackMaxDistance.getValue()) {
|
||||
this.currentAttackEntity = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.currentAttackPlayer != null && this.currentPlacePosition != null) {
|
||||
if (this.currentAttackPlayer.getDistance(this.currentPlacePosition.getX(), this.currentPlacePosition.getY(), this.currentPlacePosition.getZ()) > this.placeMaxDistance.getValue()) {
|
||||
this.currentPlacePosition = null;
|
||||
@ -132,7 +139,7 @@ public final class CrystalAuraModule extends Module {
|
||||
|
||||
// target reset
|
||||
if (currentAttackPlayer != null) {
|
||||
if ((mc.player.getDistance(this.currentAttackPlayer) > this.attackMaxDistance.getValue()) || !this.currentAttackPlayer.isEntityAlive()) {
|
||||
if ((mc.player.getDistance(this.currentAttackPlayer) > this.attackLocalDistance.getValue()) || !this.currentAttackPlayer.isEntityAlive()) {
|
||||
this.currentAttackPlayer = null;
|
||||
this.currentPlacePosition = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user