Wazebi1 Posted July 20, 2020 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.
Wazebi1 Posted July 20, 2020 Author 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
erenjwz Posted July 20, 2020 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.
Wazebi1 Posted July 20, 2020 Author 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?
erenjwz Posted July 20, 2020 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
Wazebi1 Posted July 20, 2020 Author 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
Medusa Posted July 20, 2020 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/
erenjwz Posted July 21, 2020 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.