StockCraft
StockCraft - Trade real stocks in Minecraft
Stock api updated,
- Looking up stocks now goes faster!
- 15 minute delay from Yahoo again.
This is the continuation of the original StockCraft made by @henning77 But I couldn't reach him for 15 months... And the plugin has not been updated since, untill now!
Features:
- Buy and sell real stocks in Minecraft (courses from finance.google.com)
- Compare profit with other players
- More
Requirements:
- MYSQL Database
- economy plugin
- Permissions
- Vault
How to install:
- Install MYSQL Database if not available
- Install the missing plugins (iConomy,Permissions, Vault)
- Download the rar archieve
- Extract it to plugins
- 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!
- shorten=false -> change to true if you want to activate shorting (Check Wiki!)
- Vault=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!)
database:
- host: localhost
- port: '3306'
- database: stockcraft
- username: root
- password: ''
Commands:
- /stock help -> Help
- /stock ids [page]-> Shows the stocks that are available
- /stock ids symbol [page]-> Shows the symbols of the stocks that are available
- /stock ids s [page]-> Shows the symbols of the stocks that are available
- /stock course [id] -> Shows the course of the stock
- /stock list -> Shows your stocks if you have some
- /stock buy [id] [amount] -> to buy stocks
- /stock sell [id] [amount] -> to sell stocks
- /stock top -> Top 10 with the highest profit
- /stock add [id] [symbol] -> adds a new stock to the id list (you can find the symbol on finance.yahoo.com!)
- /stock addlist [name] -> adds new stocks from a file (examplelist: /addidlist examplelist) in /plugins/StockCraft/
- /stock remove [id] -> removes stock from the id list
Permissions: default to op.
- 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:
- /stock add BMW BMW.DE
Get new stocks:
If you want to add new stocks go to finance.yahoo.com and check the id
after that add the id in Minecraft:
- /stock add BMW BMW.DE
Donate:
Donate if you like this plugin!
Getting the following error when I tried to run it. I got Vault and correct MySQL details..
Could it be that I dont run iConomy but instead FE ?
Just a note for others, 1.1 still has an exploit that allows abuse of stock, have PM'd BlockCat about it, will see when it's fixed :)
Well it should be a one-time thing, not a status permanently set on a stock. Simply a command that doubles the amount of a certain stock, on anyone having the stock.
@Joymo
oh, well, I'm quite lazy, so how about a price-multiplier?
Stock split means everyone owning stock now has twice as many, but value has been halved. Not different for different players :o
@Joymo
1. with the normal buy and sell command.
2. So player A has 2000 stock X worth 10 each. and player B has 1000 stock X worth 20 each? I don't think that's possible for now. I could add a multiplier to the prices.
3. the course is updated when the commands are used. It then will be the same course when the stocks are bought or sold. (unless the course has changed in the time period)
And a:
3) It seems that /stock course, does not update with live information on use of the command, is that intended? Could be that someone checks course, wants to sell cause he think it's profitable, but then course ends up being outdated. Or is course like updated every minute automatically, or only on sell/buy events?
Two new questions:
1) How would shorten work, I see no special command for it?
2) Could you add an Admin command to handle stock splits? Some command that would double the amount of stock a player has in a certain stock, as the value would be halved. (more of an advanced option, but otherwise players would be pretty bummed instead of happy on real stock splits)
Ugh my bad! I never use ops anymore, but forgot I had enabled it shortly to test on my Test server, so I had ops while testing.
It's working now, so back to live testing today ;)
@Joymo
What if you remove those nodes?
Everything completely works for me... (zPermissions and PEX)
http://pastie.org/7294295
Hey, after you went offline on IRC, I tested your new Dev version on Test server. Even when negating ALL the permissions, I can still use commands just fine. Permissions not working correctly...
Test perms used: http://pastie.org/pastes/7284689/text?key=ahbmkinsomfxmknmd3ntww Still can use "/stock ids" just fine.
It does say this: 2013-04-02 22:20:30 [INFO] [StockCraft] Version: 1.0 is enabled!
So am not sure you gave me the right version, unless you didn't change version number.
Yea you can't link to offsite downloads :P
You could setup a Jenkins for StockCraft and add that to your post, that's allowed for dev builds. (example: http://dev.bukkit.org/server-mods/craftconomy/ )
@Joymo
Then a quick release.
Great to hear, hope this version gets approved faster than last one :P
Not sure what you mean with test, I test basic functionality on our Test server, but 1.0 I actually loaded on our live server, I didn't spot the permission issue on Test server sadly.
@Joymo
Permission bug is fixed,
and how do you test everything if I may ask?
Ok much bigger bug, your permissions don't work, even when negated.
Have set: "detailed permissions: true".
I gave the base group "-stockcraft.commands.*" to be sure. Yet anyone can use the stock commands just fine, even buy/sell stocks.
Even when I specifically add "-stockcraft.commands.stocksell" and "-stockcraft.commands.stockbuy" to people, they can STILL buy and sell stocks.
Note that adding "-stockcraft.commands.*" should not even be needed, unless you set all commands to default: true, but even then, negating it, or negating individual commands, should block people from using then, it's not however.
We use PEX + Vault.
Also perhaps you could open the Tickets section?
Loaded and testing 1.0 now, so far so good!
Just been adding stocks, two things so far:
1) On trying to add Apple stock for example, there was a server spike for a few seconds. Do you lookup stocks in the main thread? If so, I can imagine this getting a problem with people using it, if lookups keep blocking the main thread.
2) In-game it still says "Use stock IDs from Yahoo finance", also in the command list it says "/stock removeid", when it's now "/stock remove".
3) Not sure what "stockcraft.commands.stocks" does, which command does it link to?
Thanks for the update!
@Joymo
Aaand (should be) fixed: BukkitSQL is not needed anymore, and after a many testruns, quite a few bugs got fixed.
Newest version is almost approved.
Thanks for your reply.
New errors on load, after placing BukkitSQL.jar in plugins: http://pastie.org/private/cnzqopkc4cnfxyuqboosw
Also, this is really confusing now, there are 4? overlapping config files:
Really should only be one of those files?
But even if I remove all the config and load it without any config, it still errors on load.
@Joymo
You need the config.yml, and you also need to use BukkitSQL, since it contains the connection pool, and the config to connect. But it's going to be removed one day, since nobody uses it.