Jump to content

Eagle Scripts

Lifetime Sponsor
  • Posts

    7249
  • Joined

  • Last visited

  • Days Won

    12
  • Feedback

    100%

Everything posted by Eagle Scripts

  1. Please do indeed try to catch the error . Mind also trying if this occurs if you're not using mirror mode?
  2. @Override public final void onStart() { } No need to include this if you're simply overriding a method with an empty body. You can remove the entire onStart . ^^ Same applies for onPaint. private void walkToChickenPen(){ Area chickenPen = new Area(3225, 3301, 3235, 3288); log("Walking back to pen"); getWalking().webWalk(chickenPen); //Web as gate may be closed log("Back at pen"); } you can move the chickenPen up one level: private static final Area CHICKEN_PEN = new Area(3225, 3301, 3235, 3288); fightChicken(); new ConditionalSleep(5000, 500) { @Override public boolean condition() throws InterruptedException { log("Waiting to see if we fight a chicken"); return (getCombat().isFighting() || !myPlayer().isMoving()) ; } }.sleep(); Since you're already making a separate method for attacking the chicken; why not sleep inside that method as well? Remove the sleep here. private boolean fightChicken(){ NPC chicken = npcs.closest(new Filter<NPC>() { @Override public boolean match (NPC npc) { return npc.exists() && npc.getName().equals("Chicken") && npc.isAttackable() && npc.getHealthPercent() >0; } }); if (chicken == null){ log("Found no chickens :("); return false; } else { if(chicken.isOnScreen()) { chicken.interact("Attack"); log("Fight that chicken"); return true; } else { //how? return false; } } } The above method can be refactored to: private void fightChicken(){ final NPC chicken = getNpcs().closest(npc -> npc.exists() && npc.getName().equals("Chicken") && npc.isAttackable() && npc.getHealthPercent() > 0); if (chicken != null) { if (chicken.isOnScreen()) { log("Fight that chicken"); if (chicken.interact("Attack")) { new ConditionalSleep(5000, 500) { @Override public boolean condition() throws InterruptedException { log("Waiting to see if we fight a chicken"); return (getCombat().isFighting() || !myPlayer().isMoving()) ; } }.sleep(); } } } else { log("Found no chickens :("); } } Also; notice how I changed the method's type from boolean to void? There's no point in making it a boolean method if you're not doing anything with its return value .
  3. The OT states how to start it
  4. Please visit my Discord and ask for the beta status. Make sure to give your OSBot Profile in there to verify it's you. https://discord.gg/tvXQfwa
  5. Granted
  6. Went ahead and granted you a trial. If the script does not turn up in your script selector it means you've already had your trial once .
  7. You've been granted access to the beta.
  8. @SocialGFX Somehow my Discord won't send you a friend's request. Could you send me one instead? Eagle Scripts#5266
  9. It's not necessarily bad but the old one was 10x better
  10. Nice one! On a more serious note: where is that good-looking old khal paint?
  11. Sure thing! Granted
  12. Both granted .
  13. Granted!
  14. Of course. Granted
  15. Alright. Please write a bug report for each of the issues that you're encountering. As for the feature request; I'm sorry to say that I'm currently not taking feature requests for this script.
  16. Sure thing. Granted .
  17. Are you using mirror mode?
  18. Since bans happen with any script; not necessarily. If you can supply me with an account that has access to trollheim I could add it in.
  19. Granted .
  20. Granted.
  21. It seems you've already had your trial once.
  22. Granted.
  23. Yeah. Trial granted.
×
×
  • Create New...