|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Mon Mar 26, 2007 8:24 pm
Inquiring minds need to know the solution... |
Here's a sample output.
Code: |
Mob Deaths : 979,675 361,901,151
|
Now I need to know how many Mob Deaths will reach the next million (in this case, it would be 362,000,000). But then after that would be 363,000,000. I know I could put a variable in for what the next million would be and use a math function that way, but I'd rather do it through zMUD if it is capable of doing so. Anyone have a solution? Or am I just stuck with #var nextmillion 362000000? Thanks.
Charneus |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Mar 26, 2007 9:03 pm |
Using a plain divide will always round down, so you can just do something like this:
#trig {Mob Deaths%s:%s%n%s(%n)} {#var DeathsToNext %eval((((%1/1000000)+1)*1000000)-%1)}
There're probably tidier ways to do it, but it's a starting point. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Mar 26, 2007 10:07 pm |
#trig {Mob Deaths%s:%s%n%s(%n)} {#var DeathsToNext %eval(1000000-%rightback(%1,6))}
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|