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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
sliljehorn
Newbie


Joined: 02 Nov 2005
Posts: 1

PostPosted: Wed Nov 02, 2005 10:49 am   

Calculating issue
 
I'm having some problems trying to calculate number of succeeded/failed skills in %

Everything is working except where the % is calculated.

|;#if (@stab.double) {#show |..Double Backstab...|%repeat(".",4-%len(@stab.double))[@stab.double](%repeat(".",2-%len([100*@stab.double/@stab.total]))[100*@stab.double/@stab.total]%)|%repeat(".",6-%len(@stabt.double))[@stabt.double](%repeat(".",2-%len([100*@stabt.double/@stabt.total]))[100*@stabt.double/@stabt.total]%)|}

This is what it looks like.


,-(Backstab Stats)----(Session)---(Total)--
|Total Backstabs.....|........[2]|..........[2]|
|..Double Backstab...|...[1]([100*1/2]%)|.....[1]([100*1/2]%)|
|Backstab Stuns......|...[1]([100*1/2]%)|.....[1]([100*1/2]%)|

,-(Thrust Stats)------(Session)---(Total)--.
|Total Thrusts.......|........[2]|..........[2]|
|..Double Thrust.....|...[1]([100*1/2]%)|.....[1]([100*1/2]%)|

Worth mentioning is that there are several ways of executing a succeeding backstab, which are included in the trigger but not shown here, if necessary I can add them.

So my question is, how can I get the % instead of ([100*1/2]%)?

This worked last week, before I changed my hard drive.
Last time I uppdated, this time I downloaded 7.21 directly.

Hope someone can help, it'd be appreciated!

/Sam
Reply with quote
OmegaDeus
Apprentice


Joined: 14 Sep 2005
Posts: 121

PostPosted: Wed Nov 02, 2005 3:39 pm   
 
[%eval(100*@var.double/@var.total)]

that should do the trick nicely
_________________


Look at me I've got zSKILLS
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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