[INACTIVE][ECON] PhysicalShop - Sign and chest shops (no commands, no databases) [740]

Discussion in 'Inactive/Unsupported Plugins' started by yli, Apr 6, 2011.

  1. PhysicalShop - sign and chest shops
    Version: 7

    Download
    Changelog

    Features
    • Server owned sign shops (infinite supply)
    • Player owned sign+chest (money and items are stored in a chest)
    • Everything is usable by left/right clicking
    • Supports material durability (i.e. colored wool and stuff)
    • Optional break, explosion and usage protection
    • Optional permissions
    This plugin provides support for trading without the need for databases, chat commands or virtual currency.

    The sign format was mostly inspired by the excellent TradeCraft plugin.

    Examples (open)

    Example: Server Shop

    Put a sign anywhere (wall or ground) with the following text:
    Code:
    [Dirt]
    8:1
    10:1
    [Server]
    
    This will make a shop from which players can buy 8 dirt for 1 money and sell 10 dirt for 1 money.

    Example: Player Shop

    Put a sign on a wall where a chest fits underneath with the following text:
    Code:
    [Orange Wool]
    Buy 48 for 2g
    Sell 64 for 2g
    
    Next put a chest directly under the sign. (Note that the sign has to be there before the chest.)
    Open the chest and put some money and orange wool in it.

    Now you have created a chest from which players can buy 48 orange wool for 2 money and sell 64 orange wool for 2 money.

    Usage
    • Left click sign for status
    • Right click sign with money to buy
    • Right click sign with item to sell
    Sign Format
    Code:
    [material:data] or [data material]
    X Y (defines a buy price X items for Y money, can be empty)
    X Y (same as above but for selling, can be empty)
    [Server] or empty (automatically filled for player shops)
    
    Specifying the material and data can be done either by ID numbers or names.

    The exchange rate format is by default very lenient and supports formats such as "buy 64 for 1" and "12 for 2 gold".

    Permissions
    • PhysicalShop.admin: allows creation of server shops and destruction of any shop
    • PhysicalShop.build: allows creation of normal player owned shops
    • PhysicalShop.use: allows buying and selling from shops
    If the Permissions plugin is not found the fallback is to give ops everything and non-ops build and use.

    Configuration (open)

    Create the file plugins/PhysicalShop/config.yml if you need to change anything.
    • currency: the material ID of currency (default: 266 which is gold ingot)
    • currency-data: the durability data of the currency (default: 0)
    • material-pattern: the regex for matching the material on the first line (default: "\[(.+)\]")
    • rate-pattern: the regex for matching the exchange rates (default: "\D*(\d+)\D+(\d+)\D*")
    • server-owner: the name used for server shops, case insensitive (default: "[Server]")
    • auto-fill-name: if the player name should be automatically filled in (default: true)
    • protect-break: if block breaking protection should be used (default: true)
    • protect-chest-use: if chest use protection should be used (default: true)
    • protect-explode: if explosion protection should be used (default: true)

    Changelog:
    Version 1.0
    • Released
     
    GoPlus, boksa, Geen117 and 1 other person like this.
  2. Offline

    min

    item only gold ingot? no setting?
     
  3. There are no plans to support multiple currencies as that would require significant changes to the sign format and most likely make them less readable.

    See this post for a way to work around this limitation.

    It seems to work okay on CB 740.

    Unfortunately any direct support for economy plugins is not planned at the moment.

    For a workaround I'd suggest setting up trading between the virtual and physical currency using other shop plugins such as BetterShop.

    The currency is global and set in the configuration file. It can not be specified on a shop-by-shop basis.

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

    Fuzzwolf

    Can you make it available so that we can name our currency?
     
  5. Offline

    Sparkstorm

    I would like to see a version of this with freely changeable currency, e.g:
    one sign reads: [Diamond]¦1:5 266¦1:5 266¦[Server]
    and another says, for example: [Cyan Wool]¦4:1 264¦4:1 264¦[Server]
    So the first vends diamonds for gold, and the second vends Cyan wool for diamonds.
     
  6. Offline

    shadyre

    Hum, i have make the config.yml file, but it doesn't work ... any idea for change the currency value ?
     
  7. Offline

    Ranzear

    I believe this is interfering with the right-click-to-ready skills of MCMMO.

    Maybe a little too gung-ho with the player.interact calls?
     
  8. Offline

    Kuja_Diartua

    i got a problem: when i place 2 shops on near sings, and place 2 chests, they join into 1 big chest, and one of the shops has no items in it, even if i place some.
     
  9. Offline

    NinjaStapler15

    Is there a way to make items free i have tried " Buy 64 for 0g " and " 1:0 "
     
  10. Offline

    Anim

    Thank you so much for this great plugin! It's almost exactly the kind of shop plugin I've been searching for! We've been testing it on our server for the past couple days though, and found an odd bug. Our server allows players to gather leaves on occasion while felling trees. If we try to sell the leaves, when a player hits the sign to check inventory, the server immediately reboots! I've reproduced this about 5 times with 100% occurrence.

    On a much smaller note, what is the name for charcoal? [charcoal] is not recognized and [char coal] still expects normal coal. [263:1] still works fine, but I'd like the signs to be more easily understandable.

    Thanks!
     
  11. Offline

    rezor92

    Hey there,

    is there any way to prevent players, without the Permissions plugin, from building their own shops?

    Thanks
     
  12. Offline

    Ranzear

    Seems to interfere with the right-click skill readying of MCMMO at times. Sometimes everything works, sometimes only axes work. Disabling PhysicalShop seems to alleviate it, but it's too random and seems to kick in only after interacting with shops or walking into a chunk with shops in it.

    At the very least I can definitely say it started when I dropped PhysicalShops in.

    I like PhysicalShop's handling of items and currency, keeping them in the chest instead of hammerspace, versus TradeCraft's use of the latter. Would it be possible to get an alias configuration file like the TradeCraft.txt of the other plugin so things like Cooked Porkchops and Compasses can have more known or obvious aliases?

    I'm posting in both threads to maybe get that 'perfect' combination of both plugins together. PhysicalShop's simpler functionality with TradeCraft's infinite stock shops with preset prices and easy aliases.
     
  13. Offline

    Kartus

    LOL. Why you don't just write on sign "for free" ;)

    i request that too. if that is implemented, its almost perfect ;)

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

    Bharel

  15. Offline

    Darq

    As I believe someone said earlier, yes, this is a very nice plugin, the most well done chest trading plugin I've seen, but the ability for you to freely set the currency would make it PERFECT. Thaaanks. :)
     
  16. Offline

    patrick61647

    can you make it so the supplies don't cost any money in the signs ?? So the players can access them and just take whatever they want for free?
     
  17. i just like to say that i am also hoping for this mod to support multiple currencies :)

    maybe the sign layout could be something like this

    Code:
    [material:data] or [data material] (This is X)
    X Y (defines a buy price X items for Y money)
    [material:data] or [data material] (This is Y)
    [Server] or empty (automatically filled for player shops)

    This way, depending on how you set it up, it will either sell or buy the specific items.

    here is an example:
    Code:
    [30]
    1 5
    [287]
    [Server]
    
    
    The numbers in the [] are item ID's. Punching this sign would take out 5 strings from your inventory, and give you 1 web block (the new spider web block, that is otherwise not obtainable). The explaining part could be passed to a NPC plugin, then have a NPC stand next to the sign and explain what it really does. But once you get familiar with the setup, you should understand what each sign gave out and what the price is.
     
  18. Offline

    xOptimusPrime

    Hey quick question.
    I'm trying to change the currency, but when I do I get a lot of error messages and the plugin wont work.
    So how do you change it?
    What I did was open plugins, make a folder called PhysicalShop, make a notepad put in the following:
    • currency: the material ID of currency (default: 266 which is gold ingot)
    • currency-data: the durability data of the currency (default: 0)
    • material-pattern: the regex for matching the material on the first line (default: "\[(.+)\]")
    • rate-pattern: the regex for matching the exchange rates (default: "\D*(\d+)\D+(\d+)\D*")
    • server-owner: the name used for server shops, case insensitive (default: "[Server]")
    • auto-fill-name: if the player name should be automatically filled in (default: true)
    • protect-break: if block breaking protection should be used (default: true)
    • protect-chest-use: if chest use protection should be used (default: true)
    • protect-explode: if explosion protection should be used (default: true)
    Then save it as config.yml, delete the notepad and keep the config.yml
    Start the server and it should work? But I got a lot of error messages
     
  19. Offline

    AgentME

    I'm getting the same bug occasionally mentioned on the previous page where sometimes a player's tools will get repaired and never wear off. Dunno what triggered it, just noticed it after making and experimenting with a few store chests.

    I kind of like this for protected chests. I noticed you can just define something as a store and not put any buy or sell rules, and you've got a protected chest. Can you add it so you can just put "[Protected]" as the first line?

    Also, if you make a shop sign, place a chest next to the spot below the sign, and then put a chest below the sign, you can get a double chest under the sign.
     
  20. Offline

    EpicATrain

    Please update to the latest version. Thank you!

    Code:
    2011-05-17 17:28:05 [SEVERE] Could not pass event PLAYER_INTERACT to PhysicalShop
    java.lang.ClassCastException: org.bukkit.material.Tree cannot be cast to org.bukkit.material.Leaves
        at fi.eliasp.physicalshop.ShopMaterial.toString(ShopMaterial.java:164)
        at java.util.Formatter$FormatSpecifier.printString(Unknown Source)
        at java.util.Formatter$FormatSpecifier.print(Unknown Source)
        at java.util.Formatter.format(Unknown Source)
        at java.util.Formatter.format(Unknown Source)
        at java.lang.String.format(Unknown Source)
        at fi.eliasp.physicalshop.Messaging.send(Messaging.java:43)
        at fi.eliasp.physicalshop.Shop.sell(Shop.java:197)
        at fi.eliasp.physicalshop.Shop.interact(Shop.java:145)
        at fi.eliasp.physicalshop.PhysicalShopPlayerListener.onPlayerInteract(PhysicalShopPlayerListener.java:50)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:280)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:289)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:207)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:526)
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  21. Offline

    Ranzear

    You can use Lockette for that and be able to allow multiple people as well as do the same on doors.
     
  22. Offline

    srhadaham

    this plugin is almost exactly what i was looking for, it would be nice to support multiple items as currency, but a couple extra signs works that out nicely.

    a lovely [diamond] for your excellent plugin
     
  23. Offline

    HWei

    It is a very nice plugin.
    But can you add this feature: when trade occur, the block at back of sign becomes powered. Just like a button is pushed.
    Simple, but useful. Then I can build a slot machine or sell railway ticket with redstone circuits.:cool:
     
  24. Offline

    shadyre

    Tested on 766 and it work
     
  25. Offline

    shadyre

    Or add an FX effect xD
     
  26. Offline

    Kartus

    considered inactive plugin?
     
  27. Offline

    Fearlessagent

    Please don't stop developing this, I like this better than TradeCraft for more than a few reasons.
     
  28. Offline

    vasil7112

    Uprade plz for 815 or just for 1.6 :)
    Thnx!
     
  29. Offline

    Don Redhorse

    hmm I gave people PhysicalShop.use but they can't use the server shops... they get the message you are not allowed to use shops.

    any idea? 766
     
  30. Offline

    shadyre

    Tested on 818 and work :)
     
  31. Offline

    Bookkc1

    I Have an error

    You are not allowed to build shops

    Help me!!!!

    up. Help me please. I Don`t know what me do :(

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

Share This Page