[ECON] ChestShop 3.7.18 (iConomyChestShop) - Chest&sign shop for economy plugins [1.8]

Discussion in 'Archived: Plugin Releases' started by Acrobot, Feb 12, 2011.

  1. Offline

    Acrobot

    An easy way to create shops - no protection plugin needed!
    You don't need to be on-line to earn money anymore!
    [​IMG]
    I've put a LOT of effort into making this plugin,
    you can donate if you appreciate my effort =)

    Requirements:
    - An economy plugin supported by Register or Vault, for example iConomy, BOSEconomy or Essentials Eco.
    Optional:
    - For additional economy plugin support - Vault
    - For Permissions: bPermissions, PEX, or any other permission plugin
    - For additional protection: LWC, Lockette, Deadbolt
    - For other item names (aliases): OddItem


    Setup:
    Copy the .jar file from the .zip you downloaded into /plugins folder.
    You can also copy the example files if you want to generate statistics page.

    Translations:
    You can change the plugin's language, here's a list of all user-made translations.
    If you want to update or submit a translation, feel free to PM me.
    Translations (open)

    Arabic - Attarhsase2
    Bulgarian - Muff1Ncho
    Czech - LordPgsa
    Chinese (Simplified) - tab415263
    Danish - Cannafix
    Dutch - speedlegs
    French- DragonSlayer875
    German - RasCas
    Hungarian - Anachen
    Indonesian - Yahya98
    Italian - Massimo1993
    Korean - Zwing87
    Norwegian - _AlexN_ and TheUnkownGamer
    Polish - Holls1
    Portugese (Brasil) - FelipeMarques14
    Russian - VADemon from http://minemania.ru/
    Slovak - LordPgsa
    Slovenian - jEErc
    Spanish - thxaaaa
    Swedish - Maxell
    Turkish - Developer
    Traditional Chinese - hellboyincs
    Vietnamese - etrubi1 from http://minevn.com/


    Permissions:
    How to create a ChestShop?
    - Place a chest, if you haven't already.
    - Place a sign 1 block near the chest (for example, above the chest)
    - On the sign, write:

    [​IMG]
    (Item name can actually be item ID or alias)
    First line will be filled in by the plugin automatically.
    Price is a combination of buy and sell price.
    You have to have B near buy price (people buy from you), and S near sell price (people sell to you).
    If you have both B and S, separate them with a colon - :
    For example:
    [​IMG]

    means that AcrobotPL wants to sell 64 diamonds for 10 currency, and buy them back from you for 5 currency.
    Also, if you put "free" instead of price, it is free to buy or sell :)

    - Now, when you finish editing the sign, if LWC is turned on in config, shop will be automatically created.
    Also, if your default protection is turned on in the config, people won't be able to break chest, sign or the block the sign is on.

    What is an Admin Shop?
    Admin shop is the shop that doesn't require a chest, because it has infinite stock.
    If you sell to it, the items will disappear, and if you buy from it, items will magically appear.
    To create one, you have to be Admin/OP. Just put "Admin Shop" (or anything specified in config file) on the first line of the sign.

    Restricting shops to some groups or regions
    You can either use permissions, or you can just put a sign ABOVE shop sign (you need to be in that group to create the sign) to restrict it to players with ChestShop.group.groupName permission
    The syntax is:
    [restricted]
    firstGroupName
    2ndGroupName
    3rdGroupName
    Only those groups will be able to use that shop

    To restrict a shop to some regions:
    - If you're using Towny, turn TOWNY_INTEGRATION on. Residents will be able to create shops in economy plots (either their or, if specified in config, any)
    - If you're using WorldGuard, you can use an experimental "chestshop" flag. Turn WORLDGUARD_INTEGRATION on and flag a region. (f.e. /region flag ChestShopRegion chestshop allow)

    Do you want to limit the maximum prices for items?
    Well, there's an app.... wait, not that : P
    You can use an experimental feature in ChestShop.
    In your config.yml, add lines like:
    max-buy-price-5: 14
    max-sell-price-5: 15

    That means that the maximum price for items BOUGHT by PLAYER is 14, and items SOLD by PLAYER using the shop is 15.

    You can also use a global setting, like this:
    max-sell-price: 200

    That means that the maximum price for items SOLD to PLAYER is 200 (if there is, for example, a max-sell-price-5 found, it will be used instead of the global sell price)

    USING SHOPS
    You could buy and sell by right and left clicking the sign for a long time.
    Now it's the only way to use the shops.
    It's SIMPLE!
    Just LEFT-CLICK to SELL to shop, and
    RIGHT-CLICK to BUY from shop.
    (This can be changed in the config file)

    DESTROYING SHOPS
    If you want to delete your old shop, simply SNEAK and destroy the sign.
    It's that easy =)

    STOCKING THE SHOPS
    You can either open the chest and stock it up, or click on your own sign - it will open chest's inventory (that way you can have chests not openable by other people for sure :D)

    ItemInfo command
    It's a simple command that shows item information.
    If you use it without any arguments, it shows you information about the item you're holding.
    If you specify item id or item name after the command, it will show you information about that item.

    Source code
    ChestShop is Open-Source =)
    You can find its code on https://github.com/Acrobot/ChestShop-3


    Thanks to:
    - kali876, ziomekYOYO and Herocraft server for testing the plugin and finding every little bug =)
    - Everyone who uses this plugin - really big thanks for this, I never thought it will be so popular
    - Everyone who provided translation - many people's lives will be easier now
    - @Nijikokun for Register
    - @LennardF1989 for awesome Persistence Reimplemented
    - @Temaska for fixing the plugin while I was on holidays
    - @VADemon for providing a great support for other users
    - @Euthyphro for his patience and really good bug spotting
    - vagrant326 for making a great price sheet
    - Epics for his great help
    :)
    If something's not working
    You can't change the sign color - that breaks the formatting.
    If that's not the issue, please give me this information, so I can help you faster.
    - CraftBukkit version (type /version in chat)
    - ChestShop version (type /csversion in chat)
    - Your economy plugin (iConomy? BOSEconomy? other one?)
    - Have you got any Permission plugin? Which one?

    [​IMG]
    Changelog (open)

    Changelog can be found on BukkitDev - http://dev.bukkit.org/server-mods/chestshop/files/
     
  2. Offline

    YoureDown

    Hey acrobot, i looked at some pages, but couldnt see an answer: when players try to buy from a shop, tthey get this:
    [shop] Shop ownerd doesnt want you to buy here!
    Help please? they have permissions and etc...
     
  3. Offline

    mattekure

    I think i've found a bug. Bukkit 820, IconomyChestShop 2.73, LWC 2.31

    In LWC I have set a limit to the number of chests/objects that a user is allowed to protect. In my case, they can protect up to 5 chests. However, when they create a shop, it automatically adds the protection. This allows them to exceed the limit of protected items.

    everything else about the shops works fine.
     
  4. Offline

    Icedew123

    When someone tries to buy from my chest it´╗┐ says,
    "Seller's account doesn't exist."
    How do i fix this?
     
  5. Offline

    DivineKyuuji

    I have Essentials, and this conflicts with Essentials /sell command.. can I fix this so I can use both or do I just have to live with not using Essentials /sell?
     
  6. Offline

    Xordaii

    You can do it. Use /sell for this plugin, and if you want to use essentails sell, type /esell instead.

    More information in the essentials config.yml file. Look at the comments above:

    overridden-commands:
    - god

    (Note! don't add /sell here! From what you are saying, you want both commands to work. If you add /sell here, Essentials will override iCCS /sell and this plugin's sell won't work. Just use /sell to toggle sell in iConomyChestShop, and /esell to sell to server for Essentials.)
     
  7. Offline

    DivineKyuuji


    Yeah I do /esell and nothing happens, it doesn't do anything, it doesn't say it doesn't exist and it doesn't work. I tried adding it to overridden-commands and it still didn't work. What now?
     
  8. Offline

    Acrobot

    @YoureDown
    @JacKlink01
    @Xaostica
    @Hybris95
    @Darcion
    @virtualism
    Fixed now - I am stupid, uploaded wrong version...
    Re-download, please

    @flozza83
    What's the path to your server? If it hasn't got any special characters, try to open .jar file and in plugin.yml delete the line that says "database: true"

    @DivineKyuuji
    Why do you use /sell command? Isn't it better to use sneakMode: true and just left-click the sign?
    Also, there are aliases for commands -
    /sell - chSell - /chest sell
    /buy - chBuy - /chest buy

    @Icedew123
    It means that you haven't got an economy account. Create one first.
     
    Xaostica and virtualism like this.
  9. Offline

    DivineKyuuji


    I do have sneakMode: true
    I know there are aliases to commands, but when I use /sell for the essentials one it uses the chest shop command
     
  10. Offline

    Icedew123

    Sadly, I dont know how. Sorry
     
  11. Offline

    Acrobot

    @Icedew123
    If you have iConomy, it's "/money create yourName"

    @DivineKyuuji
    Solution:
    either change sell command in Essentials, or change my plugin's sell command.

    Do it like that:

    open plugin's jar file with winRAR (or something like that), open "plugin.yml" file and in "commands" section, modify the "sell" command - change its name to some other, for example sell123
     
  12. Offline

    Icedew123

    Thanks man!
     
  13. Offline

    Icedew123

    @Acrobot It still says the error
     
  14. Offline

    virtualism

  15. Offline

    Acrobot

    @Icedew123
    Then do "/money nameOfYourShopAccount" and check, if it exists. Remember, that it is all case-sensitive!
     
  16. Offline

    Turbowaffle

    I'm thinking of writing a plug-in that will tie in to this one, that will allow users to check stock/prices from a central location (probably a web page). Has anyone already created something like that already?
     
  17. Offline

    felipepcjr

    essentials economy?
     
  18. Offline

    Acrobot

  19. Offline

    rmb938

    The max/min price can you change that so there is a global one then we can add specific min/max to certain items?
     
  20. Offline

    felipepcjr

  21. Offline

    Kyle_will_eat_u

    I cant download the link is down :(

    Nvm the link at the top is broke got the other one :)
     
  22. Offline

    Parsiuk

    Yup, here is my bash script to do so:

    Code:
    #!/bin/bash
    
    function calc_avg()
    {
            ITEM_TYPE=$1
            ITEM_COUNT=`cat ~/server.log | grep "\[iConomyChestShop\].*\(sold\|bought\).*${ITEM_TYPE}" | awk '{printf("%s/%s \n",$16,$7)}' | bc | tee ~/stats/price_list.txt | wc -l`
            PRICE_SUM=0
    
            i=1;
            while [ true ]
            do
                LINE=`sed -n "$i"p ~/stats/price_list.txt`
                    if [ -n "$LINE" ]
                        then
                            PRICE_SUM=`expr $PRICE_SUM + $LINE`
                        i=$[i+1]
                        else
                            break
                    fi;
            done
            PRICE_AVG=`echo "scale=2; $PRICE_SUM/$ITEM_COUNT;" | bc`
    }
    
    LIST_LONG=`cat ~/server.log | grep "\[iConomyChestShop\].*\(sold\|bought\)" | awk '{print $8}' | sort | uniq | awk '{printf("%s ",$1)}'`
    LIST="DIAMOND GOLD_INGOT IRON_INGOT BREAD WOOD COBBLESTONE"
    
    echo "<table width=\"170\">"
    
    for ITEM in $LIST_LONG
    do
            calc_avg $ITEM
            echo "<tr><td>${ITEM_TYPE}</td><td><div class=\"right\">${PRICE_AVG}</td></tr>"
    done
    
    echo "</table>"
    
    Scripts takes all prices and calculates average for all items (LIST_LONG) or for specified items (just LIST).
     
  23. Offline

    felipepcjr

    I am using GroupManager and the users cannot use the shops
     
  24. Offline

    Kainzo

    Can we set a limit to the number of ChestShops are player can create?
    @Acrobot
     
  25. Offline

    Stephen304

    Shops don't work if they are within spawn protection. There are also no plugins that allow editing of the protected spawn area. Can this be fixed? I'm not sure if this problem is also present when a cuboid-like protection system is in use because I don't use one yet. If there is a problem with all area protections, then people can always break the chest and collect all the shop's stock. This is why I put my shops in spawn, though the left clicking action fails to have any effect.
     
  26. Offline

    JacKlink01

    Why does a sell sign take money from a server account, but a buy sign does not give money to the server account. This makes the serveraccount thing very hurtful to our economy. Money is lost. Please fix :D
     
  27. Offline

    TheBarkingFrog

    If you're still taking suggestions, maybe this format?
    [itemname/id]​
    Buy/B: [price]​
    Sell/S: [price]​
    [Quantity]​
    edit: Oh, wait, idk where username could go...maybe...
    [Username]​
    [itemname/id]​
    B: [price] S: [price]​
    [Quantity]​
     
  28. Offline

    Xordaii

    In essentials, you can use /sell to sell to the server. We use it because we are a small server (family and friends only) and the economy base isn't large enough for everything to be based on players. So, some things it is better, like dirt, to sell directly to the server. That way, your players can actually make money.

    @DivineKyuuji
    What versions of things are you running? I am running Bukkit 820, Essentials 2.3.1 from http://ess.earth2me.com/index.php/Download , and BOSEconomy v 6.0.2. It took a while to get the worth.yml set up the way I like, and it was missing a few items on the list (you can add them yourself).

    Also, when in game, are you typing "/esell dirt" ? "/esell dirt -64" also works, just will leave you with one pile in your inventory after sale.

    If you are still having problems, and doing everything right, look to Acrobat's post, put /sell in the commands to override for Essentials in the config.yml, and use /chsell to toggle selling with iCCS.
     
  29. Offline

    Acrobot

    @Stephen304
    nope, that's all hardcoded into Minecraft - blame it on Notch :p

    @Kainzo
    Not yet, but sure - in the future.

    @felipepcjr
    GroupManager? Really?
    But yeah, if it doesn't work - it's GroupManager's fault.

    @rmb938
    Yep

    @TheBarkingFrog
    Thanks, it looks almost like my sign format tough :p
     
  30. Offline

    felipepcjr

    I got it working flawlessly
     

Share This Page