Jump to content

Gunman

Super Moderator
  • Posts

    3324
  • Joined

  • Last visited

  • Days Won

    17
  • Feedback

    100%

Posts posted by Gunman

  1. 13 hours ago, mark jacobs said:

    Ty sir seems to work perfect now! Should i be using this sleep class instead of conditional sleep?

    It's another take on the conditional sleep class that makes it a one liner with lambdas and a reset condition. Imo I'd use the Sleep class because of the reset condition option

  2. 18 hours ago, Czar said:

    It's best to increase the delay to 20 seconds or so, or make a small int timer; and do timer+=8; every time an animation is detected, and at the top of onLoop make it s

    if (timer > 0) {

    return 1000;

    }

    really simple but effective :D it carried me in my early days of scripting :doge: 

     

    Get your code up bby not your funny up
     

    Sleep.until(()-> !script.inventory.contains("Raw salmon") || script.widgets.isVisible(233) || script.getDialogues().isPendingContinuation(), ()-> myPlayer().isAnimating(), 3_000);


    Sleep.class
     

    
    import java.util.concurrent.TimeUnit;
    import java.util.function.BooleanSupplier;
    
    public class Sleep {
    
        private static final int DEFAULT_POLLING = 600;
        private static final int DEFAULT_CYCLE_LIMIT = 100;
    
        public static void sleep(int time) {
            try {
                TimeUnit.MILLISECONDS.sleep(time);
            } catch (InterruptedException e) {
                // I don't wanna deal with Interrupted Exception handling everywhere
                // but I need it to reset the execution when it happens
                throw new IndexOutOfBoundsException("Sleep Interrupted*");
            }
        }
    
        public static boolean until(BooleanSupplier condition, int timeout) {
            return until(condition, ()-> false, timeout, DEFAULT_POLLING);
        }
    
        public static boolean until(BooleanSupplier condition, int timeout, int polling) {
            return until(condition, ()-> false, timeout, polling);
        }
    
        public static boolean until(BooleanSupplier condition, BooleanSupplier resetCondition, int timeout) {
            return until(condition, resetCondition, timeout, DEFAULT_POLLING, DEFAULT_CYCLE_LIMIT);
        }
    
        public static boolean until(BooleanSupplier condition, BooleanSupplier resetCondition, int timeout, int polling) {
            return until(condition, resetCondition, timeout, polling, DEFAULT_CYCLE_LIMIT);
        }
    
        public static boolean until(BooleanSupplier condition, BooleanSupplier resetCondition, int timeout, int polling, int cycleLimit) {
            try {
                int resetCounter = 0;
                long startTime = System.currentTimeMillis();
    
                while ((System.currentTimeMillis() - startTime) < timeout && !condition.getAsBoolean()) {
                    if (resetCounter >= cycleLimit) {
                        break;
                    } else if (resetCondition.getAsBoolean()) {
                        startTime = System.currentTimeMillis();
                        resetCounter ++;
                    }
    
                    Sleep.sleep(polling);
                }
    
                return condition.getAsBoolean();
            } catch (NullPointerException e) {
                e.printStackTrace();
            }
    
            return false;
        }
    
    }

     

  3. 16 hours ago, FURYPVM said:


    Fury Pvm's Terms of Service
    All services go through our ticket system. We will always trade within your ticket, posting screenshots of trade windows, and confirm within the ticket. We will never confirm in-game.
    Please allow for a deemed reasonable amount of time for our workers to complete your order. Fury Pvm will do it's absolute best to communicate all necessary progress information in regards to your order.
    If your account becomes inaccessible for any reason of your own or Fury Pvm's control during your order, only a partial refund will be granted if approved by @Staff
    Should the Terms of Service be broken or voided by you as the customer, Fury Pvm is deemed valid to refuse you a refund, with the ability to cancel all currently active services.
    Fury Pvm will not tolerate any belligerent behavior, both parties will be treated with respect. Fury Pvm reserves the ability to cancel your current order at any time for any reason deemed fit by the @Staff
    Service orders can be conducted over VPN/Parsec. The closest geographical location to you will be used, this does not confirm non-disciplinary action will be taken against you from Jagex.
    If you the customer has a restricted account such as a pure, or low hp build. Please make @Staff aware of this prior to placing your order. Fury Pvm will not be responsible for any unwanted experience gained.
    The only payment methods Fury Pvm accepts are the ones listed within
    🛒︱purchase
    and on the form inside your ticket.
    We do not guarantee item drops for your account as we have no control over RNG.
    All concerns and issues must go through
    🤝︱support-faq
    ticket system so you as the customer can openly voice your side with the Fury Pvm team.
    Fury Pvm's ⁠terms-of-service
    is subject to change at anytime. We will notify you of these changes although it is YOUR responsibility to keep yourself up to date with the current Terms of Service.
    If the Terms of Service are broken in any means by you, Fury Pvm has the right to refuse you a refund and cancel all current orders.

    • For any further questioning please open
    🤝︱support-faq

    294c8b846df358552977b53eac01445f.gif

    Please note that global OSBot T.O.S. always applies in addition to this one, and personal T.O.S. can be declared obsolete at a moderator's discretion.

    OSBot Rules
    Market Rules

  4. 2 hours ago, Wedmarco1 said:

    Plenty of people have been reporting the same issue as I am for the past few versions, here and on Osbot discord... Unfortunately unusable for now for some of us

    Yeah I reported it to Pat and he fixed it in .20 as far as I'm aware. Maybe try deleting cache as I just tried it with .21 on a freshish osbot folder and it worked fine

  5. 9 hours ago, TheCongregation said:

    could this onmessage register if it says something like "someone else is fighting that" in that chatbox? because I use "getmessages" for game chatbox and it just reads the whole chatbox so that if the message comes up once it repeats it forever... can never design it so it only reads the most recent and then react and then continue and discount it

    It calls that method everytime there's a new message in chat. Print out the calls and see if it would work in your case

  6. 4 hours ago, SaintMeegz said:

    can i run multiple accounts on the free osbot? thru jagex accounts

    No, free only has 1 client 2 tabs, and I don't think it's currently possible to use more than 1 tab with Jagex accounts

    Currently the best support for Jagex accounts is through the manager, there is the patcher as well but not nice to run multiple with.

  7. 1 minute ago, SaintMeegz said:

    coming back after a long break trying to make new bot accounts am i just suppose to link them all to real emails and jagex accounts how are we doing it even mailinator isnt free anymore

    Sub emails for personal use and using all 20 characters per account. For selling... err make an outlook I guess?

×
×
  • Create New...