Page 1 of 1
Added stock market!
Posted: Wed Apr 07, 2004 11:48 pm
by Red Squirrel
The system is simple and straightfoward, check it out in the cybervillage and if you have any suggestions or questions post it here, check out the help file as well.
Archived topic from Iceteks, old topic ID:2230, old post ID:18783
Added stock market!
Posted: Thu Apr 08, 2004 9:16 am
by sintekk
So, how does the system work?
Archived topic from Iceteks, old topic ID:2230, old post ID:18789
Added stock market!
Posted: Thu Apr 08, 2004 2:17 pm
by Red Squirrel
Check the help file
http://www.iceteks.com/forums/cybervillage...php?topic=stock
Archived topic from Iceteks, old topic ID:2230, old post ID:18795
Added stock market!
Posted: Thu Apr 08, 2004 2:29 pm
by sintekk
It all makes sense now!
I hope the market pays off, I've invested in it big time
Archived topic from Iceteks, old topic ID:2230, old post ID:18796
Added stock market!
Posted: Thu Apr 08, 2004 2:53 pm
by Red Squirrel
The next stock update should happen soon. I might set it so it changes more often though. Right now it changes once per 20 hours or so (just pitched an aproximate number in seconds.
)
Archived topic from Iceteks, old topic ID:2230, old post ID:18797
Added stock market!
Posted: Fri Apr 09, 2004 9:39 am
by sintekk
w007! 349 -> 800! I'm Rich!
I now have a maxed out defense
Archived topic from Iceteks, old topic ID:2230, old post ID:18800
Added stock market!
Posted: Fri Apr 09, 2004 12:41 pm
by manadren_it
well I tripled my investment... I should've bought more
Well I'll just have to wait until it goes down again and then blow all my free cash on stocks
Archived topic from Iceteks, old topic ID:2230, old post ID:18802
Added stock market!
Posted: Fri Apr 09, 2004 2:48 pm
by Red Squirrel
Looks like were on a depression, they went down big time.
Archived topic from Iceteks, old topic ID:2230, old post ID:18807
Added stock market!
Posted: Fri Apr 09, 2004 4:12 pm
by manadren_it
Buy! Buy! Buy!
hmmm I think I might've went overboard on that stock purchase
Archived topic from Iceteks, old topic ID:2230, old post ID:18808
Added stock market!
Posted: Fri Apr 09, 2004 5:13 pm
by Red Squirrel
Notice the enron logo blended in the igloo for the stock market section.
Archived topic from Iceteks, old topic ID:2230, old post ID:18809
Added stock market!
Posted: Fri Apr 09, 2004 10:15 pm
by manadren_it
So does that mean that I can artificially increase the stock price through creative accounting?
Archived topic from Iceteks, old topic ID:2230, old post ID:18820
Added stock market!
Posted: Fri Apr 09, 2004 10:31 pm
by Red Squirrel
Not quite, but I happen to be the CEO so......
Nah for now this is the algorthm that is used for each update, it's very cheap but does the trick LOL:
Code: Select all
1: $stockprice = (rand(0,1000)+$stockprice)/1.6;
2: if(rand(0,4)=="3")$stockprice = $stockprice /rand(1,5);
3: $stockprice = round($stockprice);
[code]
$stockprice is the value loaded from the file at startup (the current price)
This algorthm is only run if a certain time interval has passed by, at that time, it rewrites it to file and it's the new price, otherwise it just skips the processing and sticks with the same price.
line 2 is to make a mini depression once in a while because without that the stock price slowly gos up more then it goes down. Line 3 is only to make sure it stays out of the decimals.
[color=#888888][size=85]Archived topic from Iceteks, old topic ID:2230, old post ID:18821[/size][/color]