changeset 577:e1f2b4fd2795

Commit the Nun Task Timer.
author Ealoren Pupunen <ealoren@bat.org>
date Sun, 26 Nov 2006 18:39:07 +0000
parents 586e5cc2cb67
children 59d9964c2d66
files ggrtf-nun.tf
diffstat 1 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ggrtf-nun.tf	Sun Nov 26 13:19:52 2006 +0000
+++ b/ggrtf-nun.tf	Sun Nov 26 18:39:07 2006 +0000
@@ -169,3 +169,28 @@
 ;; Saintly touch worst (compares to DE "strikes hard")
 /test gnun_defst(7, "ashy", 6)
 
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Task timer
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+/set gnun_task_n=
+/set gnun_task_t=0
+/set gnun_task_c=0
+
+/def task =\
+	/if (gnun_task_t > 0)\
+		/msq @{BCgreen}Nun task:@{n} '@{Ccyan}%{gnun_task_n}@{n}' @{Cyellow}$[prgetstime(gnun_task_t)]@{n}%;\
+	/else \
+		/msq @{BCgreen}No task started!@{n}%;\
+	/endif
+
+/def -i -p9999 -aCyellow -mregexp -t"^\* YOU STARTED TASK '([A-Za-z' ]*)', TIME TO COMPLETE: ([a-z0-9]*) \*$" gnun_task_started =\
+	/set gnun_task_n=%{P1}%;/set gnun_task_t=$[time()]%;/set gnun_task_c=%{P2}%;
+
+/def -i -p9999 -aCyellow -mregexp -t"^\* CONGRATULATIONS! You have completed nun task '([A-Za-z' ]*)'\*$" gnun_task_completed =\
+	/msq @{BCgreen}Completed nun task:@{n} '@{Ccyan}'%{gnun_task_n}'@{n} Time spent: @{Cyellow}$[prgetstime(gnun_task_t)]@{n}%;\
+	/set gnun_task_n=""%;/set gnun_task_t=0%;/set gnun_task_c=0%;
+
+/def -mregexp -t"^\* You have FAILED task '([A-Za-z' ]*)' \*" gnun_task_failed =\
+	/msq @{BCgreen}Failed nun task:@{n} @{Ccyan}'%{gnun_task_n}'@{n} Time spent: @{Cyellow}$[prgetstime(gnun_task_t)]@{n}%;\
+	/set gnun_task_n=""%;/set gnun_task_t=0%;/set gnun_task_c=0%;