![]() |
Graal Stock Market
2 Attachment(s)
Today I present you with a fully functional mini stock market.
Each player starts with $1,000 virtual cash (clientr.stockcash). You can then purchase stocks (defined in the DBNPC "Stocks"). When the NYSE stock market is open, the stocks will update every second. Whilst the NYSE market is closed players can still purchase stocks and sell, but won't make any profit or loss. The configuration is pretty simple. In the DBNPC "Stocks", just add the stock name and symbol to the array. Then upload the weapon script and add it to whoever. All code can be found in the attached file, Stocks.zip. It's important the DBNPC is named "Stocks". The code may not be the best way to do it all but it works and is fairly secure. To purchase a stock, select it on the left and then change the quantity with the up/down buttons and click buy. Selling, select it on the right hand side and click sell. Edit: v1.2 Updated code to provide live stock data when market is closed. Fixed a few bugs. Fixed a possible exploit. v1.3 Added charts. |
Really cool. I think something like this would be a far better way to gamble than bet flipping on Era.
|
Let me know when this goes live, I already found 3 exploits just looking through the code once-over. Can't wait to break your server.
|
Quote:
|
because i dont like gunderak!!
|
Quote:
|
Hezzy just **** off.
You're so cool, you'll hack virtual currency in a game. And how do you suppose to hack it, it's all server side. Might make even more checks just to piss you off. |
kiss me gunderak
|
Just piss off.
I coded it to be a bit of fun. Not for people like yourself to just offer negativity towards it. If you have something useful to say, feel free. Otherwise, go crawl back under that rock of yours. |
You know... it'd be "way cool" if you made your own independent system and base stocks off in game businesses. Then determine stock price via items sold each day or whatever, amount of stocks available and demand for that stock.
Also I notice you don't have divdends implemented, always room for an update! |
I was considering making my own stocks, I did to some degree, But it failed.
And basing it off items wouldn't really work, seeming you'd have to code it in your self. So it would work for one server only really. And dividends, eh, I mean I suppose you could make it pay out every hour of online time or something, I don't know. Can't really make it annually lol. |
This was my initial attempt at making fake stocks.
Instead of having to wait t'ill the real stock market is open. PHP Code:
|
PHP Code:
clientr.stockcash -= -(price); See where I'm going? |
not only that but stocks are stupid
|
lol ^
|
All times are GMT +2. The time now is 08:38 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.