overwriting and/or stopping 'wait' times?

Posted by Silencher on Sat 12 Apr 2014 02:00 AM — 3 posts, 15,925 views.

#0
I wanted to make a trigger where you use the wait function.

1) When the trigger goes into effect, I want it to wait for x seconds, then do something. The catch is it can only be 'online' seconds, and and if I'm disconnected I want the wait.timer to stop until I reconnect, how can I do that?

2) I have another trigger / wait timer set up to help me keep track of when my character is fully healed since it doesn't do so automatically where I play.
I have it so the wait timer is based on a variable, how can I make it so that when the trigger is triggered, it overwrites the previous... trigger?

To explain what I mean, suppose I type hp and my trigger records that I will fully naturally heal in 500 seconds. But suppose I then drink a potion that partially heals me, and I type hp again, I now would naturally heal in 200 seconds. Unfortunately, the trigger reacts to both, I get a message that I'm fully healed 500 seconds after the first time the trigger fired, and 200 seconds after the second time. How do I have the second 'firing' overwrite the first, if that's even possible.?
USA Global Moderator #1
Quote:
I wanted to make a trigger where you use the wait function.

Incorrect. You want to make a trigger where you use http://www.mushclient.com/scripts/doc.php?function=AddTimer or http://www.mushclient.com/scripts/doc.php?function=DoAfterSpecial
#2
Well, those are neat features and I tried it with doafter, but I ran into the same situation, the 'newest' firing of the trigger doesn't overwrite previous firings.

edit: Oddly enough, AddTimer would work great except I can't figure out how to switch the timer from send to world to send to script automatically.

edit 2: Nevermind, figured out how to do this with SetTimerOption http://www.mushclient.com/scripts/doc.php?function=SetTimerOption

This works great, thanks a lot.