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.

Quick Scripting Help

Featured Replies

Hi,

 

I'm trying to make to make a Script especially for Runecrafting Body runes but I'm having a little trouble with scripting in the first place I've watched a couple videos but I need help.  I just want the script to be able to open the bank, then withdraw essence (any type), walk to the altar click on it (have to have the tiara), then craft the Runes, of course.  Also, possibly some Anti-Ban.  Basically not a too complicated script. 

 

I know how to do the ScriptManifest and all that just having a hard time with the harder stuff.. I just want to be pointed in the right direction.  I just don't want to use someone else's source code.  Also I've coded a little for a RSPS.

 

Cheers.

-Cheef

Well, a tip from me would be to find conditions. Conditions will give you a sense of how the script will function such as, client.getBank().isOpen(). This condition checks whether the bank is open. So, what do you want to do when the bank is open? Deposit runes? Withdraw pure essence? etc.

if (client.getBank().isOpen()) {
    if (client.getInventory().contains(PURE_ESSENCE)) {
        client.getBank().withdrawAll(PURE_ESSENCE);
    }
}

Where PURE_ESSENCE = ID of pure essence

Edited by Illumi

Well, a tip from me would be to find conditions. Conditions will give you a sense of how the script will function such as, client.getBank().isOpen(). This condition checks whether the bank is open. So, what do you want to do when the bank is open? Deposit runes? Withdraw pure essence? etc.

if (client.getBank().isOpen()) {
    if (client.getInventory().contains(PURE_ESSENCE)) {
        client.getBank().withdrawAll(PURE_ESSENCE);
    }
}

Where PURE_ESSENCE = ID of pure essence

