[UNSUPPORTED][ECON] CodeRedEconomy v0.8.0 (RedStrype Econ) [320]

Discussion in 'Inactive/Unsupported Plugins' started by Vandolis, Jan 20, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Vandolis

    First off let me say that I only made this plugin because I was bored and wanted some more practice programming. I made it for the server I play on, RedStrype, and it was built with only the features the servers admins wanted. I am posting it to get feedback on it, and maybe it will be better suited for what you want than some of the more established (and more functional) economies such as iConomy.

    Also please note that this economy is not for everyone, as most people will probably want one that is more full featured, but I plan on keeping this one small.

    Also if you are starting to write plugins please feel free to look through my code. I'm still a novice myself, but it might be able to help somehow :D

    So to sum up this economy in one word: Simple

    All your users need to learn are 6 easy commands.

    /buy, /sell, /balance, /pay, /undo, /prices

    Thats it.

    Syntax for these are:
    /buy [item name] [amount] or /buy [amount] [item name]
    /sell [item name] [amount] or /sell [amount] [item name]
    /balance
    /pay [player name] [amount]
    /undo
    /prices [page]

    Full info is in the readme which, if you just want to check out more about the plugin, is available for download. This includes (poorly written) situations that display how the plugin behaves, as well as an explanation on how to set it up.

    ***NOTE***
    Right now the plugin only uses flatfile (/plugins/CodeRedEconomy/), but I am in the process of adding SQLite support, so forgive me.

    Also please note that this is still in heavy development, and is really just an ongoing experiment. There is about a 100% chance that there are still bugs in it, but if you are worried about bugs than you shouldn't even be using bukkit right now ;)


    Download:
    <Edit by Moderator: Redacted mediafire url>
    Source
    <Edit by Moderator: Redacted mediafire url>
    Example Stats File

    Changelog:
    v0.8.0: Fixed bugs, most of the SQL code is in there, although its not for use yet.


    v0.0.0->v0.7.1: Work on first release.
     
    Last edited by a moderator: Dec 15, 2016
    spoonikle likes this.
  2. Offline

    stevo

    I think it would be good if your balance could not go negative when /pay is used
     
  3. Offline

    Vandolis

    @stevo
    Yeah thats one of the major bugs that somebody told me. Its fixed in the new version, which I don't want to release yet as I can't seem to get something working right with SQLite. Also school has slowed me down a great deal [​IMG]
     
  4. Offline

    EvilMaL

    I think Essentials breaks this for me. I cant get them to play nice with each other.
    If i type /balance im always at 30 even if i buy or sell anything. Is there a way to make this the only econ without deleting essentials ?
    --- merged: Jan 31, 2011 6:20 AM ---
    Nm i got it to work by just baning the essentials /sell command in permissions
     
  5. Offline

    pudd1nG

    in essentials you can disable commands completely, disabling - 'eco' will disable essentials money system.

    edit: nvm u got it
     
  6. Offline

    EvilSeph

  7. Offline

    roenie

    Sharing my items.txt for your pleasure.

    Code:
    264:10:10:-1:-1:-1:0
    57:100:90:-1:-1:-1:0
    266:6:6:-1:-1:-1:0
    41:60:54:-1:-1:-1:0
    265:4:4:-1:-1:-1:0
    42:40:36:-1:-1:-1:0
    331:5:3:-1:-1:-1:0
    263:25:15:-1:-1:-1:0
    89:75:75:-1:-1:-1:0
    49:75:75:-1:-1:-1:0
    19:25:25:-1:-1:-1:0
    88:25:25:-1:-1:-1:0
    87:25:25:-1:-1:-1:0
    22:25:25:-1:-1:-1:0
    45:20:20:-1:-1:-1:0
    79:15:15:-1:-1:-1:0
    48:15:15:-1:-1:-1:0
    35:10:10:-1:-1:-1:0
    1:5:4:-1:-1:-1:0
    20:5:4:-1:-1:-1:0
    82:4:4:-1:-1:-1:0
    24:4:4:-1:-1:-1:0
    17:4:4:-1:-1:-1:0
    80:2:2:-1:-1:-1:0
    4:2:2:-1:-1:-1:0
    5:1:1:-1:-1:-1:0
    3:1:1:-1:-1:-1:0
    12:1:1:-1:-1:-1:0
    13:1:1:-1:-1:-1:0
    262:3:3:-1:-1:-1:0
    86:65:65:-1:-1:-1:0
    46:50:25:-1:-1:-1:0
    92:50:25:-1:-1:-1:0
    47:15:15:-1:-1:-1:0
    

    Characteristics:
    In the game there is a certain gap between the most rare (say, diamond) and the least rare things (say, cobblestone). I've narrowed this gap a bit in the prices. This is done so that players may have access to more rare blocks than they would without this, but there still is definitely no free lunch here. There should be *knocks wood* be no viable way to make money by selling and buying alone, you just sell what you dig up. You can't just keep building without doing any mining/gathering because you will run out of money. I use a plugin that makes tools unbreakable, making ingots much less useful (only useful for armor). To reflect this I made ingots dirt cheap because doing that comes with the added advantage that the respective blocks (gold, iron, diamond blocks) can be affordable because those blocks have the odd characteristic to consist of 9 smaller parts, so they have to be 9 times as expensive as their respective ingot. Otherwise you could buy the ingots, craft them into a block and sell for profit, or the other way around. Unless you create big differences in buy and sell price, which I wanted to avoid doing. There is a penalty for buying rather than crafting (total cost of materials): glass (21%), stone (21%), iron blocks (11%), gold blocks (11%), diamond blocks (11%), this is done by a small increase in buy price in relation to the sell price. This penalty does not exist for wood-->planks or sand-->sandstone because those blocks are not that expensive and their crafting processes just consist of clicking and who really wants to do that? Note that if you want to make your own items.txt, the value of for example, stone, equals 1/8th of the price of 1 coal + the price of 1 cobblestone, because 1 coal + 8 cobblestone crafts into 8 stone.) I reduced the price of redstone dust because you get five of them per block mined, it's all in the details. I reduced the sell price of redstone dust and coal by a factor of 2.5 compared to their buy prices, to avoid making easy money. Finally I added a number of unexpected items to the list, that may otherwise be hard to get. Arrows, cake, snowballs, what have you. Basically the list just omits the small craftable things like stairs, ladders, torches. Most else is there but nothing that seems out of place to me. Even blocks like ice and snow, glowstone, netherrack, mossy cobblestone, etc. A tweak you might want to do is to lower all the sell prices somewhat (say, by 20%) to stop players from using /sell and then later /buy as an extended inventory but I'm on the fence about that. (Not to mention, that's hard to do when something's current value is e.g. 1 or 3 so you're bound to alter the balance.) Consider starting every player off with a starting balance, 2500 should get you going comfortably (survival server).

    It may not be your cup of tea, but I hope it helps. Let me know if it does!
    --- merged: Feb 2, 2011 8:00 PM ---
    Okay, why am I able to do /pay MINUS<amount> and so is everyone else? Stealing money from people is not nice.

    Edit: some balance tweaks
    Edit: again
    Edit feb 5th: added clay
    Edit 6th: lowered price of snow block (was too quick to gather and make money with), removed snowballs
     
  8. Offline

    Vandolis

    @roenie
    Wow thanks for that post, if you don't mind I would like to put that into the OP for people to copy. But as for the /pay yeah... its fixed the only problem is that I ended up having to rewrite the whole darn economy, which combined with classes has made for a perfect storm. I do promise that this new release is out the door this week, and I will also say that using SQLite for it is amazing. No more problems adding things like new items etc.

    Apologize for the wait everyone, but it is a lot of work that needs to be done, and I do have my priorities.
     
  9. Offline

    roenie

    Of course I don't mind you adding it to the OP, but just link to my post so the explanation is right there with it, because i don't think it's going to be to everyone's liking without any changes. If they're expecting something "standard", it probably is not.

    You don't have to apologize for any wait, any code you send our way when you do is a privilege.
     
  10. Offline

    DeLux

    Just spams errors with the newest Craftbukkit.
     
  11. Offline

    Dominic

    Great work man! I can't wait for this to be updated again!
     
  12. Offline

    BoosterPunisher

    For some reason I don't see any text on my screen when I type commands such as /prices or /balance. Idk I am pretty noob so it might just be something on my part. Is anyone else getting this problem? It loads the plugin then say enabled, but then it says, could not pass event Player_Command to CodeRedEconomy.
     
  13. Offline

    DeLux

    This has been broken for a while so odds are this plugin is dead. Any ideas on a replacement ?
     
  14. Offline

    roenie

    8 whole days, don't make me laugh. what are you, five? there will be a new craftbukkit version every 5 minutes, just use one version with corresponding plugin versions and STICK WITH IT for a while. You know, like, 2 months or something.

    iConomy + SimpleShop I believe it's called, might be an alternative. Not as good though, probably.
     
  15. Offline

    GameFAQsRolo

    I've looked at some of the others, but I really like CodeRedEconomy much more. We're planning a big update on my server and I wish we could bring back CodeRed. [​IMG]
     
  16. Offline

    Dorado185

    Any idea when you will be able to update this? My users and I really enjoy this pluggin and I really want to update the bukkit jar. Do you at least know what the latest build this works with? I have it running on 186. Also, if there are no plans for update, please let me know so I can start to look at other options. But for now, I will be patient.

    Thanks for a great plugin.
     
  17. Offline

    Vandolis

    @Dorado185
    Yeah, I've only been able to work on it for about an hour or two this week, but I'm posting a fixed version that still uses the flatfile. SQL is getting there but it feels like an uphill battle sometimes. Slow going for sure.
     
  18. Offline

    coolguy32

    thanks a lot for this plugin! However, the /sell that comes with general or essentials or whatever is conflicting (only that one works). the buy and everything work great though. Is there a way to disable that one?
    thanks.
     
  19. Offline

    GameFAQsRolo

    You'll need to open the essentials.jar with something like 7zip and extract the plugin.yml. In plugin.yml, delete the information [with any text editor] for /sell and any other commands you're having problems with. Once you're done, drag the edited plugin.yml back into 7zip, overwriting the original.
     
  20. Offline

    roenie

    There is an easier solution. Edit Essentials\config.yml:

    # Disabled commands will be completelly unavailable on the server.
    disabled-commands:
    - sell

    CodeRed's sell will still work.
     
  21. Offline

    GameFAQsRolo

    This workaround causes its own problems and is not recommended.
     
  22. Offline

    Dorado185

    Wow! What turn around. Now if only a few other plugins would catch up.

    Thank you again for the awesome plugin!
     
  23. Offline

    roenie

    Can you please elaborate on "causes its own problems"? Seems to be working fine on my server...?
     
  24. Offline

    GameFAQsRolo

    Disabling commands (or in this case /sell) in config.yml might work for CodeRedEconomy, but this method does not work for every plugin. Sometimes restricting the command in essentials will restrict it from use across all plugins. The confirmed way to avoid all conflicts is to edit the plugin.yml in the essentials.jar. This method will work across any plugins conflicting with Essentials of any version. It is one of the main reasons essentials has been split into modules. Please refer to the essentials topic for more information.
     
  25. Offline

    kazeen

    sounds cool but link doesnt work
     
  26. Offline

    coolguy32


    thank you

    if i disable /sell (in essentials.yml) it disables use of coderedeconomy's /sell (though all others work fine).
     
  27. Offline

    kazeen

    Works great for me thx
    been looking for system like this
    What are admin commands or where do i find them
     
  28. Offline

    Boxsram

    Can you please make a video on how to enter the item code cause when i do it it say theres no it items ...Idk i kno if you made a video it would HELP EVRY ONE ,Its a GREAT mod thanx
     
  29. Offline

    Dorado185

    To add items to the store you need to open Server\plugins\CodeRedEconomy\items.txt in any text editor. Then add lines like so:

    1:6:3:1024:256:256:0
    2:3:2:1024:256:256:0
    3:3:2:1024:256:256:0
    4:3:2:1024:256:256:0
    ...

    The numbers being [item code : buy price : sell price : Max in store : Max Sell : Max Buy]. Save items.txt then restart the server. Should see the items in /prices. Item codes can be found here: http://www.minecraftwiki.net/wiki/Data_values

    The order you put them in items.txt is the order they show in /prices. I had to sell at least 1 item to the store per item code (/sell cobblestone 1) to get the store going - after that it restocked to 'the Max in Store' number. Easy when you have the give command.

    Hope this helps - let me know if you need more info.
     
  30. Offline

    Vandolis

    @Dorado185
    Instead of selling one of each (although clever) you can just type /restock and it will force restock all shops.
     
  31. Offline

    spoonikle

    the only issue i have had with this plug-in is making the shops item table, its not very easy.

    one thing i noticed, why is Coderedecon such a massive file? also, is the source v0.8 or in the middle of changes/actively being worked on? be cause I was thinking of modifying it to see if i can fix all of the errors i get in the latest craftbukkit build, as well as tie in a few plug-ins. of course i do not think I'm at the point where i can understand someone else's code.
     
Thread Status:
Not open for further replies.

Share This Page