Inactive [ECON] StockCraft 0.3 - When minecraft players care about economy crisis [818]

Discussion in 'Inactive/Unsupported Plugins' started by henning77, Apr 18, 2011.

  1. Offline

    henning77

    StockCraft - Trade real stocks in Minecraft
    Version: v0.3

    Features:
    • Buy and sell real stocks in Minecraft (courses from finance.yahoo.com)
    • Compare profit with other players
    Downloads:
    Requirements:
    • MYSQL Database
    • iConomy
    • Permissions
    How to install:
    • Install MYSQL Database if not available
    • Install the missing plugins (iConomy,Permissions)
    • Download the rar archieve
    • Extract it to plugins
    • Modify StockCraft.cfg -> /plugins/StockCraft/StockCraft.cfg for connection to the Database
    • Add Stocks with /addid or load example list with /addidlist examplelist
    Config File:
    Edit your config file to access your database and to activate some functions!
    • url=//localhost:3306/minecraft -> change "minecraft" to the name of your database
    • user=root -> change "root" to your database user
    • password= -> Add password of your database
    • detailedpermissions=false -> change to true if you want to activate more permissions, if false you don't need to change permissions if admin rights are "*"
    • shorten=false -> change to true if you want to activate shorting (Check Wiki!)
    • iConomy5=true -> change to false if you want to use an old iConomy Version
    • fee=0 -> If you want a trading fee, you can set one here. (percentage of money paid for stocks!)
    • minimumfee=0 -> Here you can set a minimum fee! (You can leave fee=0 and set a static fee!)
    Commands:
    • /stockhelp -> Help
    • /ids [page]-> Shows the stocks that are available
      • /ids symbol [page]-> Shows the symbols of the stocks that are available
      • /ids s [page]-> Shows the symbols of the stocks that are available
    • /course [id] -> Shows the course of the stock
    • /stocks -> Shows your stocks if you have some
    • /stockbuy [id] [amount] -> to buy stocks
    • /stocksell [id] [amount] -> to sell stocks
    • /stocktop -> Top 10 with the highest profit
    • /addid [id] [symbol] -> adds a new stock to the id list (you can find the symbol on finance.yahoo.com!)
    • /addidlist [name] -> adds new stocks from a file (examplelist: /addidlist examplelist) in /plugins/StockCraft/
    • /removeid [id] -> removes stock from the id list
    Permissions:
    • stockcraft.addid -> add this to permissions plugin to allow admins or mods to add stocks
    • stockcraft.removeid -> to allow admins or mods to remove stocks
    • stockcraft.commands.* (only needed if you set detailedpermissions = true in stockcraft.cfg)
      • stockcraft.commands.course
      • stockcraft.commands.stockbuy
      • stockcraft.commands.stocksell
      • stockcraft.commands.stocktop
      • stockcraft.commands.stocks
      • stockcraft.commands.ids
      • stockcraft.commands.stockhelp
    Examples for stocks (with symbols):
    BMW BMW.DE
    DeutscheBank DBK.DE
    Lufthansa LHA.DE
    Commerzbank CBK.DE
    Telekom DTE.DE
    Infineon IFX.DE
    SAP SAP.DE
    Siemens SIE.DE
    SONY SON1.F
    ACER ACX.MC
    Oil CLK11.NYM
    Gold GCJ11.CMX
    Gas NGK11.NYM

    Example:
    /addid BMW BMW.DE

    Get new stocks:
    If you want to add new stocks go to finance.yahoo.com and check the id

    [​IMG]

    after that add the id in Minecraft:
    /addid BMW BMW.DE


    Changelog:

    Version 0.3
    • Added support for iConomy5 (you can still use old versions if you set iConomy5=false!)
    • Added pages to /ids -> /ids [page]
    • Added symbol optiion to /ids -> /ids symbol [page] or /ids s [page]
    • Added option to set trading fee
    • Fixed some bugs
    Version 0.2
    • Added the option shorten (you can sell stocks which you don't have and buy them later! -> (Check Wiki!) To activate set shorten=true in StockCraft.cfg
    • Added new permissions -> To activate set detailedpermissions=true in StockCraft.cfg
    • Added some error messages
    • You can load stocklists now! Look at /plugins/StockCraft/examplelist.txt! Load the list with /addidlist examplelist or load your own list!
    • Getting courses (/ids and /stocks) is now speeded up!
    Version 0.1
    • First Release
    Donate:
    If you want to support me
    Donate
     
  2. Offline

    Jorrdan

  3. Offline

    wraith1200

    On our server we added 50 stocks to the list. When ever someone does the /ids command the server locks up until the list finishes displaying for the player that used the command. Anyway to make the plugin run on a separate thread.
     
  4. Offline

    henning77

    I will speed this up in the next version.

    I fixed the speed issue with /ids and /stocks! I will release 0.2 the next days... depends on testing ;-)

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

    wraith1200

    If you need help testing we would be happy to test it for you.
     
  6. Offline

    NEO

    Would like to see permission nodes for buying and managing stocks, so it can be limited to specific groups.
     
  7. Offline

    rapajara

    its a cool idea but i am having problems with it, it just won't work, it says the plugin is loaded but it doesnt actually work.... maybe it's because i don't have mysql... is that why?
     
  8. Offline

    City Builder

    Requirements:

    • MYSQL Database
    • iConomy
    • Permissions
     
  9. Offline

    KingPin

    any news on .2 ? thank you.
     
  10. Offline

    henning77

    Sorry guys... I was very busy the last days, but I will release 0.2 soon!
     
  11. Offline

    rapajara

    so your saying that I need MYSQL?
     
  12. Offline

    henning77

    Yes you need MYSQL (and iConomy!) else it doesn't work.

    StockCraft 0.2 is there! Read Changelog!

    Sorry forgot one point in Changelog:

    "Getting courses (/ids and /stocks) is now speeded up!"

    I just fixed a minor bug, so if you downloaded the new version before get the new file!

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

    KingPin

    thanx :) will test.
     
  14. Offline

    Swoosh Bear

    Edit: Nevermind. Found the problem. It was only some on the example list that were not updating the course correctly.
     
  15. Offline

    henning77

    Oh ok... from the original list? Can you tell me which? Then I can delete them in the next version!
     
  16. Offline

    Swoosh Bear

    I was using ones from the example list. I believe it was any one that isn't an actual company, but the prices for what it is. For example, Gas was one. The ones that I remember are:
    Gas
    Gold
    Oil

    Basicly, any one that isn't a company. It would just stay at 0.0 for the 50 day change course and wouldn't change the stock prices at all.
     
  17. Offline

    goldseed

    Thanks a lot for great plugin...


    Now.. My guys does not build... only seeing the charts...
     
  18. Offline

    henning77

    That was the plan ;-)

    So with the update of iconomy it doesn't work! Will work on this... if I have time! Support for the old iConomy version needed??
     
  19. Offline

    goldseed

    Yes, plz.... I will not use iconomy 5.0 until I have to....

    and.. can you add configuration for tax or selling fee or something????

    and we need page function like /ids 1 , /ids 2

    Thanks again!!..
     
  20. Offline

    henning77

    The "pages thing" is planned for 0.3 (maybe also a group function) and good idea with the selling fee... I will add an option! And support for the old iconomy plugin... any other ideas or wishes?
     
  21. Offline

    Swoosh Bear

    Maybe a command to toggle the actual ID's on and off for the ID's list. For example, whether to show just BMW, or BMW - BMW.DE so that players can look up those stocks on yahoo finance for better investing.

    Great plugin so far. Keep up the good work.
     
  22. Offline

    Birdie

    Permissions not functioning?

    While adding StockCraft.commands.* to my economy group and to an individual player, they still dont have permission. And yes detailedpermissions=true is set
     
  23. Offline

    henning77

    Write stockcraft.commands.* instead... sorry was my fault, was wrong in the doku, but I changed it. Thanks!
     
  24. Offline

    Birdie

    Haha, no problem :D
     
  25. Offline

    fugue2005

    will this be updated for iconomy 5
     
  26. Offline

    henning77

    Yes will be updated... but I had no time to fix it... ;-) sorry!

    Updated to 0.3...

    Version 0.3

    • Added support for iConomy5 (you can still use old versions if you set iConomy5=false!)
    • Added pages to /ids -> /ids [page]
    • Added symbol optiion to /ids -> /ids symbol [page] or /ids s [page]
    • Added option to set trading fee
    • Fixed some bugs
    If you find a bug, please tell me! ;-)

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

    goldseed

    Thanks a lot....!!!!!!
     
  28. Nice plugin :)

    It seems the last entry on each page is not visible when you do /ids. The paging needs to show 1 less per page I think :eek:

    ====

    And an NPE:

    17:04:31 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to StockCraft
    java.lang.ArrayIndexOutOfBoundsException: 1
    at StockCraft.StockCraftCommands.infosystem(StockCraftCommands.java:165)
    at StockCraft.StockCraftPlayerListener.onPlayerCommandPreprocess(StockCraftPlayerListener.java:25)
    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:256)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:289)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:674)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:639)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  29. Offline

    iPhysX

    Nice!
    I might use this :O
     
  30. Whaa you have a major MySQL bug:

    http://pastie.org/1922078

    Seen this before in plugins, you are not properly closing SQL connections, and/or you should be re-using your SQL connection, not opening a new one all the time.
     
  31. Offline

    henning77

    Thanks for the replies, I will fix it... This is my first project with java and MySQL so thanks for the hint :-D Havn't seen the error on our server...
     

Share This Page