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.

Flax Picker

Featured Replies

I will not update this script any further.

Edited by krulvis

Testing, will post a 1 Hour with no intereaction. (watching for randoms)

 

Edit : Bot gets stuck in this location.

 

http://puu. sh/2xLy8

Edited by AlphaBravo

Works wonders with me, a very good script, Great job dude!

script wont start? i clicked on start it didnt even ask me what acc i wanted to use just didnt do anything

re-added the script to the client and it now works. i will tell you how it goes later, but im lagging extremely bad rn. ill wait tilll i have better connection

I also re-added, iv found two flaws so far. 1: it counts flax by clicks instead of actual invent ID scanning (minor issue) and 2: when exiting the bank, it clicks the X to exit the bank tab and sometimes when doing this, it exits the tab and clicks randomly (usually near the willow trees behind seers bank) and walks here and becomes stuck because of the unknown region. if these are fixed the script would appear to be flawless. i will post some proggys for you if the script does eventually run for atleast an hour. otherwise its a good script man <3 cheers

I also re-added, iv found two flaws so far. 1: it counts flax by clicks instead of actual invent ID scanning (minor issue) and 2: when exiting the bank, it clicks the X to exit the bank tab and sometimes when doing this, it exits the tab and clicks randomly (usually near the willow trees behind seers bank) and walks here and becomes stuck because of the unknown region. if these are fixed the script would appear to be flawless. i will post some proggys for you if the script does eventually run for atleast an hour. otherwise its a good script man <3 cheers

 

It's not really "counting" how much Flax as it is he had the Log say: You've picked a flax.

When making our cooking script, he did the same to kind of test to see if it would get that far, but yeah, it still picks 28 even if the message comes up 50 times.

I updated a more randomed based walking unit...

I updated the flax counting

It works better when banking, it would sometimes break:

 

import java.awt.*import org.osbot.script.Scriptimport org.osbot.script.ScriptManifestimport org.osbot.script.mouse.*import org.osbot.script.rs2.*import org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.GroundItemimport org.osbot.script.rs2.model.Itemimport org.osbot.script.rs2.model.PrimaryObjectimport org.osbot.script.rs2.model.RS2Objectimport org.osbot.script.rs2.ui.*import javax.imageio.ImageIOimport java.io.IOExceptionimport java.net.URLimport org.osbot.script.rs2.model.*@ScriptManifest(name = "Flaxpicker", author = "KrulVis", version = 2.0D, info="Picks flax")class Flaxpicker extends Script {    int bankId = 25808;    int flax = 1780;    int bs = 1777;    int flaxObj = 3634;    boolean deur = true;    def starttime = null;    def state = State.PICKING    int picked = 0;    int coordx = 2742;    int coordy = 3444;        private final Color color1 = new Color(0.1f, 0.1f, 0.1f, 0.7f);    private final Color color2 = new Color(255, 0, 0);    private final Font font1 = new Font("Calisto MT", 0, 16);    private final Font font2 = new Font("Calisto MT", 0, 11);    void onStart() {        starttime = System.currentTimeMillis();        if(client.getInventory().isFull()){            state = State.TOBANK        }    }            enum State {        PICKING, TOBANK, BANKING    }            int onLoop() {        switch (state){            case State.PICKING:                return onPick()            case State.TOBANK:                return toBank()            case State.BANKING:                return bank()                    }    }        int onPick(){        if(client.getMyPlayer().getY() >= 3450 && !client.getInventory().isFull()){            walkExact(new Position(coordx, coordy, 0))            return 1000        }else if(!client.getInventory().isFull()){            selectEntityOption(closestObject(flaxObj), "Pick")            return 300 + random(300)        }else{		coordy = 3444 + gRandom(-3, 3);		coordx = 2742 + gRandom(-4, 4);            state = State.TOBANK            return 1200        }    }            int toBank() {        log("Walk to bank")        if(client.getMyPlayer().getY() <= 3485){            log("Got to walk a bit first.")            walkExact(new Position(2725, 3490, 0))            return 600 + random(500)        }else{            if(client.getBank().isOpen()){                state = State.BANKING                log("BANK IS OPEN!")                return 1200            }else{                selectEntityOption(closestObject(bankId), "Bank", "Bank booth")                return(3000)            }        }        }        int bank() {        if(!client.getInventory().isEmpty()){            client.getBank().depositAll()		state = State.PICKING            return 1000        }        else if(client.getInventory().isEmpty()){            client.getBank().close()            return 1000        }        else if(!client.getBank().isOpen()){		log("Bank is closed, not opened. State of PICKING!")            state = State.PICKING            return 1000        }        return 100    }        void onPaint(Graphics g) {        g.setColor(color1);        g.fillRect(1, 51, 209, 94);        g.setFont(font1);        g.setColor(color2);        g.drawString("Flax Picker V2.0", 7, 76);        g.setFont(font2);        g.drawString("Time: " + format(System.currentTimeMillis() - starttime), 7, 130);        g.drawString("Flax Picked: (${picked})", 7, 100);        g.drawString("State: ${state}", 7, 115);    }                String format(final long time) {        final StringBuilder t = new StringBuilder();        final long total_secs = time / 1000;        final long total_mins = total_secs / 60;        final long total_hrs = total_mins / 60;        final int secs = (int) total_secs % 60;        final int mins = (int) total_mins % 60;        final int hrs = (int) total_hrs % 24;        if (hrs < 10) {            t.append("0");        }        t.append(hrs);        t.append(":");        if (mins < 10) {            t.append("0");        }        t.append(mins);        t.append(":");        if (secs < 10) {            t.append("0");        }        else if (secs < 0){            t.append("0")        }        else{        t.append(secs);        }        return t.toString();    }void onMessage(String message) {        if (message == "You pick some flax.") {            log("Picked a flax!")            picked ++;}}}

