Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Ticker

Ticker

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Niko   (3 posts)  Bio
Date Sat 23 Mar 2002 02:45 PM (UTC)
Message
Where and how I can see a number of seconds before the next tick? I mean something like JMC internal ticker.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 23 Mar 2002 08:18 PM (UTC)
Message

It isn't built in, but you could do that with a bit of scripting. Something like a trigger to match on the 'tick' message, which remembers the current time. Then a timer that fires every second or so, subtracts the current time from the tick time, and displays the result on the status line (eg. 15 seconds to go).

See this post, it is about the same sort of thing: Timer triggers (help needed)


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Niko   (3 posts)  Bio
Date Reply #2 on Thu 28 Mar 2002 02:46 PM (UTC)
Message
I wrote simple script to get the average tick time.

------------
Prompt example:
<100/100hp 100/100m 100/100s 13h>
------------
sub OnNewTick(strTriggerName, strTrigLine, arrWildCards)

dim cutTime
curTime = arrWildCards (7)

world.Note "Current time is " & curTime
end sub
------------
Trigger options:
Trigger = ^<(.*)/(.*)hp (.*)/(.*)m (.*)/(.*)s (.*)h>
Checked Options: Enabled, Ignore Case, Regular Expression
Other options by default
------------

PROBLEM:
========
I get a picture like this:

--- skip ---
<100/100hp 100/100m 100/100s 13h>
Current time is 13

<100/100hp 100/100m 100/100s 14h>
------ end of screen -----------

In other words, I can not correctly get a tick moment. :(
The string "Current time is 14" I will get only after typing any command or simply after ENTER pressing.

Please, show me my mistake..
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Fri 29 Mar 2002 05:22 AM (UTC)
Message
Triggers are evaluated after a newline is received. However the prompt line does not have a newline (as you type at the end of it). Thus, the trigger doesn't activate until you press <enter>.

You need to match on something else, ie. the message that gets sent when the area resets (eg. "You hear rustling sounds.").

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


13,566 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.