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
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Sun Nov 24, 2002 1:08 am   

on the contrary..using decimals in v 6.16
 
i spoke with some people on my mud and we made a system to give us an RQE percentage using decimals (for zmud 6.16)

#CLASS {RQE}
#VAR rqerate {@perc( @rqesolved, @rqe)}
#VAR perc {%concat( %eval( %1*100/%2), ".", %mod( %1*1000000/%2, 10000), "%")}
#TRIGGER {You finished (%d) random quests, failed (%d) and abandoned (%d) of them.} {#VARIABLE rqesolved %1;#VARIABLE rqe %eval( %1+%2+%3);#SAY Your RQE Completion Rate is @rqerate}
#CLASS 0

For some reason you can't copy paste it in, and the values for 'perm' and 'rqerate' need to be manually typed in.

But it gives me the RQE percentage

You finished 1102 random quests, failed 57 and abandoned 44 of them.
Your RQE Completion Rate is 91.6043%

pretty darn well :)

So i guess it is possible to get some decimals going within version 6.16

Majere
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Nov 24, 2002 4:41 am   
 
quote:

i spoke with some people on my mud and we made a system to give us an RQE percentage using decimals (for zmud 6.16)

#CLASS {RQE}
#VAR rqerate {@perc( @rqesolved, @rqe)}
#VAR perc {%concat( %eval( %1*100/%2), ".", %mod( %1*1000000/%2, 10000), "%")}
#TRIGGER {You finished (%d) random quests, failed (%d) and abandoned (%d) of them.} {#VARIABLE rqesolved %1;#VARIABLE rqe %eval( %1+%2+%3);#SAY Your RQE Completion Rate is @rqerate}
#CLASS 0

For some reason you can't copy paste it in, and the values for 'perm' and 'rqerate' need to be manually typed in.

But it gives me the RQE percentage

You finished 1102 random quests, failed 57 and abandoned 44 of them.
Your RQE Completion Rate is 91.6043%

pretty darn well :)

So i guess it is possible to get some decimals going within version 6.16

Majere


We never said you couldn't manually create floating-point numbers. All we said was that you cannot generate nor use them in mathematical/numeric functions.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Chuckiesrealm
Newbie


Joined: 05 Dec 2002
Posts: 4
Location: USA

PostPosted: Thu Dec 05, 2002 5:17 pm   
 
About my triggers:
@perc was screwed up a bit fix is
#VAR {%insert( ".", %eval( %1*100000/%2), 3)}
or just plug @perc(@v1, @v2) and bam you have a nice pretty print form of a decimal value. It's handy for those people who love percentages. Enjoy
-Chuckie
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