[ECON] Local Shops 0.7a - Testers Needed! iConomy 4.0 + integration

Discussion in 'WIP and Development Status' started by Jonbas, Feb 25, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    Download Latest .jar
    Download zip - Contains LocalShops.jar and items.txt
    items.txt (put in: plugins/LocalShops/)
    Source Code: https://github.com/Jonbas/LocalShops

    All of the commands have been integrated. Only thing remaining is to tie into iConomy and GroupManager. But it is ready for testing to work out any remaining bugs.

    What this is:
    A localized shop system that lets users create their own shops and then control the inventory inside of them.

    This is a replacement for iCShop from hMod. It's intended to be a direct port for all of the familiar commands and be able to read the same shop files.

    So far, here's what works:
    • Watches for when you enter a shop updates you and a list that you're in a shop.
    • Shops are hard-coded for width and height (easy transition to variable later), but they only take up an area of 10x10x3 (so, not top to bottom of map anymore) Thanks to \\slashies for his QuadTree implementation.
    • File IO works. (Reads and writes all those shop files correctly)
    • Multiworlds is respected
    • built and implemented an items.txt file that creates a unique name for every block type data combination and lets you search for them by name or block/data, can be edited to suit your server
    • iConomy integration works
    • /shop create [ShopName]
    • /shop destroy [ShopName]
    • /shop add - Adds block in your hand to the shop
    • /shop add all - Adds the block in your hand to the shop plus everything else in your inventory of the same type
    • /shop add [itemname] [quantity]
    • /shop remove [itemname] - Removes an item type from the shop. All remaining inventory is returned to the player.
    • /shop list
    • /shop list buy
    • /shop list sell
    • /shop sell - sells block in hand to the shop
    • /shop sell [# or all] - sells that amount of the block in your hand to the shop
    • /shop sell [itemname] [ammount or all] - sells block of that type to the shop
    • /shop buy [itemname] [amount]
    • /shop set buy [itemname] [price] <optional: stack size>
    • /shop set sell [itemname] [price] <optional: stack size>
    • /shop set manager +player1 +player2 -player3 - use + or - before player name to add or remove them from the manager list. managers can add and remove items from the stock and are not charged money if they buy or sell from the shop
    • /shop set owner [playername] - only the shop owner can use this command. transfers ownership to new player. The shop owner gets all profits from items bought at the shop and pay for all items that are sold to the shop.
    Please give it a try and let me know what comes up. I'm a little bleary eyed right now, so the last few features I added haven't been tested very well yet (/shop set, /shop destroy).

    If you download the .zip file and unzip it in your plugins directory it will setup the default items.txt file for you.

    Still TODO:
    • rename/move shops
    • permissions integration
    And maybe someday a little further off:

    • Buy, sell, and restock from chests inside the shop
    • pay when you walk out the door
    • Custom shop region sizes
    Thanks for the support.

    It's starting to come to life:


    Commands that work now:
    /shop create
    /shop list
    /shop list buy
    /shop list sell

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 10, 2016
  2. Offline


    how do u sell things?
  3. Offline


    DAMN this sound cool!
    [​IMG] to you when it is done!
  4. Offline


    Please consider this to be my moral support.
  5. Offline


    So far that's not built yet, but it will have a few options:
    1. Hold the block you want to sell in your hand and type /shop sell
    2. Hold the block and type /shop sell # to sell up to that many from your inventory
    3. hold the block and type /shop sell all - sell everything of that type in your inventory
    4. Type /shop sell ItemName [# to sell] (or leave blank for just one item or stack)
    Then buying will be: /shop buy itemname [# to buy] (or leave blank for just one item or stack)

    I need to play with regular expressions a bit though, I want users to be able to just give part of the item name and try to match it.
  6. Offline


    This looks great. Keep up the good work. I know a lot of people want something along these lines instead of a global /shop that can be accessed from anywhere. This + an NPC standing behind a short wall and we'll have some real shops!
  7. Offline


    Okay, all the /shop sell commands work now.

    Still todo before initial release:
    • /shop buy
    • /shop add (add stock/item)
    • /shop set [price|bundle size] (also, shop owner and managers)
    • /shop remove (stop selling item)
    • /shop destroy
    not too much more. Oh, and iConomy integration. I'm going to release and start fixing bugs that are found before I implement regular expression support for searching for item names
  8. Offline


    I am following this.
  9. Offline


    Please see the OP. This plugin is ready for testing


    Also, I went ahead and implemented string matching. So you can give part of a name and it'll try to understand what you meant. For the above, I typed /shop buy cobble 5

    All that's left for an initial release is:
    • iConomy
    • GroupManager (and default to isOp)
    --- merged: Mar 1, 2011 11:57 PM ---
    Okay, the latest build should be functional. I'll put in the iConomy integration tonight, but it's a minor piece at this point. If you have a bit of time, please give it a try and report any bugs or confusion.

    --- merged: Mar 2, 2011 3:12 AM ---
    alright!! iConomy integration works.

    Everyone is still able to use all of the commands, but hey, that's a start.
    --- merged: Mar 2, 2011 5:41 AM ---
    Here it is: http://forums.bukkit.org/threads/econ-localshops-1-0b-b440-player-shops-for-iconomy.6744/
  10. Offline


    wow I have to say this is what I would like to have on my server perm! There are 2 things holding me back from further testing/deployment.
    1) I don't like the idea that a shop can be placed with out any markers. Please look into using a NPC mod to place a NPC at shop locations.(its annoying when your walking over a bridge and someone placed a shop there that you were not expecting)
    2)I would like to control the size of the shop. Maybe a command for /shopcorner1 and /shopcorner2. Running the 2 commands specifies the 2 opposing corners for a rectangle area of the shop.
    At the moment we are using iConomyChestShop. I'll be keeping an eye on this plugin. Its a bonus to use text based being that the game is mostly text.
  11. Offline


    edit: moved to new thread.
Thread Status:
Not open for further replies.

Share This Page