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


Joined: 24 Dec 2002
Posts: 3

PostPosted: Tue Dec 24, 2002 6:37 am   

Capturing Experience and displaying it
 
Is there a way to capture your total ammount of Experience displayed from the mud, and then be about to echo this info to the mud? also how would the Experience ammount be updated?

JBHitman
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Dec 24, 2002 8:22 am   
 
Yes, this is done using triggers and variables. The exact trigger needed will vary, depending on where the information comes from (prompt, score, etc) and how the MUD displays it (100exp, Exp Pts: 100, 100 Experience, etc), as well as what other information is on the same line. A sample trigger would be:
#TR {(%d)exp} {#VAR experience %1}
Echoing it back to the MUD is fairly simple, just use the variable. If entered at the command line, use <> around the variable to force expansion.
say I have <@experience> experience.
The experience variable will be updated whenever the trigger fires. How that happens depends on what you are using to provide the trigger pattern.

LightBulb
Senior Member
Reply with quote
JBHitman
Newbie


Joined: 24 Dec 2002
Posts: 3

PostPosted: Tue Dec 24, 2002 5:16 pm   
 
I get my experice when i type "sc" or "score" the experience line is:

Experience: 272891

I think i almost figured it out myself, but i must be doing something wrong.. Thanks for your help.

Xarak
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Dec 24, 2002 6:42 pm   
 
In that case, the trigger would be:
#TR {Experience: (%d)} {#VAR experience %1}
It will update the variable whenever your score is displayed (when you type score).

NOTE: Spaces matter. If the trigger doesn't work, check the number of spaces between Experience: and the first digit of the number.

LightBulb
Senior Member
Reply with quote
JBHitman
Newbie


Joined: 24 Dec 2002
Posts: 3

PostPosted: Tue Dec 24, 2002 6:59 pm   
 
thanks alot, that helped my out alot!

Xarak
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