[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

    NEO

    Ive tried with several item.dbs. Do you have a recommended one?
     
  3. Offline

    crazydog

    Scratch it - it was an issue with the Achievements plugin causing an error in iConomy on startup.
     
  4. Offline

    Sleaker

    Did you change how sale prices were calculated in the last build? Seems like they always round now, and not necessarily properly.

    - Old sale price used the same calculation as buy price at stock +1 (forcing 1 unit worse sell prices at all times) this prevented people from being able to buy and sellback items with a 0 tax for an overall gain.

    Now people can buy and sell back items at a gain since sell price is not calculated independently.

    New Sell Price is: floor(buy_price*(1-tax/100))
    Old Sell Price was: base_price*pow(1+(vol/10000), -stock-1)*(1-tax/100)
     
  5. Offline

    Oscarius

    Yes, isn't it supported?
    Using EssentialsGroupManager since the main version isn't updated yet.
     
  6. Offline

    Magik

    not officially no, I've only ever tested it with Permissions

    There was an error with the way HaloInverse was calculating batch prices, but it's been a while since I remember my fix for it.

    The basic mechanics are the same in terms of volatility, and the calculation for stock price is still the same based on your above formula:
    Code:
        private double getStockPrice(int stockLevel) {
            // Crops result to stockFloor/stockCeil/priceFloor/priceCeil.
            return rangeCrop(this.basePrice * Math.pow(getVolFactor(), -rangeCrop(stockLevel, stockFloor, stockCeil)), priceFloor, priceCeil);
        }
    
    what I did change was a slight error in his batch pricing calculations. I don't' remember exactly, but you can look in github under MarketItem.java for relevant changes

    edit: here's the commit: https://github.com/magik/DynamicMarket/commit/b7256bcf0f68a5498e49b3100461098ecf289a45

    if there is a new bug, can you please give me an export of your shop db, and show me exactly what commands you are executing to cause this problem where you gain more by using commands

    delete the items.db in the DynamicMarket folder, and let the plugin download it for you

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

    imaxorz

    Hey Magik,

    Finally got around to upgrading to 1.4 today.

    Works great on the test server, but on my actual server I get this.

    http://pastie.org/1761147

    Not sure what that can be.
     
  8. Offline

    Magik

    I'm not sure either =(

    by the definition of that error, it should be impossible to get that error ( it should be caught at compile time ). And the other thing that's crazy is those freaking variables should have open visibility to everything in it's package....

    can you tell me what your java -version is again? And what command line parameters you are passing to the Java VM?
     
  9. Offline

    imaxorz

    CentOS 64bit
    [max@72 ~]$ java -version
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

    On my test server (my computer) I have windows 7
    java version "1.6.0_23"
    Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)

    Not sure what you mean by what you said last about the line parameters :-/
     
  10. Offline

    acegiak

    I'm getting a "you don't have permission" error using latest permissions. Plus there's no debug output. I'm not running the wrapper. Also, thankyou so much for maintaining your dynamic market fork.
     
  11. Offline

    imaxorz

    Anything you would like for me to try?
     
  12. Offline

    TE5LA

    MC 1.4_1 / CB 612

    Getting this error starting server:

    08:35:58 [SEVERE] [DynamicMarket] Invalid economy setting for 'economy-plugin='.

    This is what the file says and was there by default:

    economy-plugin=iconomy4

    The market doesn't work in the game. Selling anything results in a message like:

    Balance 0 currencys
     
  13. Offline

    Color42

    DynamicMarket 0.4.8.magik.28 with permissions 2.5.5 CB617 cant access the admin features, did the nodes change?
    Just say "You dont have permissions to update shop items"

    Got these nodes in:

    - 'dynamicmarket.items.add'
    - 'dynamicmarket.items.update'
    - 'dynamicmarket.items.remove'
    - 'dynamicmarket.admin'
     
  14. Offline

    imaxorz

    Hey!

    Well it looks like the wrapper is the problem in my case.

    Here is the output with only Permissions, iConomy, DMWrapper, and DM (wrapper mode=true)
    http://pastebin.com/S0QAGVis

    Here is the output without the DWWrapper (wrapper mode=false)
    http://pastebin.com/Tq0QeN0V

    Ass you see no errors and it's working fine.

    Except I too get the no permissions errors. I got it when trying to /shop exportdb
     
  15. Offline

    ghost0001

    Bukkit 617
    Plugins:
    Dynmap, iConomy, BigBrother, Chatbukkit, ContainerProtect, EpicZones, Essentials(complete), MyHome, Scrapbukkit, xAuth
    problem i get is when i add an item to the shop. i get this:
    An internal error occurred when attempting to preform this command.

    EDIT:
    A work around I found was to export the DB in game with the /shop exportdb. Then I would edit the CSV by adding items or changing values of other items. then I imported the DB in game with the /shop importdb.
     

    Attached Files:

  16. Offline

    dademon

    I'm getting the same issue. "You don't have permission". Permissions 2.5.5, CB 617, Shaniqua build of DM, not using wrapper, no debug output, am admin with * permissions and in ops.txt. Please help.
     
  17. Offline

    ghost0001

    i found it to work better with Group Manager. but you gotta stop your server, update your permissions, then restart it. you CANNOT edit your permissions in game then /reload all. it will revert to your last back up.
     
  18. Offline

    Sleaker

    Looks like permissions are completely obselete in just the normal DynamicMarket. My players can access the commands regardless of permission nodes (I'm not using DMWrapper, and simple-permissions is off)

    Edit: Players can buy regardless of having DMWrapper enabled or not, when /shop location disable - effectively means permissions do nothing but limit access to admin commands.

    I was hoping to enable the global shop only on 1 world, but if my players have access regardless of 'dynamicmarket.buy' node it doesn't really help.
     
  19. Offline

    grizzlymann

    I apologize if this is a repeat, but are there plans for updating to 670?
     
  20. Offline

    ghost0001

    Bukkit 617
    Plugins:
    Dynmap, iConomy, BigBrother, Chatbukkit, ContainerProtect, EpicZones, Essentials(complete), MyHome, Scrapbukkit, xAuth, towny

    ran into another problem. i migrated my server to my vista machine and am running it on my network in the DMZ. problem is now that i do not have permissions to add/edit/del or export/import db. i checked my group manager's config and its all there just like when it was on my pc. so i cannot figure out what the issue is.
     
  21. Offline

    Oscarius

    Update:

    I am now using CB670 and Permissions 2.6 instead of GroupManager. I'm still getting the "no permissions" error. I'm not using the wrapper.
     
  22. Offline

    Sleaker

    @Oscarius did you give yourself '*' permission?
     
  23. Offline

    Oscarius

    Yes I did, as stated in the quoted post.
     
  24. Offline

    Sleaker

    Hmm, I haven't tried the add/remove commands I just update stuff in mySQL manually. It may just be that the permissions detection is completely broken right now. My players can buy/sell without having any of the permissions nodes.
     
  25. Offline

    crazydog

    DynamicMarket doesn't seem to work with permissions, at least not with MultiWorld.

    I've created another world where I don't want users to be able to use the shop. I've removed ALL dynamicmarket permissions from the world's permission config, but users can still use all the /shop commands.
     
  26. Offline

    Sleaker

    It actually doesn't register per-user permissions at All. If you remove all permission nodes from your players they will still be able to access the shop regardless.

    @Magik - had a chance to check out the permission issues yet?
     
  27. Offline

    crazydog

    I'm takin' about group permissions, but I guess it's related.
     
  28. Offline

    Magik

    I can't replicate the problem, maybe you guys should send me your Permissions config files

    it works fine on my production server, as well as any of the test rigs...
     
  29. Offline

    Sleaker

  30. Offline

    crazydog

    I'm doing it on Multiworld...could that be an issue? I'm also using GroupManager.
    Same as Sleaker, no dynamicmarket nodes, except for Admins, but people can use it as much as they want.
    Code:
    groups:
      User:
        default: false
        permissions:
        - achievements.check
        - achievements.view.own
        - antigrief.prevent.block.ignite
        - essentials.afk
        - essentials.compass
        - essentials.depth
        - essentials.getpos
        - essentials.helpop
        - essentials.list
        - essentials.mail
        - essentials.mail.send
        - essentials.me
        - essentials.motd
        - essentials.msg
        - essentials.rules
        - essentials.tpaccept
        - essentials.tpdeny
        - iConomyDeath.use
        - iMonster.User
        - lwc.protect
        - mcbans.vote
        - mcbans.vote.kick
        - mcbans.vote.msg
        - mcdocs./commands
        - mcdocs./rephelp
        - mcdocs.commands
        - MCDocs.rephelp
        - modtrs.command.modreq
        - sortal.coords
        - sortal.warp
        - stats.log
        - stats.view.own
        - stats.view.playtime
        - uQuest.CanDropQuest
        - uQuest.CanQuest
        - essentials.spawn
        inheritance: []
        info:
          prefix: '&7'
          build: true
          suffix: '&f'
      Guest:
        default: true
        permissions:
        - achievements.check
        - antigreif.prevent.player.damage.cause
        - antigrief.prevent.block.ignite
        - antigrief.prevent.entity.creeper
        - essentials.list
        - essentials.motd
        - essentials.tpaccept
        - essentials.tpdeny
        - mcdocs./commands
        - mcdocs.commands
        - modtrs.command.modreq
        - phatloots.use
        - sortal.coords
        - sortal.warp
        - stats.log
        inheritance: []
        info:
          prefix: '&5{GUEST}&f '
          build: true
          suffix: '&f'
      Regular:
        default: false
        permissions:
        - antigrief.allow.block.ignite
        - citizens.basic.create
        - citizens.basic.settext
        - citizens.color
        - citizens.general.colour
        - citizens.general.select
        - citizens.general.setitem
        - citizens.general.setname
        - citizens.help
        - essentials.portal
        inheritance:
        - user
        info:
          prefix: '&c[REG] &9'
          build: true
          suffix: '&f'
      Baddie:
        default: false
        permissions: []
        inheritance: []
        info:
          prefix: '&7{BAD}&f'
          build: false
          suffix: '&f '
      Veteran:
        default: false
        permissions:
        - antigrief.allow.block.ignite
        - mcbans.anticheat.trust
        inheritance:
        - user
        info:
          prefix: '&6[VET] &2'
          build: true
          suffix: '&f'
      Admins:
        default: false
        permissions:
        - achievements.*
        - antigrief.*
        - antixray.*
        - autostop.use
        - bb.admin.*
        - citizens.*
        - cleaner.*
        - delayedstop.cancel
        - delayedstop.start
        - dynamicmarket.admin
        - essentials.*
        - godmode.*
        - groupmanager.*
        - iConomy.*
        - iConomy.admin.*
        - izone.*
        - logblock.*
        - lwc.*
        - magiccarpet.mc
        - mcbans.admin
        - mcbans.anticheat.trust
        - mcbans.anticheat.view
        - mcbans.mute.all
        - mcbans.offline
        - mcbans.online
        - mcbans.reload
        - mcdocs.*
        - modtrs.*
        - modtrs.mod
        - multiverse.*
        - nocheat.*
        - phatloots.*
        - plugman.*
        - plugman.describe
        - plugman.list
        - stats.*
        - stats.admin
        - superpowers.use
        - uQuest.*
        - vanish.*
        inheritance:
        - moderator
        info:
          prefix: '&1[MOD] &3'
          build: true
          suffix: '&f'
      Moderator:
        default: false
        permissions:
        - antigrief.allow.block.ignite
        - essentials.ban
        - essentials.banip
        - essentials.home
        - essentials.kick
        - essentials.modgrp
        - essentials.nick
        - essentials.portal
        - essentials.sethome
        - essentials.tpa
        - essentials.tpahere
        - essentials.unban
        - essentials.unbanip
        - essentials.whois
        - essentials.world
        - groupmanager.manuadd
        - logblock.lookup
        - mcbans.anticheat.trust
        - mcbans.ban.global
        - mcbans.ban.local
        - mcbans.ban.temp
        - mcbans.ban.view
        - mcbans.kick
        - mcbans.lookup
        - mcbans.mod
        - mcbans.mute.player
        - mcbans.unban
        - mccondom.general
        - modtrs.broadcast
        - modtrs.check
        - modtrs.command.broadcast
        - modtrs.command.check
        - modtrs.command.complete
        - modtrs.command.modlist
        - modtrs.complete
        - modtrs.mod
        - sortal.createwarp
        - sortal.delwarp
        - sortal.placesign
        inheritance:
        - user
        info:
          prefix: '&1[MOD] &3'
          build: true
          suffix: '&f'
    
     
  31. Offline

    Magik

    hrmmm maybe you guys can send me a zip of ur minecraft dirs minus the world folders
     

Share This Page