public override void Execute() { // do i need to loot units if (UnitLootList.Count > 0) { AmeisenBotStateMachine.SetState(AmeisenBotState.Looting); return; } // do i need to follow someone if (IsUnitToFollowThere()) { AmeisenBotStateMachine.SetState(AmeisenBotState.Following); } // do we need to repair our equipment if (DateTime.Now - LastRepairCheck > TimeSpan.FromSeconds(12)) { if (IsRepairNpcNear() && CharacterManager.Equipment.Equipment.Any(e => ((double)e.Value.MaxDurability / (double)e.Value.Durability) < 0.2)) { AmeisenBotStateMachine.SetState(AmeisenBotState.Repairing); } LastRepairCheck = DateTime.Now; } // do we need to sell stuff if (DateTime.Now - LastBagSlotCheck > TimeSpan.FromSeconds(5) && CharacterManager.Inventory.Items.Any(e => e.Price > 0)) { if (IsVendorNpcNear() && HookManager.GetFreeBagSlotCount() < 4) { AmeisenBotStateMachine.SetState(AmeisenBotState.Selling); } LastBagSlotCheck = DateTime.Now; } // do buffing etc... CombatClass?.OutOfCombatExecute(); }