Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
    • Best Sellers

    • Latest Products

    • Featured

    • Topics

    • Posts

      • Date Purchased: 2025/03/26 (like 10 minutes ago) Script Purchased: Sub Account Builder v3 Script Creator (tag them with @): @SubCZ Reason for Refund: Purchased through wrong payment method (I used an incorrect card) Desired Outcome: Refund (back to payment method or store credit) / Issue Fixed / Script Swap: Back to payment method 
      • well gpt is misleading you , so maybe stop  
      • In the provided code, the cooldown for the item starts after the item is successfully bought, not merely when the order is placed. Here's the relevant portion of the code for clarification: Buying the Item: The buyItem method is called within the updatePrices method:   java CopyEdit buyItem(itemName, data.buy, Math.min(buyQuantity, remainingLimit)); // Buy up to the remaining limit Setting the Cooldown: The cooldown is set immediately after a successful buy order is placed:   java CopyEdit orderPlacedTime = System.currentTimeMillis(); // Sets the time the order was placed lastBuyPrices.put(itemName, data.buy); // Set cooldown for the item itemCooldowns.put(itemName, System.currentTimeMillis() + 4 * 60 * 60 * 1000); // 4-hour cooldown This means the cooldown time is added to the current time after the item has been bought successfully. Checking the Order Status: The script checks if the order has been fulfilled by waiting for the offer to change state:   java CopyEdit sleepUntil(() -> { Offer offer = GrandExchange.getOffer(itemName); return offer != null && offer.getState() == OfferState.FULFILLED; }, maxOrderTime); The cooldown is only set after the order is confirmed as fulfilled, indicating that the item was successfully bought. Conclusion Thus, the cooldown period starts after the item is bought and confirmed as fulfilled, not just after the order is placed. I answer with chatgpt since it can explain the code better than me. This is not about thoughts this is about what the code does and how it works.
      • Dude its actually insane that you reply with ChatGPT promts instead of your own thoughts And as I said, cooldown is not correct. "After successfully placing the buy order for the item, the cooldown period is established with the following line:" This is not how Grand Exchange cooldowns work. If you place it and cooldown starts its actual did not started. I will iterate it more COOLDOWN IS NOT TRIGGERED BY PLACING A BUY ORDER IN THE GAME ITSELF.
      • Buying the Item: When the script decides to buy an item, it calls the buyItem method. Within the updatePrices method, the following code snippet checks if the item can be purchased:   java CopyEdit if (remainingLimit > 0) { buyItem(itemName, data.buy, Math.min(buyQuantity, remainingLimit)); // Buy up to the remaining limit orderPlacedTime = System.currentTimeMillis(); lastBuyPrices.put(itemName, data.buy); // Set cooldown for the item itemCooldowns.put(itemName, System.currentTimeMillis() + 4 * 60 * 60 * 1000); // 4-hour cooldown } Setting the Cooldown: After successfully placing the buy order for the item, the cooldown period is established with the following line:   java CopyEdit itemCooldowns.put(itemName, System.currentTimeMillis() + 4 * 60 * 60 * 1000); // 4-hour cooldown This line sets a cooldown time of 4 hours (4 hours × 60 minutes × 60 seconds × 1000 milliseconds) for that specific item. The current time in milliseconds is added to the duration of the cooldown to calculate when the item can be purchased again. Cooldown Check: Before attempting to buy the item again, the script checks if the cooldown is still active:   java CopyEdit Long cooldownEndTime = itemCooldowns.get(itemName); if (cooldownEndTime != null && System.currentTimeMillis() < cooldownEndTime) { log("Cooldown active for " + itemName + ". Cannot buy until " + (cooldownEndTime - System.currentTimeMillis()) / 1000 + " seconds remaining."); continue; } If the current time is less than the cooldownEndTime, it logs that the cooldown is active and prevents the script from buying that item until the cooldown has expired. In summary, the cooldown limit for item purchases starts when an item is successfully bought. The cooldown period is set to 4 hours from that point, and subsequent purchase attempts for that item will be blocked until the cooldown period has elapsed. Also the why call it and not store item limits locally, things might change some items might be updated with new limits. Or completely new items with limits. I dont really see a issue with that decision. Only calls it once which is good. If it bothers you, u can change it.
    • Popular Contributors

    • Feedback Statistics

      • Positive
        11511
      • Neutral
        22
      • Negative
        156
      • Total Positive
        99%
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.