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
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: Sat Apr 04, 2009 2:51 am   

%window
 
I multi on a mud, and I want to set up an alias log <char>...
usage would be log Ralph1971..
script would check to see if that window is already open, in which case, it would just :%1:#connect. if it's not already open, it will #ses %1...
I think you could use the %window command.. but the zmud 7.21 file is very lacking in usage example for that.
any suggestions?
Reply with quote
shalimar
GURU


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

PostPosted: Sat Apr 04, 2009 3:38 am   
 
%names contains a list/array of all currently open windows... you could do an %ismember on it and if its not there open your session as well.

#IF %ismember(%1, %names) {} {#SES %1}
_________________
Discord: Shalimarwildcat
Reply with quote
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: Sat Apr 04, 2009 4:57 am   
 
I did that..
still opened up new windows when they already existed
added opening and closing () around the ismember statemtent
added win=%names, and changed the %names in the #if to @win..
all opened up new windows when they already existed
_________________
Win7-home - Cmud 3.33a
WinXP-pro - Zmud 7.21
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Sun Apr 05, 2009 2:32 pm   
 
Did you use correct capitalization in your input?

I end up doing things like this:

#IF %ismember(%1, %names) {#SH window param 1 equals %1 exists at %ismember(%1, %names) place } {#SH window param 1 equals %1 does not exist}}.

also

#sh %item(%names,%ismember(%1, %names)) <-- valid


Is %names actually returning the predicted strings? What about nulls, you can't test that by right clicking in settings. I think the command line differs.
Reply with quote
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: Sun Apr 05, 2009 5:10 pm   
 
figured it out.. your capitalization comment made me think of this.. in the chars settings, the character names (also in the %names) are capitalized.. the command I was sending to the mud wasn't (i.e. log Kendal worked, log kendal didn't.. but it opened up a new session instead).. just have to either remember to capitalize, or change the character files on the connection page.
thanks!
_________________
Win7-home - Cmud 3.33a
WinXP-pro - Zmud 7.21
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