Jump to content

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


imancity

Recommended Posts

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
Link to comment
Share on other sites

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.

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