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.

Issues with spam clicking tree

Featured Replies

New to scripting, got most of it down pat, can't seem to figure out how to stop my script from clicking a tree at least five times or so before it will begin cutting. Everything else seems to be fine.

Any help/criticism is welcome 

https://pastebin.com/UA1uGd37

10 minutes ago, Angelclaw said:

New to scripting, got most of it down pat, can't seem to figure out how to stop my script from clicking a tree at least five times or so before it will begin cutting. Everything else seems to be fine.

Any help/criticism is welcome 

https://pastebin.com/UA1uGd37

You need to run a ConditionalSleep until the player is chopping the tree.

Read section 9 of my tutorial:

https://osbot.org/forum/topic/115124-explvs-scripting-101/

 

Edited by Explv

What Explv said and rewrite your getState() a little. Check if the bot is animating before interacting with the tree (or put myPlayer().isAnimating() is a conditionalSleep) and not in getState()

  • Author
9 hours ago, nosepicker said:

What Explv said and rewrite your getState() a little. Check if the bot is animating before interacting with the tree (or put myPlayer().isAnimating() is a conditionalSleep) and not in getState()

so i should just rewrite the whole getState? Or is there a simply way of just changing one line of code.

7 hours ago, Angelclaw said:

so i should just rewrite the whole getState? Or is there a simply way of just changing one line of code.

Writing something simple like this should do the trick

public State getState() {
	if (inventory.isFull()) {
		return State.BANK;
	else {
		return State.CUT;
	}
}

Could also add more states for walking back and forth. Check the !myPlayer.isAnimating() before cutting a tree.

I recommend reading Explvs tutorial first if having trouble.

Edited by nosepicker

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.