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
karis
Newbie


Joined: 11 Oct 2004
Posts: 3

PostPosted: Mon Oct 11, 2004 4:46 am   

#math
 
I am still a beginner when it comes to the more advanced aspects of #math and could really use some help.

I would like to set up something along the lines of

#action {You receive your reward for the kill, %1 experience points.}

#math {EXP} {$$EXP+$$1}

#alias {xyz} {gt I have received # of exp TOTAL this run}
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Mon Oct 11, 2004 5:41 am   
 
Not sure what the gt is in the xyz alias but ill pretend you want to display it to the screen.

Code:


#TRIGGER {You recieve your reward for the kill, (%n) experience points.} {#math EXP {@EXP + %1}}
#ALIAS {xyz} {#SHOW I have recieved @EXP of esp total this run}



Cheers
_________________
I love deadlines. I like the whooshing sound they make as they fly by.
Reply with quote
karis
Newbie


Joined: 11 Oct 2004
Posts: 3

PostPosted: Mon Oct 11, 2004 6:21 am   thanks
 
I finally got it though.

It didn't like it very much when I was using %d.

#trigger {^You receive your reward for the kill, %1 experience points.} {#add %1 exp}

#alias {xp} {gt I've gained @exp experience points}
#var exp
#alias {rc} {#var exp 0;gt Exp counter reset}


Thanks. Looks like yours might work too.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon Oct 11, 2004 12:29 pm   
 
%1 in the pattern is undocumented for a reason.

%d will match 1234567
%n will match 124,567
%n will match -123,567
_________________
Zmud Support Library
Zmud Knowledge Base
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