listing question

Scripts and support for your favorite MUD client.
alendar
Sojourner
Posts: 259
Joined: Mon Jan 20, 2003 6:01 am
Location: Southern Illinois

listing question

Postby alendar » Sun Aug 26, 2007 1:48 am

i have an alias that lists everyone on a variable list (displacelist)

it shows something like this

Current displace List: Rebur|char2|char3|etc

i was wondering if there was an easy way to display a total like

Current displace List (4): Rebur|char2|char3|char4
************************************
Alendar -= The Black Ash of the Phoenix =-
************************************
http://www.giantitp.com/comics/oots0612.html
http://www.giantitp.com/cgi-bin/GiantIT ... ipt?SK=244
Hador group-says 'Inames I think you are the only person on the mud who shouldn't talk about Cofen sucking'
Kegor
Sojourner
Posts: 666
Joined: Wed Feb 28, 2001 6:01 am
Location: St. Cloud, MN
Contact:

Postby Kegor » Sun Aug 26, 2007 8:51 pm

Code: Select all

#SAY Current Displace List ~(%numitems(@DISPLACELIST)~): @DISPLACELIST
Last edited by Kegor on Wed Aug 29, 2007 10:37 pm, edited 1 time in total.
Disoputlip
Sojourner
Posts: 956
Joined: Thu Feb 21, 2002 6:01 am
Location: Copenhagen

Postby Disoputlip » Wed Aug 29, 2007 7:30 pm

Here is a fun little regular expression, it takes a list
Ann|Bob|Carl|Doris
and return
Ann, Bob, Carl and Doris

Code: Select all

%subregex(%replace(@DISPLACELIST, "|",", "),", (\a*)$"," and ~%1")

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 7 guests