Valkyr Posted September 12, 2015 Posted September 12, 2015 context.getTaskExecutor().execute( new SelectionTask(context, () -> !context.getInventory().contains(food), // When out of food new WebWalkTask(context, context.getWebWalker().getClosest(bank)) .chain(new WithdrawTask(context, food, -1)), new ExecuteOnConditionTask(context, context::isIdle, // Only run when idle new WebWalkTask(context, context.getWebWalker().getClosest(FLESH_CRAWLER)) .chain(new InteractEntityTask(context, FLESH_CRAWLER, ATTACK)) .chain(new ExecuteOnConditionTask(context, () -> context.getCombat().getHealthPercent() < 25, // Eat when HP is low new InteractItemTask(context, food, EAT)))) )); 4
cutvision Posted September 13, 2015 Posted September 13, 2015 Only if I knew what this meant... Why did he say Eww? Anything wrong with what he posted?
Valkyr Posted September 13, 2015 Author Posted September 13, 2015 nice new frameowrk valk, izi 2 read my code is self-documenting 2