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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
potnoodle
Newbie


Joined: 12 Feb 2008
Posts: 5

PostPosted: Sun Mar 15, 2009 4:30 pm   

Need Minutes
 
So I'm stuck with this. I don't get the idea how I can change time to minutes from this line.

<f> 17:55:11 ( 1h 31m 38s) EXP: 0, 0 xp/min, 0 xp/min/mbr
So that 1h 31m 38s is time what I want change.

If there is some helpful people around and can give me some advice. I'll thankful all kind advices.

PotNoodle
Reply with quote
potnoodle
Newbie


Joined: 12 Feb 2008
Posts: 5

PostPosted: Sun Mar 15, 2009 4:41 pm   
 
And when that time is under 1h it only give something like ( 39m 3s)
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Mar 15, 2009 5:00 pm   
 
#TRIGGER {~<f~> %d:%d:%d ~( ((%d)h (%d)m (%d)s)~) EXP: %d, %d xp/min, %d xp/min/mbr} {#PSUB %concat(%eval((%2*60)+%3),"m ",%4,"s") %x1}

That should be what you're looking for. Of course, since you only gave me that one line, I can only assume the <f> is constant, and word remains constant.

Charneus
Reply with quote
potnoodle
Newbie


Joined: 12 Feb 2008
Posts: 5

PostPosted: Sun Mar 15, 2009 6:40 pm   
 
That f isn't constant. and is there way to throw that eval result to variable?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Mar 15, 2009 8:08 pm   
 
If the f is always a letter, change the <f> to <%w> instead. Otherwise, use <*>.

Yes, you can throw the eval into a variable. Just take everything from the %eval to the +%3) and do something like:

Minutesvar=%eval((%2*60)+%3)

You haven't been exactly precise in what you wanted...

Charneus
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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