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.

Set a final radius from player position

Featured Replies

So upon starting a script, I want the user to be able to enter a radius in form in integer. This will set a radius for e.g 15 tiles surrounding my player at the moment. The radius should be set, and never changed.

How would I approach this with the api?

5 minutes ago, Visty said:

So upon starting a script, I want the user to be able to enter a radius in form in integer. This will set a radius for e.g 15 tiles surrounding my player at the moment. The radius should be set, and never changed.

How would I approach this with the api?

In onStart, create a custom GUI or just use a dialogue to get the radius value from the user.

Then get the Area for that radius using:

myPlayer().getArea(radius)

And store it globally.

Edited by Explv

  • Author
4 minutes ago, Explv said:

myPlayer().getArea(radius)

Thank you, appreciated :ditto:

Easier than I thought lol. Should have a better look at the api I guess kek

Edited by Visty

If you're looking for a simple solution and don't want to go through the hassle of creating your own GUI, and this is the only data you want to input, consider using a JOptionPane. Just remember to check the data that's inputted and ensure that it's valid, and if not pop the option pane up again!

-Apa

  • Author
3 hours ago, Apaec said:

If you're looking for a simple solution and don't want to go through the hassle of creating your own GUI, and this is the only data you want to input, consider using a JOptionPane. Just remember to check the data that's inputted and ensure that it's valid, and if not pop the option pane up again!

-Apa

Thank you for your post. I've sorted out the GUI. Just wanted to know how to get the area, store it in a variable, then access it to my tasks. Nevertheless, I appreciate your post :doge:

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.