Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
skeen77
Novice


Joined: 25 Oct 2010
Posts: 31

PostPosted: Mon Dec 23, 2013 6:20 pm   

In-game Stock Market
 
The game I play has an in-game stock market. Now, I'm not a smart guy, but I thought there'd be a way to use CMUD to help me track highs and lows. Here's the input the game gives:

Code:
Current Stock Market Report:
 #    Sym    Desc                                   Current     % Change
____________________________________________________________
 1    OCP    Omni Consumer Products                    450      -0.221239
 2    Cyb    Cyberdyne Systems                          74      0.000000
 3    FCC    Freejack Construction Corp.               132      0.757576
 4    VEC    Virtual Entertainment Corp.                80      0.000000
 5    Met    METALTEK Ltd.                              72      0.000000
 6    Hyd    HydroAg Corp.                             560      0.178571
 7    PHA    PHARMAtek                                 392      -0.253807
 8    Tek    Tek Angeles Eco. Dev. Corp.               324      -0.306748
 9    Jur    Jurassic Park, Inc.                        29      3.448276
10    Ana    Anaconda Mining Corp.                     816      0.000000


Was wondering if someone had ideas for using this information, maybe nudge me in the right direction.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Dec 23, 2013 10:49 pm   
 
Use an actual sqlite3 database. I would keep a table for the above list, and I would keep separate tables for individual stock histories.

tblCurrent
column:stockid
column:symbol
column:desc
column:price
column:change

tbl(individual stock name)
column:dayid
column:date
column:price

You could incorporate your portfolio into these individual tables, so you'd want a Shares_bought and a Shares_sold field for any movement you did that day.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net