Jump to content

Sujamma

Members
  • Posts

    11
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Sujamma's Achievements

Newbie

Newbie (1/10)

1

Reputation

  1. Output root? I am not sure what that is. I designated the output folder in artifacts, the jar is successfully created in the folder I chose. Do you mean I should set the output directory to a specific folder?
  2. I am trying to create a new script with IntelliJ Idea, but whenever I try to use my Utility.jar, I get this error: java.lang.NoClassDefFoundError: Utility/Sleep at Main.TanHide(Main.java:80) at Main.onStart(Main.java:48) at org.osbot.rs07.event.ScriptExecutor.iiiIIiiiiiii(hl:205) at org.osbot.rs07.event.ScriptExecutor.start(hl:125) at org.osbot.CB.iiiIIiiiiiii(jz:262) at org.osbot.rA.IIiiiiiiiiiI(lz:119) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: Utility.Sleep at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 9 more It lets me import the script, use the methods and so on. The script compiles fine, but whenever I try to use the script inside the OSBot client it fails with the error. I am not really sure what information would help resolve this, so I will be happy to clarify any questions. Any kind of help is appreciated.
  3. @progamerz I used the first one and DoorHandler works like a charm, I had no idea about that method. Many thanks.
  4. https://pastebin.com/nLaKc3NX It's my first time using pastebin, so tell me if something's wrong.
  5. I used your code, but the bot is still standing still for 5 seconds and only then runs to the mill. I'll just leave it as is, the script works anyway. Thanks for the help.
  6. I am using WalkingEvent, because I think that webWalk is using more processing power(or is it?) and should be used for long distances . But if nothing else works I'll use webWalk.
  7. Changed IsOpen(gate) with gate.hasAction("Close") and it still returns false even though the gate is open.
  8. Nope, changing the return type does not work. Right now the code consists entirely of the method GoToMill2() and IsOpen(), so it doesn't really matter what GoToMill2() returns. The problem is with IsOpen() as I recently discovered. I don't know how to reliably detect if a gate is open or not.
  9. That's weird. I am not getting any errors in IntelliJ when building and I can run the script in the OSBot client. But I have detected my problem. My problem was that ConditionalSleep didn't stop sleeping even though the gate was open. The real culpirt was IsOpen() method . It returns false even though the gate is open. So my question now would be - how do I reliably detect if the gate is open or not?
  10. I am trying to make a script that completes Cook's Assistant. I go to the Lumby Mill to make flour. After taking the grain from the field I want the bot to go to the mill, but the Conditional Sleep sleeps until timeout without detecting that the condition is true. The Conditional Sleep waits until the gate is open. Here's the code: private boolean GoToMill2(){ Position preMillPos = new Position(3166, 3300, 0); RS2Object gate = objects.closest("Gate"); if (!IsOpen(gate)){ gate.interact("Open"); new ConditionalSleep(5000, 600){ @Override public boolean condition() throws InterruptedException { return IsOpen(gate); } }.sleep(); } WalkingEvent walk = new WalkingEvent(preMillPos); walk.setMinDistanceThreshold(2); execute(walk); return true; } private boolean IsOpen(RS2Object object){ return Arrays.asList(object.getDefinition().getActions()).contains("Close"); } All help is appreciated!
×
×
  • Create New...