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 to move the camera in search of an object?

Featured Replies

I am in an area cutting trees, but in a moment the camera is left in a direction where there are no trees, then it remains without doing anything.

The tree I have declared it in the following way:

final RS2Object tree = objects.closest ("Tree");

And to move the camera try the following:

Camera camera = new Camera ();
camera.toEntity (tree);

 

Few things.

1. If you plan on using .interact, such as tree.interact("Chop"), do NOT use camera.toEntity. InteractionEvent in OSBot will handle this for you, and theres a few additional checks it will perform.

2. You're setting the tree to final and getting the closest tree. What happens when that tree is cut down and a new tree appears? This is no longer the same tree than what we started with.

Edit: Moved to Scripting Help. This was under Unofficial Scripts & Applications which this is not.

  • Author
33 minutes ago, Alek said:

Few things.

1. If you plan on using .interact, such as tree.interact("Chop"), do NOT use camera.toEntity. InteractionEvent in OSBot will handle this for you, and theres a few additional checks it will perform.

2. You're setting the tree to final and getting the closest tree. What happens when that tree is cut down and a new tree appears? This is no longer the same tree than what we started with.

Edit: Moved to Scripting Help. This was under Unofficial Scripts & Applications which this is not.

Thanks, solved.

  • Alek locked this topic
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.