Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
Download the DreamBot client today!

Shy

Scripter
  • Content Count

    13
  • Joined

  • Last visited

About Shy

  • Rank
    Newbie

Recent Profile Visitors

226 profile views
  1. https://dreambot.org/javadocs/org/dreambot/api/wrappers/interactive/Character.html#isInCombat-- https://dreambot.org/javadocs/org/dreambot/api/utilities/Timer.html Timer outOfCombatTimer = new Timer(); if (!getLocalPlayer().isInCombat()) { log(String.valueOf(outOfCombatTimer.elapsed())); } else { outOfCombatTimer.reset(); } This is just a short example to show what methods to use. You would probably want to write it a little different in a real script, but hopefully this helps you.
  2. Shy

    Shy Woodcutter

    Hi, maybe in the future, but not right now unfortunately . I looked into it, and it would be a pain to change because of how I wrote the script, or else I would do it. I just don't have enough time currently. In the future, I might re-write the script as I've learned quite a bit since then. If I do, I'll try to include an option that would make this possible. Ok, I have submitted an update to the SDN. Just have to wait for it to be approved now. Let me know if this update causes issues for anyone and I'll try to fix it asap. Version 1.1 Bug Fixes: spam clicking the mini-map when getting close to the bank occasional unnecessary clicks on the tree that is already being chopped New Features: Option to collect bird nests (can collect bird nests even if bank mode isn't enabled)
  3. Shy

    Shy Woodcutter

    I'll look into this later this week if I have time, and if it's not too much of a hassle to get working I'll add it to the script. No guarantees though.
  4. I assume you mean you're using OnPaint and want to be able to perform an action when the paint is clicked on in certain places. If so, you could implement MouseListener in your main script class. You could then use a rectangle to define an area where you want the paint to be interactive. private Rectangle aRectangle = new Rectangle(100,100,100,100); @Override public void mousePressed(MouseEvent e) { if (aRectangle.contains(e.getPoint())) { MethodProvider.log("Mouse pressed within rectangle."); } }
  5. I think you would have to do something similar to this. Check if the supplies for the item you are making are no longer in your inventory, and for level ups, use getDialogues().canContinue() MethodProvider.sleepUntil(() -> !getInventory().contains("Item Name") || getDialogues().canContinue(), 10000);
  6. Sorry, I misunderstood. Defiled has provided some good examples, but to add an additional one. If you only want to have two selection choices: private Random random = new Random(); int randomOfTwoNumbers = random.nextBoolean() ? 3 : 5); // replace 3 and 5 with the numbers you want
  7. https://dreambot.org/javadocs/org/dreambot/api/methods/Calculations.html#random-int-int-
  8. Shy

    Shy Woodcutter

    Hi, thank you for telling me. I really appreciate it. I think I have found and fixed the problem. The update is now live on the SDN, so let me know if you are still having any problems or find any new ones. Bug fixes * Script was changing locations even when it wasn't in Progressive Mode. * GUI was setting the wrong area for some locations that shared the same name for different tree types causing the bot to go to the wrong area and just stand there. As for the locations, I can add new locations if people have requests for certain locations. I wanted to make most of them in secluded areas to avoid being reported.
  9. Shy

    Shy Woodcutter

    Thank you! 🙂
  10. Shy

    Shy Woodcutter

    Shy Woodcutter Description: Chops most types of trees, Custom Areas, Progressive Mode, Upgrades Axes, Drop or Bank Logs. Features: Chops most types of trees Custom Areas: User can choose their own locations to chop trees. Progressive Mode: The bot will switch to the best tree it can chop(Currently, it only goes Tree->Oak->Willow->Yew) Upgrades Axes: The bot will go to the bank and upgrade to the best available axe based on Woodcutting level. Can drop or bank logs at the closest bank. Easy to use GUI Custom paint that can be opened and closed. Instructions: 1. Have shift-drop enabled 2. Have an axe equipped or in the inventory 3. Check the boxes for which modes you want 4. Select tree type 5. Select Area (if you choose custom area, you will need to go to the location you want the bot to chop. You then need to click the "Get Location" button to get your current coordinates. Finally, enter a value in the radius text box to set how wide of an area around the current coordinates that you want the bot to chop in. ) 6. Click the start button Please let me know of any bugs or other issues you encounter with the script, and I will try to fix them as soon as possible. This is my first script, and I am new to using Java.
  11. Are we allowed to include images(for paint, GUI, etc.) in the source files for scripts uploaded to the SDN or do we need to upload them to an image host and just get the link in our code?
  12. Are you sure OnLoop itself isn't getting invoked? Or is it just your code inside of onLoop that isn't running the way you think it should? You would need to post your code. It's hard to say what the problem is otherwise.
×
×
  • Create New...