Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Development of my first script (And ever touching Java)

Featured Replies

Hello everyone I'm going to just type some stuff up rather quickly as I am still in the middle of the whole thing and am pretty excited on how much progress I have made!

 

Description of the script: Meant for a quick start and go right out of Tut. Island it will walk you to West Varrock Trees . Then leveling you 1-15 on trees > 15-30 on Oaks > 30+ on willows. Ideally I would also like to have it sell logs and buy upgrades axes too.

 

So far I have done:

- Start and if your woodcutting level is < 15 it chops tree's in VW. WC level >= 15 & < 30 chops oaks in VW. If your >= 30 it chops in Willows in Rim. 

- Chop till full inventory then go to bank

- Return to Trees

- Simple Paint (Super cheesy but I love me some cool paints on bots XD)

- Shows status

- Bot is able to detect level and decide which location to head to

- Bot is able to show time ran + level

 

 

Need to do:

- still figure out how to get players level and then use that to define what bot cuts

- Add time ran + other stats

- Purchase axes out of GE.

- randomize actions for a better antiban

- check if axe is equiped

 

What she looks like right now:

S93wEf3.png

 

 

I would like to thank these users for their threads too if not for them this would of definitely taken a LOT longer!

- TFW

- Explv's

- Khaleesi

- Borrowed

 

Edited by Bradf3rd

Need to do:

- still figure out how to get players level and then use that to define what bot cuts

if (getSkills().getStatic(Skill.WOODCUTTING) <= 30) //if woodcutting level is less than or equal to level 30...do something
 

- other stats 

    long startTime;
    @Override
    public void onStart() {
        //Code here will execute before the loop is started
        getExperienceTracker().startAll(); //Begin the experience tracker
        startTime = System.currentTimeMillis();
    }

    @Override
    public void onPaint(Graphics2D g) {
        //This is where you will put your code for paint(s)
        //To track experience in a  skill and draw it to the canvas simply do
        g.drawString("Attack: " + getExperienceTracker().getGainedXP(Skill.ATTACK), 15, 65); //(stuff, x , y);
        //also print runtime same way
    } 

Message me anytime!

Edited by TFW

Good luck. Java is a good beginner language. You have plenty of support here.

  • Author

Finished the ability to detect woodcutting level and determine location to cut at. Thanks for the snippet TFW.

Finished the ability to detect woodcutting level and determine location to cut at. Thanks for the snippet TFW.

 

No problem buddy! Keep on climbing!

  • Author

Getting close to finishing, I will attempt at making a custom xhair and maybe making the paint a little nicer. Still need to add more random actions + GE.

S93wEf3.png

  • Author

Currently working on an antiban but I think I may be making it harder then it needs to be. This is still very early and if any of you have a better recommendation to go about this I'm ready to get schooled.

 

Currently have state WAIT, and RANDOMMOUSE but will be doing Camera and Tab.

 

This is what it looks like on getstate

if(myPlayer().isAnimating())
     Random rand = new Random();
int GetRandomAction = 1 + rand.nextInt((2 - 1) + 1);
switch(GetRandomAction){
case 1:
return State.WAIT;
case 2:
return State.RANDOMMOUSE;
}
     }
case WAIT:
     state = "Waiting";
     if(myPlayer().isAnimating()){
     sleep(random(300,1000));
     }    
     break;
     case RANDOMMOUSE:
     state = "RandomMouse Activated";
     Random rand = new Random();
     int randomNum = 1 + rand.nextInt((5 - 1) + 1);
     switch(randomNum){
     case 1:
     mouse.moveRandomly(300);    
     break;
     case 2:
     mouse.moveSlightly(300);     
     break;
     case 3:
     mouse.moveSlightly(300);    
     break;
     case 4:
     mouse.moveVerySlightly();     
     break;
     case 5:
     mouse.moveOutsideScreen();     
     break;
     }
     }

Edited by Bradf3rd

  • Author

Good luck on this script, nice to see a variation of wc'ers as opposed to a generic woodcutter script that most new scripters would start off with biggrin.png

 

If you need any programming help, just ask. smile.png

If you happen to have some time I seem to be messing up somewhere because trying to withdraw items in note doesn't seem to be working.

 

Here is my case UPGRADEAXE

 

In my main:

public static final Bank.BankMode WITHDRAW_NOTE;
case UPGRADEAXE:
     
     state = "Upgrading Axe";     
     if(!West_Varrock_Bank.contains(myPlayer())){
             state = "Heading to Varrock West Bank";
             walking.webWalk(West_Varrock_Bank.getRandomPosition());
             } else{ 
             if(!getBank().isOpen()){
             getBank().open();
             sleep(random(200,600));                          
             bank.getWithdrawMode();
             bank.withdrawAll(1521);
             bank.withdrawAll(1511);           
             }
             
     }
     break;

Edited by Bradf3rd

case UPGRADEAXE:
state = "Upgrading Axe";
    if (!West_Varrock_Bank.contains(myPlayer())) {
        state = "Heading to Varrock West Bank";
        getWalking().webWalk(West_Varrock_Bank.getRandomPosition());
    } else {
        if (!getBank().isOpen()) {
            getBank().open();
        }
        if (!getBank().getWithdrawMode().equals(BankMode.WITHDRAW_NOTE)) {
            // click withdraw_note button on the bank interface
        }
        getBank().withdraw(1521, 1);
    }
    break;

 The code says a thousand words, more effective than explaining it XD

 

Error was: trying to withdraw an item if the bank is closed

 

For setting the withdrawal mode to noted, click the appropriate widget for the NOTE button on the bank interface

 

Edited by Czar

  • Author
case UPGRADEAXE:
state = "Upgrading Axe";
    if (!West_Varrock_Bank.contains(myPlayer())) {
        state = "Heading to Varrock West Bank";
        getWalking().webWalk(West_Varrock_Bank.getRandomPosition());
    } else {
        if (!getBank().isOpen()) {
            getBank().open();
        }
        if (!getBank().getWithdrawMode().equals(BankMode.WITHDRAW_NOTE)) {
            // click withdraw_note button on the bank interface
        }
        getBank().withdraw(1521, 1);
    }
    break;

 The code says a thousand words, more effective than explaining it XD

 

Error was: trying to withdraw an item if the bank is closed

 

For setting the withdrawal mode to noted, click the appropriate widget for the NOTE button on the bank interface

 

Weird the code that I posted worked only incorrect thing it did was try to withdraw as items not as notes (biggest thing I can't seem to figure out). How come something like this doesn't work

mouse.click(295, 320, true);

Edited by Bradf3rd

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.