QUOTE (Caelan @ Jan 14 2009, 08:26 AM)

TREVIZE:
CODE
#CLASS {Prompt_Tracking}
#ALIAS track_prompt {#if (%1=%null) {#if (@hmtrack) {hmtrack=0;#say %ansi( 7)Tracking off.} {hmtrack=1;#say %ansi( 7)Tracking on.}} {#if ("%1"="on") {#if (@hmtrack=1) {#say %ansi( 7)Tracking is already on.} {hmtrack=1;#say %ansi( 7)Tracking on.}} {#if ("%1"="off") {#if (@hmtrack=0) {#say %ansi( 7)Tracking is already off.} {hmtrack=0;#say %ansi( 7)Tracking off.}} {~track %1}}}}
#VAR hmtrack {0} {0}
#VAR pval {}
#ADDKEY pval healthcheck {}
#ADDKEY pval manacheck {}
#REGEX "hmewtrack" {^(\d+)h, (\d+)m, \d+e, \d+w [exbkdc@]*\-$} {#if (@hmtrack=1) {#if (@pval.healthcheck!=%1 OR @pval.manacheck!=%2) {#sayp %ansi( 7)~[;#if (@pval.healthcheck!=%1) {#sayp %ansi( %if( %1<@pval.healthcheck, 12, 10))%if( @pval.healthcheck<%1, +)%eval( %1-@pval.healthcheck)h};#if (@pval.healthcheck!=%1 AND @pval.manacheck!=%2) {#sayp " "};#if (@pval.manacheck!=%2) {#sayp %ansi( %if( %2<@pval.manacheck, 12, 10))%if( @pval.manacheck<%2, +)%eval( %2-@pval.manacheck)m};#sayp %ansi( 7)~]}};pval.healthcheck=%1;pval.manacheck=%2} "" {nocr|prompt}
#CLASS 0
That is useful. But it's not an autosipper.

It displays the difference between your last and current health and mana.
Off the top of my head, here's an overly simple autosipper. If you use it and it doesn't work, let me know and I'll try and fix it up. Sips at 2k on health or mana, easily changed by editing sipath and sipatm.
CODE
#var sipatm {2000}
#var sipath {2000}
#var sipbal {1} {1}
#var sipping {0} {0}
#regex {^(\d+)h, (\d+)m} {#if (@sipping=0 & @sipbal=1) {
#if (%1<sipath) {sipping=1;sip health} {#if (%2<sipatm) {sipping=1;sip mana}}
}} "" {nocr|prompt}
#regex {^(?:Your mind feels stronger and more alert|The elixir heals and soothes you)\.$} {sipbal=0;sipping=1}
#regex {^You may drink another health or mana elixir\.$} {sipbal=1;sipping=0}