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.

Smoking rock detection

Featured Replies

What I did was check for the closest NPC by name, and if the rock you're currently mined changed to an NPC(it changes to an NPC when it's smoking, at least it's like this way with Ents), switch to another rock(can use closestObject... because it doesn't return the smoking rock/ent).

ehh very inefficient method of detecting it

Simple

    public RS2Object currentlyMining = null;
    public int objectId = -1; //Rock id here
 
    public RS2Object getNextRock() {
        return closestObject(objectId);
    }
 
    public void execute() {
        if(currentlyMining == null) {
            currentlyMining = getNextRock();
        }
        if(!currentlyMining.exists()) {
            if(myPlayer().isAnimating()) {
                 //click position or run (smoking rock appeared)
            }
            currentlyMining = getNextRock();
        }
        if(currentlyMining.exists() && !myPlayer().isAnimating()) {
            //mine rock and sleep method here
        }
    }

Something along those lines, if the object you were mining no longer exists and you are stilling performing the mining action the smoking rocks appeared

NOTE: wrote code in reply box so it might need some modifications/alterations to work

Edited by LifezHatred

  • Author

ehh very inefficient method of detecting it

Simple

    public RS2Object currentlyMining = null;
    public int objectId = -1; //Rock id here
 
    public RS2Object getNextRock() {
        return closestObject(objectId);
    }
 
    public void execute() {
        if(currentlyMining == null) {
            currentlyMining = getNextRock();
        }
        if(!currentlyMining.exists()) {
            if(myPlayer().isAnimating()) {
                 //click position or run (smoking rock appeared)
            }
            currentlyMining = getNextRock();
        }
        if(currentlyMining.exists() && !myPlayer().isAnimating()) {
            //mine rock and sleep method here
        }
    }

Something along those lines, if the object you were mining no longer exists and you are stilling performing the mining action the smoking rocks appeared

NOTE: wrote code in reply box so it might need some modifications/alterations to work

 

I was thinking about the original code I posted earlier, and i believe the only issue was that if there was no other rocks ready to mine the player would continue to mine the smoking rock. I have edited the original code posted to reflect what im using and will update everyone once I get some more testing done on it.

I was thinking about the original code I posted earlier, and i believe the only issue was that if there was no other rocks ready to mine the player would continue to mine the smoking rock. I have edited the original code posted to reflect what im using and will update everyone once I get some more testing done on it.

not to be mean but after looking at the modification of the code it doesn't seem you know what it does (at least not in its entirety).

Edited by LifezHatred

I'd say the best way to do this is to check if the object you interacted with at first still exists

Was relayed multiple times and is within the code i posted, just hate to see someone copying what everyone else already stated

Was relayed multiple times and is within the code i posted, just hate to see someone copying what everyone else already stated

Oh, that's an attempt at what I posted? Oh my lord.

Oh, that's an attempt at what I posted? Oh my lord.

i know i about shit myself once i read something i read 20 times over, Really really really disturbing.

i know i about shit myself once i read something i read 20 times over, Really really really disturbing.

You don't even comprehend what I'm saying

I have this code, but it doesn't seem to work. The other methods on here only work randomly. IDK >>

RS2Object rock = closestObject(GEM_ID);

	        if(rock.exists() && !myPlayer().isAnimating()) {
	        	if (rock != null) {
	        		if (rock.interact("Mine"))
	        			curRock = rock;
	        			sleep(random(1000, 1500));
	        	}
	        }		
	        if(!curRock.exists()) {
	            if(myPlayer().isAnimating()) {
	            	traversePath(avoid, true);
					sleep(random(1500, 2500));
	            }
	        }			
			
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.