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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Buba
Newbie


Joined: 01 May 2002
Posts: 0

PostPosted: 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?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: 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
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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.
Reply with quote
Buba
Newbie


Joined: 01 May 2002
Posts: 0

PostPosted: Fri Apr 05, 2002 2:14 am   
 
Hmm...Status window you mean by the Status line directly above the command line?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Apr 05, 2002 2:39 am   
 
#MENU {windows|status}

Status window.

Ton Diening
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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
Reply with quote
abeck72
Newbie


Joined: 17 Mar 2005
Posts: 3

PostPosted: 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!
Reply with quote
abeck72
Newbie


Joined: 17 Mar 2005
Posts: 3

PostPosted: 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!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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
Reply with quote
abeck72
Newbie


Joined: 17 Mar 2005
Posts: 3

PostPosted: Thu Mar 17, 2005 11:38 pm   
 
Thank you!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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 Wolfpaw.net