yibster2009 Posted August 10, 2017 Share Posted August 10, 2017 I have a fishing script but one spot cant be accessed there is a npc sitting there. I want to be able to remove that one tile or spot so the bot doesn't find it and click on it forever. there are 4 spots in the area i want to use the other 3 only. How would i do this? im retarded when it comes to programming so please bare with me. Quote Link to comment Share on other sites More sharing options...
JARNQ Posted August 10, 2017 Share Posted August 10, 2017 (edited) If the fishing spot you don't want the script to click on has static coords, you could use that. Edited August 10, 2017 by JARNQ Quote Link to comment Share on other sites More sharing options...
yibster2009 Posted August 10, 2017 Author Share Posted August 10, 2017 11 minutes ago, JARNQ said: If the fishing spot you don't want the script to click on has static coords, you could use that. how can i check this? Quote Link to comment Share on other sites More sharing options...
Nym Posted August 10, 2017 Share Posted August 10, 2017 27 minutes ago, yibster2009 said: how can i check this? exclude the fishing spot if it is on that tile. Use filters. Quote Link to comment Share on other sites More sharing options...
liverare Posted August 10, 2017 Share Posted August 10, 2017 Is it that fishing spot which sits on an awkward corner in the Fisher Realm? Quote Link to comment Share on other sites More sharing options...
Swegger Posted August 10, 2017 Share Posted August 10, 2017 You're probably trying to exclude the one in lumbridge? Quote Link to comment Share on other sites More sharing options...
d0zza Posted August 11, 2017 Share Posted August 11, 2017 (edited) It'd help if you could tell us where the fishing spot is but you could try using a filter to exclude it with getMap().canReach(). So when you're getting the fishing spots do: NPC fishingSpot = getNpcs().closest(x -> x.getId() == fishingSpotID && getMap().canReach(x)) Edited August 11, 2017 by d0zza Quote Link to comment Share on other sites More sharing options...
liverare Posted August 12, 2017 Share Posted August 12, 2017 (edited) On 11/08/2017 at 4:26 AM, d0zza said: It'd help if you could tell us where the fishing spot is but you could try using a filter to exclude it with getMap().canReach(). So when you're getting the fishing spots do: NPC fishingSpot = getNpcs().closest(x -> x.getId() == fishingSpotID && getMap().canReach(x)) Filtering by IDs is bad unless you dynamically retrieve those IDs and store them on each run. Because otherwise, a RuneScape update will change those IDs breaking your script. Running #canReach each is bad practice. If there's only one position you need to filter for, store that position as a constant and check against it. Running path-finding algorithm to exclude one fishing spot would be unnecessarily process intensive. Alternatively, you could write up a small tile-flag checker around the north, east, south, and west tiles of the fishing spot to determine whether it's a tile that can your player can stand on. That wouldn't be as bad and would be more applicable. However, be sure to store the results so you, so you don't keep asking the same questions you already know the answer to. Edited August 12, 2017 by liverare Quote Link to comment Share on other sites More sharing options...