|
gamesover Novice
Joined: 06 Jun 2007 Posts: 30
|
Posted: Wed Mar 31, 2010 3:52 am
Could CMUD detect me idle how long? |
I have a problem with my mud games.
If I have no input to 1 minute, could cmud detect it? I mean, it is not mud games idle, I can receive information normally from mud; but if I am idle for 1 minute without any input to mud, could have cmud trigger?
A timer could do similar thing. But timer is active no matter I have something input or not. Herein, I just want to trigger something when I have no input to mud for one minute, for example |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Mar 31, 2010 5:24 am |
Code: |
#trigger {(*)} {
lastreceived = %1
#call %alarm(almIdleTimer,60)
}
#alarm "almIdleTimer {-60} {#sendraw look}
|
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Wed Mar 31, 2010 6:25 am |
Matt: Two things.
1. I think he's asking if he sends no input to the MUD, not if the MUD still outputs information. In that case, he probably wants an #ONINPUT trigger, I believe, though it would require a number of changes to triggers since anything activated by triggers is considered 'input' too.
2. What's the usage of 'lastreceived' in your example? Did you miss something?
Charneus |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Mar 31, 2010 8:43 pm |
I was probably aiming for a linecheck and forgot to put one in.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|