Jump to content

matthew2112

Members
  • Posts

    8
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by matthew2112

  1. Could someone give me an example of this interaction event? I am struggling with what goes bewtteen the (). Also can i use a string such as an entity and action between here or do i have to create an event for each entity/action? I am doing it this way because i want to set the camera to not move during the interaction with each entity. InteractionEvent(Bot bot, Position position, java.lang.String... actions). Thanks in Advance
  2. private String[] actions = {"Climb", "Cross", "Cross", "Jump", "Jump", "Cross","Cross","Jump","Jump","Jump","Jump","Jump","Jump"}; private String[] names = {"Rough wall", "Tightrope", "Hand holds", "Gap", "Gap", "Tightrope","Tightrope","Gap","Ledge","Ledge","Ledge","Ledge","Edge"}; i am doing a .closest interaction with these strings and it works fine for all but one obstacle. The 3rd to last name which is Ledge. The script attempts to go backwards around the course instead of going onto the 2nd to last name which is also ledge which is slightly farther away than the 3rd one. It successfully completes the course sometimes because the 3rd to last Ledge has two IDs on it and when it interacts with the furthest east id the script is successful. However, i do not know how to interact ids into strings or solve this problem. Any help would be greatly appreciated. Thanks, Matt
  3. @BravoTaco Thanks! You have taught me a lot!
  4. BravoTaco, i appreciate the feedback as i am very new to scripting. Not sure if all of your reply took a lot of time or not. I was not familiar with the way you coded it. I only used if states. However, after reviewing your code, i was able to make it work in OSBOT. This is the correct order of the Obstacles at the gnome agility course with each of them having their own name. I got the script to complete a full lap around the agility course!!! That was super exciting. The timing seems off between starting the interactions if and clicking onto the next interaction. Example When two obstacles are on the same z plane. Such as LOGBALANCE and OBSTACLENET, the script will interact with LOGBALANCE and then immediate attempt to climb the OBSTACLENET while still crossing the LOGBALANCE. This leads the script to finish crossing the LOGBALANCE and having to wait for the script to cycle back through before it again attempts to Climb the OBSTACLENET. Any input/suggestions would be greatly appreciated. private Obstacle setNextObstacle(Obstacle currentObstacle) { switch (currentObstacle) { case LOGBALANCE: return Obstacle.OBSTACLENET; case OBSTACLENET: return Obstacle.TREEBRANCH1; case TREEBRANCH1: return Obstacle.BALANCINGROPE; case BALANCINGROPE: return Obstacle.TREEBRANCH2; case TREEBRANCH2: return Obstacle.OBSTACLENET2; case OBSTACLENET2: return Obstacle.OBSTACLEPIPE; default: return null; } } private enum Obstacle { LOGBALANCE("Walk-across", "Log balance"), OBSTACLENET("Climb-over", "Obstacle net"), TREEBRANCH1("Climb", "Tree branch"), BALANCINGROPE("Walk-on", "Balancing rope"), TREEBRANCH2("Climb-down", "Tree branch"), OBSTACLENET2("Climb-over", "Obstacle net"), OBSTACLEPIPE("Squeeze-through", "Obstacle pipe");
  5. RS2Object logbalance = getObjects().closest("Log balance"); RS2Object logbalance2 = getObjects().closest(new Filter<RS2Object>() { @Override public boolean match(RS2Object rs2Object) { return rs2Object != null && rs2Object.getName().equals("Log balance"); } }); RS2Object obstaclenet = getObjects().closest("Obstacle net"); RS2Object treebranch = getObjects().closest("Tree branch"); RS2Object treebranch2 = getObjects().closest(new Filter<RS2Object>() { @Override public boolean match(RS2Object rs2Object) { return rs2Object != null && rs2Object.getName().equals("Tree branch"); } }); RS2Object balancingrope = getObjects().closest("Balancing rope"); RS2Object obstaclepipe = getObjects().closest("Obstacle pipe"); /*if (logbalance2 != null){ log("logbalance2 exists"); if (logbalance2.interact("Walk-across")) { new ConditionalSleep(10000, 1000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); log("Walking logbalance2"); } if (obstaclenet !=null){ log("obstaclenet exists"); if (obstaclenet.interact("Climb-over")) new ConditionalSleep(10000, 1000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isMoving(); } }.sleep(); log("Climb-over obstaclenet"); } if (treebranch2 !=null){ log("treebranch2 exists"); if (treebranch2.interact("Climb")) new ConditionalSleep(10000, 1000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); log("Climb Treebranch"); } }*/ The problem i am running into is with treebranch2. This is the 3rd obstacle in the gnome agility course. You cross the log then the obstacle net then you have to climb up a tree branch. When i run all three of the actions together it never clicks on the treebranch. Once my player climbus op the obstacle net. The treebranch is never identified as in the debugger doesn't log "treebranch2 exists" So i assume the problem as to be starting here. However, when i run just that snippet of script involving treebranch2 alone it clicks the treebranch2 just fine. Any help/advice would be greatly appreciated as i am new and i think this could be a fun hobby. Also is there some action i should be using with my conditional sleeps that is different than .isanimating.
  6. RS2Object logbalance = getObjects().closest("Log balance"); RS2Object logbalance2 = getObjects().closest(new Filter<RS2Object>() { @Override public boolean match(RS2Object rs2Object) { return rs2Object != null && rs2Object.getName().equals("Log balance"); } }); RS2Object obstaclenet = getObjects().closest("Obstacle net"); RS2Object treebranch = getObjects().closest("Tree branch"); RS2Object treebranch2 = getObjects().closest(new Filter<RS2Object>() { @Override public boolean match(RS2Object rs2Object) { return rs2Object != null && rs2Object.getName().equals("Tree branch"); } }); RS2Object balancingrope = getObjects().closest("Balancing rope"); RS2Object obstaclepipe = getObjects().closest("Obstacle pipe"); /*if (logbalance2 != null){ log("logbalance2 exists"); if (logbalance2.interact("Walk-across")) { new ConditionalSleep(10000, 1000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); log("Walking logbalance2"); } if (obstaclenet !=null){ log("obstaclenet exists"); if (obstaclenet.interact("Climb-over")) new ConditionalSleep(10000, 1000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isMoving(); } }.sleep(); log("Climb-over obstaclenet"); } if (treebranch2 !=null){ log("treebranch2 exists"); if (treebranch2.interact("Climb")) new ConditionalSleep(10000, 1000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); log("Climb Treebranch"); } }*/ The problem i am running into is with treebranch2. This is the 3rd obstacle in the gnome agility course. You cross the log then the obstacle net then you have to climb up a tree branch. When i run all three of the actions together it never clicks on the treebranch. Once my player climbus op the obstacle net. The treebranch is never identified as in the debugger doesn't log "treebranch2 exists" So i assume the problem as to be starting here. However, when i run just that snippet of script involving treebranch2 alone it clicks the treebranch2 just fine. Any help/advice would be greatly appreciated as i am new and i think this could be a fun hobby. Also is there some action i should be using with my conditional sleeps that is different than .isanimating.
  7. Would the file jre 1.8.0_241 have the java 8 in it? that is what it made me download. or do i need to download an older version. This is the message i have from compiling the build "Information: javac 14 was used to compile java sources"
  8. Hi i am trying to follow the guide as i am a noob and i have the script seccesfully built and it is saved in the OSBot>Scripts folder as "scripts_jar" but when i load the client and refresh the script does not show up. Any help would be greatly appreciated. Thanks in Advance.
×
×
  • Create New...