March 1, 20178 yr I'm asking to see if it's possible to see how close you are to a specific tile. something like this: if (distanceTo(tile) <6) { bank(); }else{ webwalk(varrockeast); } I know syntax is not correct in example just looking to see if it is possible. I know you can check areas and such but i want to see if you can do it this way. In API I can only see distanceto entity. I'm probably being a bad. Can someone help? if you find it in api can you tell me where you found it too. thanks . EDIT: Would shift clicking be hard to implement too? wouldn't know where to start with this. Edited March 1, 20178 yr by mr bot420
March 1, 20178 yr use the.distance(entity) method when trying to calculate the distance e.g if(Banks.GRAND_EXCHANGE.getRandomPosition().distance(myPosition()) < 6) { //code } //another example private final Position alohaSnackbar = new Position(x,y,z); if(alohaSnackbar.distance(myPosition()) <= 6) //less than or equal to 6 { //code }
March 1, 20178 yr https://osbot.org/api/org/osbot/rs07/api/Map.html Map#distance(Entity entity) Returns absolute distance. Map#realDistance(Entity entity) Returns actual distance, as if walking to the Entity. If you can't reach it, I think this returns -1
March 1, 20178 yr 21 minutes ago, mr bot420 said: I'm asking to see if it's possible to see how close you are to a specific tile. something like this: if (distanceTo(tile) <6) { bank(); }else{ webwalk(varrockeast); } I know syntax is not correct in example just looking to see if it is possible. I know you can check areas and such but i want to see if you can do it this way. In API I can only see distanceto entity. I'm probably being a bad. Can someone help? if you find it in api can you tell me where you found it too. thanks . EDIT: Would shift clicking be hard to implement too? wouldn't know where to start with this. P.S your player is a entity so .distance(entity) will apply to myPlayer().getPosition() or simply myPosition() both r the same thing i guess
March 1, 20178 yr 1 hour ago, mr bot420 said: EDIT: Would shift clicking be hard to implement too? wouldn't know where to start with this. I think Alek added shift click dropping in the latest build, which is enabled only if your settings allow it.
Create an account or sign in to comment