|
Phanku Novice
Joined: 09 Oct 2003 Posts: 40
|
Posted: Thu Oct 16, 2003 3:15 am
Idle Script |
Ok, guys.
I have a new one for you guys. The mud i play on, doesn't like scripts that keep people from going idle. They have an idle time time out of 30 minutes. And some of the scripts i currently use, unfortnally as a side effect keep me from going idle. So what i would like to make is a script that well monitor my idle time, and about 5-10 minutes if i'm idle that long, will just disconnect me from my mud. Is this possible to write up? Ive been looking but i havn't see anything that would possibly be used to monitor idle time, cept for maybe %line.
Thanks for the help,
Phanku |
|
|
|
Arcane_of_Discworld Wanderer
Joined: 29 Jan 2002 Posts: 99 Location: UK
|
Posted: Thu Oct 16, 2003 6:41 am |
I just tested this out and it works for the Mud I play on, there is probably a more elegant method of doing this but here is my offering (simply paste into the command line of zMud and hit enter)
The first trigger (#oninput) records the time that you last used your keyboard to issue a command to the zMud main window, the second (#alarm) checks every 10 minutes to determin whether you have input anything to the zMud main window from the keyboard and if you haven't it disconnects you from the Mud.
#oninput {*} {#VARIABLE Last_Active {%time( hhnn)}}
#alarm {-10:00} {#VARIABLE Time {%time( hhnn)};#MATH Idle_Time {@Time-@Last_Active};#IF (@Idle_Time>=10) {#DI}}
Good luck ;-)
Arcane |
|
|
|
Phanku Novice
Joined: 09 Oct 2003 Posts: 40
|
Posted: Sat Jul 17, 2004 12:47 am |
Thank you, very much. This is exactly what i've been looking for.
You are on top of your game. |
|
|
|
|
|
|
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
|
|