Zodiac Dev Posted August 31, 2015 Share Posted August 31, 2015 This code is old public Position getCenterPosition(Area area, int height) { return new Position((area.getMinX() + area.getMaxX()) / 2, (area.getMinY() + area.getMaxY()) / 2, height); } this gives off the error :p I know this is old API shit but i don't know the new methods ;3 Please Help area.getMinX() + area.getMaxX()) / 2, (area.getMinY() + area.getMaxY()) / 2 Quote Link to comment Share on other sites More sharing options...
Isolate Posted August 31, 2015 Share Posted August 31, 2015 Area example = new Area(new Position(0,0,0), new Position(0,0,0)); Position mid = example.getPositions().get((example.getPositions().size() /2)); I assume this, but never tried it Quote Link to comment Share on other sites More sharing options...
Zodiac Dev Posted August 31, 2015 Author Share Posted August 31, 2015 (edited) Area example = new Area(new Position(0,0,0), new Position(0,0,0)); Position mid = example.getPositions().get((example.getPositions().size() /2)); I assume this, but never tried it That's not the full method ;L wont help much Position(0,0,0), new Position(0,0,0) isn't filled out with coords also this is how it's used script.localWalker.walk(getCenterPosition(Constants.BANK_AREA_SELECTED, 0)); I am new to this API so I am sorry to bother all of you Devs ;p I am transferring from RSPS Developing to script developing ;p Edited August 31, 2015 by run3warfar3 Quote Link to comment Share on other sites More sharing options...
Isolate Posted August 31, 2015 Share Posted August 31, 2015 (edited) private Position getMiddle(Area area, int plane){ if(area != null){ area.setPlane(plane); return area.getPositions().get((area.getPositions().size() /2)); } return null; } Edited August 31, 2015 by Isolate Quote Link to comment Share on other sites More sharing options...
Zodiac Dev Posted August 31, 2015 Author Share Posted August 31, 2015 private Position getMiddle(Area area, int plane){ if(area != null){ area.setPlane(plane); return area.getPositions().get((area.getPositions().size() /2)); } return null; } xD Thanks Man, and yes I do have to get spoon fed atm lol ;p Thanks for helping ill reply if it works or not ;3 It works I made an old treechopper work ;3 Quote Link to comment Share on other sites More sharing options...