Tick Timer Trouble

Posted by SchnitzlePuss on Tue 31 Jan 2012 02:34 PM — 21 posts, 69,740 views.

#0
I'm having trouble fixing a tick timer so that it works with my prompt. I'm about to pull my hair out. :)

In addition, I want to try to tie that in with a spell I need to monitor. There's no warning when the spell drops (I can't simply trigger a color change for the text), so I have to constantly check my affects otherwise. I can only cast it again after it drops, but if I'm in PK lag, I can't cast it again until the PK lag wears off, so it's super important to know -before- it falls so I don't get into PK without it.

The tick timer code (someone else's) I'm working with is thus:

<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="^\&lt;(\d+)\/(\d+)hp\, (\d+)\/(\d+)m\, (\d+)\/(\d+)mv\, (.*)\&gt; (?&lt;hour&gt;\d+)\:(?&lt;minute&gt;\d+)(am|pm)\."
regexp="y"
send_to="12"
sequence="100"
variable="health"
>
<send>if %&lt;hour&gt; ~= old_hour or
%&lt;minute&gt; ~= old_minute then
old_hour = %&lt;hour&gt;
old_minute = %&lt;minute&gt;
DoAfterNote (34, "TICK IN 7 SECONDS!") -- 7 seconds warning
end -- if</send>
</trigger>
</triggers>


For the freaking life of me, I can't figure how how to make it work with MY prompt, which is:

<%h/%H %m/%M %v/%V %g %s %q> [%r|Exits: %e] [%S] %f %t %c


As far as the prayer thing, I have no idea how to even start figuring that part out. Here are the specs on the freshly cast spell:

Spell: prayer : modifies none by 0 for 20 cycles, (10 hours)
Australia Forum Administrator #1
Can you show an actual (example) prompt, not just the prompt string?
#2
<1808/1808 1181/1181 406/406 382 96 12> [Chamber of Rest|Exits: SWD] [Offensive] 8:30pm


Excepting when I'm flying, which would then look like this:


<1808/1808 1171/1181 406/406 382 96 12> [Chamber of Rest|Exits: SWD] [Offensive] (Flying) 9:30pm



That's HP, Mana Moves, Gold, Silver, Quest Ponits, Room name, exits, stance, Flying/Not flying and time.
#3
SchnitzlePuss said:

<1808/1808 1181/1181 406/406 382 96 12> [Chamber of Rest|Exits: SWD] [Offensive] 8:30pm


Excepting when I'm flying, which would then look like this:


<1808/1808 1171/1181 406/406 382 96 12> [Chamber of Rest|Exits: SWD] [Offensive] (Flying) 9:30pm



That's HP, Mana Moves, Gold, Silver, Quest Ponits, Room name, exits, stance, Flying/Not flying and time.



Also, obviously the there are things that change in the prompt like mana and time, which is why they're not both exact. Flying doesn't display if I'm on the ground. Self-explanatory, obviously, but I want to make sure I'm being clear.

I just want to report now that I tried to edit my spelling error and the site told me "error, you are logged out" even though I was clearly logged in to be able to click "edit" on the post at all.

I went to post this and had to log in again becuase it gave me an error, as well.

The forum is acting very oddly, both in IE and Firefox, for me.
Australia Forum Administrator #4
Have you disabled cookies? I use Firefox all the time and never have any problems.
Australia Forum Administrator #5
For the tick timer, something like this seems to work:


<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="^\&lt;(?&lt;hp&gt;\d+)\/\d+ (?&lt;mana&gt;\d+)\/\d+ (?&lt;moves&gt;\d+)\/\d+ \d+ \d+ \d+\&gt; \[(?&lt;room&gt;[^\]]+)\] \[(?&lt;stance&gt;[^\]]+)\] +(?&lt;flying&gt;\(Flying\))? ?(?&lt;hour&gt;\d+)\:(?&lt;minute&gt;\d+)(am|pm)"
   regexp="y"
   send_to="12"
   sequence="100"
   variable="health"
  >
  <send>if %&lt;hour&gt; ~= old_hour or
%&lt;minute&gt; ~= old_minute then
  old_hour = %&lt;hour&gt;
  old_minute = %&lt;minute&gt;
  DoAfterNote (34, "TICK IN 7 SECONDS!") -- 7 seconds warning
end -- if</send>
  </trigger>
</triggers>


Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.
Australia Forum Administrator #6
SchnitzlePuss said:

As far as the prayer thing, I have no idea how to even start figuring that part out.


Check your affects every 10 or so seconds, and see if you have the spell on still?
#7
No, cookies are enabled. I have no issues staying logged into any other site, for some reason it's just like I log in and then I got to submit my post and it says I'm not logged in.

And I COULD check my affects every 10 seconds, but in PK that's not reasonable. I can't keep track of it like that, I need some thing that will let me know before it's going to fall.

It lasts for 20 ticks, so I was hoping the timer could be used to track it.

I'm going to test what you've given me, now. Thanks for it, in advance.
#8
Okay. it's not working. By that I mean it's been 10 minutes and I see no sign of a 7 second tick warning. :D
Australia Forum Administrator #9
Edit the trigger and make it colour the line when it fires (that's how I tested it). Then you can see immediately if it is working. Perhaps there's a space there that I didn't allow for, but I tested on what you posted.
#10
It seems there's a noticable gap when I'm not flying that's not there when I am.

So:

[Offensive] 5:30pm

vs

Offensive] (Flying) 1:00am



I don't know if that figures into it, but I imagine it must.
Australia Forum Administrator #11
How many spaces are after (Flying)? Can you copy and paste an exact prompt with it in it?
#12

<1808/1808 1301/1306 406/406 412 571 12> [Chamber of Rest|Exits: SWD] [Offensive]  4:30pm 


<1808/1808 1301/1306 406/406 412 571 12> [Chamber of Rest|Exits: SWD] [Offensive] (Flying) 4:30pm 



I don't know if I'm incorrect (and it didn't display properly on my last post), but it looks like there are two spaces after [offensive] in the first and only one on either side of {Flying).

[Moderator edit] Added [code] tags.
Amended on Wed 01 Feb 2012 09:03 PM by Nick Gammon
#13
SchnitzlePuss said:

<1808/1808 1301/1306 406/406 412 571 12> [Chamber of Rest|Exits: SWD] [Offensive] 4:30pm


<1808/1808 1301/1306 406/406 412 571 12> [Chamber of Rest|Exits: SWD] [Offensive] (Flying) 4:30pm



I don't know if I'm incorrect (and it didn't display properly on my last post), but it looks like there are two spaces after [offensive] in the first and only one on either side of {Flying).





Okay, when I post it, it doesn't look like what I'm seeing in my prompt.

Here's an image:

http://img860.imageshack.us/img860/7893/prompt.jpg
Amended on Wed 01 Feb 2012 01:59 PM by SchnitzlePuss
Australia Forum Administrator #14
I added code tags to preserve the spacing. Testing against both prompts they both fire for me.

Can you show what you are actually using?

Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

#15
I copied the edited trigger, and pasted it. Still not working and I'm almost wondering what I'm doing wrong.

Here's the exact copy from my client, but I didn't make any changes to the one you gave me:



<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="^\&lt;(?&lt;hp&gt;\d+)\/\d+ (?&lt;mana&gt;\d+)\/\d+ (?&lt;moves&gt;\d+)\/\d+ \d+ \d+ \d+\&gt; \[(?&lt;room&gt;[^\]]+)\] \[(?&lt;stance&gt;[^\]]+)\] +(?&lt;flying&gt;\(Flying\))? ?(?&lt;hour&gt;\d+)\:(?&lt;minute&gt;\d+)(am|pm)"
   regexp="y"
   send_to="12"
   sequence="100"
   variable="health"
  >
  <send>if %&lt;hour&gt; ~= old_hour or
%&lt;minute&gt; ~= old_minute then
  old_hour = %&lt;hour&gt;
  old_minute = %&lt;minute&gt;
  DoAfterNote (34, "TICK IN 7 SECONDS!") -- 7 seconds warning
end -- if</send>
  </trigger>
</triggers>


[Moderator edit] Added [code] tags, escaped backslashes.
Amended on Thu 02 Feb 2012 02:23 AM by Nick Gammon
Australia Forum Administrator #16
Template:summary

Please provide a summary of your world configuration:

  • Either use the scripting Immediate window (Ctrl+I) to execute: Debug ("summary")

    or

  • Install the Summary plugin (see "Summary" feature) and type "summary"

Then copy the resulting information from the output window, and paste into a Forum message.

You need version 4.55 onwards of MUSHclient to do this.


#17
[string "Immediate"]:1: unexpected symbol near '<'
Australia Forum Administrator #18
What? Recent versions of MUSHclient ship with the plugin, just use File -> Plugins to install it.
#19
When I do the debug, I get:

Object doesn't support this property or method: 'Debug'
Australia Forum Administrator #20
Template:version
Please help us by advising the version of MUSHclient you are using. Use the Help menu -> About MUSHclient.