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.

C0de help

Featured Replies

hi guys !

trying to write my own script , 

could you please show me an example of how to interact with a entity ie oak tree (correctly) 

once i define a entity ie "oak tree" do i have to write full name in other lines? or just "tree"

private State getState() {
        Entity Oak_tree = getObjects().closest("Oak tree");
        if (!inventory.isFull())
            return State.BANK;
        if (Oak_tree != null)
            return State.CHOP;
        return State.WAIT; 

 

a snippet of how to change camera angle would me epic also! 

i have 
                this.client.rotateCameraPitch(50 + random(40));

the rotatecamerapitch part has no reference :\ 

would appreciate any help , thank you ! 

Edited by Prismo

9 minutes ago, Prismo said:

hi guys !

trying to write my own script , 

could you please show me an example of how to interact with a entity ie oak tree (correctly) 

once i define a entity ie "oak tree" do i have to write full name in other lines? or just "tree"

private State getState() {
        Entity Oak_tree = getObjects().closest("Oak tree");
        if (!inventory.isFull())
            return State.BANK;
        if (Oak_tree != null)
            return State.CHOP;
        return State.WAIT; 

 

a snippet of how to change camera angle would me epic also! 

i have 
                this.client.rotateCameraPitch(50 + random(40));

the rotatecamerapitch part has no reference :\ 

would appreciate any help , thank you ! 

RS2Object oak = getObjects().closest("Oak tree");

^after doing this ur oak tree will be "oak" in the script and use the above line to define it

so example:

 if (oak != null && oak.interact("Chop")) {

^ now it will chop a oak (oak = Oak tree) if u get what i mean ? 

 

also camera change:

getCamera().mouseRotateToYaw((100));

 

hope this helps you out :gnome:

public boolean chopTree(String treeName) { //run this code until it returns a value

        if (!myPlayer().isAnimating()) { //WE ARE NOT CUTTING THEN WE CUT
            status = "Waiting for Tree.";
            RS2Object tree = getObjects().closest(treeName);
            if (tree != null) {
                if (tree.interact("Chop down")) {
                    status = "Cutting Tree.";
                    new ConditionalSleep(3500, 600) {      //sleep until chopping
                        @Override
                        public boolean condition() {
                            return myPlayer().isAnimating(); // We're chopping/Animating.
                        }
                    }.sleep();
                    return true; //we have clicked the tree!
                }
            }
        }

        return false;

    }

Here's my chopping tree code if it's any use.

Edited by HeyImJamie

  • Author

ah yes! it has all become clear now! :D nah thanks heaps guys ! 1+

@HeyImJamie Ty for code mate, i am not quite at that level, with the conditions and all...  ty for post !

7 minutes ago, Prismo said:

ah yes! it has all become clear now! :D nah thanks heaps guys ! 1+

@HeyImJamie Ty for code mate, i am not quite at that level, with the conditions and all...  ty for post !

Copy it if you need. All you need to do is store a tree name as a String, and then in the loop is call chopTree(STORED_STRING_HERE). Saves you having to re-type it for multiple trees :) 

  • Author

ah nice, i knew there was a better way ! :leech:  ill give you a free trial when im done  :???:

Create an account or sign in to comment

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.