Enjoy smile.png.

This is still krulvis's code! I just fixed it a tad!

This is also still not 100%.

Edited by wood1master7

  • Author

I updated a more randomed based walking unit...

I updated the flax counting

It works better when banking, it would sometimes break:

 

import java.awt.*import org.osbot.script.Scriptimport org.osbot.script.ScriptManifestimport org.osbot.script.mouse.*import org.osbot.script.rs2.*import org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.GroundItemimport org.osbot.script.rs2.model.Itemimport org.osbot.script.rs2.model.PrimaryObjectimport org.osbot.script.rs2.model.RS2Objectimport org.osbot.script.rs2.ui.*import javax.imageio.ImageIOimport java.io.IOExceptionimport java.net.URLimport org.osbot.script.rs2.model.*@ScriptManifest(name = "Flaxpicker", author = "KrulVis", version = 2.0D, info="Picks flax")class Flaxpicker extends Script {    int bankId = 25808;    int flax = 1780;    int bs = 1777;    int flaxObj = 3634;    boolean deur = true;    def starttime = null;    def state = State.PICKING    int picked = 0;    int coordx = 2742;    int coordy = 3444;        private final Color color1 = new Color(0.1f, 0.1f, 0.1f, 0.7f);    private final Color color2 = new Color(255, 0, 0);    private final Font font1 = new Font("Calisto MT", 0, 16);    private final Font font2 = new Font("Calisto MT", 0, 11);    void onStart() {        starttime = System.currentTimeMillis();        if(client.getInventory().isFull()){            state = State.TOBANK        }    }            enum State {        PICKING, TOBANK, BANKING    }            int onLoop() {        switch (state){            case State.PICKING:                return onPick()            case State.TOBANK:                return toBank()            case State.BANKING:                return bank()                    }    }        int onPick(){        if(client.getMyPlayer().getY() >= 3450 && !client.getInventory().isFull()){            walkExact(new Position(coordx, coordy, 0))            return 1000        }else if(!client.getInventory().isFull()){            selectEntityOption(closestObject(flaxObj), "Pick")            return 300 + random(300)        }else{		coordy = 3444 + gRandom(-3, 3);		coordx = 2742 + gRandom(-4, 4);            state = State.TOBANK            return 1200        }    }            int toBank() {        log("Walk to bank")        if(client.getMyPlayer().getY() <= 3485){            log("Got to walk a bit first.")            walkExact(new Position(2725, 3490, 0))            return 600 + random(500)        }else{            if(client.getBank().isOpen()){                state = State.BANKING                log("BANK IS OPEN!")                return 1200            }else{                selectEntityOption(closestObject(bankId), "Bank", "Bank booth")                return(3000)            }        }        }        int bank() {        if(!client.getInventory().isEmpty()){            client.getBank().depositAll()		state = State.PICKING            return 1000        }        else if(client.getInventory().isEmpty()){            client.getBank().close()            return 1000        }        else if(!client.getBank().isOpen()){		log("Bank is closed, not opened. State of PICKING!")            state = State.PICKING            return 1000        }        return 100    }        void onPaint(Graphics g) {        g.setColor(color1);        g.fillRect(1, 51, 209, 94);        g.setFont(font1);        g.setColor(color2);        g.drawString("Flax Picker V2.0", 7, 76);        g.setFont(font2);        g.drawString("Time: " + format(System.currentTimeMillis() - starttime), 7, 130);        g.drawString("Flax Picked: (${picked})", 7, 100);        g.drawString("State: ${state}", 7, 115);    }                String format(final long time) {        final StringBuilder t = new StringBuilder();        final long total_secs = time / 1000;        final long total_mins = total_secs / 60;        final long total_hrs = total_mins / 60;        final int secs = (int) total_secs % 60;        final int mins = (int) total_mins % 60;        final int hrs = (int) total_hrs % 24;        if (hrs < 10) {            t.append("0");        }        t.append(hrs);        t.append(":");        if (mins < 10) {            t.append("0");        }        t.append(mins);        t.append(":");        if (secs < 10) {            t.append("0");        }        else if (secs < 0){            t.append("0")        }        else{        t.append(secs);        }        return t.toString();    }void onMessage(String message) {        if (message == "You pick some flax.") {            log("Picked a flax!")            picked ++;}}}

