Marsman19 Posted July 30, 2018 Share Posted July 30, 2018 Thanks for this, very good explanation. Looking forward for more Quote Link to comment Share on other sites More sharing options...
Czar Posted July 31, 2018 Share Posted July 31, 2018 Really cool concept of 10 minute scripting, good job Eliot ^^ I say you should finish off the other courses then move onto another skill, should be interesting tbh. 1 Quote Link to comment Share on other sites More sharing options...
BombsAway Posted July 31, 2018 Share Posted July 31, 2018 This is great! definitely would like to see more content like this Quote Link to comment Share on other sites More sharing options...
evenflyox Posted August 1, 2018 Share Posted August 1, 2018 Gonna give this a watch and try when I get home Thanks friendo Quote Link to comment Share on other sites More sharing options...
0wne2dk1ll Posted August 1, 2018 Share Posted August 1, 2018 Quality video just goes to show how simple some scripts are to get into! looking forward to more content Fren Quote Link to comment Share on other sites More sharing options...
Flashbacks420 Posted August 2, 2018 Share Posted August 2, 2018 nice vido man keep it up Quote Link to comment Share on other sites More sharing options...
Athylus Posted August 7, 2018 Share Posted August 7, 2018 Cool, thanks! Can you elaborate on this line? Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getName()) && Arrays.asList(actions).contains(obj.getActions()[0]) && (getMap().canReach(obj) || obj.getName().equals("Crate")) && !obj.equals(previous)); Why .contains(obj.getActions()[0])? Why the [0], that's got me stuck. What is it's purpose here? Quote Link to comment Share on other sites More sharing options...
JioMy Posted August 7, 2018 Share Posted August 7, 2018 1 hour ago, Athylus said: Cool, thanks! Can you elaborate on this line? Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getName()) && Arrays.asList(actions).contains(obj.getActions()[0]) && (getMap().canReach(obj) || obj.getName().equals("Crate")) && !obj.equals(previous)); Why .contains(obj.getActions()[0])? Why the [0], that's got me stuck. What is it's purpose here? so you begin from the first object from the array. that's how agility courses work Quote Link to comment Share on other sites More sharing options...
Eliot Posted August 7, 2018 Author Share Posted August 7, 2018 2 hours ago, Athylus said: Cool, thanks! Can you elaborate on this line? Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getName()) && Arrays.asList(actions).contains(obj.getActions()[0]) && (getMap().canReach(obj) || obj.getName().equals("Crate")) && !obj.equals(previous)); Why .contains(obj.getActions()[0])? Why the [0], that's got me stuck. What is it's purpose here? An object has some set of actions, for example: ["Jump-up", "Walk here", "Examine"]. For agility, we always want to do the first interaction which in most programming languages is the 0 element. So I check my list of actions contains the first action in the object's list of actions, if it does, then I know it is an agility obstacle and I should interact with it. 1 Quote Link to comment Share on other sites More sharing options...
Athylus Posted August 7, 2018 Share Posted August 7, 2018 I see it now, cool! I was mixing up the the array result with the array actions. Thanks. Quote Link to comment Share on other sites More sharing options...
RandomInc Posted September 13, 2018 Share Posted September 13, 2018 Great video! Really shows how far the api has come Quote Link to comment Share on other sites More sharing options...
Juggles Posted September 13, 2018 Share Posted September 13, 2018 On 7/29/2018 at 6:44 PM, ProjectPact said: Why not use a Map with both the object and the action as strings or an Enum? P.S - You have a perfect narrator's voice. That's what i do for mine Quote Link to comment Share on other sites More sharing options...
Rumple Posted November 27, 2018 Share Posted November 27, 2018 Hi I am struggling a little bit with compiling. I want this to pump indefinntly until I stop getting str xp witch should be every 5 mins, then it should continue to the next object which is the coke and fill up until it recieves a message to continue (which mean all spades full x 28) then should move on to fill the stove with coke and wait for another message to continue, once it sees the message it should go back to pumping until the xp stop and loop again. public int onLoop() throws InterruptedException { int starting = getExperienceTracker().getGainedXP(Skill.STRENGTH); Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getName()) && Arrays.asList(actions).contains(obj.getActions()[0]) && (getMap().canReach(obj)) && !obj.equals(previous)); if (nextObj != null && myPlayer().getInteracting() == null && !getDialogues().isPendingContinuation()) { if (nextObj.interact(nextObj.getActions()[0])) { new ConditionalSleep(10000) { @Override public boolean condition() throws InterruptedException { return getExperienceTracker().getGainedXP(Skill.STRENGTH) < starting; } }.sleep(); } if (getExperienceTracker().getGainedXP(Skill.STRENGTH) > starting){ previous = nextObj; } } return 250; } Please help. Quote Link to comment Share on other sites More sharing options...
Icebot Posted December 7, 2018 Share Posted December 7, 2018 Legend! I have been learning to code for a while now and all these snippets and tutorials are very useful Quote Link to comment Share on other sites More sharing options...
Imthabawse Posted February 2, 2019 Share Posted February 2, 2019 So when I tryed this in Fally it would keep trying to go to previous "Jump" and "Ledge" spot. Is this because there are multiple "Jump" / "Ledge" spots and how would I make it go to the next spot instead of previous? Quote Link to comment Share on other sites More sharing options...