 |
Aarlot Adept

Joined: 30 Dec 2003 Posts: 226
|
Posted: 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. |
|
|
 |
Dharkael Enchanter

Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: 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." |
|
|
 |
Aarlot Adept

Joined: 30 Dec 2003 Posts: 226
|
Posted: 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. |
|
|
 |
Dharkael Enchanter

Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: 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." |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
 |
|
|