[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

    Montag

    This is by far my favorite plugin. I'm extremely happy it's working for CB617.
     
  3. I can't get this plugin to work - the text commands work and everything, but when I place a sign with the correct text, the sign won't do anything. added and configured the tradecraft properties file and craftcraft.txt in the server folder and assigned permissions in the permissions plugin. Am I missing anything?
     
  4. If you're using the latest RB, see ArmEagle's version from within the thread's replies.
     
  5. Offline

    ArmEagle

    (Re)move the TradeCraft.txt from the server folder to the plugins/TradeCraft/ folder.

    I know.. I really need to work on the planned changes and just create a new thread. But other stuff is pulling harder at me atm.
     
  6. Still not working - also, when I create a TradeCraft folder in the plugins folder and move TradeCraft.txt there, I get this in the console when starting up:

    22:22:22 [WARNING] Error reading TradeCraft.txt

    I get the same results from using the JAR file from here as I do from here.
     
  7. Offline

    ArmEagle

  8. Aha, it's working perfectly now :D

    Thankyou ^_^
     
  9. Offline

    Tacobeam87

    [SEVERE] Could not pass event PLAYER_INTERACT to TradeCraft java.lang.NullPointerException at com.mjmr89.TradeCraft.TradeCraftChest.<init>(TradeCraftChest.java:24) at com.mjmr89.TradeCraft.TradeCraftShop.<init>(TradeCraftShop.java:15) at com.mjmr89.TradeCraft.TradeCraftItemShop.<init>(TradeCraftItemShop.java:10) at com.mjmr89.TradeCraft.TradeCraftInfiniteShop.<init>(TradeCraftInfiniteShop.java:11) at com.mjmr89.TradeCraft.TradeCraft.getShopFromSignBlock(TradeCraft.java:277) at com.mjmr89.TradeCraft.TradeCraftPlayerListener.onPlayerInteract(TradeCraftPlayerListener.java:23) at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:252) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255) at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162) at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:208) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:477) at net.minecraft.server.Packet15Place.a(SourceFile:57) at net.minecraft.server.NetworkManager.a(NetworkManager.java:198) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72) at net.minecraft.server.NetworkListenThread.a(SourceFile:100) at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283) at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)

    Get that whenever i try to interact with a store
     
  10. Offline

    ArmEagle

    For CraftBukkit 617 or newer, download the jar from this post http://forums.bukkit.org/threads/in...old-based-economy-531.8071/page-5#post-189031
     
  11. Offline

    L24D

    I'm still using the older one (0.81AE), and it works great.. cb670... but it's having a problem reading all my entries... i made a complete list of EVERY item in MC, but it will only mess up on these few items:

    2011-04-18 15:19:21 [WARNING] Failed to parse line number 18 in plugins\TradeCraft\TradeCraft.txt: GoldOre, 14, 1:8 1:8
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 19 in plugins\TradeCraft\TradeCraft.txt: IronOre, 15, 1:2 1:2
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 20 in plugins\TradeCraft\TradeCraft.txt: CoalOre, 16, 1:1 1:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 22 in plugins\TradeCraft\TradeCraft.txt: RedWoodLog, 17:1, 2:1, 2:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 23 in plugins\TradeCraft\TradeCraft.txt: BirchLog, 17:2, 4:3, 4:3
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 28 in plugins\TradeCraft\TradeCraft.txt: Glass, 20, 2:1 2:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 29 in plugins\TradeCraft\TradeCraft.txt: LapisOre, 21, 1:4 1:4
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 30 in plugins\TradeCraft\TradeCraft.txt: LapisBlock, 22, 1:36 1:36
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 36 in plugins\TradeCraft\TradeCraft.txt: OrangeWool, 35:1, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 37 in plugins\TradeCraft\TradeCraft.txt: MagWool, 35:2, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 38 in plugins\TradeCraft\TradeCraft.txt: LtBlueWool, 35:3, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 39 in plugins\TradeCraft\TradeCraft.txt: YellowWool, 35:4, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 40 in plugins\TradeCraft\TradeCraft.txt: LtGreenWool, 35:5, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 41 in plugins\TradeCraft\TradeCraft.txt: PinkWool, 35:6, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 42 in plugins\TradeCraft\TradeCraft.txt: GreyWool, 35:7, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 43 in plugins\TradeCraft\TradeCraft.txt: LtGreyWool, 35:8, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 44 in plugins\TradeCraft\TradeCraft.txt: CyanWool, 35:9, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 45 in plugins\TradeCraft\TradeCraft.txt: PurpleWool, 35:10, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 46 in plugins\TradeCraft\TradeCraft.txt: BlueWool, 35:11, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 47 in plugins\TradeCraft\TradeCraft.txt: BrownWool, 35:12, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 48 in plugins\TradeCraft\TradeCraft.txt: DkGrnWool, 35:13, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 49 in plugins\TradeCraft\TradeCraft.txt: RedWool, 35:14, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 50 in plugins\TradeCraft\TradeCraft.txt: BlackWool, 35:15, 3:1, 3:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 58 in plugins\TradeCraft\TradeCraft.txt: 2Sandslab, 43:1, 2:1, 2:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 59 in plugins\TradeCraft\TradeCraft.txt: 2CobSlab, 43:2, 1:1, 1:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 61 in plugins\TradeCraft\TradeCraft.txt: SandSlab, 44:1, 4:1, 4:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 62 in plugins\TradeCraft\TradeCraft.txt: WoodSlab, 44:2, 2:1, 2:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 63 in plugins\TradeCraft\TradeCraft.txt: CobSlab, 44:3, 2:1, 2:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 75 in plugins\TradeCraft\TradeCraft.txt: DiamondOre, 56, 1:16 1:16
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 78 in plugins\TradeCraft\TradeCraft.txt: Crops 59, 8:1, 8:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 122 in plugins\TradeCraft\TradeCraft.txt: Charcoal, 263:1, 1:1, 1:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 168 in plugins\TradeCraft\TradeCraft.txt: IronBoots, 309, 1:8 1:8
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 213 in plugins\TradeCraft\TradeCraft.txt: BrownDye, 351:3, 4:1, 4:1
    2011-04-18 15:19:21 [WARNING] Failed to parse line number 225 in plugins\TradeCraft\TradeCraft.txt: BoneMeal, 351:14, 16:1, 16:1

    i listed all the entries the same way, so there is no "obvious" reason for this to happen... any ideas?

    [edit]: And of course, when i pasted it, it screwed up the formatting.. so there's probably no way to tell what's up :/

    [EDIT2]: Alright, there was nothing wrong with a few of them, just missed a couple of commas... it just seems like the item ids with colons separating them are throwing it for a loop. ex: red wool... 35:14. everything else works great. if you get a chance, have a look at that? would be super appreciated :D. thanks!
     
  12. Offline

    ArmEagle

    Well, colored wool, etc. is not supported yet. On hind sight I think I should have worked on that first. But I wanted to change some other things first. Maybe I'll roll that back and work on this first since it's a clear missing feature.
     
  13. Offline

    L24D

    Oh, okay... :p
    sorry about throwing a second post on you, but...
    I did find some "normal" items that don't work either... just now...

    2011-04-18 16:49:13 [WARNING] Failed to parse line number 15 in plugins\TradeCraft\TradeCraft.txt: LavaStat 11, 0:0, 1:4
    2011-04-18 16:49:13 [WARNING] Failed to parse line number 24 in plugins\TradeCraft\TradeCraft.txt: Leaves 18, 0:0, 0:0
    2011-04-18 16:49:13 [WARNING] Failed to parse line number 34 in plugins\TradeCraft\TradeCraft.txt: BedBlock, 26, 1:10 1:10
    2011-04-18 16:49:13 [WARNING] Failed to parse line number 78 in plugins\TradeCraft\TradeCraft.txt: Crops 59, 8:1, 8:1
    2011-04-18 16:49:13 [WARNING] Failed to parse line number 79 in plugins\TradeCraft\TradeCraft.txt: Soil 60, 0:0, 0:0
    2011-04-18 16:49:13 [WARNING] Failed to parse line number 94 in plugins\TradeCraft\TradeCraft.txt: Rstorchoff 75, 4:1, 4:1
    2011-04-18 16:49:13 [WARNING] Failed to parse line number 200 in plugins\TradeCraft\TradeCraft.txt: Slimeball 341, 1:1, 1:1

    ids: 11, 18, 26, 59, 60, 75, and 341
    they're normal items, but they still cannot be read. :p
    Just wanted to throw that your way, so you know about it :). thanks again!
     
  14. Offline

    ArmEagle

    You need to place a comma after the item name. A comma is required between all the different 'columns'.
     
  15. Offline

    L24D

    oh, whoops... i seriously didn't do that, did i? *walks away embarassed* :oops:

    sorry... i'm fighting with another plugin, at the same time... trying to figure out why it's breaking all my commands.
     
  16. Offline

    ArmEagle

    Hehe, that's ok. Happens to the best of us. To be honest, I'm glad it wasn't a stupid mistake I made :)
     
  17. Offline

    ArmEagle

    Ok, for the daredevils, here's a link to a new version that supports the item data field, so you can setup shops for colored wool, etc.

    http://dl.dropbox.com/u/20956285/Bukkit/TradeCraft/TradeCraft-AE-v1.0.0-alpha2.jar

    I'm just releasing this so people can try it out and check for bugs. It reads 'alpha' for a reason! Not that I think it will completely break your server. But you never know. This is still just a Minecraft 1.4 / Bukkit 617-684 release.

    So please let me know of any issues or comments you have. When this is getting shape I will probably start my own thread.

    The default TradeCraft.txt now has one extra line:
    Code:
    LGWool,		35;8, 10:1
    
    Note how that first 'column' separates 35 and 8 with a semicolon. The 35 stands for the wool ID and 8 for the color (light gray I think).

    You can also use that format to set a special item as currency if you'd really want to (and yes, you can set a non-sensible value, it should just act as the base item then).

    Also:
    - Should have fixed the issue where you could buy in rates of (ie) 3:1 when the sign or config was set to a multitude like 6:2.
    - Was blocking the creation of any sign that had text surrounded by brackets on the first line (like [launch player]). Now it checks whether the string between the brackets is actually a value in TradeCraft.txt and only then block creation of an infinite shop if you do not have the rights.
    - Whole bunch of small changes. I'll try to create a more complete list when I release this for real.
    - Still plenty on the todo list...
     
  18. Offline

    L24D

    My friend, you are amazing. :D
    I'm about to test it out in a moment, i'm still going through the unbelievably taxing task of making a shop for EVERY item in the game. I'm currently 3/4 through the list 0_0. at item 291 (stone hoe)... it's taken me hours. haha.
     
  19. The ";" character always signifies "next" not "related", you could use ":" for item type separation, like give command does :p
     
  20. Offline

    ArmEagle

    I'm not sure what basis you use to define those relations, but this is the first time I heard that explanation.

    I've thought about several options for separation here. And I think using a colon would be cause for confusing in the config file. Since the colon is already used for the trade rates in there. In the end I settled for the semicolon - for now.
     
  21. @ArmEagle, well that's my general ideea of the character :}

    Still, you should release your version in a new thread because this one is already marked as inactive and those who don't know that you're keeping it up2date have many problems because they follow the thread or might just reconsider if they see it's inactive.
     
  22. Offline

    ArmEagle

    I know, and I will. Just wanted a few eyes on this first. But I could just as well start a thread with an alpha release I guess (even if it would stay in the submissions forum for a while).
     
  23. Offline

    L24D

    Ah, i've checked it out thoroughly...
    Everything seems to be 100% :D. At least for me...
    Another +10 for an amazing job integrating it! :D

    Also... Are the lines it's throwing out in the console just for debugging? It just tells me what item was used, and what item was gained from a swap in one of the shops...

    Oh, one more thing while I'm thinking about it... do you think you might need a complete/alternate item list with the plugin(tradecraft.txt)? it took me forever to do, but i have one, if you require it :p
     
  24. Offline

    ArmEagle

    First, here's the new thread, please continue there, except for the following small discussion:


    I guess I had some extra debugging still in there. I think that's removed in the newer version (see other thread - or find the same link in my previous update post).

    Oh,about that complete list. Feel free to post that in code-tags on that other thread. I'll just put that up as a file for easy download from the OP then.

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

    Aspernatio

    This is too good to die! Don't give up hope!!!
     
  26. Offline

    ArmEagle

  27. Offline

    m0jumb0

    one issue I have with the mod is that if you deposit more items than can fit in the chest (by repeatedly depositing), then you withdraw, you only get the number of items that fit in the chest and the rest get lost. this is mainly a problem for things that don't stack like bread, porkchops, etc

    Perhaps the thing to do is when withdrawing only withdraw the amount that will fit in the chest and don't zero out the item count in the data file, only subtract 27*stack size
     
  28. Offline

    ArmEagle

    Check the link in my signature. I've continued the mod there. This is one of the things I fixed, almost exactly the way you described it.
     
  29. Offline

    m0jumb0

    awesome! I actually was using beta 1 of the AE version, so I missed the upgrade. Guess I should have checked the other thread first. I think I'm going to try your other plugin. It looks pretty cool.
     
  30. Offline

    alexcam98

    Does anyone know if there is a non-bukkit version of this? Any help would be appreciated.
     
  31. Offline

    ArmEagle

    What do you mean? The original was made for hMod, though it's not like that is still being used.
     

Share This Page