Tested only with Zmud version 5.55.
Please mud-mail me questions, comments or suggestions.
Triggers:
Person tells you:
Person asks you:
Person tells you in halfling:
Person tells you exclaiming:
Person tells you, Person2, and Person3:
Description: Adds the tell to the tell history. Waits to let zMUD check the next
line to see if it's a multi-line tell.
Pattern: ^&%w{TellName} {tells|asks} you(*): &%*{LastTell}
Commands:
tell_list_names = %additem(@TellName, @tell_list_names)
#if (%ismember(@TellName,@friend_list) or %ismember(@TellName,@target_list) or %ismember(@TellName,@orgmate_list)) {#cw underline}
tell_list_times = %additem(%time("hh:nn:ss"), @tell_list_times)
#PLA notify.wav
#wait 100
tell_list_tells = %additem(@LastTell, @tell_list_tells)
Class: tell_history
Person tells you/asks you: blah blah blah blah blah...
blah blah blah blah blah...
blah blah blah blah blah...
Description: Checks a line to see if it belongs to a tell. If so, it adds the text
to the last tell received. Works for up to 3 line tells.
Pattern: ^ &PossibleTellLine
Commands:
PossibleTellLine = %trimleft(@PossibleTellLine)
#if (%begins(%line2, @TellName tells you) or %begins(%line2, @TellName asks you)) {LastTell = %concat(@LastTell, " ")
LastTell = %concat(@LastTell, @PossibleTellLine)} {#if (%begins(%line3, @TellName tells you) or %begins(%line3, @TellName asks you))) {LastTell = %concat(@LastTell, " ")
LastTell = %concat(@LastTell, @PossibleTellLine)}}
Class: tell_history
Aliases:
tells
Usage: 'tells'
Description: Displays all of your tells.
#SHOW %ansi(brown,bold)tells %1
count = %numitems(@tell_list_names)
#if (@count < 1) {#SHOW %ansi(cyan)No tells.} {#SHOW %ansi(cyan)======= Tell List (full) =======
#LOOP @count {tell_age = %eval((%time("nn") - %word(%item(@tell_list_times, %{i}), 2,":")) + 60*(%time("hh") - %word(%item(@tell_list_times, %{i}), 1,":")))
#if (@tell_age < 15) {time_color = "green"} {#if (@tell_age > 60) {time_color = "red"} {time_color = "brown"}}
#SHOW %ansi(brown,bold)%{i} %ansi(grey)~[%ansi(@time_color)%item(@tell_list_times, %{i})%ansi(grey) (@tell_age)~] %item(@tell_list_names, %{i})": "%item(@tell_list_tells, %{i})}
#SHOW %ansi(cyan)======= Tell List (full) =======}
tells_clear
Usage: 'tells_clear' : Clears all tells
'tells_clear 5' : Removes the 5th tell
'tells_clear Person' : Removes all tells from Person
#SHOW %ansi(brown,bold)tells_clear %1
#if (%1 = "") {tell_list_names = ""
tell_list_tells = ""
tell_list_times = ""
#ECHO Tells cleared.} {#if (%isnumber(%1)) {#if (%item(@tell_list_names, %1)) {tell_list_names = %delitem(%item(@tell_list_names, %1), @tell_list_names)
tell_list_tells = %delitem(%item(@tell_list_tells, %1), @tell_list_tells)
tell_list_times = %delitem(%item(@tell_list_times, %1), @tell_list_times)
#ECHO Tell number %1 cleared.} {#ECHO No tell number %1.}} {count = %numitems(@tell_list_names)
changed = 0
#LOOP @count {#if (%item(@tell_list_names, %eval(%{i}-@changed)) = %1) {tell_list_names = %delitem(%1, @tell_list_names)
tell_list_tells = %delitem(%item(@tell_list_tells, %eval(%{i}-@changed)), @tell_list_tells)
tell_list_times = %delitem(%item(@tell_list_times, %eval(%{i}-@changed)), @tell_list_times)
#add changed 1}}
#SHOW @changed tells removed.}}
Back