Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
HerenIstarian
Novice


Joined: 30 Oct 2005
Posts: 40

PostPosted: Thu Jun 10, 2010 2:53 am   

Can CMUD detect if you are idle and turn off triggers?
 
I searched for this without much luck, sorry if it is a repost.

I play on the MUD 3K. There is a guild there (mages) that require triggers in combat to manage shields that deactivate, I have it set right now to watch for magical shields that ware away and waiting for the next combat round can mean certain death. I need to set the triggers to trigger as soon as the shields go down but that can get me in trouble if I idle out of combat. Can anyone tell me how I could set CMUD to detect how long I have been idle then at a certain point turn off all triggers? Thanks!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jun 10, 2010 3:07 am   
 
1)create a named alarm with an interval roughly equal to your idle time. This alarm will do the turning-off via the #T- command, though if you plan on turning off every last trigger you made you can simply use #IGNORE (which will probably also turn off the alarm and thus you will probably end up disconnecting due to idle).

2)create an #oninput trigger that matches everything you send to the game from either the command line or from a script. This trigger will reset the alarm interval via %alarm(), preventing the alarm from firing when you send a command before the idle time was reached.
_________________
EDIT: I didn't like my old signature
Reply with quote
HerenIstarian
Novice


Joined: 30 Oct 2005
Posts: 40

PostPosted: Fri Jun 11, 2010 10:50 pm   
 
Okay so I've tried to set it up but I'm having some trouble.

I'm trying to use this setup with #IGNORE. Here is what I have:

#ALARM idlecheck {-2:00}{#IGNORE}
#ONINPUT resetidlecheck {*} {#CALL %alarm(idlecheck,1000);#IGNORE}

Right now it appears to disable all triggers after 2 minutes but on input it doesn't appear to do anything if the triggers are disabled (I'm guessing because it is a trigger) and if they are enabled it disables them. I need it to always enable the triggers on input and always disable them on idle. Thanks in advance for the help!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Fri Jun 11, 2010 11:07 pm   
 
#IGNORE 0 = off
#IGNORE 1 = on

(Which is reverse from the help file BTW!)
_________________
Discord: Shalimarwildcat
Reply with quote
HerenIstarian
Novice


Joined: 30 Oct 2005
Posts: 40

PostPosted: Sat Jun 12, 2010 10:47 am   
 
Okay, it keeps me from unidling properly but it won't turn the triggers back on once it goes to idle, is there anyway to activate that #ONINPUT trigger once the triggers are disabled?
Reply with quote
HerenIstarian
Novice


Joined: 30 Oct 2005
Posts: 40

PostPosted: Sat Jun 12, 2010 12:24 pm   
 
I'm also running into the problem of my triggers triggering the ONINPUT and causing the alarm to reset, any help with both of these problems would be much appreciated.
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sat Jun 12, 2010 1:28 pm   
 
Since everything is disabled by #IGNORE 0, the oninput trigger wont fire either. You need an alias:
#ALIAS backatcomp {#IGNORE 1}
Should work. You can change the name of course. I just like descriptive names. :)
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
HerenIstarian
Novice


Joined: 30 Oct 2005
Posts: 40

PostPosted: Sat Jun 12, 2010 9:03 pm   
 
Thanks I figured that was the problem. I still can't stop my triggers from triggering the ONINPUT trigger though, is there a way to set it to ignore triggers?
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sat Jun 12, 2010 9:45 pm   
 
Delete the ONINPUT, you don't need it anymore.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
HerenIstarian
Novice


Joined: 30 Oct 2005
Posts: 40

PostPosted: Sun Jun 13, 2010 12:51 am   
 
No, I still need it to detect when I'm not idle or else I will constantly go idle every 3 minutes.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sun Jun 13, 2010 1:39 am   
 
you manually turn it back on my clicking the gun with the red x in the lower right corner.
_________________
Discord: Shalimarwildcat
Reply with quote
HerenIstarian
Novice


Joined: 30 Oct 2005
Posts: 40

PostPosted: Sun Jun 13, 2010 2:51 am   
 
Right, I understand that. Still wondering how to adjust the ONINPUT trigger to only detect my input and not triggered input.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sun Jun 13, 2010 3:03 am   
 
There is no coded difference as far as i know... Would make for some good default events for Zugg to code. OnComandLine vs onSettingCommand
_________________
Discord: Shalimarwildcat
Reply with quote
HerenIstarian
Novice


Joined: 30 Oct 2005
Posts: 40

PostPosted: Sun Jun 13, 2010 3:08 am   
 
Yes indeed that would be a great feature. For now I'll use a work around of setting an alias in all my numpad macros to reset the timer. Hopefully in the future there will be a better way of going about doing this. Thanks for the help everyone!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sun Jun 13, 2010 3:25 am   
 
you could stick it on the onRoomEnter #EVENT, provided you use a map
_________________
Discord: Shalimarwildcat
Reply with quote
phoenixsoap
Newbie


Joined: 31 Jul 2008
Posts: 9

PostPosted: Fri Jun 18, 2010 5:45 am   
 
Balthus wrote a script that does just that for 3k. You can find it here:

http://necro.wikidot.com/safe-idle-command-queuing

-Parisienne@3k
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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