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
Krubba
Newbie


Joined: 29 Apr 2004
Posts: 2
Location: Sweden

PostPosted: Thu Apr 29, 2004 11:21 pm   

Auto Away trigger
 
I'm trying to do an AutoAway trigger. Let's say I haven't
pressed the enter button for 10 minutes, then I will reply to
anyone that tells me anything that I'm autoaway, I have been
away for 10 minutes.
What I want to do is to reset the @AutoAway variable
everytime I press enter. So here is my problem, how do I
bind the RETURN button to reset a variable?
Reply with quote
Lirril
Novice


Joined: 23 Oct 2000
Posts: 44
Location: Ireland

PostPosted: Fri Apr 30, 2004 1:19 pm   
 
It might be easier to do this win an input trigger, so anytime you type anything and send it to the mud, it resets the variable.

Something innefficient like #ONINPUT {*} {lastCommandTime=%ctime} would probably satisfy your requirements, though #ONINPUT {^$} {lastCommandTime=%ctime} might also work.

Then you can trigger something like:
#TRIGGER {(*) tells you, } {#if (%ctime-lastCommandTime)>120 tell %1 Info: I've been away from my keyboard for %eval((%ctime-@lastCommandTime)/60) minutes.}

- Lirril
Reply with quote
Krubba
Newbie


Joined: 29 Apr 2004
Posts: 2
Location: Sweden

PostPosted: Mon May 03, 2004 1:49 am   
 
Ah, thanks Lirril. That helped me alot :-)
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