![]() |
Any Bored Programmers?
So I was looking around for a script kinda' like the debt clock but on a much smaller scale and after a few hours of looking finally came across a thread that got close to what I wanted.
Variables I'd like to have: Count up in cents and show that in the count Set how much (in dollars) it counts up every 24 hours (thinking around 5 or 6 bucks/day) Set starting amount (does this already) PHP Code:
|
Oh wow that would be pretty cool.
From what I see it already has those variables. you could make moneySavedPerSecond = 5.47 to something like 0.00003 such that it would show slower on the count over time. you could also insert the variables via PHP so that it might show information that pertains to the visitors input on a previous form. I will play with it:) |
Quote:
I'm bored if you have $50. |
If you are looking to invest a few bucks to have it fixed, hit me up, icq: 33375924
|
woj is good coder, he can do it
insert pic of rob shneider |
Here bro.
I took out all that stuff in the other script that actually did nothing and this is all you need. It adds 1 cent every second. PHP Code:
|
http://madspiders.com/testcounter.htm
It is right now set to add .00006944 dollars every second which is about $6.00 a day. Pretty boring though because it only clicks off a cent every 2.5 minutes. PHP Code:
|
I forgot you needed that to be set by time of day each time. :1orglaugh
Here is the script : Just set "dailyamount" to the dollar amount you want total for the day. I have it set to 500 dollars a day now in the script : Quote:
|
Wait!
Do you want the total to rollover to the next day? I didn't do that. Sorry. But that's enough for free. |
Rather than mess around with what you posted I wrote something that does what I think you're asking for. You can choose the amount per day and/or the start figure, and it increments in cents. And it's short (shorter than this post:upsidedow).
In the code below it's 1000 (or thereabouts) and 500 for the daily increase just to see it working, because $5/6 a day increases at a boring 1 cent every ~3 minutes. BTW the higher the daily figure the higher the start figure, because it's client side script. Everyone's computer clock is different and it needs a fixed base time to compare to, long enough ago to be in the past for the whole world, and the number will be different for everyone in the world. This isn't an issue with $5 a day, but with 500, as below, you might be wondering why it's so much over 1000. I must have misread your post because I thought you required commas. Rather than bloat it with another function I added a couple of lines for one comma, which is all you need for any number up to 999,999. If you start at $1000 and increase at $5 a day it will take about 550 years before that becomes an issue. I'll be happy to fix it if I'm around then. :winkwink: As for people asking for money for a few lines of jabbascript... are you shitting me? Hope it helps. Code:
<html> |
I'll take a look in the morning, bump this tomorrow to remind me.
|
All times are GMT -7. The time now is 04:26 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc