Advertisement
FALSkills

Untitled

May 25th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. public static boolean handleZeahBoats(String locationOption){
  2. String travelOption = "Travel";
  3. RSNPC[] npcs = NPCs.find("Veos","Captain Magoro");
  4. if(npcs.length > 0){
  5. String[] actions = npcs[0].getActions();
  6. if(actions != null){
  7. if(Arrays.asList(actions).stream().anyMatch(a -> a.equals("Port Sarim") || a.equals("Land's End"))){
  8. if(locationOption.contains("Port Sarim")){
  9. travelOption = "Port Sarim";
  10. } else if(locationOption.contains("Piscarilius")){
  11. travelOption = "Port Piscarilius";
  12. } else if(locationOption.contains("Land")){
  13. travelOption = "Land's End";
  14. }
  15. }
  16. }
  17. }
  18. if (NPCInteraction.talkTo(Filters.NPCs.nameEquals("Veos", "Captain Magoro"), new String[]{travelOption}, new String[]{locationOption})
  19. && WaitFor.condition(10000, () -> ShipUtils.isOnShip() ? WaitFor.Return.SUCCESS : WaitFor.Return.IGNORE) == WaitFor.Return.SUCCESS){
  20. WaitFor.milliseconds(1800, 2800);
  21. return true;
  22. }
  23. return false;
  24. }
  25.  
  26.  
  27.  
  28.  
  29.  
  30. case PORT_SARIM_VEOS:
  31. zeahBoatLocation = "Travel to Port Sarim.";
  32. break;
  33. case GREAT_KOUREND:
  34. zeahBoatLocation = "Travel to Port Piscarilius.";
  35. break;
  36. case LANDS_END:
  37. zeahBoatLocation = "Travel to Land's End.";
  38. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement