Register to post in forums, or Log in to your existing account

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts

Joined: 15 Jul 2001
Posts: 31
Location: USA

PostPosted: Fri May 10, 2002 9:16 pm   

Catch those tells

Remote Tell Catcher - Ok this will add a tell to a history that can be reviewed later. Great for those going AFK
and not wanting to miss that important call...Pals and Enemies are underlined

Trigger :

Pattern ^&%w{RTellName} {tells|asks} you(*): &%*{PrevRTell}


rtell_from_who = %additem(@RTellWho, @rtell_from_who)
#if (%ismember(@RTellWho,@pal_list) or %ismember(@RTellWho,@enemy_list)) {#cw underline}
rtell_in_times = %additem(%time("hh:mm:ss"),@rtell_in_times)
#PLA msg.wav
rtell_list_tells = %additem(@PrevRTell,@rtell_list_tells)

Class: rtell_list

Now, for those that get in multi line tells, this 2nd trigger looks at the next line to see if it is part of the
previous tell wrapped. I have mine set to do up to 5 lines, but this is for 3.

Trigger :

Pattern ^ &ExtendRTell


ExtendRTell = %trimleft(@ExtendRTell)
#if (%beings(%line2,@RTellWho tells you) or %beings(%line2, @RTellWho asks you)) {PrevRTell = %concat(@PrevRTell," ")
PrevRTell = %concat(@PrevRTell, @ExtendRTell)} {
#if (%beings(%line3, @RTellWho tells you) or %beings(%line3,@RTellWho asks you))) {
PrevRTell = %concat(@PrevRTell, " ")
PrevRTell = %concat(@PrevRTell,@ExtendRTell)}}

Class: rtell_list

Ok, these next two are Aliases

This alias will display all the tells to you that it has recieved (hopefully)

Pattern: tells
Commands :

count = %numitems(@rtell_from_who)
#if (@count < 1) {
#show %ansi(red) No Tells} {
#show %ansi(blue) =- Tell List -=
#loop @count { rtell_age = %eval((%time("nn") - %word(%item(@rtell_in_times,%{i}),2,":")) + 60*(%time("hh") -

%word(%item(@rtell_in_times, %{i})": "%item(@rtell_list_tells,%{i})}
#if (@rtell_age < 15) {rtell_time_color = "yellow"} { #if (@rtell_age > 60) {rtell_time_color = "green"} {
rtell_time_color = "blue"}}
#show %ansi(cyan)%{i} %ansi(white)~[%ansi(@rtell_time_color)%item(@rtell_in_times, %{i}) %ansi(cyan) (@rtell_age)~]

%item(@rtell_from_who,%{i})": "%item(@rtell_list_tells, %{i})} }

Class: rtell_list

This one gets really jazzy. It will allow you to do tells_clear to clear all of them, or
tells_clear 3 to take out the 3rd tell, or tells_clear Name to remove all the tells from one Person

Pattern: tells_clear or tells_clear x


#if (%1 = "") {rtell_from_who = ""
rtell_list_tells = ""
rtell_in_times = ""
#Echo Tells Cleared} {
#if (%isnumber(%1)) {
#if (%item(@rtell_from_who, %1)) {
rtell_from_who = %delitem(%item(@rtell_from_who, %1), @rtell_from_who)
rtell_list_tells = %delitem(%item(@rtell_list_tells, %1), @rtell_list_tells)
rtell_in_times = %delitem(%item(@rtell_in_times, %1), @rtell_in_times)
#Echo Tell number %1 cleared} {
#Echo No tell number %1}} {
count = %numitems(@rtell_from_who)
changed = 0
#loop @count {#if (%item(@rtell_from_who, %eval(%{i}-@changed)) = %1) {
rtell_from_who = %delitem(%1,@rtell_from_who)
rtell_list_tells = %delitem(%item(@rtell_list_tells, %eval(%{i}-@changed)), @rtell_list_tells)
rtell_in_times = %delitem(%item(@rtell_in_times, %eval(%{i}-@changed)), @rtell_in_times)
#add changed 1}}
#show @changed tells removed.}}

Class: rtell_list

I make no claim that this will work exactly as expected. Some messages may get folded, bent, spindeled and/or
multiated. Although it doesn't give me trouble (yet)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by