public override void DoWork() { if (ObjectManager.MyPlayer.IsAlive) { CombatHandler.RunningAction(); } if (GrindingSettings.Jump && _jumpRandomly.IsReady) { MoveHelper.Jump(); _jumpRandomly = new Ticker(_random.Next(4, 8) * 1000); } GrindingEngine.Navigation.Pulse(); Thread.Sleep(10); }
public override void DoWork() { FlyingEngine.Navigator.Stop(); if (FlyingSettings.SendKeyOnStartCombat) { KeyHelper.SendKey("CombatStart"); } CombatHandler.StartCombat(_unit); FlyingEngine.UpdateStats(0, 1, 0); if (ObjectManager.MyPlayer.IsDead) { return; } CombatHandler.RunningAction(); }
public override void DoWork() { FlyingEngine.Navigator.Stop(); if (FlyingSettings.StopOnDeath) { LazyHelpers.StopAll("We died"); } Logging.Write("Going to ress"); FlyingEngine.UpdateStats(0, 0, 1); Location pos = ObjectManager.MyPlayer.Location; Frame frameByName = InterfaceHelper.GetFrameByName("StaticPopup1Button1"); try { frameByName.LeftClick(); Thread.Sleep(2000); frameByName.LeftClick(); Thread.Sleep(3000); var maxTimeout = new Ticker(8000); if (!ObjectManager.MyPlayer.IsGhost && !maxTimeout.IsReady) { frameByName.LeftClick(); Thread.Sleep(5000); } } catch { } if (FlyingSettings.FindCorpse && Mount.IsMounted()) { KeyHelper.PressKey("Space"); Thread.Sleep(20000); KeyHelper.ReleaseKey("Space"); var toLong = new Ticker(150000); FlyingEngine.Navigator.SetDestination(new Location(pos.X, pos.Y, ObjectManager.MyPlayer.Location.Z)); FlyingEngine.Navigator.Start(); while (ObjectManager.MyPlayer.IsGhost) { if (pos.DistanceToSelf2D < 20) { FlyingEngine.Navigator.Stop(); Logging.Write("Looks like we found our corpse"); DescentToCorpse(); Thread.Sleep(2000); ApproachPosFlying.Approach(pos, 3); frameByName.LeftClick(); var timeout = new Ticker(5000); while (ObjectManager.MyPlayer.IsGhost && !timeout.IsReady) { Thread.Sleep(10); } break; } if (!Mount.IsMounted() && ObjectManager.MyPlayer.IsGhost) { Logging.Write("We are not mounted, cannot find corpse"); toLong.ForceReady(); break; } if (toLong.IsReady && ObjectManager.MyPlayer.IsGhost) { Logging.Write("We never found our corpse :("); toLong.ForceReady(); break; } } } else { TrySpiritRess(); } FlyingEngine.Navigator.Stop(); MoveHelper.ReleaseKeys(); Thread.Sleep(1500); if (!ObjectManager.MyPlayer.IsAlive) { if (FlyingSettings.FindCorpse) { Logging.Write("Could not find the corpse... trying to make it anyway"); InterfaceHelper.GetFrameByName("GhostFrame").LeftClick(); Thread.Sleep(5000); TrySpiritRess(); if (!ObjectManager.MyPlayer.IsAlive) { LazyHelpers.StopAll("Could not ress :("); } } else { LazyHelpers.StopAll("Could not ress :("); } } Logging.Write("Ress worked :)"); FlyingEngine.Navigator.Stop(); if (ObjectManager.MyPlayer.HasBuff(15007) && FlyingSettings.WaitForRessSick) { Logging.Write("Waiting for ress sickness"); Mount.MountUp(); MoveHelper.Jump(6000); if (!Mount.IsMounted()) { Mount.MountUp(); MoveHelper.Jump(6000); } while (ObjectManager.MyPlayer.HasBuff(15007)) { Thread.Sleep(5000); } } else { CombatHandler.RunningAction(); } }
public override void DoWork() { Logging.Debug("Approaching: " + _node.Location); if (_nodeLoc == _node.Location) { if (_approachTimes > 6) { Logging.Write("We tried to approach the same node more than 6 times... does not make sense abort"); FlyingBlackList.Blacklist(_node, 120, true); return; } _approachTimes++; } else { _nodeLoc = _node.Location; _approachTimes = 0; } if (Gather.GatherNode(_node)) { FlyingEngine.UpdateStats(1, 0, 0); if (FlyingSettings.WaitForLoot) { while (ObjectManager.MyPlayer.LootWinOpen && !TimeOut.IsReady) { Thread.Sleep(100); } Latency.Sleep(1300); } if (ObjectManager.MyPlayer.IsInFlightForm) { MoveHelper.Jump(); } } else { if (ObjectManager.ShouldDefend && Mount.IsMounted()) { Logging.Write("ShouldDefend while mounted? Odd"); FlyingBlackList.Blacklist(_node, 120, true); } } if (!ObjectManager.MyPlayer.InVashjir && ObjectManager.MyPlayer.IsSwimming) { Logging.Write("We got into the water, blacklisting node"); FlyingBlackList.AddBadNode(_node); KeyHelper.SendKey("Space"); Thread.Sleep(3000); KeyHelper.ReleaseKey("Space"); } if (!ObjectManager.ShouldDefend && !ObjectManager.MyPlayer.IsInCombat) { LootedBlacklist.Looted(_node); if (ObjectManager.MyPlayer.InVashjir) { KeyHelper.SendKey("Space"); Thread.Sleep(1000); KeyHelper.ReleaseKey("Space"); } } if (!Mount.IsMounted()) { CombatHandler.RunningAction(); CombatHandler.Rest(); } Stuck.Reset(); if (FlyingEngine.CurrentProfile.NaturalRun) { FlyingEngine.Navigation.UseNearestWaypoint(); } else { FlyingEngine.Navigation.UseNearestWaypoint(10); } }