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.

Clicking on inventory items + antiban would be helpful :)

Featured Replies

Hello guys,
 
I'm making my first script, which is a wine drinker. I think I'm getting everything right, however there's missing one part that I can't get to figure out (saw a bunch of tutorials, and it was really helpful smile.png ) How do I click on jugs of wine from inventory? I have this code for now

 

import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
 
import java.awt.*;
 
@ScriptManifest(author = "Rafael", info = "My first script", name = "Bebe vinho", version = 0.1, logo = "")
public class main extends Script {
 
    @Override
    public void onStart() {
        log("Começar com 'jugs of wine' no banco de falador");
    }
 
    private enum State {
    	DRINK, BANK, WAIT
    };
    
    private State getState() {
    	if (inventory.contains("jug of wine"))
    		return State.DRINK;
    	if (!inventory.contains("jug of wine"))
    		return State.BANK;
    	return State.WAIT;   	
    }
    
    @Override
    public int onLoop() throws InterruptedException {
    	switch (getState()) {
    	case DRINK:
    		if (!myPlayer().isAnimating()) {
    			
    			sleep(random(10, 150));
    		}
    		break;
    	case BANK:
    		Entity bank = objects.closest("Bank booth");
    		if (!inventory.contains("jug of wine"))
    			getBank().depositAll();
    		if (bank != null) {
    			bank.interact("Bank");
    			sleep(random(500, 1300));
    			getBank().withdraw("Jug of wine", 28);
    		}
    		break;
    	case WAIT:
    		sleep(random(300, 1000));
    		break;
    	}
        return random(500, 1800);
    }
 
    @Override
    public void onExit() {
        log("Script parado. Bebado o suficiente?");
    }
 
    @Override
    public void onPaint(Graphics2D g) {
 
    }
 
}

 

 

Any anti-ban would be helpfull smile.png (and advices eheh)

Again, It's my first script, complete noob, never had any computer language learned, sorry if it's rubbish smile.png

Use this:
import org.osbot.rs07.api.ui.Tab;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.ConditionalSleep;

import java.awt.*;

@ScriptManifest(author = "Rafael", info = "My first script", name = "Bebe vinho", version = 0.1, logo = "")
public class main extends Script {

	@Override
	public void onStart() {
		log("Começar com 'jugs of wine' no banco de falador");
		AntiBan();
	}

	public void AntiBan() throws InterruptedException {
		switch (random(1, 35)) {
		case 1:
			equipment.openTab();
			break;
		case 2:
			skills.open();
                        break;                 
		case 3:
			camera.movePitch(40 + (random(2, 80)));
			break;
		case 4:
			camera.moveYaw(110 + (random(20, 50)));
			break;
		}
		sleep(random(250, 750));
		tabs.open(Tab.INVENTORY);
	}

	private enum State {
		DRINK, BANK, WAIT
	};

	private State getState() {
		if (inventory.contains("Jug of wine") && !myPlayer().isAnimating())
			return State.DRINK;
		if (!inventory.contains("Jug of wine"))
			return State.BANK;
		return State.WAIT;
	}

	@Override
	public int onLoop() throws InterruptedException {
		switch (getState()) {
		case DRINK:
				getInventory().interact("Drink", "Jug of wine");
				sleep(random(10, 150));
			break;
		case BANK:
			if (!getBank().isOpen()) {
				getBank().open();
				new ConditionalSleep(500) {

					@Override
					public boolean condition() throws InterruptedException {
						return !getBank().isOpen();
					}

				}.sleep();
			}
			if (getBank().isOpen() && getInventory().isEmpty() && !getInventory().contains("Jug of wine")
					&& getBank().contains("Jug of wine")) {
				getBank().withdrawAll("Jug of Wine");
			} else if (getBank().isOpen() && !getInventory().isEmpty() && !getInventory().contains("Jug of wine")
					&& getBank().contains("Jug of wine")) {
				getBank().depositAll();
				getBank().withdrawAll("Jug of Wine");
			}
			if (getBank().isOpen() && getInventory().contains("Jug of wine")) {
				getBank().close();
			}
			break;
		case WAIT:
			sleep(random(300, 1000));
			break;
		}
		return random(500, 1800);
	}

	@Override
	public void onExit() {
		log("Script parado. Bebado o suficiente?");
	}

	@Override
	public void onPaint(Graphics2D g) {

	}

}

Also if you dont mind me asking , why a wine drinker?

Edited by Assnerd

 

Use this:
import org.osbot.rs07.api.ui.Tab;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.ConditionalSleep;

import java.awt.*;

@ScriptManifest(author = "Rafael", info = "My first script", name = "Bebe vinho", version = 0.1, logo = "")
public class main extends Script {

	@Override
	public void onStart() {
		log("Começar com 'jugs of wine' no banco de falador");
		AntiBan();
	}

	public void AntiBan() throws InterruptedException {
		switch (random(1, 35)) {
		case 1:
			equipment.openTab();
			break;
		case 2:
			skills.open();
                        break;                 
		case 3:
			camera.movePitch(40 + (random(2, 80)));
			break;
		case 4:
			camera.moveYaw(110 + (random(20, 50)));
			break;
		}
		sleep(random(250, 750));
		tabs.open(Tab.INVENTORY);
	}

	private enum State {
		DRINK, BANK, WAIT
	};

	private State getState() {
		if (inventory.contains("Jug of wine") && !myPlayer().isAnimating())
			return State.DRINK;
		if (!inventory.contains("Jug of wine"))
			return State.BANK;
		return State.WAIT;
	}

	@Override
	public int onLoop() throws InterruptedException {
		switch (getState()) {
		case DRINK:
				getInventory().interact("Drink", "Jug of wine");
				sleep(random(10, 150));
			break;
		case BANK:
			if (!getBank().isOpen()) {
				getBank().open();
				new ConditionalSleep(500) {

					@Override
					public boolean condition() throws InterruptedException {
						return !getBank().isOpen();
					}

				}.sleep();
			}
			if (getBank().isOpen() && getInventory().isEmpty() && !getInventory().contains("Jug of wine")
					&& getBank().contains("Jug of wine")) {
				getBank().withdrawAll("Jug of Wine");
			} else if (getBank().isOpen() && !getInventory().isEmpty() && !getInventory().contains("Jug of wine")
					&& getBank().contains("Jug of wine")) {
				getBank().depositAll();
				getBank().withdrawAll("Jug of Wine");
			}
			if (getBank().isOpen() && getInventory().contains("Jug of wine")) {
				getBank().close();
			}
			break;
		case WAIT:
			sleep(random(300, 1000));
			break;
		}
		return random(500, 1800);
	}

	@Override
	public void onExit() {
		log("Script parado. Bebado o suficiente?");
	}

	@Override
	public void onPaint(Graphics2D g) {

	}

}

Also if you dont mind me asking , why a wine drinker?

 

Because wine is 35gp and jug is ~85, with water 110

Its mad beginner cash

  • Author

I tought a wine drinker would be a decent script to start learning (actually learned a lot holy shiee....) next stop, is to get a jug filler, where it doesn't have 20 people getting jugs of water every hour jesus christ, and maybe I'll last a while longer money-making on F2P accounts eheh I'm thinking of doing a quester next :D

I tought a wine drinker would be a decent script to start learning (actually learned a lot holy shiee....) next stop, is to get a jug filler, where it doesn't have 20 people getting jugs of water every hour jesus christ, and maybe I'll last a while longer money-making on F2P accounts eheh I'm thinking of doing a quester next biggrin.png

good luck

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.