[Work in Progress] Dark RP stock exchange! By:ImNotLoved

Hello everyone, This is my first lua project that I have ever attempted and I wanted to share it on the forums. It is a DarkRP stock addon.

What I have done: I currently have added a buy tab in it that displays however many stocks the owner of the mod wishes to add. I added a add spot in the code so that all you have to do is add the stocks name and ticker symbol and then the lua script send out a http request to the yahoo stock api and take the information and updates the stocks with it.

**What I need to do: ** I still need to finish the buying system so that it saves your stocks and deducts money which I think I will do today and I need to add a sell tab and a My Portfolio Tab.

Pictures:

http://cloud.steampowered.com/ugc/1117160031519257738/B2D64C1204291762607D3B6D4ED042324EA1A3EF/

Any feedback or suggestions are greatly appreciated.

Thanks,
ImNotLoved

A ticker with news about stocks would be cool.

Neat, although isn’t there some pish-posh over using brand identities like that? More on topic, is that information actually linked up or is it a placeholder?

Nice job so far.

Garrison thanks for the idea, I will think I might have to add that!

KillerLUA: All that information is legit it is being retrieved from a yahoo finance api and then I use a series of search functions to get the data out. You should add me on steam Killer, My steam name is ImNotLoved

By the way if anyone wants to check out the stock addon, It will be up on my server hopefully this weekend. My server is Undisclosed Gaming and the ip is 50.31.65.56:27015

Thanks,
ImNotLoved

Looks good

<3

This idea is amazing, haha! Investing in real life stocks with DarkRP money.

Real stock exchange with fake money! It’s brilliant! The investments are long-term, though, I guess. So you’ll have to keep track of players’ investments even when they’re not in the server :slight_smile:

I can’t wait.

Please don’t add too much DarkRP dependencies, would be nice to be able to expand this.

Lerpaderp: What gamemode were you planning on expanding this to?

[editline]5th February 2013[/editline]

Thank you very much Falco, I saw your tweet.

This is a great idea! Are there any plans to add SQL support? It would be great if people could view the prices of stocks and possibly buy/sell them on the communities website.

I would like to add SQL support but I don’t have any experience with SQL in lua and I can’t find much documentation on it. If you point me in the right direction I will add it in

I don’t know much about SQL In Gmod, but I know you can use this module http://www.facepunch.com/showthread.php?t=1220537 and it is used for most of the MySQL addons in gmod, and is very stable as far as I can tell from experience.

Alright thanks. I will add that And a maybe even a HTML stock trading page.

Thank you sir.

So wait, how does one actually make any money from this if it’s using real stocks?

Ahhhh no way, when I plan to implement this in AperBank as an original idea.
You beat me too it.

I really hope you don’t mind, if you have any problems with me using this idea please feel free to add me, we can sort something out and maybe possibly remove it.

Otherwise if you need any help scripting, please feel free to add me, I’m sure we can discuss and I’ll assist you

Haha, I just reread that and got the joke after I spent the time trying to explain the stock market lol.

imnotloved.

You say this, yet how well can you script? Can you make real time updates?

[editline]8th February 2013[/editline]

You rate the post? But do not reply?

Any chance of a reply…

Science: I added you on steam. I have no issue with you making your own stock market.
As far as real time updates. Yes. As soon as you load the script you get the newest data available from yahoo stock api. The only newer data is available at a monthly premium charge and that streams live stock market data and that is for real investors.

What do you mean by “You say this” What have I said. I said that I am working on this addon and because of my busy schedule with school and basketball I only really work on this addon on the weekends. As for my ability to code LUA, Yes I can do this addon and no I am not in over my head. I am just finishing up the buying stocks part. And If you were referring to my HTML and PHP knowledge I assure you that I can make a online stock Market Trading page for communities website using SQL PHP and HTML and of course some CSS to make it look pretty.

If you would like to bitch about anything or question my ability to code in computer languages, while LUA is the most recent one I learned I do know a few including a very good amount of Java. Message me on steam.

This is a definite add when it is finished. Amazing work

This is an extremely interesting project. If you want any help adding SQL support I find this project extremely interesting and would be glad to help. I find the potential of this project extremely interesting to provide players a way to make money without going to illegal methods!

LET DARKRP ENTER THE AGE OF CAPITALISM!

Really nice project