Mercurial > hg > batmud > ggrtf
changeset 1414:5cded81d0078
Add /chkbalance macro and 'cbalance' binding for only checking of balance would be doable.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 08 Aug 2011 00:54:33 +0300 |
parents | 0c36f09b074f |
children | 2839ed1a53ce |
files | ggrtf.tf |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ggrtf.tf Mon Aug 08 00:52:18 2011 +0300 +++ b/ggrtf.tf Mon Aug 08 00:54:33 2011 +0300 @@ -2598,7 +2598,22 @@ /msq Sleeves possibly not worn. If you are certain that they are, use @{BCwhite}@@@@balance@{n} to force action.%;\ /endif +;;@command /chkbalance +;;@desc Check and report the status of Alexia sleeve 'balance' without actually performing 'balance'. +/def -i chkbalance =\ + /if (gbalance_timeleft()==0)\ + /return%;\ + /endif%;\ + /let _diff=$[status_hp - status_sp]%;\ + /if (_diff < toy_sleeves_diff & _diff > toy_sleeves_min)\ + /msq @{BCgreen}HP - SP diff = %{_diff}, OK TO BALANCE ...@{n}%;\ + /else \ + /msq @{BCred}HP - SP diff > %{toy_sleeves_diff} (%{_diff}), balance not favorable!@{n}%;\ + /endif + + /prdefgbind -s"balance" -c"/balance" +/prdefgbind -s"cbalance" -c"/chkbalance" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Global script initialization