Inactive [ECON/ADMN] DynamicShop v1.3 - Trade with dynamic prices via cmds or signs. Economy support! [1337]

Discussion in 'Inactive/Unsupported Plugins' started by Schwarzer Zylinder, Sep 1, 2011.

  1. I am trying to edit the file on my computor, then uploading it to the server. Wish me luck!
     
  2. Offline

    Dpa1991

    Any updates on my suggestion/request? Would be amazing if it was possible.
     
  3. Added it officially to the ToDo-list, willd be done in the next version :)
     
  4. Offline

    bgdemonic

    LOVE this plugin but I'm also having problems with the server restarts as well....it breaks signs with items that take up too much space on the 2nd line of text....I'm running a small server hosted from a home computer. Any info would be useful.
     
  5. Offline

    Don Redhorse

    would it be possible to support the "shop" only in specific regions?

    also concerning the buy / sell / tax algorythim.. I don't want to use the sell tax but still you shouldn't be able to just increase the price by buying stuff.. so I have a suggestion which I know will force a rewrite so think it over:

    track how many people are buying a certain ID... if X people buy a certain ID in a Y time increase the price as the demand is higher, same goes with selling... one person shouldn't be able to drive the price.
     
  6. The fix for the bug on second sign line is nearly finished, will be in 1.3.

    @Don Redhorse: Would be possible, but not so easy to translate in code.
    What do you think of this:
    1. The last buyer/seller for all materials are saved. If you sell something and you are the last one who bought this material you have to pay the tax, otherwise not
    2. The price will not change after every transaction, but in time intervals
     
    bgdemonic likes this.
  7. Offline

    Don Redhorse

    hmm you could also try
    3. Every ID has a 2 counters which are incremented when you buy / sell, if the counter reaches X it is reset to 0 and the price is newly calculated.

    option 1 is also ok.... I mean there is always room for exploits... but I don't care really about it..
     
  8. Offline

    Magge

    Im trying to sell mossy_cobblestone - the word is to long to be on one line - so... How can i sell it?
    I have tryed to type it in with the block Id, but same thing :(
     
  9. Write the block id instead of the word and it should be automatically changed to the name.
    Fix for restart will be in 1.3
     
  10. Offline

    Magge

    I have tryed with block id...
    The only difference here is that when i use block id it can fit one more letter on a line then i can manually. Still can't sell/buy it :(
    Is says "impossible material or amount
    [DynamicShop]
    48
    1
    blank
     
  11. Offline

    rodfoflmao

    How would i add items such as the Brick half blocks, or the mossy smooth bricks?
    It's really kicking me >.<
     
  12. Offline

    JoneKone

    Nice plugin.. LocalShop had updateds aswell.
     
  13. Offline

    Zocomen

    Happends when I try to create a shop using Sign.
    Latest Version of DynamicShop
    Bukkit 1337
    PermissionsBukkit + Superperm
    iConomy 6
    Register 1.5
    Code:
    2011-11-03 12:58:25 [SEVERE] Could not pass event PLAYER_INTERACT to Dynamic Shop
    java.lang.NullPointerException
        at me.gerry.dynamicshop.DynamicShop.buy(DynamicShop.java:163)
        at me.gerry.dynamicshop.DynamicShopPlayerListener.onPlayerInteract(DynamicShopPlayerListener.java:41)
        at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:92)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    2011-11-03 12:58:26 [SEVERE] Could not pass event PLAYER_INTERACT to Dynamic Shop
    java.lang.NullPointerException
        at me.gerry.dynamicshop.DynamicShop.buy(DynamicShop.java:163)
        at me.gerry.dynamicshop.DynamicShopPlayerListener.onPlayerInteract(DynamicShopPlayerListener.java:41)
        at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:92)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    2011-11-03 12:58:27 [SEVERE] Could not pass event PLAYER_INTERACT to Dynamic Shop
    java.lang.NullPointerException
        at me.gerry.dynamicshop.DynamicShop.buy(DynamicShop.java:163)
        at me.gerry.dynamicshop.DynamicShopPlayerListener.onPlayerInteract(DynamicShopPlayerListener.java:41)
        at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:92)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  14. Offline

    Tobbzn

    Got some new errors to report. Of all the in-game commands, only buy, sell and price work. The rest of the commands return "Wrong material!" error.

    Turning off "op-only" doesn't seem to work either. My players still need to be op to buy and sell via commands.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  15. Thanks for recording, I will finish the update as soon as possible.
     
  16. For all those who can't wait, here's the first Alpha version :)

    <Edit by Moderator: Redacted mediafire url>

    As the name says, it is an ALPHA! So there are some bugs and please report as much as you can ;)

    Changelog:
    * Whole new file system (See below)
    * Improved giving of items (Max. item stack sizes are considered now
    * Identifiers! (See below)
    * Player Signs! (See below)
    * New Configuration
    * Statistics
    * Internal round-off errors are fixed, so the price can never get 0
    * Rewrote tons of code again, again and again
    * Nothing is case-sensitive (Hopefully :D)
    * Fixed some bugs

    Materials with long names are now completely usable! You can use the name, the item id, or your personal identifier!

    Explanations:

    Show Spoiler
    File system:
    If you start the plugin, you will see 6 txt files in your folder. PlayerItems.txt and PlayerSigns.txt are only used by the plugin, don't touch them!

    Configuration.txt works as the old config, you only have to remove the spaces:
    default-price:50 -->Correct
    default-price: 50 -->Remove the space

    Global prices.txt works like the old one, with just one difference: It uses ':' instead of '='
    How to convert the old price file to the new one:
    Just replace all '=' with a ':' using an editor programe and copy it to the new auto-generated file, that's all

    Identifiers.txt: Here you can set identifers for all materials, and for the first line
    Example:
    [DynamicShop]=shop
    If you write shop on the first line, it will be a shop sign. DO NOT TOUCH THE FIRST WORD, change theSECOND one!

    In the transaction log you can see all transactions, including, the shop, price, date, player, shop owner, etc...


    PlayerShops:

    Create a sign with the identifier on the first line (Default: [DynamicPShop]), on the second line write the material.
    On the third row write whether you want to buy or sell and the amount
    On the fourth row write the price
    Example:
    [DynamicPShop]
    dirt
    sell:4
    100

    You sell 4 dirt for 100$ each.

    You can use the material name, the identifer, or the item id.
    The amount and price will refresh after every transaction.


    Configuration:
    //if true, all prices will be set to default after server restart (After change it will be automtically false, so it doesn' change again)

    set-price-default:false
    //Default price for each item
    default-price:50.0
    //Enable logging?
    log-transactions:true
    //Sell taxes in percent
    sell-taxes:1.0
    //Only op should use the plugin?
    op-only:false
    //Permissions enabled?
    use-permission:false
    //If true, after a sign creation, the price, material and identifier will be rewritten correctly (So dIRt will be DIRT), so the sign works 100%. Recommended to set true!
    rewrite-signs:true
    //See the main post
    pricechange:percent
    pricechangespeed:0.18
    //Same as set-price-default for identifers
    set-identifier-default:false
     
    Last edited by a moderator: Nov 12, 2016
  17. 1.3 is out!

    See changelog on main page. It really has MANY, MANY new features.

    How to convert files from older version to 1.3: (open)
    Configuration.txt :
    It works like the old config, you only have to remove the spaces:
    default-price:50 -->Correct
    default-price: 50 -->Remove the space

    Prices.cfg to Prices.txt:
    Just replace all '=' with a ':' using an editor programe and copy it to the new auto-generated file, that's all



    @Dpa1991: I have not forgotten your idea. It will be added some time! :)
     
  18. Offline

    scoobyalex

    [BUG] When i tried out this plugin, i set up the sign all correct so that it worked (using iconomy). but when i stood far back from the sign and sold some dirt, i got the money from selling it but the block also got placed infront of the sign??!?!?!

    (sorry for the lag)
     
  19. That isnt a bug, its the normal minecraft gameplay. Signs act like blocks, so if you click on a block and there is enough space, you place another block in front of it ;)
     
  20. Offline

    Tobbzn

    1.3 was a huge improvement, thank you! However, I have one issue.

    If I break the player shop I set up, it disappears without me getting money or items back. Haven't tried with other people breaking it, but I set up a bookshelf-buy-shop, and sold myself a bookcase while breaking it, but lost the rest of the stack I was selling.
     
  21. I tested it out again and all worked fine. After you set up the sign, check whether it's in the PlayerSigns.txt
    My build is 1337.
     
  22. Offline

    Tobbzn

    I get a "Could not pass BLOCK_BREAK event to DynamicShop" error.
    And the shops I've destroyed are still in the PlayerSigns.txt file.
     
  23. Then post the error code...
     
  24. Offline

    Tobbzn

    I've since restarted the server and lost the error code, and am unable to reproduce the error code. The sign still breaks without refunding, though. I remember one of the error codes including Spout.somethingsomething, is there a possibility there might be an incompatability?

    One of my players is also reporting an issue of prices suddenly becoming 0. He claims Iron Chestplates were at 600 earlier today, but later became 0. I've had the same experience with Sand and Bookshelves, despite copying my old prices-list.
    My current configuration file:
    set-price-default:false
    default-price:50.0
    log-transactions:true
    sell-taxes:50.0
    op-only:false
    use-permission:true
    rewrite-signs:true
    pricechange:percent
    pricechangespeed:0
    set-identifier-default:false
    drop-signs-on-inactive:false
     
  25. Isn't the code still in the server log? somethingsomething doesn't help really :)
     
  26. Offline

    Tobbzn

    Found it! Didn't know the server logs were saved after a reset.
     
  27. The material to give wasn't found. Delete the files and try it out with new placed signs.
     
  28. Offline

    jazzman170

    I'm having problems. I am using permissions so that only OPS can make the signs via a permission i give them. But when i give the buy/sell permission to the default group, its not working. It always say's they dont have permission. What is the EXACT permission i need to allow players to buy everything and sell everything that is on the market (Signs) at the market shop that i built. I am using permissionsbukkit

    edit: sorry ill post on bukkit next time :p
     
  29. 1. Post on BukkitDev!
    2. Look at BukkitDev!
    3. Download version 1.32 on BukkitDev, then it will work.
     
  30. Offline

    cool430

    nice ! plugin:)
     

Share This Page