Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Area[] banks = new Area[]{Banks.VARROCK_WEST, Banks.LUMBRIDGE_LOWER};
  2. WebWalkEvent webEvent = new WebWalkEvent(banks);
  3. PathPreferenceProfile pathProfile = new PathPreferenceProfile();
  4. pathProfile.setAllowTeleports(true);
  5. webEvent.setPathPreferenceProfile(pathProfile);
  6. webEvent.prefetchRequirements(this);
  7. Position destination = webEvent.getDestination();
  8. Area closestArea = null;
  9. if (destination != null) {
  10. for (Area area : banks) {
  11. if (area.contains(destination)) {
  12. closestArea = area;
  13. break;
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement