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
➜ Access Global Timer from plugin
|
Access Global Timer from plugin
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Manacle
(28 posts) Bio
|
| Date
| Tue 04 Jan 2011 07:32 AM (UTC) |
| Message
| I'm trying to enable/disable global timers from a plugin based upon certain circumstances, but I can't seem to access them.
When I run '.Note(IsTimer("TestTimer"))' from my input bar, I receive the response that I expect - eOK.
When I call a function in my plugin with the same line (minus the scripting prefix, of course), I receive indication that that timer doesn't exist (return code 30017).
Is it possible to access a timer I've manually added to my preferences from the scope of my plugin? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Tue 04 Jan 2011 08:12 PM (UTC) |
| Message
| No, not easily. Plugins are supposed to be independent of the main script, so if you uninstall them, or send a copy to a friend, there aren't "parts missing" because they rely on timers and triggers in the main world.
The easiest thing to do is simply copy the timer into the plugin. Hit the "copy" button (not the copy menu item) on the timers list in the preferences dialog to get a copy. See here for more details:
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
Then open the plugin .xml file, and in an appropriate place (eg. not inside the middle of a trigger) paste the resulting timer XML. Then you now have the timer inside the plugin. |
- 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.
11,964 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top