Mercurial > hg > batmud > ggrtf
changeset 547:705805fb8a41
Code cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 30 Oct 2006 02:53:57 +0000 |
parents | 2991678d1a9a |
children | 9743c0dca34b |
files | ggrtf.tf |
diffstat | 1 files changed, 10 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/ggrtf.tf Mon Oct 30 02:51:13 2006 +0000 +++ b/ggrtf.tf Mon Oct 30 02:53:57 2006 +0000 @@ -1,8 +1,8 @@ ;; -;; GgrTF v0.6.1.11-svn - TinyFugue script for BatMUD +;; GgrTF v0.6.1.12-svn - TinyFugue script for BatMUD ;; (C) Copyright 2004-2006 Matti Hämäläinen (Ggr Pupunen) ;; -/set ggrtf_ver=0.6.1.11-svn +/set ggrtf_ver=0.6.1.12-svn ;; ;; This triggerset is Free Software distributed under ;; GNU General Public License version 2. @@ -143,13 +143,13 @@ /endif -;; Return string describing time elapsed from given timestamp parameter +;; Return string describing timestamp in "[[??h]??m]??s" format /def -i prgettime =\ /if ({1} > 0)\ /let _jtime=$[trunc({1})]%;\ /let _jtimeh=$[_jtime/3600]%;\ /let _jtimeq=$[mod(_jtime,3600)]%;\ - /if (_jtimeh >= 1)\ + /if (_jtimeh > 0)\ /let _jstr=%{_jtimeh}h%;\ /else \ /let _jstr=%;\ @@ -161,21 +161,10 @@ /endif +;; Return string describing time elapsed from given timestamp parameter /def -i prgetstime =\ - /if ({1} > 0)\ - /let _jtime=$[trunc(time()-{1})]%;\ - /let _jtimeh=$[_jtime/3600]%;\ - /let _jtimeq=$[mod(_jtime,3600)]%;\ - /if (_jtimeh > 0)\ - /let _jstr=[%{_jtimeh}h%;\ - /else \ - /let _jstr=[%;\ - /endif%;\ - /let _jstr=%{_jstr}$[_jtimeq/60]m$[mod(_jtimeq,60)]s]%;\ - /return _jstr%;\ - /else \ - /return ""%;\ - /endif + /let _tmps=$[prgettime(time()-{1})]%;\ + /if (_tmps!~"") /return "[%{_tmps}]"%;/else /return ""%;/endif ;; Return a color definition based on [n, nmax] (useful for hp/sp/ep lites) @@ -578,7 +567,7 @@ ;; Report current statistics ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /def -i stats =\ -/let _qs0=Gathered since: $[ftime(fmt_date,cnt_date)] ($[prgetstime(cnt_date)])%;\ +/let _qs0=Gathered since: $[ftime(fmt_date,cnt_date)]%;\ /let _qs1=%{cnt_casts} casts, %{cnt_scasts} succ, %{cnt_fcasts} fail, %{cnt_icasts} intr, %{cnt_fucasts} fumbled.%;\ /let _qs2=%{cnt_hastes} hastes, %{cnt_ghastes} ghastes, %{cnt_trounds} total rounds.%;\ /let _qs3=%{cnt_damcrits} total, %{cnt_dcrit1} lvl#1, %{cnt_dcrit2} lvl#2, %{cnt_dcrit3} lvl#3, %{cnt_dcrit4} lvl#4%;\ @@ -1170,6 +1159,7 @@ ;/prdefprot -i"pbsf" -n"PbSf" -l"Protection by Sacrifice" -A" kneels before you and whispers \'With my life I\'ll protect yours\'.$" -r -u"^(She|He|It) stands up with a solemn look on her face.$" +;/prdefprot -i"lol" -n"LoL" -l"Lift of Load" -u"You feel odd. Not stronger, but..." -d"" ;; ---- Spider ---- /prdefprot -i"sptouch" -n"STouch" -l"Spider Touch" -u"Suddenly you don\'t feel too good. Your blood feels like it is on fire." -d"Your blood does not burn anymore." @@ -1186,6 +1176,7 @@ ;; ---- Tarmalen ---- /prdefprot -i"unpain" -n"Unp" -l"Unpain" -h -r -u"^You feel your will getting stronger.$" -d"^(You feel your will returning normal.|Your Unpain spell dissipates|You feel your will getting normal.|You suffer an acute health change)" +; FIXME /prdefprot -i"bot" -n"BoT" -l"Blessing of Tarmalen" -u"You feel strong - like you could carry whole flat world on your back!" -d"You feel weaker." /prdefprot -i"lifelnk" -n"LifeLnk" -l"Life Link" -r -u"^You (succeed. You create a link to [A-Z][a-z]+\.|feel somehow linked to [A-Z][a-z]+!)$" -d"^You hear a loud snap like sound!$" /prdefprot -i"evital" -n"EV" -l"Enhanced Vitality" -A"\'zoot zoot zoot\'" -r -u"^A bright light extracts from (your|.+\'s) hands covering your skin.$" -d"^Your skin stops glowing.$"