Jump to content

Welcome to DreamBot!

Download for Free

Supercharge Your Bots

Run unlimited bots today using DreamBot's Covert Mode and
stay more protected.

Upgrade Now
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Still not working? Try downloading and running JarFix
  • 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
OSRS Gambling

Interested in advertising your business? Reach out today!

Download the DreamBot client today!
Nation

National Draynor Willows

Recommended Posts

National Draynor Willows

 

I'm new to DreamBot so to learn the API I decided to write this script!

 

Start with axe equipped or in Inventory

 

Features:

  • Chops and banks Willow logs in Draynor
  • Reliable - (Ran for several hours without any issues)
  • Fast - Get upwards of 40k xp/hour with a good axe and Woodcutting level
  • AntiBan
  • Great way to train Woodcutting in F2P

 

Progress Reports: (Feel free to post your own!)

 

q1TXhKZ.png

 

Download: Download Link

 

Source code for anyone interested: Source code

Share this post


Link to post
Share on other sites

Nice release!

 

Can you explain me what anti-ban features you have added into this script?

 

Thanks!

 

Simple stuff. Mouse exiting screen, checking Woodcutting XP, checking friends list, right clicking on players, moving mouse, moving camera.

Edited by Nation

Share this post


Link to post
Share on other sites

Great release! Thanks for posting source, I like to read how other scripters format their code :3


Btw I found in your code you had this:

 GameObject willow = getGameObjects().closest("Willow");

                if(getLocalPlayer().getAnimation() != 867) {
                    if(willow != null) {

Instead you can write it as

 GameObject willow = getGameObjects().closest(GO -> GO.getName.equals("Willow") && o!=null);

                if(getLocalPlayer().getAnimation() != 867) {
                    //Don't need this anymore//if(willow != null) {

It's this new Lambda thing people seem to like. It seems weird at first, but it's kinda fun :)


oh oh (yay I'm helpful?) I also saw this:

getTabs().open(Tab.FRIENDS);
                    sleep(500, 1500);
                    getTabs().open(Tab.INVENTORY);
                    sleep(10, 300);
                    break;

(in your Antiban) thing, it's really neat, but when you use getTabs().open(Tab.TAB), it uses hotkeys (sometimes), but sometimes the hotkeys are messed up because people change them. Instead I like to use getTabs().openwithmouse(Tab.TAB), because then the bot can't mess up :D


Oo one final thing, I saw you made your own Random function, I just want to share mine (because I haven't yet ^.^)

private Random Rand = new Random();

void sleepie(int x, int y)
{
   sleep(Rand.nextInt((x+y)/2)+Rand.nextInt((x+y)/2))
}

What this does is it makes the bot more likely to sleep at the number inbetween, less likely to sleep a little more but still probably and the same for a little less. I find it's a lot more like a human :D

Share this post


Link to post
Share on other sites

Great release! Thanks for posting source, I like to read how other scripters format their code :3

Btw I found in your code you had this:

 GameObject willow = getGameObjects().closest("Willow");

                if(getLocalPlayer().getAnimation() != 867) {
                    if(willow != null) {

Instead you can write it as

 GameObject willow = getGameObjects().closest(GO -> GO.getName.equals("Willow") && o!=null);

                if(getLocalPlayer().getAnimation() != 867) {
                    //Don't need this anymore//if(willow != null) {

It's this new Lambda thing people seem to like. It seems weird at first, but it's kinda fun :)

oh oh (yay I'm helpful?) I also saw this:

getTabs().open(Tab.FRIENDS);
                    sleep(500, 1500);
                    getTabs().open(Tab.INVENTORY);
                    sleep(10, 300);
                    break;

(in your Antiban) thing, it's really neat, but when you use getTabs().open(Tab.TAB), it uses hotkeys (sometimes), but sometimes the hotkeys are messed up because people change them. Instead I like to use getTabs().openwithmouse(Tab.TAB), because then the bot can't mess up :D

Oo one final thing, I saw you made your own Random function, I just want to share mine (because I haven't yet ^.^)

private Random Rand = new Random();

void sleepie(int x, int y)
{
   sleep(Rand.nextInt((x+y)/2)+Rand.nextInt((x+y)/2))
}

What this does is it makes the bot more likely to sleep at the number inbetween, less likely to sleep a little more but still probably and the same for a little less. I find it's a lot more like a human :D

 

 

Thanks for the tips!  :D

 

I'm still getting used to the API but I really like it so far!

Edited by Nation

Share this post


Link to post
Share on other sites

Btw I found in your code you had this:

 GameObject willow = getGameObjects().closest("Willow");

                if(getLocalPlayer().getAnimation() != 867) {
                    if(willow != null) {

Instead you can write it as

 GameObject willow = getGameObjects().closest(GO -> GO.getName.equals("Willow") && o!=null);

                if(getLocalPlayer().getAnimation() != 867) {
                    //Don't need this anymore//if(willow != null) {

It's this new Lambda thing people seem to like. It seems weird at first, but it's kinda fun :)

 

 

This actually isn't true, in the odd case there isn't a willow tree, closest() will return null :)

Share this post


Link to post
Share on other sites

This actually isn't true, in the odd case there isn't a willow tree, closest() will return null :)

You just solved a problem I had like 2 months ago. Thanks!

 

edit: Nevermind. That script is unsaveable.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...