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
SethRizzen
Beginner


Joined: 07 Apr 2003
Posts: 15
Location: USA

PostPosted: Mon Apr 07, 2003 12:05 am   

zMUD Subsitution Question
 
I play mostly Godwars based muds, which have VERY high exp values.

How can i get zMUD to substitute my exp (shown on prompt) to have the correct commas...

For Examaple:
Original : <[123456789012345] [HP blah blah blah]>
After: <[123,456,789,012,345] [HP blah blah blah]>

I'm a little bit of a newbie, so a little explination would be nice too, as in how the heck you do these things...
Reply with quote
Wrudyn
Novice


Joined: 24 Mar 2003
Posts: 44
Location: USA

PostPosted: Mon Apr 07, 2003 12:59 am   
 
Look up the %format function. You will want a trigger that captures the experience, and replaces it with a formatted version.

#TRIG {~<~[(%d)~]} {#SUB {~<~[%format("&.0n", %1)~]}}

I tried that and it works, but it looks like there is floating-point rounding going on, so you will get a number close to your actual experience, but not exactly.
Reply with quote
SethRizzen
Beginner


Joined: 07 Apr 2003
Posts: 15
Location: USA

PostPosted: Mon Apr 07, 2003 11:13 pm   
 
Well, as soon as i put the post on, i figured it out...

#trigger {~<~[(%d)~] ~[} {#substitute {~<~[%format( "&0.0n", %1~] ~[}

It is exact.
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