;;;;;;;;;; ;; crewsave.tf ;; Written by: Hair@BatMUD ;; ;; This file saves messages from your crew leader to a specified log file ;; and allows you to recall those messages. To recall the messages, ;; simply type "cmesg" and it will default to echoing the last 10 ;; messages your crew leader sent you. You can also do "cmesg xx" ;; where "xx" is some number, and this script will echo that many ;; lines back to you from the log file. ;; This line is well, required. This should come with all ;; tf installations. /REQUIRE textutil.tf ;; Change the path here to the log file you wish to use /SET CREW_LOG=/home/hair/tf-dir/crew_log.log ;; You can change the default number of lines displayed here /SET crew_lines=10 ;; Be sure to change from Hansolo to your current crew leader /DEF -t"Hansolo tells you*" crew_lead_grab = \ /check_local_date %;\ /ECHO %{_local_date}: %{*} %| /WRITEFILE -a %{CREW_LOG} /DEF check_local_date = \ /SET _local_date=$(/sys date) ;; Just type "cmesg" or "cmesg xx" where "xx" is some number ;; To recall that many messages from your crew leader. It defaults ;; to 10 lines, or whatever is set in the 'crew_lines' variable. /DEF -ag -h"send {cmesg}*" get_crew_messages = \ /IF (%{-1} !~ "") \ /QUOTE -S /ECHO !tail -%{-1} %{CREW_LOG} %; \ /ELSE \ /QUOTE -S /ECHO !tail -%{crew_lines} %{CREW_LOG} %; \ /ENDIF