Results 1 to 4 of 4

Thread: Looking for a good way to accurately get Shop Stock Amounts

  1. #1
    Join Date
    Apr 2013
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default Looking for a good way to accurately get Shop Stock Amounts

    I've been experimenting with getting the stock of a shop's inventory to no avail.

    Everything I do seems to be able to detect the shop's stock, but not 100% accurately, it seems like it will read the stock accurately for the most part, but every once and a while read a "5" or a "52" instead of say "520", think the shop doesn't have enough stock and

    So far I've tried using the ItemAmount function and GetTextAtExWrap, and both when using writeln return the correct amt 99% of the time, but that 1% where it returns 0 or only the first digit or so of a number makes it disrupt my buying.

    What is the best way to get the inventory of a shop? Or how should I go about making it ignore those few inaccuracies?

  2. #2
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Easiest way I can think of is get the shop amount twice in a row, if they match, you're good; if they don't, check again.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  3. #3
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default

    A message probably appears in the chatbox if you try to buy something and there is nothing left in stock.

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    I'm not sure about this because it's been a while since I looked at item amounts in the shop interface. If come across this again to where the numbers are read incorrectly could you please take a screenshot and post it here? Along with what Simba thinks the correct numbers are.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •