Jump to content

Script works differently on Linux


smy

Recommended Posts

So I've decided to buy Linux server. It has preinstalled xfce desktop with debian 8 distro. But I've got an issue with scripts. There scripts are written by me and they work on my Windows pc, but they don't work on Linux server.

For example: 

if(api.inventory.isItemSelected())
{
  if(api.inventory.interact("Use", "Item1"))
    new ConditionalSleep(MethodProvider.random(2000, 3000)) {
    @Override
      public boolean condition() throws InterruptedException {
      return api.widgets.getWidgetContainingText("looooooooooooool") != null;
    }
  }.sleep();
} else {
  if(api.inventory.interact("Use", "Item2"))
    new ConditionalSleep(MethodProvider.random(2000, 3000)) {
    @Override
      public boolean condition() throws InterruptedException {
      return api.inventory.isItemSelected();
    }
  }.sleep();
}

This code don't work, it's just click on Item2 and then clicks on inventory and does it repeatedly. That part of code works on windows pc.

Sometimes checking of object in area doesn't work.

First I though that Java versions are different, but on windows and linux they are the same.

Any suggestions ?

Edited by smy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...