Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Falcon

    Lifetime Sponsor
    • Posts

      23
    • Joined

    • Last visited

    About Falcon

    Contact Methods

    • Discord
      Falcon#5042

    Recent Profile Visitors

    The recent visitors block is disabled and is not being shown to other users.

    Falcon's Achievements

    1. Okay so my issue is that I am trying to make the script wait until it has logged in since it is trying to get some data about the local player afterwards but it seems to start running way before it has fully loaded, do you guys have any clue what I am doing wrong or have any suggestions? Sleep.sleepTicks(2); Sleep.sleepUntil(() -> Client.getGameState() == GameState.LOGGED_IN && Client.getGameState() != GameState.GAME_LOADING && Client.getGameState() != GameState.LOADING, 1000); log("After sleepUntil"); // This is running a long time before it should. Sleep.sleepTicks(2);
    2. @Pandemic I am curious if you are going to look into the matter or not? As specified in my earlier post adding delays did not resolve the issue.
    3. @Pandemic I spent an hour debugging and I tried to add sleep calls up to 3 seconds everywhere. Like after it added the player etc, the only thing I could do to make it work was to run the method twice. If it does not work with a 3 seconds delay it should not work by running the method twice as I assume it goes much faster than 3 seconds.
    4. Okay I made it work by calling the method twice, is this a bug @Pandemic This worked Friends.deleteFriend(PlayerFriend); Friends.deleteFriend(PlayerFriend); This did not work Friends.deleteFriend(PlayerFriend);
    5. How do I make the script wait until it has finished removing the player before starting to add a new one? For some reason it will add players without problem but it refuses to remove the player afterwards. I have tried to make the thread sleep after the add friend method is called but it still just skips deleting the friend entirely and clicks on the add new friend button and starts adding another player. import org.dreambot.api.methods.friend.*; List<Player> players = Players.all(); players.forEach(player -> { Friends.addFriend(player); Friend PlayerFriend = Friends.getFriend(player.getName()); boolean playerIsOnline = PlayerFriend.isOnline(); Friends.deleteFriend(PlayerFriend); }
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.