Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. while(Player.getRSPlayer().isInCombat()) {
  2. //======Switch Prayers & Avoid Falling Rock====
  3. RSProjectile[] projectiles = Projectiles.getAll();
  4. for (RSProjectile proj: projectiles) {
  5. System.out.println("Looping through all projectiles");
  6. // Falling Rock
  7. if (proj.getGraphicID() == Constants.BOULDER && (proj.getPosition() == Player.getPosition())) {
  8. System.out.println("Detected falling boulder");
  9. RSTile tile = new RSTile(Player.getPosition().getX()-General.random(1, 3), Player.getPosition().getY()-General.random(1, 3));
  10. if (Clicking.click("Walk here", tile)) {
  11. Timing.waitCondition(new Condition() {
  12. @Override
  13. public boolean active() {
  14. General.sleep(100, 200);
  15. return Player.getPosition() == tile;
  16. }
  17. }, General.random(700, 1250));
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement