[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

    ArmEagle

    If you only want to use player based trading shops (no infinite item shops), then you'd set 0:0 after every item. Then players can set their own buy and sell values on their personal shops.

    If you do want there to be infinite item shops (with infinite, it means no one has to supply the items (or gold) it sells), you have to set some trade value. If you want for some items to have less value when a player wants to get rid of it, then you have to set add the extra sell ratio.

    I hope that was clear enough.
     
  3. Offline

    Mr_Mellow

    So if i want some infinite and the rest as player shops. does that mean i just set the ones i want? or will that make player shops the same?
     
  4. Offline

    ArmEagle

    For the infinite shops you'd set buy(and optionally) sell values in TradeCraft.txt. For the others you do not want there to be any infinite shops you'd just set 0:0 (though you can set permissions such that only admins/ops can create infinite shops and base it on trust).

    For any player shop, they'd just set their own buy/sell values on their own signs anyway, independent of the values in TradeCraft.txt
     
  5. Offline

    Mr_Mellow

    So if its just for admins, could they just set the price for the infinite shops?
     
  6. Offline

    ArmEagle

    As far as I know, you can only set the prices of infinite shops in TradeCraft.txt. I was only mentioning admins/ops in relation to permissions support. Anyway, it's all really in the README.txt.
     
  7. Offline

    Mr_Mellow

    Okay, thanks
     
  8. Offline

    Xin_TiGeR

    can you tell how this mod behaves in terms of memory managment on bukkit?

    i´m asking this because i had it on Hmod but had to remove it due to a high memory leak problem...
    i was using infinite chest on a small area, and with about 20 chests it lagged all my server consuming all memory i got available, like consuming about 3gb of ram with only 8 ppl around :/ the moment i took it away, the lag was gone...

    i realy like this mod!
     
  9. Offline

    ArmEagle

    We don't seem to have any (extra :p) memory issues while running this mod. We have about 10 infinite chests and about 5 player chests. And that's with about 6 players online together at max on an evening
     
  10. Offline

    mjmr89

    Not sure of its memory usage, I'm not too sure what things affect memory a lot and what doesn't. It keeps an array of properties, and an array of data (where all personal shops are located, and the curency/item amount in each shop), and an array of item data (from the .txt). I'm not sure what else may be taking up memory. It's basically ATM a straight port of the hmod so unless bukkit did something a lot differently than hmod that affect memory use (which it probably did do), it might be the same. Why not try it out? Also if you - or anyone - knows about what can cause memory leaks here, maybe you could take a glance at the source? ;) BTW about the source, it's not my fault it's not commented! He left it completely uncommented :(
     
  11. Offline

    Lareneon

    Where do I put the tradecraft.txt, plugin.yml and trade craft.properties and also the com folder... I just can seem to get it to work. I always get error reading tradecraft.txt

    Edit: put tradecraft.jar in the plugins folder and everything else in the folder with my craftbukkit.jar. Still get an error reading tradecraft.txt
     
  12. Offline

    Xin_TiGeR


    yes and was not this plugin leaking memory, hmod itself also...

    i´ve tried it out and it seems a have a lot of client crashes when trying to make a chest!

    i´m the admin and gave myself in permissions the tradecraft.* node!
    also when i make a chest(not a infinite one) it keeps saying that a i do not have any gold stored in the chest but i cant add it also...
     
  13. Offline

    mjmr89

    Put the TradeCraft.jar in the plugins folder, and the TradeCraft.txt and TradeCraft.properties in the same folder as your craftbukkit jar. If you're doing this and still having problems with the .txt file, could you please post the error you get and your .txt file? Thanks :)

    Xin, could you post the part of your Permissions file that gives yourself the permissions for this plugin? Also, what is the error you get when it says you cant add it? You should make the chest (First line item name in brackets, second the buy ratio, third the sell ratio, fourth your name inside of '-'s), right click it, then put gold in the chest and right click it again.
     
  14. Offline

    Lareneon

    There's a funky server file structure on Mac. Anyway... I just put It in my user directory with the sErver.properties etc.. Instead of the folder with craftbukkit. Problem solved. Now I all I need to get working is epiczones.
     
  15. Offline

    GDSkeptic

    If you are going to do some iConomy stuff I would recommend redirecting the iConomy API (kind of like what GroupManager does with its fake Permissions plugin) to use gold on hand as the player's balance and gold in a chest for non-player balances. This would allow integration of using gold or some other item as currency for any plugin that supports iConomy (for example, Towny). This idea sounds like a lot of work though... actually it sounds like it should be a separate plugin entirely. Seems to me that iConomy just wouldn't make sense for TradeCraft in its current form but I wouldn't mind being proven wrong.
     
  16. Offline

    Jonterzioglu

    What do i do i put a chest that has a sign on top on a wall that say [trade] i right click and left 5000 times it doesnt say chest is ready !!!
     
  17. Offline

    mjmr89

    Yeah iConomy addition is rapidly becoming a lower and lower priority.

    Jonterzioglu, please take a look at the readme, it has instructions on how to set up shops.
     
  18. Offline

    n4Ghost

    This Idee is pretty good..
     
  19. Offline

    Lakart

    Two things:
    1) The glass shop doesn't work for me, it always says "There is nothing in the chest" or "You can't buy that here"
    2) When I try to add more things to the tradecraft.txt they don't work to make infinite shops out of.
     
  20. Offline

    ronix

    With the newest server, there seems to be a cast problem somewhere in the code:

    Code:
    2011-03-23 09:39:43 [SEVERE] Could not pass event SIGN_CHANGE to TradeCraft
    java.lang.ClassCastException: org.bukkit.craftbukkit.block.CraftBlockState cannot be cast to org.bukkit.block.Sign
            at com.mjmr89.TradeCraft.TradeCraftBlockListener.onSignChange(TradeCraftBlockListener.java:90)
            at org.bukkit.plugin.java.JavaPluginLoader$26.execute(JavaPluginLoader.java:289)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:851)
            at net.minecraft.server.Packet130UpdateSign.a(SourceFile:39)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:76)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    Maybe you could have a look into this :)
     
  21. Offline

    Mr_Mellow

    Could someone write me up the tradecraft.txt file please or give me theres. every time i go to write one, it never works. id like someones that i can work off please?
     
  22. You know what would be nice, a sub-currency, gold beeing gold and redstone beeing silver XD I'd recommend the same for iConomy but I like this more 'cause it's simplier :}
    Also, could you add a feature to place signs ON chests (like Lockette) ?
     
  23. Offline

    ArmEagle

    Redstone is way too common to be a currency.
     
  24. Offline

    Montag

    @Lakart, The default tradecraft.txt file doesn't include any buy/sell values for glass. You need to edit it, and add in your own.

    @Mr_Mellow, I've been working with this configuration on my local server for quite awhile. We use different buy and sell values to retain an original item's worth. This is a copy of my tradecraft.txt file.

    Code:
    Obsidian,49,1:12,1:8
    Cobblestone,4,64:1,96:1
    Dirt,3,32:1,48:1
    Sand,12,32:1,48:1
    Wood,17,12:1,18:1
    Gravel,13,20:1,30:1
    Glass,20,8:1,12:1
    Stone,1,12:1,18:1
    Coal,263,6:1,9:1
    Iron,265,1:4,1:3
    Diamond,264,1:64,1:43
    Clay,337,2:1,3:1
    SnowBlock,80,12:1,18:1
    Wool,35,10:1,15:1
    Ice,79,8:1,0:0
    Redstone,331,16:1,24:1
    BrickBlock,45,0:0,1:2
    Leaves,18,8:1,0:0
     
  25. Offline

    Luke2012

    Hi

    I use your plugin quite a bit but I'm noticing a couple problems that I'm hoping you're aware of already. I'm using Craftbukkit 531
    Here goes:
    I'm not getting any errors in console but what I am getting is that when I have to reload all my configuration files using the console command 'reload' it causes the custom set currency (glowstone_dust) to reset back to gold ingots. I was wondering if you were planning on getting a config file setting that allowed you to just set the currency in there instead of using that reload command and having it reset to default.

    Another issue I am having is with player made shops. If I the shop owner place 1 goldstone dust inside and want to buy stone from players lets say 64, instead of withdrawing 1 dust at a time per stack they put in, it withdraws the entire stack of dust I placed in the chest. This obviously causes some problems with the economy especially if the player takes all of the dust or if its not even an admin owned player shop and its an honest living player trying to sell their goods for their own prices.

    The last issue I've encountered at random times is sometimes the signs stop working altogether and act like signs with just some writing on them. Other random times it won't accept the command /setcurrency 348
    and in the console it will just say: Chaositic tried the command setcurrency 348

    Hopefully this is helpful to you. Honestly I've been trying to signup to this forum for about 3 days now just to at least tell you about these issues.

    Cheers
     
  26. Offline

    JoeMearman

    For some reason the plugin isn't recognising any nether items. Is anyone else having this problem or is it me being stupid?
     
  27. Are the items listed in <server dir>/TradeCraft.txt ? You can't use items that are not listed there.
     
  28. Offline

    Montag

    If you have a space in the name of the tradecraft.txt file, such as "soul sand", I think it won't work although I'm not 100% certain. Here's what yours should look similar to:
    Code:
    GlowstoneDust,348,1:3,1:2
    
    Netherrack,87,32:1,48:1
    
    Soulsand,88,12:1,18:1
     
  29. Offline

    JoeMearman

    Oh cheers, I got it fixed, just some misplaced spaces. duhhhh
     
  30. Offline

    Red_Pepper_rus

    My nick is "Red_Pepper_rus". I tried to write on a sign -Red_Pepper_ru-, -Red-, -Pepper-... This is not working!

    Where administrators must to set aliases or nicknames for players for use on
    signs?
     
  31. Offline

    phaed

    add:

    currency-id: 266

    to the .properties file.
     

Share This Page