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


Joined: 22 Feb 2002
Posts: 25
Location: USA

PostPosted: Sun Mar 10, 2002 6:16 am   

cant get it to disply the minutes right
 
say I Have gotten a total of @xpgtotal XP, in @time Minutes.

it always comes up with 0 mins. help

CHRIS ONDROVIC
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun Mar 10, 2002 6:24 am   
 
Chris,

Where do you set the variable time? You get that from a trigger?
Do you set that in an alias?

Sounds like where ever you catch that isn't
working.

//

My guess at what you want to do:

#ALIAS start {#VAR time %ctime}
#ALIAS stop {#VAR time [(%ctime-@time)/60];say [@time] minutes}


TonDiening
Beta Upgrading to 6.26
Reply with quote
ondrovic
Beginner


Joined: 22 Feb 2002
Posts: 25
Location: USA

PostPosted: Sun Mar 10, 2002 6:40 am   
 
#var exp { };#var xpstart {};#var exp1 {%replace(@exp1,",",g)};#var xpstart1 {%replace(@xpstart1,",",g)};#Math Looptimes1 {%numwords(@exp1,g)};#Math Looptimes2 {%numwords(@xpstart1,g)};#loop {1,@Looptimes1} {#var exp {@exp%word(@exp1,%i,g)}};#loop {1,@Looptimes2} {#var xpstart {@xpstart%word(@xpstart1,%i,g)}};#var exp {%trim(@exp)};#var xpstart {%trim(@xpstart)};xptotal=[@exp-@xpstart];xprate=[@xptotal/@time];xphour=[@xprate*60];#if {%len(@xptotal) < 5} {#var xpgtotal {@xptotal}};#if {%len(@xptotal) = 5} {#var xpgtotal {%copy(@xptotal,1,2),%copy(@xptotal,3,3)}};#if {%len(@xptotal) = 6} {#var xpgtotal {%copy(@xptotal,1,3),%copy(@xptotal,4,3)}};#if {%len(@xptotal) = 7} {#var xpgtotal {%copy(@xptotal,1,1),%copy(@xptotal,2,3),%copy(@xptotal,5,3)}};#if {%len(@xptotal) = 8} {#var xpgtotal {%copy(@xptotal,1,2),%copy(@xptotal,3,3),%copy(@xptotal,6,3)}};#if {%len(@xptotal) = 9} {#var xpgtotal {%copy(@xptotal,1,3),%copy(@xptotal,4,3),%copy(@xptotal,7,3)}};#if {%len(@xptotal) = 10} {#var xpgtotal {%copy(@xptotal,1,1),%copy(@xptotal,2,3),%copy(@xptotal,5,3),%copy(@xptotal,8,3}};#if {%len(@xprate) < 5} {#var xpgrate {@xprate}};#if {%len(@xprate) = 5} {#var xpgrate {%copy(@xprate,1,2),%copy(@xprate,3,3)}};#if {%len(@xprate) = 6} {#var xpgrate {%copy(@xprate,1,3),%copy(@xprate,4,3)}};#if {%len(@xprate) = 7} {#var xpgrate {%copy(@xprate,1,1),%copy(@xprate,2,3),%copy(@xprate,5,3)}};#if {%len(@xprate) = 8} {#var xpgrate {%copy(@xprate,1,2),%copy(@xprate,3,3),%copy(@xprate,6,3)}};#if {%len(@xprate) = 9} {#var xpgrate {%copy(@xprate,1,3),%copy(@xprate,4,3),%copy(@xprate,7,3)}};#if {%len(@xprate) = 10} {#var xpgrate {%copy(@xprate,1,1),%copy(@xprate,2,3),%copy(@xprate,5,3),%copy(@xprate,8,3}};#if {%len(@xphour) < 5} {#var xpghour {@xphour}};#if {%len(@xphour) = 5} {#var xpghour {%copy(@xphour,1,2),%copy(@xphour,3,3)}};#if {%len(@xphour) = 6} {#var xpghour {%copy(@xphour,1,3),%copy(@xphour,4,3)}};#if {%len(@xphour) = 7} {#var xpghour {%copy(@xphour,1,1),%copy(@xphour,2,3),%copy(@xphour,5,3)}};#if {%len(@xphour) = 8} {#var xpghour {%copy(@xphour,1,2),%copy(@xphour,3,3),%copy(@xphour,6,3)}};#if {%len(@xphour) = 9} {#var xpghour {%copy(@xphour,1,3),%copy(@xphour,4,3),%copy(@xphour,7,3)}};#if {%len(@xphour) = 10} {#var xpghour {%copy(@xphour,1,1),%copy(@xphour,2,3),%copy(@xphour,5,3),%copy(@xphour,8,3}};say I Have gotten a total of @xpgtotal XP, in @time Minutes.

here is the whole script for the xprate

CHRIS ONDROVIC
Reply with quote
ondrovic
Beginner


Joined: 22 Feb 2002
Posts: 25
Location: USA

PostPosted: Sun Mar 10, 2002 7:16 am   
 
seems to work now after i inserted those alias thanks for your help i would be lost without you all

CHRIS ONDROVIC
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