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.

how should the script know how much items it mined

Featured Replies

I wanna do something like

if 100 tin ores mined then go to state trading

but how should the script know how many tin ores it mined.

maybe getInventory().containts(Tin ore) +1?

 

I really appereciate your help

  • Author
21 minutes ago, Gunman said:

@mousbros Make a int called whatever you want. Then you have 2 options you can either track it based off what is in your bank when you go to bank or do int++ after everytime you mine the ore.

thank you im gonna try that out

  • Author
1 hour ago, mousbros said:

thank you im gonna try that out

@Gunman

case "MINING":
            final Area MINING_AREA1 = new Area (2982,3233,2990,3242);
            int ItemsMade = 0;
            
            if (!getInventory().isFull()) {
            if(MINING_AREA1.contains(myPosition()) && (getInventory().contains("Bronze pickaxe"))){
                RS2Object ore = getObjects().closest(11362,11363);                
                if (ore != null) {                    
                    log ("Found ore");
                    if (!myPlayer().isAnimating()) {
                        if (!myPlayer().isMoving()) {                                                        
                            ore.interact("Mine");
                            antiban();
                            ItemsMade += 1;
                            log("Made an item");
                        if (ItemsMade == 5) {
                            log("Walking to Draynor");
                            getWalking().webWalk(Banks.DRAYNOR);
                            }
                        }
                    }
                }
            }
        }

I did something like this, knows when the item is made cuz I see the log.

but it doesnt go to the draynor after 5 ''items are made''

 

Edited by mousbros

  • Author
12 minutes ago, Gunman said:

@mousbros Pretty sure you're reseting the counter every time at the start of the case. Log the int at the start of the case and the end and see if it is being reset each time. Also you can do ItemsMade++; instead of ItemsMade +=1;

yea your right, dumb of me. it just goes to 0 when the loop starts again. is there any trick that I can make it remember it how many times it did the loop

1 minute ago, mousbros said:

yea your right, dumb of me. it just goes to 0 when the loop starts again. is there any trick that I can make it remember it how many times it did the loop

Yeah....Move it out of the case.
private int ItemsMade = 0;

  • Author
17 minutes ago, Gunman said:

Yeah....Move it out of the case.
private int ItemsMade = 0;

love you made it

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.