[ECON] TradeCraft-AE v1.1b - Chest/Gold Based Economy [Permissions] [1337] [BukkitDev]

Discussion in 'Inactive/Unsupported Plugins' started by ArmEagle, Apr 21, 2011.

  1. Offline

    ArmEagle

    Jdwede, Montag, Tonysp and 2 others like this.
  2. Offline

    Montag

    Thanks for continuing this! This plugin has been essential to my local server, and I am glad to see it won't be going inactive.
     
  3. Offline

    L24D

    Alrighty then! it has it's own thread now! :D
    I just wanted to say, thanks again for reviving it, and doing a wonderful job with the new additions!

    [EDIT] With ArmEagle's permission. Sorry, i forgot to mention that. :) [EDIT]

    And... as for the item data i whipped up.. I shall post that here for you right now.
    For the most part, one item is based off another, with price and such, so i believe it's pretty well balanced.. With an exception of the dyes, they aren't 100% balanced but they're all set too:

    Code:
    #Implemented by L24D, for his server: mc.na.tl
    #Given by L24D for, ArmEagle, and for use with the TradeCraft plugin.
    #Now contains everything in the item list, as of 3-20-2011.
    #I have marked items that are either duplicates, or achieve
    #the same result, with a #, and/or a reason why.
    #Please check id.minecraftrepublic.org for a complete list of item IDs.
    #Item Name, Item ID;type, Item:Money (Buy), Item:Money (Sell)
    
    Stone,          1,    8:1,    0:0
    Grass,          2,   32:1,    0:0
    Dirt,           3,   32:1,    0:0
    Cobblestone,    4,    8:1,    0:0
    Woodplank,      5,    8:1,    8:1
    Sapling,        6,    1:1,    1:1
    Bedrock,        7,  1:512,  1:256
    Water,          8,    0:0,    1:2
    WaterStat,      9,    0:0,    1:2
    Lava,          10,    0:0,    1:4
    LavaStat,      11,    0:0,    1:4
    Sand,          12,   32:1,    0:0
    Gravel,        13,   32:1,    0:0
    GoldOre,       14,    1:8,    1:8
    IronOre,       15,    1:2,    1:2
    CoalOre,       16,    1:1,    1:1
    Log,           17,    2:1,    2:1
    RedWoodLog,   17;1,   2:1,    2:1
    BirchLog,     17;2,   4:3,    4:3
    Leaves,        18,    4:1,    0:0
    RWLeaves,     18;1,   4:1,    0:0
    Birchleaves,  18;2,   4:1,    0:0
    Sponge,        19,   1:12,   1:12
    Glass,         20,    2:1,    2:1
    LapisOre,      21,    1:4,    1:4
    LapisBlock,    22,   1:36,   1:36
    Dispenser,     23,   1:18,   1:12
    Sandstone,     24,   16:1,    0:0
    NoteBlock,     25,   1:14,   1:14
    #BedBlock,     26,   1:10,   1:10 (THIS IS ONLY HALF A BED, USE ITEM ID 355 INSTEAD)
    Wool,          35,    3:1,    3:1
    OrangeWool,   35;1,   3:1,    3:1
    MagWool,      35;2,   3:1,    3:1
    LtBlueWool,   35;3,   3:1,    3:1
    YellowWool,   35;4,   3:1,    3:1
    LtGreenWool,  35;5,   3:1,    3:1
    PinkWool,     35;6,   3:1,    3:1
    GreyWool,     35;7,   3:1,    3:1
    LtGreyWool,   35;8,   3:1,    3:1
    CyanWool,     35;9,   3:1,    3:1
    PurpleWool,  35;10,   3:1,    3:1
    BlueWool,    35;11,   3:1,    3:1
    BrownWool,   35;12,   3:1,    3:1
    DkGrnWool,   35;13,   3:1,    3:1
    RedWool,     35;14,   3:1,    3:1
    BlackWool,   35;15,   3:1,    3:1
    YelFlower,      37,   4:1,    0:0
    Rose,           38,   2:1,    0:0
    BroMushroom,    39,   2:1,    2:1
    RedMushroom,    40,   1:1,    1:1
    GoldBlock,      41,  1:72,   1:72
    IronBlock,      42,  1:18,   1:18
    #2StoneSlab,    43,   1:1,    1:1 (SAME RESULT FROM ID 44)
    #2Sandslab,   43;1,   2:1,    2:1 (SAME RESULT FROM ID 44:1)
    #2WoodSlab,   43;2,   1:1,    1:1 (SAME RESULT FROM ID 44:2)
    #2CobSlab,    43;3,   1:1,    1:1 (SAME RESULT FROM ID 44:3)
    StoneSlab,      44,   2:1,    2:1
    SandSlab,     44;1,   4:1,    4:1
    WoodSlab,     44;2,   2:1,    2:1
    CobSlab,      44;3,   2:1,    2:1
    BrickBlock,     45,   2:1,    2:1
    TNT,            46,  1:20,   1:20
    Bookshelf,      47,  1:16,   1:16
    MossyCobstone,  48,   4:1,    4:1
    Obsidian,       49,  1:32,   1:16
    Torch,          50,   2:1,    2:1
    Fire,           51, 1:128,  1:128
    MobSpawner,     52,   0:0,    0:0
    Woodstairs,     53,  1:12,   1:12
    Chest,          54,   1:5,    1:5
    Wire,           55,   4:1,    4:1
    DiamondOre,     56,  1:16,   1:16
    DiamondBlock,   57, 1:128,  1:128
    Workbench,      58,   2:1,    2:1
    Crops,          59,   8:1,    8:1
    Soil,           60,   0:0,    0:0
    Furnace,        61,   1:1,    1:1
    #FurnaceOn,     62,   1:1,    1:1 (SAME AS ITEM ID 61)
    #Sign0,         63,   0:0,    0:0 (USE SIGN INSTEAD, ID 323)
    WoodHalfDoor,   64,   1:4,    1:4
    Ladder,         65,   2:1,    2:1
    Rails,          66,   1:4,    1:4
    CobStairs,      67,   1:1,    1:1
    #WallSign,      68,   1:1,    1:1 (USE SIGN INSTEAD, ID 323)
    Lever,          69,   4:1,    4:1
    SPPlate,        70,   2:1,    2:1
    IronHalfDoor,   71,  1:16,   1:16
    WPPlate,        72,   2:1,    2:1
    RedstoneOre,    73,   1:3,    1:3
    #RSoreglow,     74,   1:3,    1:3 (SAME AS ITEM ID 74)
    #Rstorchoff,    75,   4:1,    4:1 (SAME AS ITEM ID 76)
    RedstoneTorch,  76,   4:1,    4:1
    Button,         77,   4:1,    4:1
    Snow,           78,   0:0,    0:0
    Ice,            79,   0:0,    0:0
    SnowBlock,      80,   8:1,    0:0
    Cactus,         81,   3:2,    3:2
    ClayBlock,      82,   1:2,    1:1
    #SugarCane1,    83,   1:2,    1:2 (SAME AS ITEM ID 338, USE IT INSTEAD)
    JukeBox,        84,  1:20,   1:20
    Fence,          85,   8:1,    8:1
    Pumpkin,        86,   1:1,    1:1
    NetherRock,     87,   8:1,    8:1
    SoulSand,       88,   4:1,    8:1
    Glowstone,      89,  1:27,   1:27
    Portal,         90, 1:256,  1:256
    JackoLantern,   91,   1:2,    1:2
    Cakeblock,      92,  1:18,   1:18
    #RSRepeatoff,   93,  1:10,   1:10 (SAME AS RSREPEATER, ID 356)
    #RSRepeateron,  94,  1:10,   1:10 (SAME AS RSREPEATER, ID 356)
    IronShovel,    256,   1:4,    1:4
    IronPick,      257,  1:12,   1:12
    IronAxe,       258,  1:12,   1:12
    FlintSteel,    259,   1:2,    1:2
    Apple,         260,   2:1,    2:1
    Bow,           261,  1:10,   1:10
    Arrows,        262,   2:1,    2:1
    Coal,          263,   1:1,    1:1
    Charcoal,    263;1,   0:0,    0:0
    Diamond,       264,  1:16,   1:16
    IronBar,       265,   1:2,    1:2
    GoldBar,       266,   1:9,    1:9
    IronSword,     267,   1:8,    1:8
    WoodSword,     268,   1:1,    1:1
    WoodShovel,    269,   1:1,    1:1
    WoodPick,      270,   1:2,    1:2
    WoodAxe,       271,   1:2,    1:2
    StoneSword,    272,   1:2,    1:2
    StoneShovel,   273,   1:2,    1:2
    StonePick,     274,   1:2,    1:2
    StoneAxe,      275,   1:2,    1:2
    DiamondSword,  276,  1:36,   1:36
    DiamondShovel, 277,  1:18,   1:18
    DiamondPick,   278,  1:50,   1:50
    DiamondAxe,    279,  1:50,   1:50
    Stick,         280,   16:1,  16:1
    Bowl,          281,    2:1,   2:1
    MushSoup,      282,    1:2,   1:2
    GoldSword,     283,   1:18,  1:18
    GoldShovel,    284,    1:9,   1:9
    GoldPick,      285,   1:25,  1:25
    GoldAxe,       286,   1:25,  1:25
    String,        287,   27:1,  27:1
    Feather,       288,   24:1,  24:1
    Gunpowder,     289,    1:4,   1:4
    WoodHoe,       290,    1:1,   1:1
    StoneHoe,      291,    1:2,   1:2
    IronHoe,       292,    1:8,   1:8
    DiamondHoe,    293,   1:36,  1:36
    GoldHoe,       294,   1:18,  1:18
    #Seeds,        295,    4:1,   0:0 (SAME AS CROPS, USE ITEM ID 59 INSTEAD)
    Wheat,         296,    1:4,   1:4
    Bread,         297,   1:12,  1:12
    LeatherHelm,   298,    1:5,   1:5
    LeatherChest,  299,    1:8,   1:8
    LeatherLegs,   300,    1:7,   1:7
    LeatherBoots,  301,    1:4,   1:4
    ChainHelm,     302,   1:20,  1:20
    ChainChest,    303,   1:32,  1:32
    ChainLegs,     304,   1:28,  1:28
    ChainBoots,    305,   1:16,  1:16
    IronHelm,      306,   1:10,  1:10
    IronChest,     307,   1:16,  1:16
    IronPants,     308,   1:14,  1:14
    IronBoots,     309,    1:8,   1:8
    DiaHelm,       310,   1:80,  1:80
    DiaChest,      311,  1:128, 1:128
    DiaLegs,       312,   1:84,  1:84
    DiaBoots,      313,   1:64,  1:64
    GoldHelm,      314,   1:40,  1:40
    GoldChest,     315,   1:64,  1:64
    GoldLegs,      316,   1:42,  1:42
    GoldBoots,     317,   1:32,  1:32
    Flint,         318,    1:1,   1:1
    RawPork,       319,    1:8,   1:8
    CookedPork,    320,   1:10,  1:10
    Painting,      321,   1:16,  1:16
    GoldApple,     322,   1:66,  1:66
    Sign,          323,    1:1,   1:1
    WoodDoor,      324,    1:4,   1:4
    Bucket,        325,    1:6,   1:6
    WaterBucket,   326,    0:0,  1:10
    LavaBucket,    327,    0:0,  1:12
    Minecart,      328,   1:12,  1:12
    Saddle,        329,   1:16,   0:0
    IronDoor,      330,   1:16,  1:16
    RedStoneWire,  331,    4:1,   4:1
    SnowBall,      332,   32:1,   0:0
    Boat,          333,    1:8,   1:8
    Leather,       334,    1:1,   1:1
    MilkBucket,    335,    1:7,   1:7
    #ClayBrick,    336,   18:1,  18:1 (SAME AS ITEM ID 82, USE IT INSTEAD)
    ClayBalls,     337,    6:1,   6:1
    SugarCane,     338,    1:2,   1:2
    Paper,         339,    1:3,   1:3
    Book,          340,    1:4,   1:4
    Slimeball,     341,    0:0,   0:0
    StorageCart,   342,   1:20,  1:20
    PowerCart,     343,    1:8,   1:8
    Egg,           344,    6:1,   6:1
    Compass,       345,   1:10,  1:10
    FishingRod,    346,    1:8,   1:8
    Clock,         347,   1:36,  1:36
    GlowDust,      348,    1:3,   1:3
    Rawfish,       349,    1:8,   1:8
    Fish,          350,   1:10,  1:10
    BlackDye,      351,    1:6,   0:0
    RedDye,      351;1,    1:6,   0:0
    GreenDye,    351;2,    1:6,   0:0
    cocoabean,   351;3,    4:1,   4:1
    lapis,       351;4,    1:6,   0:0
    PurpleDye,   351;5,    1:6,   0:0
    CyanDye,     351;6,    1:6,   0:0
    LtGreyDye,   351;7,    1:6,   0:0
    GreyDye,     351;8,    1:6,   0:0
    PinkDye,     351;9,    1:6,   0:0
    ltGreenDye, 351;10,    1:6,   0:0
    YellowDye,  351;11,    1:6,   0:0
    LtBlueDye,  351;12,    1:6,   0:0
    MagDye,     351;13,    1:6,   0:0
    OrangeDye,  351;14,    1:6,   0:0
    BoneMeal,   351;15,   12:1,  12:1
    Bone,          352,    4:1,   4:1
    Sugar,         353,    1:3,   1:3
    Cake,          354,   1:18,  1:18
    Bed,           355,   1:20,  1:20
    RSRepeater,    356,   1:10,  1:10
    Cookie,        357,    1:2,   1:2
    GoldDisc,     2256,   1:32,  1:32
    GreenDisc,    2257,   1:32,  1:32
    Haha, that's a long list.. that covers every item in the game though. and for those who don't wish to copy and paste, i uploaded a copy here.

    Enjoy! Oh, and let me know if I made any errors, I just made some last minute changes to some of the item names to reduce confusion. :p
     

    Attached Files:

  4. Offline

    ArmEagle

    Thanks, I added a link to your post, so people can easily find it in the future (when this thread has a lot of pages... :)
     
  5. Offline

    imjake9

    Thanks for keeping this updated!
    Also, I'd like to confirm that this does work with 1.5_02. I'm running 693 and everything's working great. Thanks!
     
  6. Offline

    L24D

    Ditto for me, i scooped up a copy of b689 when it was first released (yes, i was actually up at 4:37AM :D ), worked smoothly. go figure though, my most important plugin (xauth) had to break :/
     
  7. Offline

    Montag

    Working great on CB699.
     
  8. Offline

    hofec

    This is so amazing plugin ! Thank you lot ArmEagle for his rebirth :D Works well on #709.

    One suggestion I have .. can you please make strings config file for this ? I just wanna localize to my language for my guys on our server :)

    Thx in advence.
     
  9. Offline

    ArmEagle

    Oh yeah, I guess that's something to be put on the TODO list too. Good suggestion! (I should just go take a look how Afforess does that with MinecartMania I guess...).
     
  10. Offline

    hofec

    Great ! U are my man. (no homo :D )
     
  11. Offline

    peas

    ^osamabinbush...yesssss


    o btw

    anyone else having problems writing on tradecraft.txt?

    my FTP gives me an error when I try to save :l ?
     
  12. Offline

    ArmEagle

    Hmm, next time I dispatch to a linux box I'll try to see what the permissions on the file are. Ftp should have support for setting file permissions. Maybe you could see whether you have write permissions.
     
  13. Offline

    peas

    I've had no problem changing any other files..just this one

    thanks for quick response

    just checked file permissions

    it seems to only have Owner and not group and public under write/execute

    but then again, so do all the other files I change :l ..

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

    ArmEagle

    Well I really have no clue then. I just checked the code and it should be closing all handles to that file just fine. So even if the minecraft server is running, you should be able to edit it without problems.
     
  15. Offline

    bolsjeboy

    Most of the id's/blocks/items cant be used i can only use sand and cobblestone?
     
  16. Offline

    ArmEagle

    That is because the file TradeCraft.txt (inside the plugins/TradeCraft/ folder) by default only contains about a dozen items. In my opinion by default it is best to build up from a small list and mold all the trade rates in a way you think is fair. Also, as server admin, you might not want to allow all items to be traded (TNT, lava, water, bedrock, obsidian, etc.).

    But in the post you quoted I did point to this post (although it is a bit hidden) where L24D provides a list of all items in the game at values he thinks are fair.
     
  17. Offline

    peas

    still no idea on why I can't alter original tradecraft.txt :/?
     
  18. Offline

    ArmEagle

    No, sorry. I have really no idea.. You're editing the plugins/TradeCraft/TradeCraft.txt file right? And (though it shouldn't matter) the game server isn't running?
     
  19. Offline

    peas

    Status: Starting upload of C:\Documents and Settings\name\Local Settings\Temp\fz3temp-1\TradeCraft.txt
    Command: PASV
    Response: 227 Entering Passive Mode (71,171,125,66,105,212)
    Command: STOR TradeCraft.txt
    Response: 553 Could not create file.
    Error: Critical file transfer error

    yes its in plugins/tradecraft/.txt

    looking @ filezilla fixes on google, they say to delete file and upload new...but I can't delete it either :L

    woah man...Ive been messing aroudn with player shops...and they're EXTREMELY exploitable

    i just poofed a stack of ingots out of nowhere when i withdrew, and I deposited one log and withdrw 64... :<


    edit: anyone else getting thsi???

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

    ArmEagle

    Player shops should always keep a balance between the shop and the player using it. If you manage to get more of a goods or 'currency' between the user and the shop, then please let me know how you did so.
     
  21. Offline

    peas

    I did

    buy:1
    sell:1

    put a stack of logs in, withdrew something like a stack ormore of gold <cannot sell to yourself??>

    next put something liek 20 logs in, it reported it could buy up to 120 ingots worth <is this normal>?

    then I put in 1 log and somehow withdrew a stack just by right clicking sign and following normal instructions, will do some more testing
     
  22. Offline

    Adondriel

    If you ranit as sudo when. You first instaled it linux makes the file read only
    On ly way to fix would be to rename the txt file and make a new one, if that's the problem.
     
  23. Offline

    peas

    rename has same error as delete :/
     
  24. Offline

    Fralexxelarf

    Can't get it to work with cb 714, it says that it is working in the server console, nothing happens when i set up a shop, no console errors or anything.
    (yes i know the plugin is for 617-684, just wanted to report you that there's something wrong with cb 714 so that you know that you need to update :p)
    had it working with earlier builds and it's awesome! thank you alot for continuing this awesome plugin;)!
     
  25. Offline

    Lareneon

    Thanks for continuing this awesome plugin. But looking into the possible exploit mentioned above would be great. I've never experienced that but I would feel better if I knew the system was secure.
     
  26. Offline

    ArmEagle

    Well, a sign with the following text:
    Code:
    [log]
    buy:1
    sell:1
    
    Is not a player chest, but an infinite chest, as the plugin tells you when you right-click on it.
    You need a sign like this
    Code:
    [log]
    buy 8 : 1
    sell 8 : 1
    -yourname-
    
    To turn it into a player chest.

    Btw, yes, I'm hoping to have it accept other formats than just amount:value and add a name automatically.

    Now to look into a latest build of bukkit.

    I'm running a server CB#714 right now and I don't see any problems. I can create and interact with infinite and (own and other's) player shops just fine.

    Maybe your Permissions have reset. Or Permissions isn't running and you try to do things that only an operator can? (Though building and using player shops should work).

    Hmm, I should clarify the support for Permissions and what the default permissions are when Permissions isn't detected.

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

    Fralexxelarf

    Nothing wrong with permissions loads correctly and I have the permissions '*' and I am an Operator, so it's kind of weird, well I'll just try again :p thanks for you help ;)

    page 2 woho !
    it works now! :D maybe it was because i had the config file from an old version? forgot that i had an old version config xD heh

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

    ArmEagle

    Yes that would probably be it. It uses some new formatting. I should probably give some warning about that.

    edit:
    To clarify the above statement. When I picked up development of the plugin, one of the first things I did was moving the plugin files to plugins/TradeCraft/. With that change I also 'fixed' the default formatting of the properties file, which actually didn't seem to be parsed successfully anymore. At least that's how I remember things.. :)

    Ok, I've made some more changes.
    download v1.0.0-alpha3 here (be sure to rename it to just TradeCraft.jar in the plugins folder).

    Changes:
    - Buy/sell rates on a line don't need the colon in between anymore. You just need to put two separated numbers on the line. So you can write something simple as "3 : 1", or something more readable like "Buy 3 for 1".
    - When you create a player shop (by specifying buy and/or sell rate), the plugin will add your name (surrounded by dashes) on the last line automatically (abbreviated if needed). It will now save the full name in case your player name is too long to fit.
    - Because of the above change, the properties setting "strict-playershop-owner-name" is not used anymore.
    - Before, if the Permissions plugin is not detected, normal users could not create player owned shops. Now they can.
    - Changed some interaction messages for when a customer right-clicks a player shop.

    Todo (new one added):
    - I want to add localization before this goes to 1.0.0. Hopefully that will be done right when the Bukkit team releases their recommended build for Minecraft 1.5.

    Oh, I forgot to remove some use of the "strict-playershop-owner-name" setting.
    Get the new update here.

    Localization is added! And with that I turn this to beta (what's in a name anyway).

    Please let me know of any issues. Strings I somehow missed to use localization for. Or problems creating them.

    Download the beta here.

    version 1.0.0-beta
    • Localization support (en only now)
    • Cleaned up some ugly coding (no worry, plenty left!)

    There's a new setting in TradeCraft.properties; "language", default "en", which specifies what language file (inside plugins/TradeCraft/) is used. If you think you've got a pretty good translation, post it in the thread in code-tags and (if you let me) I might add it in the .jar eventually. By default the plugin will copy the English language file into the plugins/TradeCraft directory.

    Request for testing:
    In a few occasions I've seen the TradeCraft.data file to be cleared between server restarts. With the new way of automatically adding the player name to a player shop sign and storing the actual player name, this does mean that you'd lose everything that was in the shop. You'd also have to remove and replace the sign for the shop to be stored.
    So please try to poke at it and try to break this!

    Ok, I figured out what would cause this and this should not be occurring during normal use of the plugin. It happened in case the shop data was not loaded during the enabling of the plugin because of some error. In a future version I will prevent saving the shop data if it was not loaded before.

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

    game_stailer94

    can you add an history for the shops, maby with an setable limit of entries?
     
  30. Offline

    Lord Chaos

    Iconomy support please?

    This is an awesome mod.
     

Share This Page