Jump to content

BravoTaco

Scripter II
  • Posts

    237
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by BravoTaco

  1. No easy way to do it, you will have to grab the text from hans and parse it. Example this returns the lifetime of the account in milliseconds. Use getAccountLifetime method to retrieve the time. You will need to check if it doesn't return -1 before using the result as it is set up in a way to only execute one action each time it is called. So if the dialogue is not visible it will talk to or walk to hans than you will have to call it again for it to either talk to hans, or retrieve the lifetime. Example usage.
  2. I don't have much experience using linux so I won't be able to help you out with it. But once you correct the java versions it should successfully build out. Sorry about not being able to assist further.
  3. You would declare that variable in the class. Outside of any method body. So that the entire class will be able to use it. You could also declare it static and will be able to use it throughout all your classes.
  4. You can do something like this: Stream<GroundItem> fishItems = getGroundItems().getAll().stream().filter((e) -> e.getName().contains("Raw")); You can than manipulate that data to do as you wish.
  5. Don't worry about it saying that your Main class is not being used. Technically in the IDE it is not since you are not creating/extending from it anywhere. Two things usually cause this error. 1. No ScriptManifest - You have this so most likely its number 2 2. Wrong java version. For the wrong java version go to File -> Project Structure -> Project Once you are in that window check to make sure that the Project SDK is 1.8 and that your Project Language Level is 8. If you don't have JDK 1.8 option than you will have to download it from here.
  6. Make sure you are using JDK 8. Link: JDK 8
  7. Unfortunately not. Been really busy with work due to the Coronavirus. To use it, download the .jar file and place it into your OSBot scripts folder and than hit refresh in the script selector if you do not see it. Default location is: C:\Users\PC Username\OSBot\Scripts
  8. No need to check if your dead. Just check to see if the wizards are nearby, if not walk to the wizard area. Area wizardArea = new Area(0, 0, 0, 0); // Set this to the area of the wizards. String wizardName = "PlaceNameHere"; NPC wizard = getNpcs().closest(npc -> npc.getName().equalsIgnoreCase(wizardName) && npc.isAttackable()); // If the wizard is null and you are not in the area walk to the area. // Else If you are in the area and there is no available wizard and you are currently on a p2p world than hop to a p2p world. // Else If you are in the area and there is no available wizard and you are currently on a f2p world than hop to a f2p world. if (wizard == null && !wizardArea.contains(myPlayer())) getWalking().webWalk(wizardArea); else if (wizardArea.contains(myPlayer())) if (getWorlds().isMembersWorld()) getWorlds().hopToP2PWorld(); else getWorlds().hopToF2PWorld();
  9. I thought it would automatically call the child after the parent has executed but, with some testing it seems that is not the case. So what you will have to do is loop through all the child events and execute them and set them as failed/finished. Using those values you could then execute/end the next child event.
  10. Adding children to an event will allow you to run the parent event while also being able to execute the child events so you do not have to call multiple events one after the other. The setFailed and the setFinished method will work as it normally does applying to the current event you are using when calling them.
  11. You are setting the widget too soon. Set it once you are expecting to interact with it.
  12. Try to use the normal ConditionalSleep method to see if its an error, with the method you are currently using. new ConditionalSleep(16000) { @Override public boolean condition() throws InterruptedException { return !getInventory().contains("Chocolate bar"); } }.sleep();
  13. This will grab NPC information from OSRS Box using the NPC id. Class: Usage:
  14. Will need more code to find the problem. Do you have any while loops or recursive calls? If so than you might be causing the main thread to hang.
  15. Maple logs should be fixed once update is approved.
  16. Not to sure. Been pretty busy with work. Maybe around a week or so.
  17. Nice. Mules will be able to to enter the ruins if you have them setup that way.
  18. This is interesting. Are you opening separate clients for each bot? Or clicking the Add bot button to add new bots? Also if its walking back to get essences than somehow its not detecting the essences in the inventory. In the method that retrieves essences the first line is this: if (script.getInventory().contains("Pure essence") || script.getInventory().contains("Rune essence")) return; So if essences are detected than it will exit that method. The only way it could be executing is that the bot can't detect any items in the inventory. When, in this scenario, it completes it's walk back to the bank does it break? Ill add a log statement to log all the items in the inventory before it walks to get essences so you can tell me if it is able to detect any items. .jar Edit: I was able to run 2 mules until I ran out of essences each account had roughly 600 each.
  19. I had a logic error when calculating the local path to see if its usable. I believe that was what was causing it to get stuck. I added a check before initiating the walking event to the bank to get essences, hopefully that fixes it. .jar
×
×
  • Create New...