|
SCORNME Novice
Joined: 25 Jul 2004 Posts: 48 Location: aka Falan
|
Posted: Tue Aug 03, 2004 2:28 pm
#math problem? |
Mud Prompt
H:1149 S:420 E:253 []697927 26842433 57567->
Trigger
on prompt
Code: |
Pattern: ~[*~](%d)%s(%d)%s(%d)
Value: totgold=%1
nxp=%2
cxp=%3
#math nxpp 100*@nxp/(@nxp+@cxp)
#psub "" %x1
#psub "" %x2
#psub "" %x3 |
Result
H:1149 S:420 E:253 [] ->
totgold=697927
nxp=26842433
cxp=57567
Status Bar
Gold: @totgold Lvl: @{nxpp}%
No problems with any of that EXCEPT when I gain a level. Then the "Lvl : @{nxpp}%" in the Status Bar shows a negative number (e.g. -59%).
The number will get smaller for ~10-20 more % pts (e.g. -59%, -60%, -61%, etc) and then decide to become a positive number (i.e. drop the negative sign) and continue to get smaller (e.g. +61%, +60%, +59%, etc).
The example prompt is current as of this posting. I verified @cxp and @nxp are accurate. The @nxpp value should be 0 (0.214) but is -59.
This isn't a problem really, since the value eventually autocorrects itself. But it didn't do this at lower levels (i.e. smaller numbers) I'm just curious why zMUD does this with the larger numbers.
Thanks. |
|
|
|
SCORNME Novice
Joined: 25 Jul 2004 Posts: 48 Location: aka Falan
|
Posted: Tue Aug 03, 2004 2:49 pm |
I just watched it go from -59% to -77%, then become a positive 77% and is now down to 74%.
|
|
|
|
SCORNME Novice
Joined: 25 Jul 2004 Posts: 48 Location: aka Falan
|
|
|
|
|
|
|
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
|
|