|
zeiuszeppo Novice
Joined: 22 Nov 2001 Posts: 48 Location: Italy
|
Posted: Mon Sep 02, 2002 10:13 pm
connected or not |
is there a way to ask zmud if I'm connected
to the mud? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Sep 02, 2002 10:20 pm |
quote:
is there a way to ask zmud if I'm connected
to the mud?
Nope, there isn't a way (although it should be obvious if you are or not). If you want to simply ensure that you are, you can issue a #CONNECT command which will disconnect and try to reconnect you.
I checked out the #HOST command and the %port system variable, but they returned the domain and port number of the character, not whether you were connected (the host name and port) or not (null or some sort of obvious text, like "Not connected" and "0")
li'l shmoe of Dragon's Gate MUD |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 02, 2002 10:58 pm |
#IF (%ctime > 0) {#SAY probably connected} {#SAY probably not connected}
However, %ctime doesn't get reset to zero when you disconnect.
Personally, I wouldn't rely on a function or a system variable, since I could easily make a variable of my own and control it using triggers or the atconnect/atdisconnect aliases.
LightBulb
Senior Member |
|
|
|
zeiuszeppo Novice
Joined: 22 Nov 2001 Posts: 48 Location: Italy
|
Posted: Mon Sep 02, 2002 11:03 pm |
not correct...%ctime tells me only the last
connection time, even if now i'm disconnected
I made it adding a VAR assign in the aliases
atconnect, atdisconnect, to set a var to tell
me if I'm connected |
|
|
|
|
|