About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Sat Feb 12, 2005 1:08 am   

Checking to see if connected
 
I have multiple windows open in this mud I play, one for my character that I"m playing, and two rolling stats. I have scripts for the ones rolling stats to roll until they find a certain minimum stat. When they do this, I want them to do one of two things. If my character window is connected to the mud, I want them to do one thing, if it isn't, I want them to do another. Is there any way for an if statement to check whether this other character window is connected?

Thanks in advance
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Sat Feb 12, 2005 1:51 am   
 
add this line to your atconect alias
#var connected 1;
and this to your atdisconnect alias
#var connected 0;

then you can just check the value at @connected;
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Sat Feb 12, 2005 2:53 am   
 
The thing is, the two connections use separate settings files.
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Sat Feb 12, 2005 4:54 am   
 
in each atconnect,atdisconnect you can use the setglobal command
then you can check the values using getglobal to coordinate your
sessions as you see fit
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Feb 13, 2005 4:44 am   
 
You can use @windowName.variable to get the value of a variable from another window. If the windowName is not going to be a constant thing then you would have to retrieve the %names predefined variable and parse it for where to check the state of.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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