ListShops by Item

Home Forums General ListShops by Item

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2202
    PseudoKnight
    Member

    Yesterday I spent my MC time coding a shop cache that stores a decent representation of the available shops on the server. This in turn allows us to search the cache by item (and buy/sell). To use this new feature, you’d type something like “/listshops buy stonebrick” and it’ll show you all the currently cached shops claiming to sell stonebrick — the price, the stock, owner, and location.

    /listshops

    It’s possible to “de-sync” from the actual existing shops, especially if you encounter a bug that I haven’t squashed yet. So please report here any errors you encounter when clicking a sign, breaking a sign, or using the listshops/shop commands.

    Planned Changes

    • Possibly add region names to the shop locations.
    • Support listing shop stock (requires a new function in commandhelper that they plan)
    • Maybe support data values and block IDs (convert to item name?).

    Let me know what you think and if you have any ideas on how to improve upon this feature.

    #2575
    PseudoKnight
    Member

    Okay, I made huge improvements to the script. It stores under the item IDs and data values, so you should be able to type in a number of aliases (eg. “stonebrick”, “smooth brick”, “98”) and get what you expect (whereas before you had to give the specific shop alias). I also keep track of stock so that I can keep the list clear of all those empty shops or shops that don’t have enough stock to sell. That was a huge problem before, as shop owners often fail to keep up with demand. (like myself) I also improved the styling a bit and improved some underlying code. It should be a better feature all around.

    However, this required me to clear the old cache and start fresh. That means you’ll want to click your signs again to add your shop to the cache. As the Final City market manager, I went through and clicked all those signs already.

    #2615
    PseudoKnight
    Member

    A CommandHelper update broke this feature for a couple days there. I just fixed it, and other affected scripts, using a workaround.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General’ is closed to new topics and replies.