[INACTIVE][ECON] TradeCraft v0.7 - Chest/Gold Based Economy! [531]

Discussion in 'Inactive/Unsupported Plugins' started by mjmr89, Mar 11, 2011.

  1. Offline

    mjmr89

    TradeCraft - Chest/Gold Based Economy
    Version: 0.7

    Features
    • Make infinite shops - place gold or items in the chest, right click the sign, and watch the magic happen!
    • Become entrepreneurs! Have a lot of extra goods? Create a shop to let people easily buy or sell!
    • Change the currency if you don't like gold
    Download and Source

    All credit for the core of this mod goes to the github user jdiamond (injektilo on the hey0 forums). All I'm doing is porting it at the moment, but I'll probably add more features down the road. I haven't been able to test it extensively so far, so expect problems! If you don't have Permissions, it will resort to only letting ops make or destroy shops, but all players can buy/sell at shops. The TradeCraft.txt and TradeCraft.properties files are IN the jar, open it up with a archive manager program and extract them to the same folder as your craftbukkit.jar. I know they should be in something like plugins/TradeCraft, and I'll change that soon.

    For the readme, please go to the source page and look there. It is also included in the jar file if you open it with an archive manager.

    Permissions:
    • TradeCraft.canBuy
    • TradeCraft.canSell
    • TradeCraft.canMakeInfShops
    • TradeCraft.canMakePlayerShops
    • TradeCraft.canDestroyShops
    Commands:
    • /setCurrency - use the id number, or the material name (using _ as spaces)
    • /displayCurrency - Shows the current currency
    • /canPlayer - debugging info if there are problems with permissions - outputs to the console.
    • /myShops - displays the personal shops you have and their current inventory/gold
    To Do:
    • Repair shops? Some basic structure is in the old hmod plugin, could probably get it working without too much trouble.
    • iConomy interaction? For example, back up iConomy $$$ with gold or something? Not sure how that would work out, or if people would find it useful.
    If theres any more comments or questions, please let me know!
     
    kenneth123, ydido and Digi like this.
  2. Offline

    Mr_Mellow

    Id like a big list of items. I want to be able to sell pretty much everything besides netherstones, lava,tnt,sulphur. stuff like that. i couldnt be bothered to write up a whole text file for it.
     
  3. Offline

    ArmEagle

    You'll have to setup buy/sell values anyway (or disable them). You're really better off taking a few minutes and creating the list yourself.
     
  4. That's only required for infinite shops... so if he wants an infinite shop of something he can just add values.

    Still, this plugin doesn't support Item:Type (like various wool/log/dye types).

    I uploaded my tradecraft.txt which contains most items.
     
  5. Offline

    ydido

    So i install this plugin on my server and I try to make a player shop. I put the chest down and the sign and I write this on the sign,

    [Sand]
    Buy for 32:1
    sell for 32:1
    -ydido-

    and thats it. then i try to deposit gold, by placing in the chest and right-clicking the sign. Nothing happens, and the gold is still in the chest.

    Please help
    Ydido
     
  6. Offline

    Luke2012

    Just to make sure, you mean gold ingot right? Also be sure to include your craftbukkit version, its easier for the plugin developer :)
     
  7. Offline

    ydido

    Yes gold ingots, and I think My build is b556. I may be looking at the wrong number.
     
  8. Offline

    ArmEagle

    That seems right. I'm not sure, but maybe "sell" has to be capitalized to "Sell".

    And sand is in the default config file, so that isn't the problem either.

    Otherwise I can't think of any issues, except checking the server log.
     
  9. Offline

    ydido

    This is the only thing on the server log
    2011-03-26 09:30:08 [WARNING] Error reading TradeCraft.txt​


    OK now I restarted my server and this popped up.
    2011-03-26 11:58:09 [SEVERE] Could not load plugins/TradeCraft\(1\).jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:69)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:131)
    at java.util.jar.JarFile.<init>(JarFile.java:150)
    at java.util.jar.JarFile.<init>(JarFile.java:114)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:56)
    ... 8 more​


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

    ArmEagle

    That's weird stuff. I'd try and remove all TradeCraft config files and then try again.
     
  11. Offline

    ydido

    removed all the config files, and restarted. same deal...
    2011-03-26 14:54:34 [SEVERE] Could not load plugins/TradeCraft\(1\).jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:69)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:131)
    at java.util.jar.JarFile.<init>(JarFile.java:150)
    at java.util.jar.JarFile.<init>(JarFile.java:114)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:56)
    ... 8 more​
     
  12. "TradeCraft(1).jar" ? Do you have two copies of the same plugin in there ?
     
  13. Offline

    ydido

    I took away the first 1.
     
  14. Offline

    megamix34

    Hi !

    Can you add suport with colored wool ?

    when i add IDs in TradeCraft.txt :

    Code:
    orange,      35:1,   10:1,  15:1
    magenta,     35:2,   10:1,  15:1
    light_blue,  35:3,   10:1,  15:1
    yellow,      35:4,   10:1,  15:1
    lime,        35:5,   10:1,  15:1
    pink,        35:6,   10:1,  15:1
    gray,        35:7,   10:1,  15:1
    light_gray,  35:8,   10:1,  15:1
    cyan,        35:9,   10:1,  15:1
    purple,      35:10,  10:1,  15:1
    blue,        35:11,  10:1,  15:1
    brown,       35:12,  10:1,  15:1
    green,       35:13,  10:1,  15:1
    red,         35:14,  10:1,  15:1
    black,       35:15,  10:1,  15:1

    Console log say :

    Code:
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 17 in TradeCraft.txt: orange, 35:1, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 18 in TradeCraft.txt: magenta, 35:2, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 19 in TradeCraft.txt: light_blue, 35:3, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 20 in TradeCraft.txt: yellow, 35:4, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 21 in TradeCraft.txt: lime, 35:5, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 22 in TradeCraft.txt: pink, 35:6, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 23 in TradeCraft.txt: gray, 35:7, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 24 in TradeCraft.txt: light_gray, 35:8, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 25 in TradeCraft.txt: cyan, 35:9, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 26 in TradeCraft.txt: purple, 35:10, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 27 in TradeCraft.txt: blue, 35:11, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 28 in TradeCraft.txt: brown, 35:12, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 29 in TradeCraft.txt: green, 35:13, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 30 in TradeCraft.txt: red, 35:14, 10:1, 15:1
    2011-03-27 00:49:27 [WARNING] Failed to parse line number 31 in TradeCraft.txt: black, 35:15, 10:1, 15:1
    How can i do it ?
     
  15. Offline

    ArmEagle

    That's simply not supported yet.
     
  16. Offline

    ydido

    can anyone fix my problem?
     
  17. Offline

    ArmEagle

    so, you removed the (1) part in the TradeCraft jar filename? I assume the error message changed accordingly. Any chance the TradeCraft.jar is corrupt? Can you open it with a zip client? (a jar is kinda like a zip file, if you change the extension to .zip you should be able to open it)

    Maybe try redownloading the .jar
     
  18. Offline

    ydido

    this is the only thing that popped up
    Error reading TradeCraft.txt​


    I don't have a tradecraft.txt. were would i put it?
     
  19. Offline

    ArmEagle

    For now it should be in the main folder, containing the craftbukkit.jar file.
    Give not to the capitalization of the filename TradeCraft.txt

    The plugin should have created default files though. The above one, but also TradeCraft.data (initially empty, containing player shop data) and TradeCraft.properties (no idea). Maybe you need to remove all three for it to generate all of them again.
     
  20. Offline

    ydido

    It has loaded fully!

    Done, it works!
    thank you for helping me!

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

    aheath4

    this looks like a great plugin! But i need your help.

    begin essay :/

    Im trying it on my server atm but the actuall shop creating/buying/selling is not working. We have the basic commands like displaycurrency/myshops etc so its obviously works. However im using servercraft.co as a host so its hard for me to configure everything. I have basic access to the files so i can type in permissions and such. However i can only upload .jar files or ymcl and the jar file in the dl pack doesn't seem to generate links. i have downloaded it several times. Im not sure if im installing it correctly. Please could you sort of tell me what to do lol
     
  22. Offline

    ArmEagle

    Well, the plugin creates a few files in the main path of the gameserver installation. You really need the TradeCraft.txt there, since that matches names to object IDs and sets default (unlimited store) buy/sell ratios.
    You can add more items yourself of course. But with that file in place you should at least be able to setup a shop for sand (infinite shop sign would just read [sign]. Try that an go from there.
     
  23. Offline

    ydido

    how can I make it so everyone can make shops?
    and how can I sell cakes?
     
  24. Offline

    ArmEagle

    If you run the permissions mod, add rights to normal users as explained in the README contained in the .jar. Then everyone should be able to place their own signs over a chest.

    To add cake, you'll just have to edit the TradeCraft.txt in the main folder and add that to the list (check http://www.minecraftwiki.net/wiki/Data_values for the item IDs).
     
  25. Offline

    ydido

    Can you sell discs
    I tried putting it into my Tradecratf.txt with cake and cake works but discs don't.
     
  26. Offline

    ArmEagle

    I think there were a few normal items (so, plain ID, not using damage bits) that wouldn't work. Maybe records are one of those, but I can't quickly test that. They might not be working in TradeCraft because of their high ID).
     
  27. It seems that most of the permissions aren't working properly. Any player can buy, sell and create infinite and player owned shops.

    Another problem is the lack of support for dyes and dyed wool.

    Otherwise pretty much perfect.
     
  28. Offline

    ArmEagle

    Well, with the Permission plugin installed and setting the right permissions to the different groups according to the README in the .jar file, it works just fine here.

    True. But not until CraftBukkit #564+ are all Block API functions thread safe. The developer for MinecartMania waited for that to support wool colors (etc) too. Now we just need to wait for a new recommended build of CraftBukkit...
     
  29. This plugin is awesome but it lacks some features.

    - The wool, dye, log, etc sub-items (just re-mentioning, I understand it's gonna be possible in #564+)
    - Protection of chest contents while you're using it... or something, so other people don't just sit by and wait for you to buy and steal your stuff.
    - The sign labels would be better understood if they're: "Buy 5 for 1" and "Sell 5 for 1" and you should suppot texts like "Buy 5 for 1g" or "Buy5for1" etc.
    - The sign shouldn't require you to type your name since you can only make shops for yourself, it should overwrite the last line with your nickname.
    - Additional information about current amount of items and currency available when right clicking as client.

    Hope you release an updated version soon :} apart from that, everything is working right.
     
  30. Offline

    Xin_TiGeR

    OMG!!! MAJOR BUG!!

    i gave my players abilities to create playershops, use buy shops and sell shops, and they can pretty much create an infinite chest with their own ratio!!

    plz fix this :(
     
  31. Offline

    ArmEagle

    I've thought about that and was about to play with the code (and github and stuff, for personal practice mostly) when it occurred to me that this shouldn't be possible. Unless there's a deeper underlying bug.

    With a player shop the one who setup the shop provides items in the chest. One item A is sold for X (let's assume gold ingots) and bought for Y.
    When an item is sold to another player, that player has to provide X. The seller loses one item A and gains X. The buyer loses X and gains item A. There's a balance here. Nothing disappears and nothing is created.
    When someone sells one A to the player shop, the shop gains one item A, but loses Y. The player selling the item at the shop loses the item A and gains Y. Again there is balance.

    Even if someone sells their items for no money, then they just give existing items away. Or when they setup to buy for nothing, then it's practically a drop box.

    Unless somewhere the plugin doesn't keep track of amounts correctly, there should be no possibility to create an infinite chest.

    If you manage to have two players, one starting with a certain amount of items, another with a certain amount of gold ingots. And by using one (ore multiple) new tradeshop-chests, they manage to gain more of the item and more of the gold ingots (between the two). Then please explain how they did so.

    Or maybe I'm oblivious and totally looked over something. But then also feel free to explain :)
     

Share This Page