Skip 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.

Cabbage Patch Kid - Money Making

Featured Replies

The code in this script isn't my 'best' but functional, feel free to improve if you'd like I just did this up quick is all lol sorry in advance!

 

Be sure to hit the Like button if you use, this is my second script made so far. Plenty more to come!

 

Anyways, market price for Cabbage is 48gp, sell lower to auto sell. I was actually testing to see if infact cabbage would sell and it did.

Regardless, there's 0 requirements for this money making method and is entirely F2P.

 

Start off anywhere, it'll walk itself to the cabbage patch (start draynor ideally).

Here's some features to list.

  • Statistics Log
  • Walks to Port Sarim/Draynor Cabbage patch
  • Anti ban methods as seen in my Bone Bury script
  • Prior features from the Bury Bones script included
  • Bank support (object/npc (randomized))

 

pHYS4ux.png

package main.script.Cabbage_Patch_Kid;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.RenderingHints;

import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.api.ui.Tab;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Booleans Yay", info = "Cabbage Picking made ez pz", name = "Cabbage Patch Kid", version = 1, logo = "")

public class CabagePatchKid extends Script {
	
	private int cabbage_taken, banked,randomsDismissed;
	long timeStarting = System.currentTimeMillis();
	
	private Area bankArea = new Area(3092 , 3245, 3094, 3245);
	private Position cabbagePos = new Position(3053, 3284, 0);
	
	@[member='Override']
	public void onStart() throws InterruptedException {
		cabbage_taken = 0;
		banked = 0;
		randomsDismissed = 0;
		timeStarting = System.currentTimeMillis();
		getSettings().setRunning(true);
		if (!(cabbagePos == myPlayer().getPosition()))
		{
			getWalking().webWalk(cabbagePos);
		}
	}

	private enum BotState {
		PICKING_CABAGE, BANKING
	};
	
	private BotState getState() {
		return inventory.isFull() ? BotState.BANKING : BotState.PICKING_CABAGE;
	}
	
	private boolean dismissRandom() {
		for (NPC npc : npcs.getAll()) {
			if (npc == null || npc.getInteracting() == null
					|| npc.getInteracting() != myPlayer()) {
				continue;
			}
			if (npc.hasAction("Dismiss")) {
				npc.interact("Dismiss");
				randomsDismissed++;
				return true;
			}
		}
		return false;
	}
	public void antiBanMode() throws InterruptedException {
		camera.movePitch(random(0, getState() == BotState.PICKING_CABAGE ? 360 : 0));
		sleep(random(500, 900));
		camera.moveYaw(random(0, getState() == BotState.PICKING_CABAGE ? 360 : 0));
		sleep(random(500, 900));
		
		int randomTabs = random(0, 125);
		if (getState() == BotState.PICKING_CABAGE) {
			switch (randomTabs) {
			case 0:
				getTabs().open(Tab.EMOTES);
				break;
			case 1:
				getTabs().open(Tab.ATTACK);
				break;
			case 2:
				getTabs().open(Tab.FRIENDS);
				break;
			case 3:
				getTabs().open(Tab.CLANCHAT);
				break;
			case 4:
				getTabs().open(Tab.EQUIPMENT);
				break;
			case 5:
				getTabs().open(Tab.IGNORES);
				break;
			case 6:
				getTabs().open(Tab.INVENTORY);
				break;
			case 7:
				getTabs().open(Tab.LOGOUT);
				break;
			case 8:
				getTabs().open(Tab.PRAYER);
				break;
			case 9:
				getTabs().open(Tab.SKILLS);
				break;
			case 10:
				getTabs().open(Tab.MAGIC);
				break;
			}
			return;
		}
	}
	
    public void bank() throws InterruptedException{
    	openBank();
    	depositBank();
    	closeBank();
	}
    
    public void openBank() throws InterruptedException{
    	NPC closestBanker = getNpcs().closest("Banker");
    	Entity closestBankBooth = objects.closest(6943);
    	if(!bank.isOpen()){
    		int randomChoice = random(3);
    		if (randomChoice == 1){
    			closestBankBooth.interact("Bank");
    		}else{
    			closestBanker.interact("Bank");
    		}
    		sleep(random(1500,5000));
    		log("opening bank");
    	}
    }
    
	public void depositBank() throws InterruptedException {
		if (bank.isOpen()) {
			bank.depositAllExcept("Coins");
				sleep(random(400, 750));
			banked++;
		}
		log("Depositing");
	}