if (!client.getInventory().contains(PURE_ESSENCE)) {

You forgot to add the ! for not. If inventory doesn't contain essence -> withdraw essence smile.png

 

Also, if you're only wanting a full inventory of essence you would use:

if (!client.getInventory().isFull()) {

If inventory is not full -> withdraw essence.

Edited by Kronos

  • Author

Well, a tip from me would be to find conditions. Conditions will give you a sense of how the script will function such as, client.getBank().isOpen(). This condition checks whether the bank is open. So, what do you want to do when the bank is open? Deposit runes? Withdraw pure essence? etc.

if (client.getBank().isOpen()) {
    if (client.getInventory().contains(PURE_ESSENCE)) {
        client.getBank().withdrawAll(PURE_ESSENCE);
    }
}

Where PURE_ESSENCE = ID of pure essence

 

 

 

Well, a tip from me would be to find conditions. Conditions will give you a sense of how the script will function such as, client.getBank().isOpen(). This condition checks whether the bank is open. So, what do you want to do when the bank is open? Deposit runes? Withdraw pure essence? etc.

if (client.getBank().isOpen()) {
    if (client.getInventory().contains(PURE_ESSENCE)) {
        client.getBank().withdrawAll(PURE_ESSENCE);
    }
}

Where PURE_ESSENCE = ID of pure essence

if (!client.getInventory().contains(PURE_ESSENCE))

You forgot to add the ! for not. If inventory doesn't contain essence -> withdraw essence smile.png

 

 

Thanks! I will try these in the morning.

 

edit: Deposit the runes and withdraw essence.  (You can use rune essence for Body runes I think)

Edited by Cheef

 

Well, a tip from me would be to find conditions. Conditions will give you a sense of how the script will function such as, client.getBank().isOpen(). This condition checks whether the bank is open. So, what do you want to do when the bank is open? Deposit runes? Withdraw pure essence? etc.

if (client.getBank().isOpen()) {
    if (client.getInventory().contains(PURE_ESSENCE)) {
        client.getBank().withdrawAll(PURE_ESSENCE);
    }
}

Where PURE_ESSENCE = ID of pure essence

if (!client.getInventory().contains(PURE_ESSENCE)) {

You forgot to add the ! for not. If inventory doesn't contain essence -> withdraw essence smile.png

 

Also, if you're only wanting a full inventory of essence you would use:

if (!client.getInventory().isFull()) {

If inventory is not full -> withdraw essence.

 

Yeah sorry, I'm sleep deprived. Kronos is right. :)

  • Author

 

 

Well, a tip from me would be to find conditions. Conditions will give you a sense of how the script will function such as, client.getBank().isOpen(). This condition checks whether the bank is open. So, what do you want to do when the bank is open? Deposit runes? Withdraw pure essence? etc.

if (client.getBank().isOpen()) {
    if (client.getInventory().contains(PURE_ESSENCE)) {
        client.getBank().withdrawAll(PURE_ESSENCE);
    }
}

Where PURE_ESSENCE = ID of pure essence

if (!client.getInventory().contains(PURE_ESSENCE)) {

You forgot to add the ! for not. If inventory doesn't contain essence -> withdraw essence smile.png

 

Also, if you're only wanting a full inventory of essence you would use:

if (!client.getInventory().isFull()) {

If inventory is not full -> withdraw essence.

 

Yeah sorry, I'm sleep deprived. Kronos is right. smile.png

 

 

Do I have to import the bank classes? From org.osbot.script.rs2.ui?

Does the Pure Ess have the same id as the ground item id?

Can someone please help me?

I have TeamViewer.

 

 

 

Well, a tip from me would be to find conditions. Conditions will give you a sense of how the script will function such as, client.getBank().isOpen(). This condition checks whether the bank is open. So, what do you want to do when the bank is open? Deposit runes? Withdraw pure essence? etc.

if (client.getBank().isOpen()) {
    if (client.getInventory().contains(PURE_ESSENCE)) {
        client.getBank().withdrawAll(PURE_ESSENCE);
    }
}

Where PURE_ESSENCE = ID of pure essence

if (!client.getInventory().contains(PURE_ESSENCE)) {

You forgot to add the ! for not. If inventory doesn't contain essence -> withdraw essence smile.png

 

Also, if you're only wanting a full inventory of essence you would use:

if (!client.getInventory().isFull()) {

If inventory is not full -> withdraw essence.

 

Yeah sorry, I'm sleep deprived. Kronos is right. smile.png

 

 

Do I have to import the bank classes? From org.osbot.script.rs2.ui?

Does the Pure Ess have the same id as the ground item id?

Can someone please help me?

I have TeamViewer.

 

 

yes

yes

yes

and no.

 

  • Author

 

 

 

 

Well, a tip from me would be to find conditions. Conditions will give you a sense of how the script will function such as, client.getBank().isOpen(). This condition checks whether the bank is open. So, what do you want to do when the bank is open? Deposit runes? Withdraw pure essence? etc.

if (client.getBank().isOpen()) {
    if (client.getInventory().contains(PURE_ESSENCE)) {
        client.getBank().withdrawAll(PURE_ESSENCE);
    }
}

Where PURE_ESSENCE = ID of pure essence

if (!client.getInventory().contains(PURE_ESSENCE)) {

You forgot to add the ! for not. If inventory doesn't contain essence -> withdraw essence smile.png

 

Also, if you're only wanting a full inventory of essence you would use:

if (!client.getInventory().isFull()) {

If inventory is not full -> withdraw essence.

 

Yeah sorry, I'm sleep deprived. Kronos is right. smile.png

 

 

Do I have to import the bank classes? From org.osbot.script.rs2.ui?

Does the Pure Ess have the same id as the ground item id?

Can someone please help me?

I have TeamViewer.

 

 

yes

yes

yes

and no.

 

 

 

Thanks lol

  • Author

You should try and use names instead of ID's wherever possible.

Otherwise Jagex will try and fuck you after an update smile.png

 

For example: Mysterious ruins, Body rune, Banker, Bank stall; etc.

 

Probably make a different bot there's already a body runecrafter on the SDN... Stark just needs to update it.

Probably make a thieving script for seed stalls.

 

Much thanks.


package cheefseedstallin;

import java.lang.Thread.State;

import org.osbot.script.Script;
import org.osbot.script.ScriptManifest;
import org.osbot.script.rs2.map.Position;

@ScriptManifest(author = "Cheef", info = "Steals seeds from the stalls in Draynor Village.  Set-up in bank", name = "Cheef's Seed Stallin'", version = 0.1)

public class CheefSeedStallin extends Script{

enum state {
	BANKING, WALK, ROBBING, IDLE, EATING, OPENBANK
	
}

STATE state = State.WALK;
Position bankp = new Position(3091, 3245, 0);
Position stallp = new Position(3079, 3054, 0);
Position HalfwayTo = new Position(3087, 3248, 0);
Position HalfwayTo2 = new Position(3086, 3249, 0);
int bankerId = 567;
int lobsterId = 379;
int X = 0;
int Y= 0;
int stallId = 7053;
int amout = 12;


public void onStart(){
	X = client.getMyPlayer().getX();
	Y = client.getMyPlayer().getY();
	log("Welcome. Time to start Stallin'");
	startlevel = Client.getSkills().getLevel(Skills.THIEVING);

	}
}

Can someone help? 

I am I doing it right or do I need to scrap the whole thing?

Thanks in advanced.  

 

edit: I just started the script, but I would like to know if I'm on the right track.

Forgot to show what I want the features to be; to eat, run from combat, steal from the seed stall, bank for food, walk back from Lumby.

Edited by Cheef

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.