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.

Smithing sleep not working

Featured Replies

  • Author

ok changed, still not working

https://pastebin.com/CTmrkeEW

Just now, Explv said:

Nothing wrong with using the inventory variable instead of the getInventory() method (which just returns inventory)

so why the conditionalsleep is not working?

Edited by kadiem

I believe your script also banks if you have even 1 sapphire ring so you could use getinventory().onlycontains sapphire ring and ring mould?

Edited by Abysm

3 minutes ago, Explv said:

Nothing wrong with using the inventory variable instead of the getInventory() method (which just returns inventory)

Ugly tho :boge: 

Mabye change for condition to break when !inventory.contains ("whatever your starting with")

1 hour ago, slazter said:

Mabye change for condition to break when !inventory.contains ("whatever your starting with")

True! ConditionalSleep if !inventory.onlycontains sapphire ring and ring mould && !myplayer. isAnimating 

  • Author
14 hours ago, Abysm said:

True! ConditionalSleep if !inventory.onlycontains sapphire ring and ring mould && !myplayer. isAnimating 

 

16 hours ago, slazter said:

Mabye change for condition to break when !inventory.contains ("whatever your starting with")

no use still

https://pastebin.com/E5J3bjHz

  • Author

nothing is showing on

 

[INFO][Bot #1][07/09 03:48:32 PM]: Loaded 3 built-in random solvers!
[INFO][Bot #1][07/09 03:48:34 PM]: Started script : SP
[INFO][Bot #1][07/09 03:48:57 PM]: Terminating script SP...
[INFO][Bot #1][07/09 03:48:57 PM]: Script SP has exited!
 

not quite sure what the problem is, i made a super simple ruby amulet maker, pretty similar to yours, that works, i'll link it and mabye u can try to steal some part of that logic and try to se if it works? 
bare in mind this was one of my first scripts i ever made, but it got the job done. 

 

import org.osbot.rs07.api.Inventory;
import org.osbot.rs07.api.Widgets;
import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.script.MethodProvider;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.ConditionalSleep;

import javax.swing.text.Position;

@ScriptManifest(author = "Slazter", name = "Craft Ruby Rings", info = "", version = 0.1, logo = "")

public final class CrafterTest extends Script  {


    @Override
    public final int onLoop() throws InterruptedException {
        Platser plat = new Platser();
        if(getInventory().contains("Ruby")&& plat.edge_bank.contains(myPosition()) && getInventory().contains("Gold Bar")){
            walkFurnace();
        }
        else if(plat.edge_furnace.contains(myPosition()) && getInventory().contains("Ruby")){
            craft();
        }
        else if(plat.edge_furnace.contains(myPosition()) && !getInventory().contains("Ruby")){
            walkBank();
        }
        else if(plat.edge_bank.contains(myPosition())&& !getInventory().contains("Gold bar")){
            banking();
        }
        return 650;
    }
    private boolean setAmount(){
        return getKeyboard().typeString("" + MethodProvider.random(15,88));
    }

    private void craft() throws InterruptedException {
        Inventory inv = getInventory();
        Item gbar = getInventory().getItem("Gold bar");
        RS2Object furn = getObjects().closest("Furnace");
        Widgets wid = getWidgets();

        if(!getWidgets().isVisible(446) &&furn!=null){
            gbar.interact("Use");
            sleep(random(221,389));
            furn.interact("Use");
            new ConditionalSleep(3000) {
                @Override
                public boolean condition() {
                    return getWidgets().isVisible(446);
                }
            }.sleep();
        }
        else if(getWidgets().isVisible(446)){
            wid.interact(446,37, "Make-X");
            sleep(random(750,988));
            setAmount();
            new ConditionalSleep(25000) {
                @Override
                public boolean condition() {
                    return !inv.contains("Ruby") || getDialogues().isPendingContinuation();
                }
            }.sleep();
        }else if(getDialogues().isPendingContinuation()){
            getDialogues().clickContinue();
        }
    }
    private void walkBank(){
        Platser plat = new Platser();
        getWalking().walk(plat.edge_bank_s);
    }
    private void walkFurnace(){
        Platser plat = new Platser();
        getWalking().walk(plat.edge_furn);
    }
    private void banking() throws InterruptedException {
        if(!getBank().isOpen()){
            getBank().open();
        }
        else if(getBank().isOpen()){
            getBank().depositAllExcept("Amulet Mould");
            getBank().withdraw("Ruby", 13);
            getBank().withdraw("Gold bar", 13);
            getBank().close();
            }
        else if(!inventory.contains("Gold bar")){
            getBank().open();
            getBank().withdraw("Gold bar",13);
            getBank().close();
        }
        }
    }

 

  • Author
52 minutes ago, slazter said:

not quite sure what the problem is, i made a super simple ruby amulet maker, pretty similar to yours, that works, i'll link it and mabye u can try to steal some part of that logic and try to se if it works? 
bare in mind this was one of my first scripts i ever made, but it got the job done. 

 


import org.osbot.rs07.api.Inventory;
import org.osbot.rs07.api.Widgets;
import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.script.MethodProvider;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.ConditionalSleep;

import javax.swing.text.Position;

@ScriptManifest(author = "Slazter", name = "Craft Ruby Rings", info = "", version = 0.1, logo = "")

public final class CrafterTest extends Script  {


    @Override
    public final int onLoop() throws InterruptedException {
        Platser plat = new Platser();
        if(getInventory().contains("Ruby")&& plat.edge_bank.contains(myPosition()) && getInventory().contains("Gold Bar")){
            walkFurnace();
        }
        else if(plat.edge_furnace.contains(myPosition()) && getInventory().contains("Ruby")){
            craft();
        }
        else if(plat.edge_furnace.contains(myPosition()) && !getInventory().contains("Ruby")){
            walkBank();
        }
        else if(plat.edge_bank.contains(myPosition())&& !getInventory().contains("Gold bar")){
            banking();
        }
        return 650;
    }
    private boolean setAmount(){
        return getKeyboard().typeString("" + MethodProvider.random(15,88));
    }

    private void craft() throws InterruptedException {
        Inventory inv = getInventory();
        Item gbar = getInventory().getItem("Gold bar");
        RS2Object furn = getObjects().closest("Furnace");
        Widgets wid = getWidgets();

        if(!getWidgets().isVisible(446) &&furn!=null){
            gbar.interact("Use");
            sleep(random(221,389));
            furn.interact("Use");
            new ConditionalSleep(3000) {
                @Override
                public boolean condition() {
                    return getWidgets().isVisible(446);
                }
            }.sleep();
        }
        else if(getWidgets().isVisible(446)){
            wid.interact(446,37, "Make-X");
            sleep(random(750,988));
            setAmount();
            new ConditionalSleep(25000) {
                @Override
                public boolean condition() {
                    return !inv.contains("Ruby") || getDialogues().isPendingContinuation();
                }
            }.sleep();
        }else if(getDialogues().isPendingContinuation()){
            getDialogues().clickContinue();
        }
    }
    private void walkBank(){
        Platser plat = new Platser();
        getWalking().walk(plat.edge_bank_s);
    }
    private void walkFurnace(){
        Platser plat = new Platser();
        getWalking().walk(plat.edge_furn);
    }
    private void banking() throws InterruptedException {
        if(!getBank().isOpen()){
            getBank().open();
        }
        else if(getBank().isOpen()){
            getBank().depositAllExcept("Amulet Mould");
            getBank().withdraw("Ruby", 13);
            getBank().withdraw("Gold bar", 13);
            getBank().close();
            }
        else if(!inventory.contains("Gold bar")){
            getBank().open();
            getBank().withdraw("Gold bar",13);
            getBank().close();
        }
        }
    }

 

what do you mean by Platser?

20 minutes ago, kadiem said:

what do you mean by Platser?

Platser is just a class i made when i started scripting, to store all the regular spots i visit, so i don't have to type them up everytime or find them again. So basicly name of the class, platser = swedish word for spots. Then i create an object of that class so i can acess those spots. 

So instead of writing, 

final Area edgeville_Bank = new Area(3089, 3488, 3096, 3494);
getWalking.webWalk(edgeville_Bank);

or

getWalking.webWalk(new Area(3089,3488,3096,3494);

i made a class for all the spots, and to acess them i have to create an object therefore,
 

Platser plats = new Platser(); //create class to acess the areas.
getWalking.webWalk(plats.edgeville_Bank);

I have no clue if this is actually good practice as im self taught, just figured it'd make my life easier to not having to scroll through my scripts each time i want a certain spot that i frequently visit. 

 

  • Author
1 hour ago, slazter said:

Platser is just a class i made when i started scripting, to store all the regular spots i visit, so i don't have to type them up everytime or find them again. So basicly name of the class, platser = swedish word for spots. Then i create an object of that class so i can acess those spots. 

So instead of writing, 


final Area edgeville_Bank = new Area(3089, 3488, 3096, 3494);
getWalking.webWalk(edgeville_Bank);

or

getWalking.webWalk(new Area(3089,3488,3096,3494);

i made a class for all the spots, and to acess them i have to create an object therefore,
 


Platser plats = new Platser(); //create class to acess the areas.
getWalking.webWalk(plats.edgeville_Bank);

I have no clue if this is actually good practice as im self taught, just figured it'd make my life easier to not having to scroll through my scripts each time i want a certain spot that i frequently visit. 

 

oh ok, thanks btw i used your crafting class and it worked

16 minutes ago, kadiem said:

oh ok, thanks btw i used your crafting class and it worked

Glad it worked out for you! :)

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.