[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

    mrgreaper

    we just switched from iconomy to coderedeconomy and it works great thank you !
     
  3. Offline

    McSpuds

    I am loading this up to see how it is. With iConomy not providing shops and signs I am forced to find something.
     
  4. Offline

    mrgreaper

    NOTE TO ALL
    bug we found

    if you change anything in items.txt open up shop.txt and delete all the text inside or you will have 0 stock in your shop

    this applies to adding stuff

    for example we had coble stone added then we tested it the plugin worked so we went and added a load of others

    in game the shop showed 0 stock for all but coblestone

    we exited the server deleted the contents of shop.txt and restarted server

    shop stock was then accurate
     
  5. Offline

    Vandolis

    Wow, lots of replies haha. So let me try and address them all.

    @mrgreaper
    Thanks for letting me know, I changed my /restock command to include ops now so if you change items.txt you *should* be able to type /restock and it will add those items.

    @TurtlePatrol
    No, the economy doesn't support decimals. Didn't like the idea.

    @Abecbu
    I looked through your files and the only problem I saw was how my plugin read the files [​IMG] Turns out it still read blank lines and tried to gather data from it, so I went ahead and fixed it. Thanks!

    @highwisdom
    The correct format for items.txt would be "itemId:buyPrice:sellPrice:maxAvail:maxSell:maxBuy:breakValue" so instead of having the item name, you need to put the items Id number, not the name.

    @Nate204
    Looks like your problem might have been the same as Abecbu's. Download the new build and let me know if it is fixed.

    @Everyone
    Thanks for trying out my economy and I will definitely look into the apparent compatibility problems. Off the top of my head though I can't even imagine why my plugin would cause other plugins to not work. New download is on the first page.
     
  6. Offline

    highwisdom

    Managed to get the plugin (v0.70) loaded on cbukkit 114 and functioning without error. all i had to do was make sure the 'badwords' filter was set to false, and that the badwords.txt file was totally empty (not even blank lines). Setting badwords to true, or having content on the badwords.txt causes an error on loading adn prevents other plugins from loading.
     
  7. Offline

    Vandolis

    @highwisdom
    So that WAS the problem. Dang thanks for confirming that, must've thrown an error while it was loading that caused any plugins trying to load after to not get enabled or something. Well the new version should have that fixed, have it checking to see if that is a empty line now. Stupid mistake ><
     
  8. Offline

    spoonikle

    when making item.txt what do i do in between items? ''? ,,? "."?
     
  9. Offline

    Vandolis

    Oh its all in the readme. When in doubt use a colon. so something like 1:1:1:-1:-1:-1:1
     
  10. Offline

    spoonikle

    no mean do i set up the flat like this

    itemId:buyPrice:sellPrice:maxAvail:maxSell:maxBuy:breakValue,itemId:buyPrice:sellPrice:maxAvail:maxSell:maxBuy:breakValue

    or like this...

    itemId:buyPrice:sellPrice:maxAvail:maxSell:maxBuy:breakValue
    itemId:buyPrice:sellPrice:maxAvail:maxSell:maxBuy:breakValue
    itemId:buyPrice:sellPrice:maxAvail:maxSell:maxBuy:breakValue
     
  11. Offline

    Vandolis

    Oooohhh my bad. The second option, each entry on its own row.
     
  12. Offline

    spoonikle

    :D thank you very much!
     
  13. Offline

    Lookatmego

    will this work if im using permissions...not groupusers
     
  14. Offline

    Vandolis

    Well right now the only command that you would need to limit is /restock, and that just checks the ops.txt for names. But I will eventually use some sort of permissions system, although I am probably going to wait for the official one.
     
  15. Offline

    GGreenBass

    Oh, sorry- I meant 'Can you set it so the purchase price of an item is different from the selling price of that same item?' You know, how in RPGs you might buy X armor for 500 gold but can only sell it for like 250 or something.
     
  16. Offline

    Vandolis

    @GGreenBass
    Oh well in that case yes [​IMG] You can also put sell/buy limits on each item and a break value so that if the player breaks that item like leaves or something, they get money for it.
     
  17. Offline

    GGreenBass

    Oh my god. That's brilliant.
     
  18. Offline

    Lookatmego

    hey my ites.txt is empty and if i wanna fill it up would i put the item id or the item name since in game it says correct use is /buy [itemname] [amount]
     
  19. Offline

    Vandolis

    @Lookatmego
    The correct way to input for items.txt is itemId. If you have any other questions check the readme and then feel free to ask [​IMG]
     
  20. Offline

    zengrath

    Thanks for this! Our server relied heavily on the shop with iconomy and this is a perfect replacement for now. My only problem i've incurred after getting it up and running is the issue with stocks returning to 0 when messing with items file, but as someone else said deleting shop.txt fixes it..
     
  21. Offline

    Fleder

    please add a function where i can determine which stuff you are allowed to buy
    and a command where it lists all available purchaseable stuff
     
  22. Offline

    DoritosMan

    This doesn't seem to be working for me
     
  23. Offline

    spoonikle

    when i have my items.txt like this i receive this error and my plugins stop working entirely...
    [​IMG]

    Code:
    1:10:2:1024:-1:-1:0
    14:0:340:0:10:0:0
    15:0:20:0:-1:0:0
    50:5:2:-1:64:64:0
    47:280:40:64:10:10:0
    45:120:70:1024:256:256:0
    17:40:4:1024:-1:64:0
    5:10:1:1024:64:256:0
    35:70:15:128:32:64:0
    41:9000:1200:10:5:5:0
    42:1800:200:30:15:15:0
    295:2:1:64:64:32:0
    297:500:45:32:32:16:0
    265:200:30:64:30:30:0
    263:20:5:-1:-1:256:0
    336:0:12:0:256:0:0
    337:20:8:-1:256:64:0
    356:15:0:10:0:1:0
    274:15:0:10:0:1:0
    275:15:0:10:0:1:0
    273:15:0:10:0:1:0
    291:15:0:10:0:1:0
    349:0:10:0:64:0:0
    350:200:20:64:32:32:0
    333:100:30:10:10:1:0
    351:300:70:64:64:32:0
    264:6000:2500:5:5:5:0
    266:1000:200:maxAvail:maxSell:maxBuy:breakValue
    itemId:buyPrice:sellPrice:maxAvail:maxSell:maxBuy:breakValue
    itemId:buyPrice:sellPrice:maxAvail:maxSell:maxBuy:breakValue
    i know its incomplete i was in the middle of working on it, but it shouldnt kill my server when i make an error in my syntax

    my version of craftbukkit is from January 18th, i don't know how to get the build number...
    if i had a guess i would say 95?....
     
  24. Offline

    highwisdom

    Do you mean you saved it just like this and ran the server? This will absolutely cause it to crash. It's due to improperly formatted strings. It will only accept numbers.

    On the other hand, I like that you posted your items text....

    @Vandolis: i'm looking around for a 'default value' item.txt file..that would save sooo much time. Does the server CodeRedEconomy was originally made for have a filled-out items.txt you could post for us to use?
     
  25. Offline

    zengrath

    @spoonikle i was getting erros like that until i removed permissions plugin.. I just staretd experimenting with plugins today, i'm sure it can work with permissions but i was getting errors until i removed it.

    @Fleder it's /prices to see a list if items and prices while on server
     
  26. Offline

    spoonikle

    okay so i completed the file, and get this error here

    [​IMG]

    Code:
    1:10:2:1024:-1:-1:0
    14:0:340:0:10:0:0
    15:0:20:0:-1:0:0
    50:5:2:-1:64:64:0
    47:280:40:64:10:10:0
    45:120:70:1024:256:256:0
    17:40:4:1024:-1:64:0
    5:10:1:1024:64:256:0
    35:70:15:128:32:64:0
    41:9000:1200:10:5:5:0
    42:1800:200:30:15:15:0
    295:2:1:64:64:32:0
    297:500:45:32:32:16:0
    265:200:30:64:30:30:0
    263:20:5:-1:-1:256:0
    336:0:12:0:256:0:0
    337:20:8:-1:256:64:0
    356:15:0:10:0:1:0
    274:15:0:10:0:1:0
    275:15:0:10:0:1:0
    273:15:0:10:0:1:0
    291:15:0:10:0:1:0
    349:0:10:0:64:0:0
    350:200:20:64:32:32:0
    333:100:30:10:10:1:0
    351:300:70:64:64:32:0
    264:6000:2500:5:5:5:0
    266:1000:200:90:10:9:0
    319:0:150:0:10:0:0
    320:600:200:20:10:10:0
    335:30:10:10:10:10:0
    353:20:5:10:10:10:0
    354:1000:200:10:10:10:0
    2256:20000:2000:1:1:1:0
    2257:20000:2000:1:1:1:0
    331:300:30:64:256:64:0
    i have no way of knowing whats causing this, i am using general 1.3, group users 1.4.2, world edit 2.11 and world guard 2.2, i also have iconomy, but i wana remove it, but i cant...
     
  27. Hi,

    I got the same problem as Abecbu. I have uploaded my CodeRedEconomy files and a screenshot of my server-window.

    I hope you can help me.

    Greetings from Germany,
    Greyhair93

    Edit: I use the plugins Flashlight, General + Essentials, MyHome, Travel Portals, Plant Spreader, CodeRedEconomy (not working yet), Noon and Search ID's
     
  28. Offline

    ShadowFile

    Chances of adding in an amount part to items.txt, say 15 dirt is 1 coin or whatever...
     
  29. Offline

    axebyte

    Yeah that be nice.

    Also having an issue with /pay (name) (amount)
    SEVERE: Could not pass event PLAYER_COMMAND to CodeRedEconomy
    java.lang.NullPointerException
    at bukkit.Vandolis.ShopItem.<init>(ShopItem.java:76)
    at bukkit.Vandolis.ShopItemStack.<init>(ShopItemStack.java:30)
    at bukkit.Vandolis.Shop.sell(Shop.java:305)
    at bukkit.Vandolis.CodeRedPlayerListener.onPlayerCommand(CodeRedPlayerListener.java:42)
    at org.bukkit.plugin.java.JavaPluginLoader.callEvent(JavaPluginLoader.java:135)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:201)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:547)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:523)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:232)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:65)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:261)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)

    no money is recieved but money is taken away..
    build 107
     
  30. Offline

    spoonikle

    please we need a fix for this, without your economy mod my RP server will never go public! i beg you, help me your my only hope!
     
  31. Offline

    Andy

    Does anyone know exactly how the time format on this mod works?
    Because the OP said he thinks it's something like 20 = 1 second, but that's hardly very specific and doesn't seem to be true. It working in milliseconds would make far more sense.
    Does anyone have the correct answer?
     
Thread Status:
Not open for further replies.

Share This Page