void RemoveAxe(GameObject sender) { if (AxesAbailables.Count > 0 && sender != null) { for (int i = 0; i < AxesAbailables.Count; i++) { AxesAbailable v = AxesAbailables[i]; if (v.Object != null && v.Object.Position.Distance(sender.Position) < 30) { AxesAbailables.RemoveAt(i); break; } } } }
public void CheckCatch() { if (AxesAbailables.Count > 0) { foreach (AxesAbailable obj in AxesAbailables) { if (Utils.TickCount - obj.Time > 1200) { //AxesAbailables.Remove(obj); } } Chat.Print(((Config.GetListIndex("CatchMode") == 0 && (Program.MainOrbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None)) || (Config.GetListIndex("CatchMode") == 1)).ToString()); if (Config != null && Config.GetKeyToggle("Catch") && ((Config.GetListIndex("CatchMode") == 0 && (Program.MainOrbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None)) || (Config.GetListIndex("CatchMode") == 1))) { CheckAxe v = new CheckAxe(true, true); for (int i = 0; i < AxesAbailables.Count; i++) { if (AxesAbailables[i].Object != null) { AxesAbailable a = AxesAbailables[i]; CheckAxe c2 = CheckAxe(a.Object, a.Time); if (!c2.CanMove) { v.CanMove = false; } if (!c2.CanAttack) { v.CanAttack = false; } } } if (AxesAbailables[0].Object != null) { if (v.CanAttack) { Program.MainOrbwalker.SetAttack(true); } else { Program.MainOrbwalker.SetAttack(false); } if (v.CanMove) { Program.MainOrbwalker.SetMovement(true); } else { Program.MainOrbwalker.SetMovement(false); if (!InAxeRadius(AxesAbailables[0].Object) && Orbwalking.CanMove(0.2f)) { EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, AxesAbailables[0].Object.Position); } } } } else { Program.MainOrbwalker.SetAttack(true); Program.MainOrbwalker.SetMovement(true); } } else { Program.MainOrbwalker.SetMovement(true); Program.MainOrbwalker.SetAttack(true); } }