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.

Creating an entity for a bird snare

Featured Replies

So say i have a bird snare and i want to refer back to at that specific position.. How would i refer back to it later??

 

so like i want to be like

 

 

birdSnareOrigin.interact("pickup");

 

but how would i declare that... 


// Define this as a field, not local var!

ArrayList<Position> mySnares = new ArrayList<Position>();

 

// Run this when you want to add a Position

mySnares.add(theSnareEntity.getPosition());

 

// Run this when you want to retrieve a snare via its Position

Entity mySnare = getObjects().closest(new NameFilter("Snare"), new PositionFilter(mySnares.get(snareIndex));

mySnares.remove(snareIndex);

mySnare.interact("Pickup");

Edited by dudeami

// Define this as a field, not local var!
ArrayList<Position> mySnares = new ArrayList<Position>();
 
// Run this when you want to add a Position
mySnares.add(theSnareEntity.getPosition());
 
// Run this when you want to retrieve a snare via its Position
Entity mySnare = getObjects().closest(new NameFilter("Snare"), new PositionFilter(mySnares.get(snareIndex));
mySnares.remove(snareIndex);
mySnare.interact("Pickup");

linked lists are usually better performance when doing a lot of adding/removing from the lists

linked lists are usually better performance when doing a lot of adding/removing from the lists

 

Not something to worry about at this level :p

  • Author

Not something to worry about at this level tongue.png

I understand lists and stuff, just not the syntax or stuff like filters and some other stuff... my knowledge is limited to AP CS teachings,. Where just learning really about polymorphism, inheritance, and stuff like that for sub and super classes atm

Edited by iponu777

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.