Enjoy smile.png.

This is still krulvis's code! I just fixed it a tad!

This is also still not 100%.

 

 

I will replace it with your code if you are fine with that, Though i am not convinced about the random adds on the coords it isn't really gonna help, if you want a more random walking just use the method walk() instead of walkExact() but as i've seen many scripts fail on walk() i prefer to have it walk to the same place the whole time

I will replace it with your code if you are fine with that, Though i am not convinced about the random adds on the coords it isn't really gonna help, if you want a more random walking just use the method walk() instead of walkExact() but as i've seen many scripts fail on walk() i prefer to have it walk to the same place the whole time

 

It's all good... I mean it's still your code.

I did that because some people said that it couldn't always go to the point you had, so i did it this way, so if it fails one way, it has 12 other options...

Oh and can you change it to this:

import java.awt.*import org.osbot.script.Scriptimport org.osbot.script.ScriptManifestimport org.osbot.script.mouse.*import org.osbot.script.rs2.*import org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.GroundItemimport org.osbot.script.rs2.model.Itemimport org.osbot.script.rs2.model.PrimaryObjectimport org.osbot.script.rs2.model.RS2Objectimport org.osbot.script.rs2.ui.*import javax.imageio.ImageIOimport java.io.IOExceptionimport java.net.URLimport org.osbot.script.rs2.model.*@ScriptManifest(name = "Flaxpicker", author = "KrulVis", version = 2.0D, info="Picks flax")class Flaxpicker extends Script {    int bankId = 25808;    int flax = 1780;    int bs = 1777;    int flaxObj = 3634;    boolean deur = true;    def starttime = null;    def state = State.PICKING    int picked = 0;    int coordx = 2742;    int coordy = 3444;        private final Color color1 = new Color(0.1f, 0.1f, 0.1f, 0.7f);    private final Color color2 = new Color(255, 0, 0);    private final Font font1 = new Font("Calisto MT", 0, 16);    private final Font font2 = new Font("Calisto MT", 0, 11);    void onStart() {        starttime = System.currentTimeMillis();        if(client.getInventory().isFull()){            state = State.TOBANK        }    }            enum State {        PICKING, TOBANK, BANKING    }            int onLoop() {        switch (state){            case State.PICKING:                return onPick()            case State.TOBANK:                return toBank()            case State.BANKING:                return bank()                    }    }        int onPick(){        if(client.getMyPlayer().getY() >= 3450 && !client.getInventory().isFull()){            walkExact(new Position(coordx, coordy, 0))            return 1000        }else if(!client.getInventory().isFull()){            selectEntityOption(closestObject(flaxObj), "Pick")            return 300 + random(300)        }else{            state = State.TOBANK            return 1200        }    }            int toBank() {        log("Walk to bank")        if(client.getMyPlayer().getY() <= 3485){            log("Got to walk a bit first.")            walkExact(new Position(2725, 3490, 0))            return 600 + random(500)        }else{            if(client.getBank().isOpen()){                state = State.BANKING                log("BANK IS OPEN!")		coordy = 3444 + gRandom(-3, 3);		coordx = 2742 + gRandom(-4, 4);                return 1200            }else{                selectEntityOption(closestObject(bankId), "Bank", "Bank booth")                return(3000)            }        }        }        int bank() {        if(!client.getInventory().isEmpty()){            client.getBank().depositAll()		state = State.PICKING            return 1000        }        else if(client.getInventory().isEmpty()){            client.getBank().close()            return 1000        }        else if(!client.getBank().isOpen()){		log("Bank is closed, not opened. State of PICKING!")            state = State.PICKING            return 1000        }        return 100    }        void onPaint(Graphics g) {        g.setColor(color1);        g.fillRect(1, 51, 209, 94);        g.setFont(font1);        g.setColor(color2);        g.drawString("Flax Picker V2.0", 7, 76);        g.setFont(font2);        g.drawString("Time: " + format(System.currentTimeMillis() - starttime), 7, 130);        g.drawString("Flax Picked: (${picked})", 7, 100);        g.drawString("State: ${state}", 7, 115);    }                String format(final long time) {        final StringBuilder t = new StringBuilder();        final long total_secs = time / 1000;        final long total_mins = total_secs / 60;        final long total_hrs = total_mins / 60;        final int secs = (int) total_secs % 60;        final int mins = (int) total_mins % 60;        final int hrs = (int) total_hrs % 24;        if (hrs < 10) {            t.append("0");        }        t.append(hrs);        t.append(":");        if (mins < 10) {            t.append("0");        }        t.append(mins);        t.append(":");        if (secs < 10) {            t.append("0");        }        else if (secs < 0){            t.append("0")        }        else{        t.append(secs);        }        return t.toString();    }void onMessage(String message) {        if (message == "You pick some flax.") {            log("Picked a flax!")            picked ++;}}}

Edited by wood1master7

Guest
This topic is now closed to further replies.

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.