|
Buba Newbie
Joined: 01 May 2002 Posts: 0
|
Posted: Thu Apr 04, 2002 7:58 pm
Continuos List |
In my MUD I get a report like this:
SPYNET REPORT: Baroness Ellyon has left Federation DataSpace.
everytime someone comes in/out of the game, what I want to do is somehow on the side of the output window or someway (not sure if its even possible) to keep a updated list of whos in and whos out...so when i get a report someone comes in add their name to the list and if i get a report someone leaves take thier name out of the list, but the hard part is i want this list viewable easily some way.
any ideas on how i could accomplish this? |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Apr 04, 2002 11:27 pm |
One idea so to capture the information into
an #ADDITEM/#DELITEM list and then
clear, reshow the list in a separate window.
How you show the list depends on the number
of people you are tracking.
Ton Diening |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Apr 05, 2002 1:20 am |
If you are not using the Status Window at all then you have it very easy.
#TR {SPYNET REPORT: (*) has left Federation DataSpace.} {#DELITEM Players {"%1"}}
#TR {SPYNET REPORT: (*) has entered Federation DataSpace.} {#ADDITEM Players {"%1"}}
#STW {--Players In Game--%cr{%replace(@Players,"|",%cr)}}
Now all you have to do is position the status window. |
|
|
|
Buba Newbie
Joined: 01 May 2002 Posts: 0
|
Posted: Fri Apr 05, 2002 2:14 am |
Hmm...Status window you mean by the Status line directly above the command line?
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Apr 05, 2002 2:39 am |
#MENU {windows|status}
Status window.
Ton Diening |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Apr 05, 2002 2:46 am |
From the helpfile:
quote: The status window is like the status line except it can contain more than one line, and can contain %ansi color sequences. The status window can be positioned and sized anywhere on the screen (the position and sized is remembered).
The status line uses the #STATUS command. The status window uses the #STW command. They are similar but not identical.
LightBulb
All scripts untested unless otherwise noted |
|
|
|
abeck72 Newbie
Joined: 17 Mar 2005 Posts: 3
|
Posted: Thu Mar 17, 2005 10:08 pm More help on this one. |
I have the above solution working fine for adding players to the status window when they join or leave the game.
Is there a way I can pre populate the list with everyone in the game?
If I do a "who" command it returns a list of names on separate lines.
>who
The following people are in Federation II dataspace:
Adventurer xxxxx
Industrialist xxxxx
Commander xxxx
Industrialist xxxx
Industrialist xxxx
Manufacturer xxxx
6 players
How can I get those names into the list? Then use this solution
#TR {SPYNET REPORT: (*) has left Federation DataSpace.} {#DELITEM Players {"%1"}}
#TR {SPYNET REPORT: (*) has entered Federation DataSpace.} {#ADDITEM Players {"%1"}}
#STW {--Players In Game--%cr{%replace(@Players,"|",%cr)}}
To keep the list up to date?
Thanks much! |
|
|
|
abeck72 Newbie
Joined: 17 Mar 2005 Posts: 3
|
Posted: Thu Mar 17, 2005 11:01 pm |
Also, if I want the above list displayed in the status window in alphabetical order where would the %sort go in the string?
Thanks! |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Mar 17, 2005 11:36 pm |
To poputlate the list:
Code: |
#TRIGGER "WhoCap" {^The following people are in Federation II dataspace~:$} {Players=""}
#COND {} {#IF (%match(%line,"%d players")) {#STATE WhoCap 0} {#ADDITEM Players {%word(%line,2)}}} {looplines|param=99}
#COND {*} {#ECHO "Error in WhoCap: 99 lines exceeded"}
|
To add the sorting:
#STW {--Players In Game--%cr{%replace(%sort(@Players),"|",%cr)}} |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
abeck72 Newbie
Joined: 17 Mar 2005 Posts: 3
|
Posted: Thu Mar 17, 2005 11:38 pm |
Thank you!
|
|
|
|
|
|