	public void closeBank() {
		if (bank.isOpen())
			bank.close();
		log("Closing bank");
	}
	
	
	@[member='Override']
	public int onLoop() throws InterruptedException {
		antiBanMode();
		int runRNG = random(5);
		if (runRNG == 1) {
			getSettings().setRunning(getSettings().getRunEnergy() < 25 ? false : true);
		}
		if(dismissRandom()) {
            sleep(random(600, 800));
            while(myPlayer().isMoving()) {
                sleep(600);
            }
        }
		switch (getState()) {
		case PICKING_CABAGE:
			if (!myPlayer().isAnimating()) {
				Entity cabbage = objects.closest("Cabbage");
				if (cabbage != null) {
					cabbage.interact("Pick");
					sleep(1_100);
					if (myPlayer().getX() == cabbage.getX())
						cabbage_taken++;
				}
			}
			break;
		case BANKING:
			while (!inventory.isEmpty()) {
				getWalking().webWalk(bankArea);
					bank();
			}
			if (inventory.isEmpty())
			{
				getWalking().webWalk(cabbagePos);
			}
			break;
		}
		return random(200, 300);
	}

	@[member='Override']
	public void onExit() {
	}
	
	@[member='Override']
	public void onPaint(Graphics2D g) {
		drawMouse(g);
		Font font = new Font("TimesRoman", Font.PLAIN, 14);
		g.setFont(font);
		g.setColor(Color.WHITE);
		g.drawString("Cabage Patch Kid script created by: Booleans Yay", 5, 40);
		g.drawString("Cabbage Patch Kid v1.1", 5, 55);
		g.drawString("Cabbage Gathered: " + cabbage_taken, 5, 85);
		g.drawString("Inventories Banked: " + banked, 5, 100);
		long runTime = System.currentTimeMillis() - timeStarting;
		g.drawString("Script Runtime: " + formatTime(runTime), 5, 115);
		g.drawString("Random Events Skipped: " + randomsDismissed, 5, 130);
		g.drawString("Mouse X/Y: " + mouse.getPosition().x + " " + mouse.getPosition().y, 5, 145);
		g.drawString("Player Running: " + settings.isRunning() + (" (Energy: " + settings.getRunEnergy() +")"), 5, 160);
		
		g.drawString("88888888888", 10, 470);
	}
	
	public void drawMouse(Graphics g) {
		((Graphics2D) g).setRenderingHints(
				new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON));
		Point p = mouse.getPosition();
		Graphics2D spinG = (Graphics2D) g.create();
		Graphics2D spinGRev = (Graphics2D) g.create();
		spinG.setColor(new Color(255, 255, 255));
		spinGRev.setColor(Color.cyan);
		spinG.rotate(System.currentTimeMillis() % 2000d / 2000d * (360d) * 2 * Math.PI / 180.0, p.x, p.y);
		spinGRev.rotate(System.currentTimeMillis() % 2000d / 2000d * (-360d) * 2 * Math.PI / 180.0, p.x, p.y);

		final int outerSize = 20;
		final int innerSize = 12;

		spinG.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
		spinGRev.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
		spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize, outerSize, 100, 75);
		spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize, outerSize, -100, 75);
		spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2), innerSize, innerSize, 100, 75);
		spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2), innerSize, innerSize, -100, 75);
	}

	public final String formatTime(final long ms) {
		long s = ms / 1000, m = s / 60, h = m / 60, d = h / 24;
		s %= 60;
		m %= 60;
		h %= 24;
		return d > 0 ? String.format("%02d:%02d:%02d:%02d", d, h, m, s)
				: h > 0 ? String.format("%02d:%02d:%02d", h, m, s) : String.format("%02d:%02d", m, s);
	}
}

Edited by booleans yay

That's a lot of cabbages for a bond.

Just collecting 8mil cabbages brb

  • Author

Just collecting 8mil cabbages brb

Share I scripted feels.png

  • 2 weeks later...

Works good, only time it gets stuck is on death, it will sometimes not detect it died so instead of deathwalking back it just rotates the camera / map continuously  like it's still picking cabbage,script needs to be restarted in order for it to work again(or moving back to cabbage field yourself). thanks for the script!

 

 

 

 

Edited by Convergence

  • 2 weeks later...
  • 1 month later...
  • Author
On 1/6/2017 at 1:55 PM, leechesgetstiche said:

how dare you ruin my money making method! curses!

please no hate!

But on flip side you can make several fresh accounts and instantly start making gp (current price 45gp*crashing*)

  • 2 months later...

who tf buys cabbages? lol nice release though

  • 2 weeks later...

Just wanted to thank you for this script, most tutorials are very outdated but yours worked with copy paste <3. Cannot wait to play around with the code :D Works really well, keep it up!

Can someone help me figure out how to only click a cabbage on a specific tile until it disappears without a sleep function? Would greatly appreciate it. <3 

pretty much asking how to keep mouse on a specific tile and clicking if "Cabbage" is seen there. :)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.