Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while(Player.getRSPlayer().isInCombat()) {
- //======Switch Prayers & Avoid Falling Rock====
- RSProjectile[] projectiles = Projectiles.getAll();
- for (RSProjectile proj: projectiles) {
- System.out.println("Looping through all projectiles");
- // Falling Rock
- if (proj.getGraphicID() == Constants.BOULDER && (proj.getPosition() == Player.getPosition())) {
- System.out.println("Detected falling boulder");
- RSTile tile = new RSTile(Player.getPosition().getX()-General.random(1, 3), Player.getPosition().getY()-General.random(1, 3));
- if (Clicking.click("Walk here", tile)) {
- Timing.waitCondition(new Condition() {
- @Override
- public boolean active() {
- General.sleep(100, 200);
- return Player.getPosition() == tile;
- }
- }, General.random(700, 1250));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement