1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bug GrandExchange.placeBuyOffer() gets stuck every time

Discussion in 'Client & Site Support' started by Infinite Monkeys, Jun 23, 2017.

  1. Infinite Monkeys

    Joined:
    Jun 20, 2015
    Messages:
    160
    Likes Received:
    48
    I can't get GrandExchange.placeBuyOffer() to work. It names and selects the item and sets the amount properly, but then it clicks the button to set the price and just sits there on this ChatDialog:

    https://i.imgur.com/RkWkEN9.png

    Here's how I'm using it (I set the price to a constant to see if that worked):

    GrandExchange.placeBuyOffer(bot.itemName,bot.buyAmount,2300);

    I checked the log, but there's nothing relevant, here's how it ends:

    Code (Text):
    1. 00:00:13 TRACE    [PlayerSense] Parsed PSElement "regal_max_LOGOUT_DELAY" with opcode 0 and value 6577.0
    2. 00:00:13 TRACE    [PlayerSense] Parsed PSElement "step_threshold" with opcode 0 and value 4.0
    3. 00:00:17 TRACE    [Bank] Withdrawing with action: Withdraw-X
    @Party @Cloud
    --- Double Post Merged, Jun 23, 2017, Original Post Date: Jun 9, 2017 ---
    It now correctly sets the amount and price, but instead of clicking Confirm it just re-enters the price over and over again.
    @Party @Cloud
     
  2. Party

    Party Client Developer

    Joined:
    Oct 12, 2015
    Messages:
    3,708
    Likes Received:
    1,606
    Sounds like it's failing to detect the set price. Can you try again, let me know the price you requested it set and grab me a screenshot of the price shown after the bot enters it?
     
  3. Infinite Monkeys

    Joined:
    Jun 20, 2015
    Messages:
    160
    Likes Received:
    48
    GrandExchange.placeBuyOffer(bot.hideName,bot.buyAmount,2300);

    [​IMG]

    Keeps hitting the ... and setting the price, again and again.
     
  4. Party

    Party Client Developer

    Joined:
    Oct 12, 2015
    Messages:
    3,708
    Likes Received:
    1,606
    I wonder if it's picking up the total price below and thinking that it's wrong...
    Code (Text):
    1.     private static int getSelectedPrice() {
    2.         int price = -1;
    3.         final InterfaceComponent priceComponent = Interfaces.newQuery().containers(GE_CONTAINER).types(InterfaceComponent.Type.LABEL).texts(PRICE_TERM).heights(20).results().first();
    4.         if (priceComponent != null) {
    5.             final Matcher matcher = PRICE_TERM.matcher(priceComponent.getText());
    6.             if (matcher.matches()) {
    7.                 price = Integer.valueOf(matcher.group("price").replace("\\D", ""));
    8.             }
    9.         }
    10.         return price;
    11.     }
    Seems I'm not filtering by text color, which would be the fix for this.
     
  5. Infinite Monkeys

    Joined:
    Jun 20, 2015
    Messages:
    160
    Likes Received:
    48
    Can't you just use the ID of the InterfaceComponent? Or do they change occasionally?
     
  6. Party

    Party Client Developer

    Joined:
    Oct 12, 2015
    Messages:
    3,708
    Likes Received:
    1,606
    Usage of IDs is heavily discouraged, especially in an API the size of RuneMate's.
     
    sickness0666 likes this.
  7. sredna

    Joined:
    Apr 9, 2015
    Messages:
    1
    Likes Received:
    0
    How was this fixed?
    Code (Text):
    1. final InterfaceComponent priceComponent = Interfaces.newQuery().containers(GE_CONTAINER).types(InterfaceComponent.Type.LABEL).texts(PRICE_TERM).heights(20).results().first();
    returns null for me
     

Share This Page

Loading...