[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Tick Timer Trouble
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Tick Timer Trouble

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Pages: 1 2  

Posted by SchnitzlePuss   (11 posts)  [Biography] bio
Date Tue 31 Jan 2012 02:34 PM (UTC)  quote  ]
Message
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)
[Go to top] top

Posted by Nick Gammon   Australia  (19,338 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 31 Jan 2012 09:01 PM (UTC)  quote  ]
Message
Can you show an actual (example) prompt, not just the prompt string?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by SchnitzlePuss   (11 posts)  [Biography] bio
Date Reply #2 on Tue 31 Jan 2012 10:07 PM (UTC)  quote  ]
Message
<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.
[Go to top] top

Posted by SchnitzlePuss   (11 posts)  [Biography] bio
Date Reply #3 on Tue 31 Jan 2012 10:18 PM (UTC)  quote  ]
Message
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.
[Go to top] top

Posted by Nick Gammon   Australia  (19,338 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Wed 01 Feb 2012 01:12 AM (UTC)  quote  ]
Message
Have you disabled cookies? I use Firefox all the time and never have any problems.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (19,338 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Wed 01 Feb 2012 01:27 AM (UTC)  quote  ]
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (19,338 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Wed 01 Feb 2012 01:29 AM (UTC)  quote  ]
Message
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?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by SchnitzlePuss   (11 posts)  [Biography] bio
Date Reply #7 on Wed 01 Feb 2012 02:02 AM (UTC)  quote  ]
Message
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.
[Go to top] top

Posted by SchnitzlePuss   (11 posts)  [Biography] bio
Date Reply #8 on Wed 01 Feb 2012 02:21 AM (UTC)  quote  ]
Message
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
[Go to top] top

Posted by Nick Gammon   Australia  (19,338 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Wed 01 Feb 2012 03:58 AM (UTC)  quote  ]
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by SchnitzlePuss   (11 posts)  [Biography] bio
Date Reply #10 on Wed 01 Feb 2012 04:22 AM (UTC)  quote  ]
Message
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.
[Go to top] top

Posted by Nick Gammon   Australia  (19,338 posts)  [Biography] bio   Forum Administrator
Date Reply #11 on Wed 01 Feb 2012 08:53 AM (UTC)  quote  ]
Message
How many spaces are after (Flying)? Can you copy and paste an exact prompt with it in it?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by SchnitzlePuss   (11 posts)  [Biography] bio
Date Reply #12 on Wed 01 Feb 2012 01:48 PM (UTC)  quote  ]

Amended on Wed 01 Feb 2012 09:03 PM (UTC) by Nick Gammon

Message

<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.
[Go to top] top

Posted by SchnitzlePuss   (11 posts)  [Biography] bio
Date Reply #13 on Wed 01 Feb 2012 01:52 PM (UTC)  quote  ]

Amended on Wed 01 Feb 2012 01:59 PM (UTC) by SchnitzlePuss

Message
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
[Go to top] top

Posted by Nick Gammon   Australia  (19,338 posts)  [Biography] bio   Forum Administrator
Date Reply #14 on Wed 01 Feb 2012 09:05 PM (UTC)  quote  ]
Message
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.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


3,000 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]