public void Rotation() { while (_isLaunched) { try { if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Me.IsDead) { UseBuffs(); if (Fight.InFight) { if (Me.HasBuff("Ghost Wolf") && RotationFramework.Units.Any(u => u.IsTargetingMe && !u.IsPlayer())) { Lua.RunMacroText("/cancelaura Ghost Wolf"); } RotationFramework.RunRotation(RotationSpells); } } }catch (Exception e) { Logging.WriteError("ExampleClass ERROR:" + e); } Thread.Sleep(Usefuls.LatencyReal); } }
public void Dispose() { _isLaunched = false; RotationFramework.Dispose(); MovementEvents.OnMovementPulse -= LongGhostWolfHandler; MovementEvents.OnMoveToPulse -= GhostWolfHandler; }
public void Initialize() { ExampleSettings.Load(); wManagerSetting.CurrentSetting.UseLuaToMove = true; RotationFramework.Initialize(ExampleSettings.CurrentSetting.SlowRotation, ExampleSettings.CurrentSetting.FrameLock); MovementEvents.OnMovementPulse += LongGhostWolfHandler; MovementEvents.OnMoveToPulse += GhostWolfHandler; _isLaunched = true; RotationSpells.Sort((a, b) => a.Priority.CompareTo(b.Priority)); Rotation(); }