Tables and Scoring

I noticed in the manual that there is a special Table of Rankings that has some special automatic rules, ie

Table of Rankings
Score Rank
0 “novice”
10 “initiate”
20 “veteran”
etc.

And basically the Score can be any value and the Table automatically selects the appropriate corresponding rank.

Is there any way to nab this functionality to use with other Tables - for example a table of Health which would take a few key values (eg 0, 50 and 100) and then return a string description for whatever the player’s health happened to be (ie, any number between 0 and 100).

Has anyone done this, and if so, how?

Something like this:

[code]Table of Health
min message
0 “dying”
10 “barely conscious”
25 “in bad health”
50 “somewhat healthy”
75 “in good health”
100 “in perfect health”

A person has a number called healthiness. The healthiness of a person is usually 100.

When play begins:
sort the Table of Health in reverse min order;

To say the health of (p - a person):
let mentioned be 0;
repeat through the Table of Health
begin;
if mentioned is 0 and the healthiness of p is at least the min entry
begin;
now mentioned is 1;
say “[message entry]”;
end if;
end repeat;
if mentioned is 0, say “in unknown health”.

Understand “health” as healthing. Healthing is an action out-of-world.

Report healthing:
say “Your are [health of the player].”.
[/code]

(Note, this is untested code, as I’m currently on a machine without I7)

You’re really really cool, thank you very much.