|
CircuitConcepts Newbie
Joined: 11 Dec 2005 Posts: 6
|
Posted: Wed Dec 14, 2005 5:39 pm
'Capturing' amount of something |
In Accursed-Lands the prompt is very basic, it's just a
Yes, the spaces are there. As you become more and more fatigued you get a | before it looking like:
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....... |
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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} |
|
|
|
CircuitConcepts Newbie
Joined: 11 Dec 2005 Posts: 6
|
Posted: 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? |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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. |
|
|
|
CircuitConcepts Newbie
Joined: 11 Dec 2005 Posts: 6
|
Posted: Wed Dec 14, 2005 6:37 pm |
of my avatar? I'm an AL newbie, what's an avatar?
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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 |
|
|
|
|
|