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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Katoki
Newbie


Joined: 20 Jul 2013
Posts: 7

PostPosted: Tue Jul 28, 2020 12:20 am   

displaying player list in a status window or other window
 
trying to make a trig so i can see who is one without having to scroll back through the spam of combat
luckily i can short down the titles to just names via the command 'cwho +name'
which shows something like this


Name
-----------
bob
tim
steve
lux
(luke)
Lor
swag
-----------



the () around the name means they are invisible but have me added to their friends list.

how would a trigger like this work. thank you.
Reply with quote
chaossdragon
Apprentice


Joined: 09 Apr 2008
Posts: 168

PostPosted: Tue Jul 28, 2020 12:50 am   
 
My method would be to use #C+ and #C-

IF and only IF your 'cwho +name' has a semi-unique header and closer.

so like the -------------------- after Name would trigger #C+ and the other --------------------- would trigger #C-

this captures all lines in-between and you can then send that captured text to your status window.

Additionally to prevent pre-mature firing of either trigger... create a class that houses the #C- portion and have it force close/disable itself after firing,
and have the trigger that does #C+ enable the closing class.

** DO NOT take this advice without testing or support from other better knowledged poeple... just offering my horrible method **
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Tue Jul 28, 2020 3:00 pm   
 
This should work, without needing to worry about enabling/disabling:

#TR {Name$-----------} {#EXECWIN Friends {#CLR};#C+ Friends}
#COND {-----------} {#C-}
_________________
Discord: Shalimarwildcat
Reply with quote
chaossdragon
Apprentice


Joined: 09 Apr 2008
Posts: 168

PostPosted: Wed Jul 29, 2020 4:29 am   
 
See!

my method... horrible, dirty, and convoluted...

Shalimar's ... elegant, clean, and simplistic

lol
Reply with quote
Katoki
Newbie


Joined: 20 Jul 2013
Posts: 7

PostPosted: Sun Aug 02, 2020 6:09 am   
 
shalimar wrote:
This should work, without needing to worry about enabling/disabling:

#TR {Name$-----------} {#EXECWIN Friends {#CLR};#C+ Friends}
#COND {-----------} {#C-}


added it in, but it didnt seem to work. when i ran script debugger it didnt even register. not sure if im doing something wrong lol.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Sun Aug 02, 2020 11:22 am   
 
Ahh, I missed a space from your example, try:

#TR {Name%s$-----------} {#EXECWIN Friends {#CLR};#C+ Friends}
#COND {-----------} {#C-}
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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