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.

Fishing spot

Featured Replies

Is a fishing spot considered an NPC? doge.png

 

Also how would I get the closest fishing spot that isn't on tile (x,y,z)? unsure.png

  • Author

it is a npc 

 

getnpcs().getclosest(fishspot)

how can I filter out Position (x,y,z) with this? I'm so noob someone save me wacko.png

how can I filter out Position (x,y,z) with this? I'm so noob someone save me wacko.png

//try
NPC fish = getNpcs().closest(o -> o.getName().equals("Fishing spot") && o.getPosition().equals(Position position));
  • Author
//try
NPC fish = getNpcs().closest(o -> o.getName().equals("Fishing spot") && o.getPosition().equals(Position position));

srry I meant to say how do I get the closest "Fishing spot" which position is not (x,y,z)

srry I meant to say how do I get the closest "Fishing spot" which position is not (x,y,z)

NPC fish = getNpcs().closest(o -> o.getName().equals("Fishing spot")

???

  • Author
NPC fish = getNpcs().closest(o -> o.getName().equals("Fishing spot")

???

 

There is a tile in lumbridge by the fishing tutor where the fishing spot moves to sometimes.

It is not possible to fish there because the tutor is in the way of it. I'm trying to

.closest("Fishing spot") != Position(x,y,x) but there are errors because of different types.

Still trying to figure out how to say it in correct code. huh.png

Edited by Huz


NPC spot = getNpcs().closest("Fishing spot");

Position pos = new Position(x,y,z);

if(!spot.getPosition().equals(pos)){

//do stuff

}

Edited by Vilius

  • Author
NPC spot = getNpcs().closest("Fishing spot");
Position pos = new Position(x,y,z);
if(!spot.getPosition().equals(pos)){
    //do stuff
}

This works thanks!

However, now if the closest spot is the one which position we checked against, it stands still.

Any idea on how to make it "ignore" pos as a possible spot when assigning spot=npcs.closest?

This works thanks!

However, now if the closest spot is the one which position we checked against, it stands still.

Any idea on how to make it "ignore" pos as a possible spot when assigning spot=npcs.closest?

Just do this

//position object
Position pos = new Position(x,y,z);
//Will check if name is right and will check if the position isnt the ignored one
NPC fish = getNpcs().closest(o -> o.getName().equals("Fishing spot") && !o.getPosition().equals(pos));
//Interact with fish
fish.interact("action");

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.