Jump to content

Script works differently on Linux


Recommended Posts

Posted (edited)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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