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
zzyzzyzzx
Beginner


Joined: 24 Oct 2006
Posts: 13

PostPosted: Sun Jun 28, 2009 10:57 am   

noinput
 
how would you track if no input was received, and after X min do something?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Jun 28, 2009 11:43 am   
 
The easiest way is with an alarm, like so:

#alarm "afk" 600 {do whatever}

#oninput {*} {#call %alarm("afk",600000)}

What this will do is create an alarm that fires after 10 minutes. If you enter any command, the timer is reset to 10 minutes. If you want to change the time, the number in #alarm is seconds and in %alarm is ms.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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