[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

    Cyrem

    I was trying 351:4 for lapis lazuli, It didn't want to work. However I will try some more combination's.

    Besides this it's all working great. I wanted something standalone, and this filled that void.
     
  3. Offline

    shadyre

    Nice plugin ! i like plugin doesn't need other plugin or database for work ! easy to use and really good !

    It's work for me selling buying ... :)

    Can you just insert a default value for buying/selling per ID on a config file ?
    exemple :

    [data item]
    default
    default
    [Server]

    You check the default value with data item on the default price !

    ( Sorry for my bad english )
     
  4. Offline

    lazy_architect

    I know you have not updated to the new RB670 but I hope this helps the update. Got this error when using a server shop after updating to 670.
    Code:
    2011-04-08 06:34:32 [SEVERE] Could not pass event PLAYER_INTERACT to PhysicalShop
    java.lang.NullPointerException
        at fi.eliasp.physicalshop.InventoryHelpers.getCount(InventoryHelpers.java:67)
        at fi.eliasp.physicalshop.Shop.buy(Shop.java:75)
        at fi.eliasp.physicalshop.Shop.interact(Shop.java:144)
        at fi.eliasp.physicalshop.PhysicalShopPlayerListener.onPlayerInteract(PhysicalShopPlayerListener.java:50)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:252)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
        at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:208)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:447)
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     
  5. The plugin has now been updated to work with 670.
     
  6. Offline

    Joeyy

    could you add support for multiple currencies?
    Like gold for the more expensive items and iron for the less expensive items?
     
  7. Offline

    Arjan

    I can't create a config.yml file could you send me a config file so i can edit it? would like to use this plugin but not with these settings i would like change gold ingot to iron ingot etc! plz send me a link to a config file or perhaps add the config with the .jar?
     
  8. Offline

    Kainzo

    This looks and feels a lot like IconomyCheStShop but seems simpler
     
  9. Offline

    Braden1996

    Dont call me wierd but could anybody just make it so you can buy 64 diamond for 1g and sell dirt for 1000g using the server sign?
     
  10. I'm afraid multiple currencies would make things unnecessarily complicated.

    You can trade items in greater quantities than 64. Try something like 128:1 for dirt.

    The YAML format is very simple. Create the config.yml file with the following contents:
    Code:
    currency: 265
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  11. Offline

    riuthamus

    Any chance for bosecon support?
     
  12. You will need to be an op (without Permissions) or have the "PhysicalShop.admin" permission (with Permissions) to build them.

    Perhaps in the near future.

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

    shadyre

    And for default price for item ? possible or not ?
     
  14. Offline

    Rasmuffin

    First of all: great mod, been hoping for an economy system that is based in resources, instead of the economic fantasy that is "iconomy"

    Second:
    There is a bug in the transaction system when a non server chest is full.
    If you set up a chest:
    [ arrow ]
    (blank)
    1:63

    Then fill the chest with arrows and one slot with 64 (whatever the currency is set to)

    If you Sell the chest 1 arrow, you will get 63 gold out of it, but since the chest doesn't receive anything (it is full) the 64 gold remains in the chest. This can be repeated and the currency is infinitely created.


    Proposed solution:
    Im not a programmer but my impression is:
    The mod exchanges the currency to item in your inventory before it checks to see if the chest is full. Then it submits the text saying that the chest is full.


    Note: this only works if the Currency you gain from selling is less than the Currency in a single slot of the chest. Otherwise space is freed up for at least one of the item is put in.


    Keep up the good work.
     
  15. Offline

    shadyre

    Iconomy ... BOSecon, some plugin exist for them, just take them and it's ok
     
  16. Offline

    Joeyy

    Why would it make things unnecessarily complicated?
     
  17. Offline

    lazy_architect

    The file set up for that would be a huge pain. My server uses iron ingot, gold ingot, diamonds, and slime balls for money. The rate is 8 iron to 1 slime, 4 gold to 1 slime , and 1 diamond to 5 slime. using this i just set up 3 currency exchange signs using the slime ball as the base system. No need to add anything to the plugin.
     
  18. Offline

    Calvin

    So this doesn't work with iConomy?
     
  19. Offline

    davr

    That makes sense...except it means you can trade 1 diamond for 40 iron :O
     
  20. Offline

    lazy_architect

    diamonds are very rare on my server so that is about the going rate. But if it start to be a issue it is very easy to change. Just lower iron to 4:1
    Edit: Changed things around to make it easy and more in line with how rare slimeballs are. Going to try it out. 2:1 for Diamonds, 4:1 for Gold, 8:1 for iron. Thanks for the input I think this will work out with less extra iron pumped into the system.
     
  21. Offline

    xichael

    I searched through this forum didn't find anyone having the same problem, but whenever ppl on my server try to buy or sell its saying "Inventory is full." Doing this for ppl with empty inventories. What could this be and how could I fix it?
     
  22. Thanks for the report. This issue should now be fixed.
     
  23. Offline

    Cyrem

    I updated from r1 to r4... but then the plugin completely didn't work. So I reverted back to old r1 and left-clicking works but buying/selling does not. :(
     
  24. Offline

    bentford

    I am only able to sell from my player owned shops. Am I missing something?

    Using craftserver b61ef8c
     
  25. How exactly did it not work? Can you reproduce the problem with the newest version?

    Does your sign have both buy and sell prices? Does your shop chest have enough items and money? The plugin should be able to tell you if any of these cases occur.

    I'm not exactly sure what could've caused it, but I suggest you try the newest version where I made some changes to the inventory handling.

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

    swehunter2000

    Doesnt work at all..


    18:01:08 [ALLVARLIG] Could not load plugins\PhysicalShop.jar in plugins: Permiss
    ions
    org.bukkit.plugin.UnknownDependencyException: Permissions
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:88)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:158)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:106)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:63)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     
  27. The new version should once again work without the Permissions plugin.
     
  28. Offline

    Rasmuffin

    Hey again, this is epic and ignore the Iconomy complainers.

    First ty for fixing the full inventory problem.

    Second new problem: When attempting to buy an item from a chest it will say player inventory is full IF:
    There is not enough room in a single stack of the item in inventory.
    There is not an item to place on top of.

    Example:
    Shop
    [arrow]
    32:1
    (blank)
    Rasmuffin

    It will return Inventory full if you have 33 arrows in inventory or if you have 0 arrows in inventory.


    Third new problem:
    If you are attempting to buy items greater than 64 from a shop. It will return Shop inventory is full.

    It seems that with both problems the mod does not check multiple slots to see if there is enough room. Also if there is not a place to stack the item it does not look for an empty slot, or multiple empty slots in the case of 65+ sales.


    again Ty for the mod that doesn't rely on artificial currency :)


    Edit:
    4th Problem:

    I may be wrong, but if I understand the mod correctly, it replaces the players inventory with an identical inventory with less of the currency and more of the item being sold. Given this as relatively "true" There is a problem with the durability of items being replaced incorrectly.
    My half HP diamond axe was replaced with an almost full durability Axe when I purchased some arrows.
     
  29. I tried to reproduce the issues you reported, but all cases seemed to work correctly in version 7 at least.

    What versions of CraftBukkit and the plugin are you using?
     
  30. You should add support for placing signs on the side of chests instead of above chests, that would make it more compact.
    Also, I see that large chests don't work, what's in the 2nd chest is completly ignored... but you can do a double shop with a double chest and each half of the chest can be used for a different shop xD but it's too sneaky.

    Also, verry nice plugin.
     
  31. Offline

    Rasmuffin

    CraftBukkit: 617

    Version: 5
     

Share This Page