private async Task RandomJump() { if (classConfiguration.Jump.MillisecondsSinceLastClick > random.Next(10000, 15000)) { await input.TapJump($"{GetType().Name}: Random jump"); } }
private async Task RandomJump() { if (input.ClassConfig.Jump.MillisecondsSinceLastClick > random.Next(5000, 7000)) { await input.TapJump(); } }
private async Task RandomJump() { if (classConfiguration.Jump.MillisecondsSinceLastClick > 10000) { if (random.Next(1) == 0 /*&& HasBeenActiveRecently()*/) { logger.LogInformation($"Random jump"); await input.TapJump(); } } }
private async Task RandomJump() { if ((DateTime.Now - LastJump).TotalSeconds > 5) { if (random.Next(1) == 0) { logger.LogInformation($"Random jump"); await input.TapJump(); } } LastJump = DateTime.Now; }
private async Task StopDrowning() { await input.TapJump("Drowning! Swim up"); await wait.Update(1); }
public override async Task PerformAction() { if (playerReader.PlayerBitValues.IsMounted) { await input.Dismount(); } if (NeedsToReset) { this.stuckDetector.ResetStuckParameters(); } var location = playerReader.PlayerLocation; if (!playerReader.PlayerBitValues.PlayerInCombat) { playerWasInCombat = false; } else { // we are in combat if (!playerWasInCombat && HasPickedUpAnAdd) { logger.LogInformation("WARN Bodypull -- Looks like we have an add on approach"); logger.LogInformation($"Combat={this.playerReader.PlayerBitValues.PlayerInCombat}, Is Target targetting me={this.playerReader.PlayerBitValues.TargetOfTargetIsPlayer}"); await this.stopMoving.Stop(); await input.TapClearTarget(); await input.TapStopKey(); if (playerReader.PetHasTarget) { await this.input.TapTargetPet(); await this.input.TapTargetOfTarget(); } } playerWasInCombat = true; } await this.TapInteractKey("ApproachTargetAction 1"); await this.playerReader.WaitForNUpdate(1); var newLocation = playerReader.PlayerLocation; if ((location.X == newLocation.X && location.Y == newLocation.Y && SecondsSinceLastFighting > 5) || this.playerReader.LastUIErrorMessage == UI_ERROR.ERR_AUTOFOLLOW_TOO_FAR) { input.SetKeyState(ConsoleKey.UpArrow, true, false, "ApproachTargetAction"); await Wait(100, () => false); await input.TapJump(); this.playerReader.LastUIErrorMessage = UI_ERROR.NONE; } await RandomJump(); // int approachSeconds = (int)(this.stuckDetector.actionDurationSeconds); if (approachSeconds > 20) { await this.stuckDetector.Unstick(); await this.TapInteractKey("ApproachTargetAction unstick"); await Task.Delay(250); } if (playerReader.WithInCombatRange && ( playerReader.PlayerClass == PlayerClassEnum.Rogue || playerReader.PlayerClass == PlayerClassEnum.Warrior || playerReader.PlayerClass == PlayerClassEnum.Paladin)) { Log("WithInCombatRange -- Strictly melee -- Wait a moment"); await stopMoving.Stop(); await this.TapInteractKey("ApproachTargetAction engage"); await Task.Delay(200); } }