ThatGamerBlue Posted May 7, 2018 Share Posted May 7, 2018 Quote Link to comment Share on other sites More sharing options...
ez11 Posted May 7, 2018 Share Posted May 7, 2018 mouse.move(random(132.35, ), random(210.0112, )); Quote Link to comment Share on other sites More sharing options...
Apaec Posted May 7, 2018 Share Posted May 7, 2018 aren't all scripts state based? Quote Link to comment Share on other sites More sharing options...
Vilius Posted May 7, 2018 Share Posted May 7, 2018 2 hours ago, Apaec said: aren't all scripts state based? Technically yes, if they ude the task/node framework. Some frameworks are Event based with break conditions and other crap. Quote Link to comment Share on other sites More sharing options...
Alek Posted May 9, 2018 Share Posted May 9, 2018 boolean shouldExecute() { return getObjects.getAll().get("ABC") != null } void execute() { return getObjects.getAll().get("ABC").interact(); } 1 1 Quote Link to comment Share on other sites More sharing options...
Vilius Posted May 9, 2018 Share Posted May 9, 2018 24 minutes ago, Alek said: boolean shouldExecute() { return getObjects.getAll().get("ABC") != null } void execute() { return getObjects.getAll().get("ABC").interact(); } Syntax error on line 2, missing ; 2 Quote Link to comment Share on other sites More sharing options...
Alek Posted May 9, 2018 Share Posted May 9, 2018 Just now, Vilius said: Syntax error on line 2, missing ; it makes the task node system faster, less characters to compute. Quote Link to comment Share on other sites More sharing options...
Vilius Posted May 9, 2018 Share Posted May 9, 2018 Just now, Alek said: it makes the task node system faster, less characters to compute. No need to compile when you are missing parameters on line 6 cause eitherway you wouldnt do an action Quote Link to comment Share on other sites More sharing options...
FrostBug Posted May 9, 2018 Share Posted May 9, 2018 14 minutes ago, Vilius said: Syntax error on line 2, missing ; Not even commenting on the fact that he's using a List like a Map 1 Quote Link to comment Share on other sites More sharing options...
liverare Posted May 9, 2018 Share Posted May 9, 2018 public enum Task { OPEN_BANK("Open bankies") { @Override public boolean validate(Bot bot) { return !bot.bank.isOpen(); } @Override public int execute(Bot bot) throws InterruptedException { if (bot.bank.open()) { bot.logger.debug("*YAY*"); } return 250; } } ; private final String name; private Task(String name) { this.name = name; } public abstract boolean validate(Bot bot); public abstract int execute(Bot bot) throws InterruptedException; @Override public String toString() { return name; } } Quote Link to comment Share on other sites More sharing options...
Alek Posted May 9, 2018 Share Posted May 9, 2018 1 hour ago, liverare said: public enum Task { OPEN_BANK("Open bankies") { @Override public boolean validate(Bot bot) { return !bot.bank.isOpen(); } @Override public int execute(Bot bot) throws InterruptedException { if (bot.bank.open()) { bot.logger.debug("*YAY*"); } return 250; } } ; private final String name; private Task(String name) { this.name = name; } public abstract boolean validate(Bot bot); public abstract int execute(Bot bot) throws InterruptedException; @Override public String toString() { return name; } } Bank open() checks if your bank is already open, so you're still calling the same code twice. Not like it matters much though Quote Link to comment Share on other sites More sharing options...
Pegasus Posted May 9, 2018 Share Posted May 9, 2018 what are you talking about? Quote Link to comment Share on other sites More sharing options...