Jump to content

How to buy items from a store/check if they are out?


Recommended Posts

Posted (edited)

by using widgets you can check store item info.

 


if !store open

    open

   cond sleep

else {

    if (item != null && item.getAmount() > 0){

         item.interact("Buy all");

         cond sleep

    } else {

       //close and hop

    }

}

 

try that but using widgets

Edited by Sinatra
Posted

Why do you say my getState() is flawed? I'm not sure what you mean by this.

 

Because you said this: because the way I currently have it, it opens the Store but doesn't buy.

 

So your case TRADE works but when the case BUY should be executed, it's not. So either your getState() is flawed when it should return case BUY or your case BUY is flawed.

 

By the way, if you want help you should post your code. I'm not sure why you are trying to keep your code so secure. After all, you're a beginner in scriptning and you shouldn't worry about getting your code copied.

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...