[Resolved] Tick timer no longer works/on time.

Posted by Melanosol on Fri 08 Mar 2013 11:48 AM — 11 posts, 38,194 views.

#0
So I've been using a tick timer successfully for over a month now, not a single issue with it, then all of a sudden today it's been quite... difficult. It'll not fire for several ticks, fire 2-3 times at once, or just at incorrect times (sometimes multiple times) during a tick.

To give an example;

Log said:
<581/581hp 405/405m 256mv 34583 Defensive 10:00am>
+ The Shalonost Suite +


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 10:30am>
+ The Shalonost Suite +


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 11:00am>
+ The Shalonost Suite +
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 11:30am>
+ The Shalonost Suite +


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 12:00pm>
+ The Shalonost Suite +


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 12:30pm>
+ The Shalonost Suite +
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 1:00pm>
+ The Shalonost Suite +


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 1:30pm>
+ The Shalonost Suite +


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 2:00pm>
+ The Shalonost Suite +
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 2:30pm>
+ The Shalonost Suite +


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 3:00pm>
+ The Shalonost Suite +


You are hungry.

<581/581hp 405/405m 256mv 34583 Defensive 3:30pm>
+ The Shalonost Suite +
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!


It's meant to give me the message 3 times, so 6 is a double-fire etc. I ran a stopwatch for a few ticks, they don't appear to have changed in length (every 40-41 seconds), and even if they had it would be a pretty radical change I'd have thought for it to cause problems with a timer firing 7 seconds early?

As a test, I changed the timer to fire off after 3 seconds instead of 34, and used a stopwatch to test the interim between each one. There was about 5-6 seconds between each 3 second timer, so there appears to be a delay coming from somewhere now, and I just... don't see how, where or why.

The Trigger, variable and timer are all as follows. If anyone can see any reason or offer any tests I could do for it, I would be most appreciative!

Trigger said:
<triggers>
<trigger
enabled="y"
group="Timer"
keep_evaluating="y"
match="^\&lt;(.*?)\/(.*?)hp (.*?)\/(.*?)m (.*?)mv (.*?) (.*?) (.*?)\&gt;$"
name="TickTimer"
regexp="y"
send_to="12"
sequence="100"
variable="health"
>
<send>now = "%8"
if(now ~= GetVariable('time')) then
ResetTimer('Tick')
SetVariable('time', "%8")
SetVariable('pray_timer',(GetVariable 'pray_timer')-1)
end -- tick</send>
</trigger>
</triggers>


Variable said:
<variables>
<variable name="time">8:30pm</variable>
</variables>


Timer said:
<timers>
<timer name="TickTimer" enabled="y" second="34.00" offset_second="0.00" send_to="12"
group="Tick" >
<send>Note("TICK IN 7 SECONDS!")
Note("TICK IN 7 SECONDS!")
Note("TICK IN 7 SECONDS!")</send>

</timer>
</timers>
Amended on Fri 08 Mar 2013 11:49 AM by Melanosol
Australia Forum Administrator #1
Check Global Preferences -> Timers. What is the timer interval?
#2
It's set to 0.
USA Global Moderator #3
And you're just sitting there with no other plugin processing going on?
#4
The only plugin I use is the chat redirector from http://mushclient.com/forum/?id=7991
Australia Forum Administrator #5
Do you have another trigger that might have caught the line before the tick timer did?

Try turning on Game -> Trace, especially just before you expect the timer to fire, and see if you see what is happening.

You can add the plugin "Trace_To_Notepad.xml" and then the trace output gets redirected to a plugin, which might be less annoying (although then you don't see exactly when things fire, interleaved with the MUD output).
Australia Forum Administrator #6
How often do you get the prompt? Only on a tick? Otherwise you might get a race condition.
#7
There's nothing else that runs off my prompt currently. Using the trace for just a little bit, with more activity in it to better show how the prompts manifest:

Quote:
TRACE: Trace on

Ixi'kweez auctions: '*singing* If you're not black of heart, and you think you're smart! Cart your arse down to Ixi-Mart! *singing softer* (Unless you're eviiiiiiiiiiiiillllllllll.)'

<604/604hp 438/2082m 410mv 14737 Defensive 10:30am>
TRACE: Matched trigger TickTimer
+ The Healer's Chambers + S



<604/604hp 539/2082m 410mv 14737 Defensive 11:00am>
TRACE: Matched trigger TickTimer
+ The Healer's Chambers + S
TRACE: Fired timer TickTimer
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!

Kikko utters the words, 'pass door'.
Kikko turns translucent.

<604/604hp 539/2082m 410mv 14737 Defensive 11:00am>
TRACE: Matched trigger TickTimer
+ The Healer's Chambers + S

Kikko utters the words, 'fly'.
Kikko's feet rise off the ground.

<604/604hp 539/2082m 410mv 14737 Defensive 11:00am>
TRACE: Matched trigger TickTimer
+ The Healer's Chambers + S



<604/604hp 611/2082m 410mv 14737 Defensive 11:30am>
TRACE: Matched trigger TickTimer
+ The Healer's Chambers + S

Kikko hops out of the room, the bells on her toes jingling softly.

<604/604hp 611/2082m 410mv 14737 Defensive 11:30am>
TRACE: Matched trigger TickTimer
+ The Healer's Chambers + S
TRACE: Fired timer TickTimer
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
TICK IN 7 SECONDS!
stand
You are already standing.

<604/604hp 611/2082m 410mv 14737 Defensive 11:30am>
TRACE: Matched trigger TickTimer
+ The Healer's Chambers + S


The prompt is shown every time -anything- happens. Every received message, action or even just pressing enter with nothing typed. As you can see in this one, it's then firing the timer shortly after the tick, rather than just before.
Amended on Sat 09 Mar 2013 09:22 PM by Melanosol
Australia Forum Administrator #8
Does the prompt have a newline? That is, does the trigger fire the moment the prompt appears?
#9
Yeah, the prompt I use is two lines with the trigger set to the first line, so that it catches it straight away. Were I to take away the carriage return and secondary line it would only be after something else happens, which I'm guessing is what you're wondering?

Edit: I created a new world for the MUD, with only the tick trigger/timer/variable in it, and the same problem occurs even then. Not sure if that helps rule anything out or not, but figured it worth checking.
Amended on Mon 11 Mar 2013 12:34 PM by Melanosol
#10
I feel like -such- an idiot. Someone else just pointed out to me that I have my trigger set to reset Tick and not TickTimer which was what I'd labelled it. I guess I'd made a change recently, not seen it through properly, and completely forgot.

Sorry for wasting your time, but thank you for helping, and introducing me to some awesome new features!