[INACTIVE][ECON] DMWrapper v0.14 - a DynamicMarket wrapper adding locations [617]

Discussion in 'Inactive/Unsupported Plugins' started by Magik, Feb 18, 2011.

  1. Offline

    Magik

    DMWrapper v0.14

    Links
    DMWrapper.jar (GitHub Source)
    DynamicMarket.jar ( 0.4.8.magik.28 ) (GitHub Source)
    DynamicMarket Thread ( slightly outdated, I forked it and have been maintaining my own version )

    Plugin Requirements
    • DMWrapper 0.14 was tested against Craftbukkit build #677
    • DynamicMarket ( 0.4.8.magik.28 - Shaniqua )
    • Permissions 2.7
    • iConomy 4.6.3 ( this is what DynamicMarket was compiled against )
    Intro
    I wanted DynamicMarket to be able to be locked down so that it wasn't a "global" shop command. This plugin enables that functionality by adding some /shop location commands. Basically you get to set up some locations in the world as shops, and you can restrict usage of the /shop to only those places. The plugin utilizes DynamicMarket's wrapper mode allowing me to pass commands as necessary to DynamicMarket. This plugin is just restricting location manager addon for DynamicMarket.

    HaloInverse's plugin thread can be found here: http://forums.bukkit.org/threads/econ-dynamicmarket-v-0-4-3-dynamic-price-shop-plugin-343.3266/


    Note: this has been barely tested, use at your own risk. And please for god's sake back things up before you try this! Any suggestions/comments are welcome, please post in this thread ( or an issue on github's issue tracker ).

    And thanks a ton HaloInverse for the great plugin that is DynamicMarket!

    Commands and Usage (open)
    Commands and Usage
    • /shop location - prints out the Usage for the location commands
    • /shop location enable - enables location-restricted shops
    • /shop location disable - disables location-restricted shops - DynamicMarket will work like normal here with a global /shop command
    • /shop location set - begins the shop location selection process - this will ask you to right click 2 corners to set the boundary box
    • /shop location cancel - cancels the shop setting process
    • /shop location remove <ID> - removes the shop location with id ID
    • /shop location check - tells you the shop location ID that you are currently in ( for deleting )
    • /shop location list - lists all the IDs of the shop locations
    • /shop location tp <ID> - teleports to the shop ID location
    Permissions (open)
    Permission Nodes:


    dmwrapper.location - allows usage of the /shop location command
    dmwrapper.admin - locations will not apply to a group with this node
    Installation Instructions (open)
    Installation Instructions:
    • Ensure you have DynamicMarket already installed and working ( with my latest compiled version here )
    • Add the permissions node to whomever you would like to be able to access the "/shop location" commands
    • Download the .jar - put it in the plugins directory
    • Once in-game ( with the location permission node ):
      • /shop location enable
      • /shop location set
    Changelog (open)
    Changelog:
    • 0.13
      • recompiled against CB#617 for Minecraft 1.4
    • 0.12
      • CB #602 update, as well as permissions/iConomy for that RB
    • 0.10
    • 0.09
      • added better integration into /shop help
    • 0.08
      • fixed command collisions with DynamicMarket ( also fixed in DynamicMarket 0.4.8.magik.18 )
    • 0.07
      • added debug-mode to config
    • 0.06
      • better player tracking for entering/leaving messages
    • 0.05
      • better world tracking
    • 0.04
      • fixed embarrassing stupid command error
      • fixed /shop location being ignored when locations disabled in shop.yml
    • 0.03
      • Updated to support newer DynamicMarket ( 0.4.8.magik.15 )
      • Craftbukkit Build #522
    • 0.02
      • minor command related bug fixes
      • tweaked intercept command code
    • 0.01
      • Initial Release
      • Added basic location based functionality to DynamicMarket
    To-do (open)
    To-do
    • Add custom/configurable messages for everything
    • Color up the current messages
    • Find a way to show the location command when passing /shop help to DynamicMarket
    • Add ability to pass administrative commands ( list/add/remove/etc... ) and ignore locations for those
    • Add ability to pass all commands if admin permissions?
    • Better handling of worlds ( currently I am assuming one world, and thus, this will probably break if you someone tries some sneaky things like setting one corner of a shop in one world, and another corner in another world ).
    • Fix getCenterOfShop() function to return calculated center instead of returning one of the set corners
    • Remove hard-coded plugin name/version/paths
     
  2. Offline

    TomWolf

    I've found what other plugin gives me 'no permissions' when combined with dynamicmarket. For me it's dropbonus.

    I got multiverse, groupmanager and many more. When I remove dropbonus I can add items to the shop, with it I can't. Hope this helps.
     
  3. Offline

    Daniel Few

    @Magik
    Heya, i love this plugin, however the reason why i'm not using it is because its a global shop. Do you think you would be able to set this up to use each location as an individual shop. Because at the moment and of the 'location shops' you go into share the same stock, and this means i cant have a Woodcutting shop, mining shop etc for my RPGServer.

    If this is possible it would be GREAT!
    -DanJames
     
  4. Offline

    Magik

    that's so odd... so I run it on my test rig here, and I have no problems at all....

    on my server, i'm noticing i do have the same issue - everything except for update seems to work as intended.... ( i usually use the console to update the shop ) I don't have dropbonus though...

    so I'm not sure what's causing the conflict on my server... people are playing on it now, so I don't want to start pulling plugins and the like....

    i don't see how one plugin could affect the permissions of another!?
     
  5. Offline

    N3X15

    The market is lagging my server like a bitch. Anything involving shop = 3 seconds of lag.
     
  6. Offline

    nukeade

    I was using this plugin with CB#677 and MySQL with no problems and really liked it, but now I added a Creative world with its own separate inventory and would like to have permission to use shop on a per-world basis. Is there any chance of modifying this DynamicMarket itself (not the wrapper) so that it is not global across all worlds, but rather obeys the permissions on each world?
     
  7. Offline

    xlilcasper

    I would like to request a config option to change the command prefix. I want to change it from /shop to /dshop, to avoid conflicts with other mods.
     
  8. Offline

    panderiz

    Getting
    Code:
    java.lang.NullPointerException
        at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onEnable(DynamicMarket.java:114)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:578)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:115)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:93)
        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)
    
    When I try and start my server. I am using EssentialsGrouperManager for permissions, which seems to be the issue... Any chance you could release an update to allow this to work with GroupManager(download here)?
     
  9. Offline

    Sleaker

    Going to try and fix the permissions issues, the way permissions is handled seems completely different/outdated compared to what the Permissions API lists as the proper method.

    Update: Pull request sent. - my code should now work properly with permissions with no issues if anyone wanted to test it. It was also built with 678 - so it's compatible

    I have no clue if it will break functionality with DMWrapper, but regardless. The Permissions were not working AT ALL.
     
  10. Offline

    Daniel Few

    @Magik​
    Heya, sorry, just wondering if you saw my post above:​

    I would really love it if this plugin could have different stock for different shop areas.​
    -DanJames​
     
  11. Offline

    ghost0001

    running craftbukkit 684 with these plugins:
    Backup 1.4a
    Bigbrother 1.8
    ContainerProtect 1.07
    DMWrapper 0.13
    DynamicMarket 0.4.8
    Dynmap 0.15
    EpicZones 0.19.1
    Essentials 2.1a
    iChat 2.2.3
    iConomy 4.6.5
    MyHome 1.9.4b
    Towny 0.61
    xAuth 1.2.2

    I am getting this when i use /shop exportdb, /shop add, /shop remove, and /shop edit.
    You do not have permission...

    I use group manager under essentials and my node has a * for all commands. Thoughts?
     
  12. Offline

    dcgamingentral

    does this work with cb684?
     
  13. Offline

    Revenger

    If your maintaining dynamic shop also would it be possible to use chests for the shop?

    Coming from mmo's this would be a neat visual feature have like a shopping mall building with various rooms for types of trading and you go to the chest to purchase stuff like what Realshop does but on a locked location basis with dynamic prices which this does.
     
  14. Offline

    dslip

    @Magik
    Probably not the right place to post this, but what the hey.

    Using the Dynamic Market plugin linked above, I cannot seem to get it to 'acknowledge' permissions.

    I have many ranks, lets say 2 for example

    rank1
    no dynamic market permissions

    rank2: inherits rank1
    - dynamicmarket.access
    - dynamicmarket.buy
    - dynamicmarket.sell

    However rank1 can use /shop to sell & buy?
    The permissions worked with older builds of Dynamic Market (I have not changed my groups.yml file in a while) but it seems now dynamic market ignores the permissions?

    I have even tried adding
    rank1
    - -dynamicmarket.access
    - -dynamicmarket.buy
    - -dynamicmarket.sell

    to explicitly remove the permission, but they still can use /shop.

    I also use localshops, but I use the version that registers /lshop thus I hope it is not conflicting with Dynamic Market.

    (I use dynamic marget for a global 'stock exchange' and local shops for player created shops)

    Could you please help / advise what I should try next?
     
  15. Offline

    Magik

    https://github.com/downloads/magik/DMWrapper/DynamicMarket.jar

    updated it again, sorry I forgot to upload it to the download section of DMWrapper ( I had added it to DynamicMarket's download link on it's github repo )

    can you try using this new version? It should recognize permissions properly
     
  16. Offline

    crazydog

    Nope...
    Group Manager Reports for this command:
    /manucheckp Crazydog115 dynamicmarket.buy
    The player doesn't have access to that permission

    However, I, and anyone else that returns that message, can still buy stuff from the shop just fine.

    CB 711
     
  17. Offline

    Magik

    hrm... I've never tried using groupmanager... and with permissions 2.7 it works fine for me? though I've never tested it with CB 711 I doubt that's the issue here
     
  18. Offline

    crazydog

    Well, GM comes with a fake permissions plugin, and everything else seems to work with it, whether or not it's been explicitly tested.
     
  19. Offline

    dslip

    @Magik
    Downloaded the new version you provided, still no change. I too am using GroupManager (essentialsGroupManager) Permissions is an ass on a big server (no ability to 'promote / demote players')
     
  20. Offline

    Magik

    can u guys try it one more time from the links in the original post here? I just recompiled them... but I was having an issue with DMWrapper, and it was throwing an error in the console... but give it a try?
     
  21. Offline

    crazydog

    It works! Fantastique!
     
  22. Offline

    dslip

    @Magik
    Ty, works correctly with group manager again.
     
  23. Offline

    Revenger

    I asked about the Items.DB in the general bukkit forum as your one is missing some 1.4 blocks and items we would require and all the 1.5 stuff.

    It was mentioned you can use the bukkit material.data class instead of using the items.db file.

    Link to that thread

    If anyone has a complete items.db and also a complete itemlist with values etc that we can work off please let me know as we are going to be setting a full shop system for every block and item except griefing ones or admin only ones and want to make setting this up as easy as we can.
     
  24. Offline

    Magik

    The only problem with the builtin bukkit material types is they don't deal with having names for sub-type items, for example, all dyes would have to be referenced by Ink Sank, and sub-types for the different colors.

    I can make an items.db file myself, it's actually quite easy if you open it up and look at it. It's just one of these two types of lines:
    itemID=NiceName
    itemID,subType=NiceName

    or you can let me know what's missing from there, and I can add it?
     
  25. Offline

    Revenger

    Block id's missing:

    26,27,28,30,(subtypes 43,44),93,94

    ItemID's missing

    355,356,357​
     
  26. Offline

    Sleaker

    Pretty sure the items.db file is not necessary for adding items to the database. I have cookies buy/sell - able without having them in the items.db and they work just fine, DM looks up item names by the name field of the DB.
     
  27. Offline

    Joy

  28. Offline

    Sleaker

    @Joy - did you configure the DB settings properly?
     
  29. Offline

    Joy

    Yes, market is running fine otherwise. Just saying it happened. This seems to be the case with many Bukkit plugins, not being entirely stable with reloads.

    Which makes it pretty ridiculous you can't reload individual plugins like in hMod.
     
  30. Offline

    Sleaker

    oh.. yah plugin reloads don't work well in bukkit. As a general rule I never use reload, for some reason bukkit doesn't deconstruct/release everything properly (something with the plugin manager probably).
     
  31. Offline

    Revenger

    Anyone got a shop export they can share?

    I keep looking over the sample shop I know the values and what they do etc but for us I have no idea what is good etc for pricing and settings.

    I'm planning to have each person start of with '50 Credit' kill will range between 1 and 15 credits depending on type of creature.

    More credit for mining world. where pvp etc will be and for building good stuff etc.
    I think the sample shot list might be good to get us going then tweak it.

    Also anyone have a webpage integration from the shop export list they can share? I started coding a basic one here if anyone is interested.

    I want a list of all products there images and there base stock levels etc and if they get removed or added they are shown or not shown on the webpage respectively.
     

Share This Page