Mercurial > hg > batmud > ggrtf
changeset 355:32c884e80dd3
v0.5.10.11: Aura string length was miscalculated for status line,
caused problems in terminal handling, fixed; Added two psionicist
prots, courtesy of Jutom; Experimental date saving, which may get
removed soon anyway; Local variable namespace cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 23 Mar 2006 17:12:22 +0000 |
parents | aef103a9ad22 |
children | b1b476305c6e |
files | ggrtf-magical.tf ggrtf.tf |
diffstat | 2 files changed, 38 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/ggrtf-magical.tf Fri Mar 17 02:00:34 2006 +0000 +++ b/ggrtf-magical.tf Thu Mar 23 17:12:22 2006 +0000 @@ -13,16 +13,14 @@ ;; Initialization and options ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /prdeftoggle -n"rmagic" -d"General magic reporting spam" -/prdeftoggle -n"rspells" -d"Report magic spells" /prdeftoggle -n"rresist" -d"Report blast resists" -/prdefvar -n"rmagic_cmd" -v"@@emote" -c"Command/macro used for general magic reporting spam" -/prdefvar -n"rresist_cmd" -v"/msr" -c"Command/macro used for reporting blast resists" -/prdefvar -n"rspells_cmd" -v"/msr" -c"Command/macro used for spell reporting" +/prdefvar -n"cmd_rmagic" -v"@@emote" -c"Command/macro used for general magic reporting spam" +/prdefvar -n"cmd_rresist" -v"/msr" -c"Command/macro used for reporting blast resists" /eval /def -i mremote = /mse %%* -/eval /def -i mrmagic = /if (opt_rmagic=~"on") %{rmagic_cmd} %%*%%;/endif -/eval /def -i mrresist = /if (opt_rresist=~"on") %{rresist_cmd} %%*%%;/endif +/eval /def -i mrmagic = /if (opt_rmagic=~"on") %{cmd_rmagic} %%*%%;/endif +/eval /def -i mrresist = /if (opt_rresist=~"on") %{cmd_rresist} %%*%%;/endif /eval /def -i mrrounds =\ /if (opt_rrounds=~"on")\ /if (cast_info_t!~"")\
--- a/ggrtf.tf Fri Mar 17 02:00:34 2006 +0000 +++ b/ggrtf.tf Thu Mar 23 17:12:22 2006 +0000 @@ -1,8 +1,8 @@ ;; -;; GgrTF v0.5.10.10-svn - TinyFugue script for BatMUD +;; GgrTF v0.5.10.11-svn - TinyFugue script for BatMUD ;; (C) Copyright 2004-2006 Matti Hämäläinen (Ggr Pupunen) ;; -/set ggrtf_ver=0.5.10.10-svn +/set ggrtf_ver=0.5.10.11-svn ;; ;; This triggerset is Free Software distributed under ;; GNU General Public License version 2. @@ -27,6 +27,7 @@ /set status_pad=_ /def -i greset =\ + /prdefivar cnt_date $[time()]%;\ /prdefivar cnt_casts 0%;\ /prdefivar cnt_scasts 0%;\ /prdefivar cnt_icasts 0%;\ @@ -53,6 +54,7 @@ /def -i prinitialize =\ + /prdefvar -n"fmt_date" -v"%%%c" -c"ftime() formatting string used for dates"%;\ /set battle_target=%;\ /set battle_st=0%;\ /set spell_st=off%;\ @@ -94,6 +96,7 @@ /def msr = /if (opt_verbose=~"on") @@party report %*%;/else /msq %*%;/endif /def msp = /if (opt_verbose=~"on") @@party say %*%;/else /msq %*%;/endif /def mse = /if (opt_verbose=~"on") @@party say emote %*%;/else /msq %*%;/endif +/def msb = @party report %* /def dig_grave = @dig grave /def eat_corpse = @get corpse;@eat corpse @@ -407,7 +410,7 @@ ;; Save a header string /def -i gsave_header =\ /gsave_separator%;\ - /let _ss=;; GgrTF v%{ggrtf_ver} %{1}-INIT savefile ($[ftime("%d %b %Y",time())])%;\ + /let _ss=;; GgrTF v%{ggrtf_ver} %{1}-INIT savefile ($[ftime(fmt_date)])%;\ /if (tfwrite(gsave_file,_ss) < 0)\ /gerror Error writing to file '@{Cyellow}%{gsave_filename}@{n}'!%;\ /return%;\ @@ -504,7 +507,7 @@ @use %{_qs}%;\ /else \ /eval /def -i -h"SEND {%{bind_prefix}%{opt_s}}*" bind_%{opt_s} =\ - /msr %{_qw}%%%;@use %{_qs}%;\ + /msb %{_qw}%%%;@use %{_qs}%;\ /endif @@ -530,7 +533,7 @@ @cast %{_qs}%;\ /else \ /eval /def -i -h"SEND {%{bind_prefix}%{opt_s}}*" bind_%{opt_s} =\ - /msr %{_qw}%%%;@cast %{_qs}%;\ + /msb %{_qw}%%%;@cast %{_qs}%;\ /endif @@ -564,24 +567,26 @@ ;; Report current statistics ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /def -i stats =\ -/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%;\ -/let qs4=%{cnt_skills} skills, %{cnt_sskills} succ, %{cnt_fskills} fail, %{cnt_iskills} intr, %{cnt_fuskills} fumbled.%;\ -/let qs5=$[prgettime(cnt_ctime)] ($[prround(cnt_ctime,2)]s) total, $[prstdiv(cnt_ctime,cnt_trounds)]s/rnd, $[prstdiv(cnt_ctime,cnt_scasts)]s/cast%;\ -/let qs6=$[prgettime(cnt_sktime)] ($[prround(cnt_sktime,2)]s) total, $[prstdiv(cnt_sktime,cnt_sskills)]s/skill%;\ +/let _qs0=Gathered since: $[ftime(fmt_date,cnt_date)] ($[prgetstime(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%;\ +/let _qs4=%{cnt_skills} skills, %{cnt_sskills} succ, %{cnt_fskills} fail, %{cnt_iskills} intr, %{cnt_fuskills} fumbled.%;\ +/let _qs5=$[prgettime(cnt_ctime)] ($[prround(cnt_ctime,2)]s) total, $[prstdiv(cnt_ctime,cnt_trounds)]s/rnd, $[prstdiv(cnt_ctime,cnt_scasts)]s/cast%;\ +/let _qs6=$[prgettime(cnt_sktime)] ($[prround(cnt_sktime,2)]s) total, $[prstdiv(cnt_sktime,cnt_sskills)]s/skill%;\ /msw ,------------------.%;\ /msw | @{BCgreen}GgrTF@{n} @{Cyellow}Statistics@{n} |%;\ /msw +------------------+-------------------------------------------------.%;\ -/msw | Spells........: $[pad(qs1,-50)] |%;\ -/msw | Skills........: $[pad(qs4,-50)] |%;\ -/msw | Cast rounds...: $[pad(qs2,-50)] |%;\ -/msw | Cast time.....: $[pad(qs5,-50)] |%;\ -/msw | Skill time....: $[pad(qs6,-50)] |%;\ -/msw | Damcrits......: $[pad(qs3,-50)] |%;\ +/msw | $[pad(_qs0,-66)] |%;\ +/msw | Spells........: $[pad(_qs1,-50)] |%;\ +/msw | Skills........: $[pad(_qs4,-50)] |%;\ +/msw | Cast rounds...: $[pad(_qs2,-50)] |%;\ +/msw | Cast time.....: $[pad(_qs5,-50)] |%;\ +/msw | Skill time....: $[pad(_qs6,-50)] |%;\ +/msw | Damcrits......: $[pad(_qs3,-50)] |%;\ /if (opt_tickpred=~"on")\ -/let qs7=Freq: $[prround(tick_k,2)]s, [H:$[prround(tick_hp_avg,2)]] [S:$[prround(tick_sp_avg,2)]] [E:$[prround(tick_ep_avg,2)]]%;\ -/msw | Ticks.........: $[pad(qs7,-50)] |%;\ +/let _qs7=Freq: $[prround(tick_k,2)]s, [H:$[prround(tick_hp_avg,2)]] [S:$[prround(tick_sp_avg,2)]] [E:$[prround(tick_ep_avg,2)]]%;\ +/msw | Ticks.........: $[pad(_qs7,-50)] |%;\ /endif%;\ /msw `--------------------------------------------------------------------' @@ -738,15 +743,15 @@ /if (prot_eaura == 2) /let qtcolor=BCred%;/endif%;\ /if (prot_eaura == 3) /let qtcolor=BCblue%;/endif%;\ /if (prot_eaura_weak=~"on")\ - /let qttimes=$[prgetstime(prot_eaura_weak_t)]%;\ - /let qtweak=/" "WEAK":4:Cred "%{qttimes}" "%;\ - /set status_w=$[status_w+5+strlen(qttimes)]%;\ + /let _utime=$[prgetstime(prot_eaura_weak_t)]%;\ + /let _uweak=/" "WEAK":4:Cred "%{_utime}" "%;\ + /set status_w=$[status_w+5+strlen(_utime)]%;\ /else \ - /let qtweak=%;\ + /let _uweak=%;\ /endif%;\ - /let qttimes=$[prgetstime(prot_eaura_t)]%;\ - /set status_w=$[status_w+2+strlen(qttimes)]%;\ - /set status_pstr=%{status_pstr} "[" "Aura%{prot_eaura}":5:%{qtcolor} "%{qttimes}%{qtweak}]"%;\ + /let _utime=$[prgetstime(prot_eaura_t)]%;\ + /set status_w=$[status_w+7+strlen(_utime)]%;\ + /set status_pstr=%{status_pstr} "[" "Aura%{prot_eaura}":5:%{qtcolor} "%{_utime}%{_uweak}]"%;\ /endif ;; Update statusbar @@ -1242,6 +1247,8 @@ ;; ---- Psionicist ---- /prdefprot -i"levi" -n"Levi" -l"Levitation" -u"You slowly rise from the ground and start levitating." -d"You decide that you have levitated enough and slowly descend to the ground." /prdefprot -i"forcesh" -n"FSh" -l"Force Shield" -r -A"^([A-Z][a-z]+ is surrounded by blue waves as you hear|You tap the power of the blue star with) the words \'thoiiiiiisss huuuiahashn\'$" -u"^(You form a psionic shield of force around your body|[A-Z][a-z]+ forms a shield of force around you)\.$" -d"^Your armour feels thinner.$" +/prdefprot -i"psish" -n"PsiSh" -l"Psionic Shield" -u"Psionic waves surge through your body and mind!" -d"The psionic shield vanishes." +/prdefprot -i"minddev" -n"MindDev" -l"Mind Development" -s -u"You feel your mind developing." -d"Your brain suddenly seems smaller." ;; ---- Druid ---- /prdefprot -i"flexsh" -n"FlexSh" -l"Flex Shield" -u"You sense a flex shield covering your body like a second skin." -d"Your flex shield wobbles, PINGs and vanishes." @@ -1255,7 +1262,7 @@ /prdefprot -i"warez" -n"WarEns" -l"War Ensemble" -A"\'War is TOTAL massacre, sport the war, war SUPPOORT!!!\'" -u"You feel full of battle rage! Victory is CERTAIN!" -d"The effect of war ensemble wears off." /prdefprot -i"emelody" -n"EMelody" -l"Embracing Melody" -r -u"^[A-Z][A-Za-z]+ wraps you into an embracing melody\.$" -d"^The embracing melody subsides, leaving you longing for more\.$" /prdefprot -i"afavour" -n"AFav" -l"Arches Favour" -u"You feel optimistic about your near future!" -d"You no longer have Arches Favour on you. You feel sad." -/prdefprot -i"cthought" -n"CT" -l"Clandestine Thoughts" -u"[clandestine thought]: activated. Snooping activities will be terminated and reported." -d"[clandestine thought]: scanning ended. Shielding from snoopers no longer active." +/prdefprot -i"cthought" -n"CT" -l"Clandestine Thoughts" -u"[clandestine thought]: activated. Snooping activities will be terminated and reported." -d"[clandestine thought]: scanning ended. Shielding from snoopers no longer active." ;; ---- Conjurer::Basic Prots ----