[ECON] CommandShops v4.2.0 - The premier local shop plugin. [1.5.2]

Discussion in 'Archived: Plugin Releases' started by zolcos, Sep 30, 2011.

  1. Offline

    Passi901

    When I try buying somethin in a Shop ingame it says:
    "Unexpected Money Problem - Could not Complete Sale"
    Yesterday it worked Fine for me and i changed nothing

    EDIT: Using iConomy 6, latest version of Register and latest of Bukkit

    Code:
    16:47:35 [INFO] [CommandShops] Passi901 issued: buy cooked porkchop 1
    >
    16:47:35 [INFO] [CommandShops] PlayerFrom: Passi901 balanceFrom: 36372.808728122836 PlayerTo: Staat balanceTo: 0.0 Cost: 20.0
    >
    16:47:35 [INFO] [CommandShops] Failed to deposit! EconomyResponse[amount=0.0,balance=0.0,type=FAILURE,errorMessage=Register couldn't find player]
     
  2. Offline

    zolcos

    Please verify that "Staat" still exists in the player data
     
    Passi901 likes this.
  3. Offline

    Passi901

    Aaaah Thanks a lot =) Gonna try that I think that´s the reason

    Okay that´s the reason thx =) Fast and good Support *Thumps Up*
     
  4. Offline

    Mozartripper

    does it supports pistons ? id 29 and 33 when its in a shop it wont load it and move it to "broken-shop" folder at start-up.
    Also a /shop reload command would be nice :D instead of reloading every plugin when playing with the config/shops files.
     
  5. Offline

    zolcos

    Pistons are supported in all the commands but I think the "broken shop" checking code chokes on them. Problems like this will be moot when I switch to sqlite but if my guess is right then I'll release an immediate fix for this issue first
     
  6. Offline

    Gangstacris4

    Would be great if you could support localshop v4 files moved over - I tried to move over my 4.0.2 localshop files, but they don't work at all. I moved back to them when the problem with register occurred, and localshops was updated, but since it has again become inactive so I wanna move back to this for all the new items + regular maintenance of the plugin.
     
  7. Offline

    zolcos

    @Mozartripper I think I figured out Pistons. This is an issue that was fixed in CommandShops 3.6. However, if you added Pistons to your shop under a version of CommandShops prior to that, it stored a wrong damage value for Piston and Sticky Piston in your shop file. When the latest CS sees that wrong value, it no longer matches the reference and it moves the shop to shops-broken.

    The issue stems from the fact that pistons actually require a damage value of 7, can you believe it?

    To fix your broken shops, open the shop file and change 33\:0 to 33\:7
    Likewise, change 29\:0 to 29\:7
    Make sure you take a backup first of course.
     
  8. Offline

    Sanpletext

    Anyone else has problem with Endstone? ID 121. I can't add it to shop neighter from hand with /shop add nor with /shop add 121. It just says "Could not find item."
     
  9. Offline

    Inferno

    Have the same problem, Nobody can buy from the shop :(
     
  10. Offline

    zolcos

    @Chirimorin @Inferno
    For now, you could create a fake player in your player data that has the same name that you put for the owner of the shop. This 'NPC' will recieve the money from purchases and there should be no more errors.
    (I still plan on fixing the root cause of course)
     
  11. Offline

    kahlilnc

    VAULT support plz ? :(
     
  12. Offline

    zolcos

    3.6.2 is out guys. Bundles are gone now, and prices should be divided automatically, but if you were using bundles, then PLEASE double check the new price. I had the foresight to prevent anything from having its sell price reduced to zero (minimum is 0.01) but some currency systems may react differently than what I tested with.
     
  13. Offline

    Chirimorin

    Yeah, that's what I'm doing now. Just an iConomy account with the name NPC and it works fine. My post was mainly to point out the vague error message and a suggestion to not require a money account.
     
  14. Offline

    Wolffe

    Is there a way to make this work with iconomy when I also have essentials installed? It defaults to essentials eco. Please help
     
  15. Offline

    zolcos

    If you have two economies running it will just pick one. You should be able to go into the Essentials config and disable the economy part so plugins like this one don't get confused
     
  16. Offline

    zolcos

    Here's my plan for supporting enchanted items and damaged items:

    - Implement XP buying first
    - Create "Disenchant" service that removes an enchantment from an item, and gives you back the XP. Since enchanting is random, the XP you get back will be the minimum XP you reasonably could have spent on getting the enchantments, that way repeatedly enchanting and disenchanting will result in a net loss to prevent abuse.
    - Create "Repair" service that consumes crafting materials from the shop, with service price automatically set by the sell price of those materials, and with both price and mat usage scaled for damage % of the item. Fractional materials would be preserved so the shop owner doesn't get screwed. Repairing enchanted items also consumes XP from the shop.
    - Don't accept enchanted or damaged items when stocking a shop, but of course these items can be sold after fixing them up with the above services.

    Pros:
    - Allows sellers to get fair compensation for enchanted items instead of the enchant being stripped
    - Fixes the balance issue of shops providing free repair, which unfairly benefitted shop owners, while still allowing a sensible option for repairing
    - Implements a legit way to repair enchanted items
    - Works from existing prices, avoiding the need to separately set up prices of scaling factors for these services
    - Avoid the need to store inconsistent item states in the shop data, because it would be very difficult to handle them from a command based interface.

    Cons:
    - Since all these prices are calculated, it's not obvious to the player what something would cost so I'd probably want to add a mechanism for price-checking a service before committing. But it is really a Pro that I'm keeping any of this complication away from the main buy/sell commands.

    I have an alternate solution for supporting damaged items:
    Simply make the stock of durable items be a real number instead of an integer. So if I sell a pick with 50% damage, the shop will have 0.5 picks (which will display as 0). If I sell two picks with 50% damage, the shop will have 1 whole pick in stock and then somebody will be able to buy 1 pick with no damage. This is a much simpler method that is more in line with how Minecraft's built-in repair system works. I'd need to implement the disenchant service as stated above and there would be no direct repairing possible, meaning no repair of enchants whatsoever.

    Let me know which system you like better because I am going to implement one of them soon, assuming I can't find a way to cleanly support actually dealing in enchanted items.
     
    kahlilnc likes this.
  17. Offline

    toxicminers

    Hey there thanks for reviving localshops. Awesome plugin love all the options. I was wondering if there was going to be a release to include the new eggs recently added with 1.1?
     
  18. Offline

    zolcos

    It's not important enough to force a release by itself but they will be included. Shops already support lots of items you can't get legitimately in survival like water blocks, double slabs, and hidden silverfish blocks.
     
  19. Offline

    Olat

    zolcos

    First, TY for restarting LocalShops.

    2nd, trying to set up a server shop, that BUYS certain items and sells others.

    We are using iconomy for money and I want my players to be able to sell gold Ingots / Blocks to the shop. Everytime I try to set it up it complains that I cant set a buy price higher then a sell price or vice versa. Why cant I have a shop that only BUYS gold ingots and doesnt sell them ? Is this possible? Am I an idiot and doing it wrong? Or did you change something that wont allow for this ?

    I have the shop set to unlimited money and unlimited stock, so the shop can Sell PVP items like Armor and Weapons, and it will buy Diamonds / Gold for them to make and create currency. With the old Local shops this was no issue.

    So please explain what im doing wrong, or how I can fix this.. Thank you!
     
  20. Offline

    zolcos

    You're doing the right thing. What you describe is a side effect of the "faulty pricing protection" I implemented that prevents you from setting a buy price higher than the sell price for an item. It shouldn't have caused any problem, except for the fact that original LocalShops stored non-prices as 0. So if to tell it to buy and not sell, it compares against 0 and triggers the protection when it really shouldn't.
    The next non-trivial release will rework the way price setting and shopdata works and will solve this problem. It will store non-prices as NULL instead of 0. This will also allow you to buy or sell things for 0 if you wish.

    For now, you could just set some insane sell price that nobody is willing to pay, to work around this issue.
     
  21. Offline

    toxicminers

    Thanks for the reply. I wasn't begging for a release I was just curious if it was going to happen. But cool it's gonna get worked in. I don't know if someone has already said this or not but on our server we are havign an issue with blaze rods. They are being noticed as Lapiz we have to use the data value for them. Is that normal or an issue?
     
  22. Offline

    zolcos

    Version?
     
  23. Offline

    toxicminers

    Oh Well maybe that is why I feel like a noob. I thought I checked for updates :(
    Running v3.5.4
     
  24. Offline

    Bluehog

    Well now, got some bugs to bring forward.

    1 ) Pistons and sticky pistons can't be added to the shops. Holding them and say /shop add doesn't work, nor does /shop add <ID>. This is true also for leaves.

    2 ) Potions are buggy. You can add them by holding them and saying /shop add. But you can't /shop add <ID: Damage> anything but water bottles. Also using names I recommend changing names like Potion of Weakness 2 to Potion of Weakness II or Portion of Weakness Lv2. At the moment level 2 potions can't be retrieved through the shops with commands due to it thinking you want 2 of the level 1 potion.

    3 ) Spawn Eggs - Item 383. You can't add working shop eggs (383:95 for example), just the non-functional 383:0
     
  25. Offline

    zolcos

    Have a look at the changelog :)

    Version? That sounds like stuff that was fixed

    Sure you can -- try leaving out the spaces, it will work. For more info use the search command and it will tell you the bits of text you need to match the item

    That was intentional as the damage values were not known at the time I added support for them. I'll expand support in the next release of course.
     
  26. Offline

    Bluehog

    I just redownloaded what I dled yesterday and it semi fixed (Must of not installed properly last time. Apologies for that.). Potions are working properly now. Leaves, not so much.

    Leaves cannot be added or sold from the hand with "/shop add" and "/shop sell" respectively
    You can add leaves via their ID numbers 18, 18:0, 18:1, 18:2 but you can only remove 18 and 18:0 with their ID numbers. Trying to remove 18:1 or 18:2 makes the shop remove (or attempt to) 18:0
    18/18:0 being oak leaves
    18:1 being redwood leaves
    18:2 being birch leaves


    New thing is that I can't "/shop set buy" and item that hasn't been "/shop set sell" first. The message is "Cannot set buy price greater then sell price." But the shop doesn't even sell that item. (We have shops with unlimited money that ONLY buy stuff)
     
  27. Offline

    zolcos

    Thanks for catching the leaf thing -- birch leaves work fine but redwood leaves have search collision with redwood log and jungle leaves are new.
    for buy/sell issue see post 180
     
  28. Offline

    toxicminers

    Thanks for the info Zolcos but seems the D/L link is broken? Now I know the problem but can't fix it . I'll check back later.
     
  29. Offline

    zolcos

    Just tried the link and it still works for me, maybe a temporary glitch

    What issue are you having with Register?
     
  30. Offline

    GarretSidzaka

    nothin other than command shop is been buggy, register is abandoned, and everyone is switchin to Vault so i dont really want 2 economy register.

    also you have a problem with shops getting corrupted if there is a server crash.
     

Share This Page