[INACTIVE][ECON] SimpleShop [1.41] - An iConomy Shop [493-531]

Discussion in 'Inactive/Unsupported Plugins' started by Nijikokun, Jan 23, 2011.

  1. Offline

    Nijikokun

    SimpleShop (1.41) (iConomy 4.4+ & Permissions or Op(s).txt)(Donate)
    Download the latest release. (Jar)

    What is SimpleShop?
    Simple shop is... well a simple global shop that allows you to add, update, and reload in game.
    Natively supporting MySQL & SQLite.

    Install:
    1. You need iConomy & Permissions to use this plugin.
    2. Download the archive, extract the files to your base craftbukkit directory.
      1. SQL Dependencies Required:
        1. SQLite Dependency
        2. MySQL Dependency
      2. The dependency must be located in the craftbukkit plugin directory!
    3. Go to plugins/SimpleShop/ and modify the .settings file to your likings.
    4. Restart server and enjoy!
    Stock
    Show Spoiler
    To activate stock open up the .settings file and locate use-stock=false set it to true.
    Commands:
    Show Spoiler
    /shop check [id] - Show item information
    /shop list (page)
    /shop buy [id]([:amount])
    /shop sell [id]([:amount])
    /shop add [id]:[amount per bundle] [buy] [sell] (stock)
    /shop update [id]:[amount per bundle] [buy] [sell] (stock)
    /shop remove [id]
    /shop reload
    Examples:
    • Getting Started.. We are going to add stone, in bundles of 64 to purchase for 10, and sell for 2.
      • /shop add 1:64 10 2
      • For Stock:
        • /shop add 1:64 10 2 64
    • Lets test it:
      • /shop buy 1
    • Now lets update it.. it was bit expensive and nobody was really gaining money.
      • /shop update 1:64 8 5
      • For Stock:
        • /shop update 1:64 8 5 64
    • Now lets test again:
      • /shop sell 1
    • The end.
    Permission Nodes:
    Show Spoiler
    simpleshop.buy
    simpleshop.buy.gift
    simpleshop.sell
    simpleshop.items.remove
    simpleshop.items.reload
    simpleshop.items.add
    simpleshop.items.update
    Changelog:
    • Version 1.41
      • Rewrote chunks of the coding.
      • Added support for "gifting"
        • /buy [item]( : amount) [who]
    • Version 1.4
      • Fixed connection issues.
      • Fixed plugin hook issues.
      • Added Dependency download support.
      • Default file loading support like in iConomy.
      • Fixed up some CLI issues.
    • Version 1.3
      • Added support for stock
        • Modifies database! Backup before restarting!
      • Fixed some bugs revolving around listing pages.
      • Fixed issues with not being able to set non-sellable / buyable items.
        • Now use -1 for either buy / sell to disable that feature:
        • /shop add 1:64 -1 15
          • Stone is sellable but not purchasable!
    • Version 1.2
      • Commands are now CLI parsed.
        • Causes /shop [id] to become /shop check [id]
      • Shop list is now paginated (Untested)
    • Version 1.1
      • Fully working with selling items.
     
    dojopunk and TonyMcDanza like this.
  2. Offline

    Nate204

    For some odd reason, the shop doesn't seem to make pages. I've added over a page worth of items (the extra items don't list on the first page) and the second pages doesn't show up. It shows that I've added them correctly, but like I said, Page two is nowhere to be found. How strange~ Anyone else have this problem?
     
  3. Offline

    cloudafloat

    I have iConomy installed too.
    http://screensnapr.com/v/K7PBEM.png
     
  4. Offline

    Hotrian

    [SEVERE] [SimpleShop]: Could not create table for sqlite: java.sql.SQLException: unable to open database file

    BukkitCraft #254, SimpleShop 1.3, iConomy 2.0, Both dependancies are in the root, where bukkitcraft is.

    Edit: Permissions on my server were bugging out. Everything was owned by a different group. Odd.
     
  5. Offline

    Meteo

    Is there anyway for this to show all this info from /help ? like, new commers have NO IDEA and npc's dotn work for bukkit yet =/...
     
  6. Offline

    2Bucks

    Under what conditions, if any, can we reset stock? The stock idea is great but it'd be a pain to have to do /shop update for every item once stock runs out, any way to just completely reset all stock?
     
  7. Offline

    Azraeil

    I use stock so that if, say, glass is out of stock in the shop, my players will have to go farm some glass. I also like the idea of having rare items in the shop for sale, but only if a player puts them there. Things like Mossy Cobblestone.

    It looks like stock isn't currently functional. I can run everything, but I can't actually sell/buy anything when use-stock=true. I'm using craftbukkit build 254 with the latest versions of iConomy and SimpleShop.
     
  8. Offline

    zettairyouiki

    I've encountered a problem where requesting page 2 of the item list causes a client crash. All files up to date.
     
  9. Offline

    2Bucks

    True, but if a bunch of rare items do run it, it would be much easier if there was like a /stock reset all command to reset all stocks simultaneously
     
  10. Offline

    Azraeil

    I suppose that would require two settings then: an initial stock and the current stock. If he does implement that, I would suggest also adding a maximum stock as well.
     
  11. Offline

    shadydeath999

    to make it only sellable:
    use /shop add (id): (amount per purchase) -1 (sell money)

    to make it only buyable:
    use /shop add (id): (amount per purchase) (buy money) -1

    remove the space between the : and the amount i did that else i would get a emote
     
  12. Offline

    cvpcs

    i had an idea for a way to make this even more awesome. since this is essentially a global shop, why not add the capabilities for price logic based on supply and demand? i.e., add optional extra variables that relate to how much of an item has been bought in relation to how much of an item has been sold, so if more people are buying an item then there are people selling it, then the price goes up, and goes down if more people are selling than are buying and such. not only would it add some interesting dynamics to the economics of the system, but would also make the price stabilization more natural.

    so basically my idea is to add another aspect to the formula for price, which essentially is a function based on time and quantity bought/sold for an item. the more people buy an item then the price to buy/sell should go up, and the more people sell an item then the price to buy/sell should drop (these should be logrithmic, not linear, as the amount of rise/fall should trail off eventually to avoid becoming ridiculous). also, then as time passes without any purchases/sales being made, the price should slowly gravitate back towards the "core" value, which is what you have implemented right now.
     
  13. Offline

    Azraeil

    This was once implemented before. I think to avoid making this particular plugin too complicated and also increase the amount of customizability available to us all, it would be nice to expose a set of APIs that would allow other plugins to do that sort of thing. I'm thinking of a really simple set of API events at first: basic things to give other plugins knowledge of when something is about to be bought or sold (whether or not the event should actually succeed) and functions to get prices and set prices. It would then be relatively easy for another plugin to hook into this one to modify prices on the fly -- perfect for adding a system of supply and demand.
     
  14. Offline

    shadydeath999

    /shop list gives me also a client crash
     
  15. Offline

    GamezShock

    I get This Error:

    2011-02-06 17:41:26 [INFO] [SimpleShop] Permission system not enabled.Disabling Plugin.
    2011-02-06 17:41:26 [INFO] [SimpleShop] version [1.3] <Yen> disabled
    --- merged: Feb 6, 2011 4:58 PM ---
    No Body can help me ???!!!!
     
  16. Offline

    Odjit

    Feb 6, 2011 12:03:55 PM org.bukkit.plugin.SimplePluginManager callEvent
    SEVERE: Could not pass event PLAYER_COMMAND to SimpleShop
    java.lang.ArrayIndexOutOfBoundsException: 5
    at com.nijikokun.bukkit.SimpleShop.iListen.onPlayerCommand(iListen.java:318)
    at org.bukkit.plugin.java.JavaPluginLoader$3.execute(JavaPluginLoader.java:133)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:60)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:213)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:590)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:563)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:232)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:71)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:283)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:209)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    2011-02-06 12:03:55 [INFO] Odjit issued server command: shop sell 266:1


    =( I can update the shop, but buying and selling throws that error
     
    alexgeek likes this.
  17. Offline

    Slayer9x9

    Yeah I'm having the same problem with both buying and selling...
     
  18. Offline

    Nathan C

    Yep, same exact problem.
     
  19. Offline

    SoapFlakes

    Any chance of you releasing the source code with some comments, Nijikokun?
     
  20. Offline

    Nate204

    Anyone got this too?
     
  21. Offline

    axebyte

    yup i get the same thing as well here.
     
  22. Offline

    closer013

    I get the errors with buying and selling as well
     
  23. Offline

    acegiak

    I'm also getting the buying selling error
     
  24. Offline

    cvpcs

    i would love some source code as i want to add the ability to put extra functions into place as stated before. i really want some supply/demand functionality
     
  25. Offline

    SoapFlakes

    Me too.

    Is anyone else getting an error message when they try to access a page in the store? When I type "/shop list 5" Minecraft crashes.
    Code:
    --- BEGIN ERROR REPORT a1dce528 --------
    Generated 2/7/11 1:18 AM
    Minecraft: Minecraft Beta 1.2_02
    OS: Windows 7 (x86) version 6.1
    Java: 1.6.0_20, Sun Microsystems Inc.
    VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
    LWJGL: 2.4.2
    OpenGL: ATI Radeon HD 5800 Series  version 4.1.10362 Compatibility Profile Context, ATI Technologies Inc.
    java.lang.StringIndexOutOfBoundsException: String index out of range: 53
        at java.lang.String.charAt(Unknown Source)
        at nh.a(SourceFile:152)
        at nh.a(SourceFile:119)
        at pe.a(SourceFile:238)
        at ll.b(SourceFile:346)
        at net.minecraft.client.Minecraft.run(SourceFile:668)
        at java.lang.Thread.run(Unknown Source)
    --- END ERROR REPORT 7f6ba611 ----------
    
    Also, none of the items that should be listed on page five are not available for purchase.
     
  26. Offline

    lavaworld2

    I need help i have all the files installed it allows me to add items and see them in the list so i know it is all installed right but for some reason i can do all the commands but other players cant and the permissions file confused me lol but i managed to make me admin but i dont know if i need to do something with their name in the permissions file...
    2011-02-07 16:43:43 [INFO] robbie issued command: /shop buy 3 64
    2011-02-07 16:43:43 [INFO] robbie issued server command: shop buy 3 64
    2011-02-07 16:43:43 [INFO] Unknown console command. Type "help" for help.
    /\ other player (nothing happened)
    2011-02-07 17:04:35 [INFO] TheBoxKidsGran issued command: /shop buy 3 64
    2011-02-07 17:04:35 [INFO] TheBoxKidsGran issued server command: shop buy 3 64
    2011-02-07 17:04:35 [INFO] Unknown console command. Type "help" for help.
    /\ me (it gave me my items and displayed my balance)
     
  27. Offline

    Qtinifier

    When buying or selling i got these errors thrown at me

    EDIT: Please note this only happens when use-stock is enabled


    Love your work as always =) Will be patiently waiting till next update and disable stock for now :)
     
  28. Offline

    Asara

    The same thing happens for me, but isn't limited to certain pages. I've found that the shop just doesn't like certain items or certain parameters and will crash the client when using /shop list [page number offender is on]. Here's what I've experienced so far, and I think others have mentioned these events too;

    1- Using the Stock option makes it so players can't buy or sell anything.
    2- Listing certain items in the shop like Leaves will crash the client when checking the list that item is on.
    3- The Buy Only parameter (setting sell to -1) also crashes the client when checking the list that item is on.
     
  29. Offline

    acegiak

    confirming buy/sell problem only happens when using stock
     
  30. Offline

    mrtankjump

    Seems like others are having the same problem(reports of crashing when they /shop list (page number that has only buyable items, not sellable) crashing the client. Seems like when it accesses the negative value, it causes an exception, instead of just reading it as disabled. Look at this line in the client crash report:
    Code:
    java.lang.StringIndexOutOfBoundsException: String index out of range: 51
        at java.lang.String.charAt(Unknown Source)
    
    Also confirming not being able to buy/sell stuff when stock is enabled. Can buy, but not sell.
    Unsure if it was just a restart that fixed it, or not, will test later, but after installing this plugin, iConomy started miscounting the timer that gives players x amount every so often. I deleted simpleshop and restarted the server and the issue went away. Will report back what happens when I install simpleshop and restart the server.
     
  31. Offline

    RedPoptarts

    @Nijikokun:
    I am also having this problem. I hope you will be adding a more intuitive approach to handling block data in the future (such as an optional value in the shop config or command), but until then could you be more precise about exactly how to add Dyes to our items.db in a way that is compatible with SimpleShop?

    -Thanks! =D
     

Share This Page