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


Joined: 11 Dec 2005
Posts: 6

PostPosted: Wed Dec 14, 2005 5:39 pm   

'Capturing' amount of something
 
In Accursed-Lands the prompt is very basic, it's just a

Quote:
>


Yes, the spaces are there. As you become more and more fatigued you get a | before it looking like:

Quote:
||| >


How would I go about capturing how many |'s there are so I can record how fatigued I am. The ebst I can come up with, which isn't going to work well if at all it seems, is:

Code:
#TRIGGER {(*) ~ >~ $} {#var fatigue %1; testfatigue %1}
#ALIAS {testfatigue} {#if(%numparam = 1) {#var faitugelevel 1} {#if (%numparam = 2) {#var fatiguelevel 2) {#if.......
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 14, 2005 6:05 pm   
 
I think AL's prompt is a prompt and not a newline. Unless they've changed something watchout for stacking prompts.
ie: || > || > ||| >

I just captured the length of the bars.
#TRIGGER {^(*) ~>} {#SUB {%len("%1") >};#VAR fatigue %len("%1")} "" {nocr|prompt}
Reply with quote
CircuitConcepts
Newbie


Joined: 11 Dec 2005
Posts: 6

PostPosted: Wed Dec 14, 2005 6:19 pm   
 
That's very clever, I didn't even know about %len, gracias!

While we're at it, are there any hidden values in AL that I can uncover, such as my health without having to do HEALTH or PHEALTH?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 14, 2005 6:25 pm   
 
Probably the best way would be to use HEALTH as the exact status of your avatar.

Then you can use a bunch of triggers that show the effects of various IC things and combat damage to guestimate.
Reply with quote
CircuitConcepts
Newbie


Joined: 11 Dec 2005
Posts: 6

PostPosted: Wed Dec 14, 2005 6:37 pm   
 
of my avatar? I'm an AL newbie, what's an avatar?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 14, 2005 10:02 pm   
 
Was thinking about it and probably want to have a more restricted prompt check. I'm not sure if there are any other > around which could throw off your trigger.

#TRIGGER {^([|]) > } {#SH F:%len( %1);#VAR fatigue %len( %1)} "" {nocr|prompt}
#TRIGGER {^ > } {#SH F:0;#VAR fatigue 0} "" {nocr|prompt}

avatar = character = personage
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