Exemple #1
0
        public override void Run()
        {
            CurrentLootable = Lootables.FirstOrDefault() ?? WoWUnit.Invalid;

            if (CurrentLootable != null && CurrentLootable.IsValid)
            {
                if (CurrentLootable.Distance > 4f)
                {
                    if (Mover.Status != MovementStatus.Moving || Mover.Destination != CurrentLootable.Location)
                    {
                        _parent.Print("Moving to loot {0}", CurrentLootable.Name);
                        if (!Mover.PathTo(CurrentLootable.Location))
                        {
                            _parent.Blacklisted.Add(CurrentLootable.Guid);
                        }
                    }
                    _parent.FSM.DelayNextPulse(500);
                }
                else
                {
                    CurrentLootable.Interact();
                    if (Manager.LocalPlayer.IsLooting)
                    {
                        WoWScript.ExecuteNoResults(
                            "local res = GetCVar(\"AutoLootDefault\") if res == \"0\" then for i = GetNumLootItems(), 1, -1 do LootSlot(i) end end CloseLoot()");
                    }
                    _parent.FSM.DelayNextPulse(2000);
                }
            }
        }
Exemple #2
0
        public override void Run()
        {
            CurrentEnemy = Enemies.FirstOrDefault() ?? WoWUnit.Invalid;

            if (CurrentEnemy != null && CurrentEnemy.IsValid)
            {
                if (CurrentEnemy.Distance > 20f) //tmp distance
                {
                    if (Mover.Status != MovementStatus.Moving || CurrentEnemy.Location.DistanceTo(Mover.Destination) > 15f)
                    {
                        _parent.Print("Moving to {0}", CurrentEnemy.Name);
                        if (!Mover.PathTo(CurrentEnemy.Location))
                        {
                            _parent.Blacklisted.Add(CurrentEnemy.Guid);
                        }
                    }
                    _parent.FSM.DelayNextPulse(500);
                }
                else
                {
                    if (!Manager.LocalPlayer.IsCasting)
                    {
                        Combat.Brain.Pull(CurrentEnemy);
                    }
                    _parent.FSM.DelayNextPulse(1000);
                }
            }
        }