This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.



  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flax Picker
#1
Code:
package net.mark.test;

import java.awt.Graphics2D;

import net.mark.rsc.bot.api.interfaces.PaintListener;
import net.mark.rsc.bot.api.various.Random;
import net.mark.rsc.bot.api.wrapper.GameObject;
import net.mark.rsc.bot.api.wrapper.NPC;
import net.mark.rsc.bot.api.wrapper.Player;
import net.mark.rsc.bot.api.wrapper.Tile;
import net.mark.rsc.bot.script.Script;

public class FlaxPicker extends Script implements PaintListener {
    
    @Override
    public void init() {
    }

    @Override
    public String getName() {
        return "Flax Picker";
    }
    
    @Override
    public int loop() {
        Player local = players.getLocal();
        if(banking.isOpen()) {
            if(inventory.contains(675)) {
                banking.depositAll(675);
                return 1250;
            }
            banking.close();
            return 1200;
        }
        if(players.getLocal().getY() > 1000) {
            if(inventory.getInventory().length == 30) {
                NPC banker = npcs.find(540);
                GameObject chest = objects.find(942);
                if(banker != null && chest != null && !local.isWalking()) {
                    int distance = banker.getLocation().distanceTo(players.getLocal().getLocation());
                    int distance2 = chest.getLocation().distanceTo(players.getLocal().getLocation());
                    if(distance > distance2) {
                        if(chest != null) {
                            if(!chest.isOnScreen()) {
                                camera.rotateTo(chest.getLocation());
                                return 400;
                            } else {
                                chest.interact("Open");
                                return 1250;
                            }
                        }
                    } else {
                        if(banker != null) {
                            if(!banker.isOnScreen()) {
                                camera.rotateTo(banker.getLocation());
                                return 400;
                            } else {
                                banker.interact("Bank");
                                return 1250;
                            }
                        }
                    }
                }
            } else {
                GameObject ladder = objects.find(new Tile(714,1460));
                if(ladder != null) {
                    if(!ladder.isOnScreen()) {
                        camera.rotateTo(ladder.getLocation());
                        return 400;
                    } else {
                        ladder.interact("climb-down");
                        return 1250;
                    }
                }
            }
        } else {
            if(inventory.getInventory().length == 30) {
                GameObject ladder = objects.find(new Tile(714,516));
                if(ladder != null) {
                    if(!ladder.isOnScreen()) {
                        camera.rotateTo(ladder.getLocation());
                        return 400;
                    } else {
                        ladder.interact("climb-up");
                        return 1250;
                    }
                }
            } else {
                GameObject flax = objects.find(new Tile(711,518));
                if(flax != null) {
                    if(!flax.isOnScreen()) {
                        camera.rotateTo(flax.getLocation());
                        return 400;
                    } else {
                        flax.interact("pick");
                        return Random.nextGaussian(250, 300);
                    }
                }
            }
        }
        return 1000;
    }
    
    @Override
    public void paint(Graphics2D g) {
    }
}
  Reply
#2
I paid for the bot but can't find a download?
  Reply
#3
how much flax does it pick an hour?
  Reply
#4
More than you can ever dream of
  Reply
#5
Mark, best one liner ever
  Reply
#6
Sweet
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)