Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Area[] banks = new Area[]{Banks.VARROCK_WEST, Banks.LUMBRIDGE_LOWER};
- WebWalkEvent webEvent = new WebWalkEvent(banks);
- PathPreferenceProfile pathProfile = new PathPreferenceProfile();
- pathProfile.setAllowTeleports(true);
- webEvent.setPathPreferenceProfile(pathProfile);
- webEvent.prefetchRequirements(this);
- Position destination = webEvent.getDestination();
- Area closestArea = null;
- if (destination != null) {
- for (Area area : banks) {
- if (area.contains(destination)) {
- closestArea = area;
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement