Jump to content

Welcome to DreamBot

VIP Enhancement

Want to upgrade your DreamBot experience? Consider signing up for VIP!
VIP allows you to run as many accounts as you want, view the forums ad-free, receive 10% off all script purchases, and so much more!
Visit the store to learn about all of these great features!

Upgrade to VIP Now
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
Sign in to follow this  

Grandexchange buy a raw shrimp process.

Recommended Posts

GrandExchange twindow = getGrandExchange();
twindow.searchItem("Raw shrimps");
twindow.addBuyItem("Raw shrimps");

Starting on the grandexchange screen, i want to buy 1 shrimp for 100gp.

However the code above clicks on a trade window, and doesn't search for raw shrimp. It just starts adjusting the quantity and price. Am I missing a step?

Share this post

Link to post
Share on other sites

Each of these return boolean value, try using these inside an AbstractScript.sleepUntill();
Also you do not need to use getGrandExchange().searchItem(), before using getGrandExchange().addBuyItem(itemName), because addBuyItem will do that for you.
So your code could look like this:

Main.sleepUntil(() -> getGrandExchange().open(), 5000);
Main.sleepUntil(() -> getGrandExchange().openBuyScreen(1), 5000);
Main.sleepUntil(() -> getGrandExchange().addBuyItem("Raw shrimps"), 5000);

Share this post

Link to post
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.

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.

Sign in to follow this  

  • Create New...