HP line evaluation

Jim Sanders <[email protected]>
Newsgroups gmane.comp.games.mud.client.lyntin
Message-ID <[email protected]>
Sorry if this is posted in the wrong place, and I'm sure this is a
stupid question, but what's the best way to do an evaluation of an
hpbar?  As a brief example:

HP[100/100] SP[100/100]

There are actually several more entries including some that include
dotted decimal notation with a % sign inside brackets
[100.00/100.00%].  What I want to do is evaluate each entry and as an
example, if hp is less than maxhp (in this case, say HP [90/100]),
evaluate another entry on the line and if its more than say 50.00%, do
some command.  Then, if that other entry falls below 50.00%, do
another command.

I'm pretty new at lyntin and at python, so the only way I can think of
to do this is to do an action with like:

HP[%1/%2] SP[%3/%4]

However, this would drag it out to 10+ variables and just make things
ugly trying to put all the if statements and such on one line.  Also,
I'm guessing it might hurt performance as well.  I'm wondering if
someone could point me in the right direction to get this to work. 
Not looking for exact command lines, just the best way to approach it.
 I figure this will be a good learning experience, but not sure where
to start.

Thanks for any help,

Jim


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.