Wazebi1 Posted July 20, 2020 Share Posted July 20, 2020 Hello, Trying to make my first script and having a hard time with this part. How can i get my character to only select mine types in certain areas? anyone help. Quote Link to comment Share on other sites More sharing options...
erenjwz Posted July 20, 2020 Share Posted July 20, 2020 Mine type? You mean the type of rock, right. Quote Link to comment Share on other sites More sharing options...
Wazebi1 Posted July 20, 2020 Author Share Posted July 20, 2020 Just now, erenjwz said: Mine type? You mean the type of rock, right. Yes i mean only get some type of rock in a certain place and not others Quote Link to comment Share on other sites More sharing options...
erenjwz Posted July 20, 2020 Share Posted July 20, 2020 Just now, Wazebi1 said: Yes i mean only get some type of rock in a certain place and not others You could do it like this: RS2Object ore_vein = getObjects().closest(obj -> obj.getName().equals("Ore vein") && MINE_AREA.contains(obj)); This will only mine certain rocks in the a certain Area you created if it exists. Quote Link to comment Share on other sites More sharing options...
Wazebi1 Posted July 20, 2020 Author Share Posted July 20, 2020 Just now, erenjwz said: You could do it like this: RS2Object ore_vein = getObjects().closest(obj -> obj.getName().equals("Ore vein") && MINE_AREA.contains(obj)); This will only mine certain rocks in the a certain Area you created if it exists. Thanks but how do i create an area? Quote Link to comment Share on other sites More sharing options...
erenjwz Posted July 20, 2020 Share Posted July 20, 2020 Just now, Wazebi1 said: Thanks but how do i create an area? You can find this all in the https://osbot.org/api/ And then go to Map>Area, and there you will find everything you need to know about Areas Quote Link to comment Share on other sites More sharing options...
Wazebi1 Posted July 20, 2020 Author Share Posted July 20, 2020 Just now, erenjwz said: You can find this all in the https://osbot.org/api/ And then go to Map>Area, and there you will find everything you need to know about Areas Alrighty thanks Quote Link to comment Share on other sites More sharing options...
erenjwz Posted July 20, 2020 Share Posted July 20, 2020 No problem and goodluck Quote Link to comment Share on other sites More sharing options...
Medusa Posted July 20, 2020 Share Posted July 20, 2020 2 hours ago, erenjwz said: You can find this all in the https://osbot.org/api/ And then go to Map>Area, and there you will find everything you need to know about Areas In case this is too hard, you can use https://explv.github.io/ Quote Link to comment Share on other sites More sharing options...
erenjwz Posted July 21, 2020 Share Posted July 21, 2020 11 hours ago, Medusa said: In case this is too hard, you can use https://explv.github.io/ Yesm Explv does have really good tutorials and snippets to take a look at. Quote Link to comment Share on other sites More sharing options...