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
➜ referencing timers in aliases
referencing timers in aliases
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Ignis
(26 posts) Bio
|
Date
| Wed 24 Aug 2005 08:23 AM (UTC) |
Message
| is there a way reference enabling or disabling a timer in an alias/trigger?
is it something simple like sending "timer.<timername>.enabled = n" to command or execute?
also is there a way to create a random number, or to increment a value in an alias each time it's fired? | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Wed 24 Aug 2005 08:53 AM (UTC) |
Message
| EnableTimer "timername", 1 to enable, or 0 to disable (syntax changes depending on your script language).
Random functions are totally script dependant, so the syntax varies, but yes, very possible.
and yes, you can just have the alias add 1 to a variable via a script.
Or, you can use the information provided with the alias (via GetAliasInfo, 10 and 11). I'm honestly not sure what the difference between 10 and 11 is, nor do I know when/if they reset (which may or may not be your intent). |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Ked
Russia (524 posts) Bio
|
Date
| Reply #2 on Wed 24 Aug 2005 08:54 AM (UTC) |
Message
| Check the following functions in Mushclient's Help:
world.EnableTimer
world.SetVariable
world.GetVariable
Random numbers can be done in any scripting language, so take your pick. | Top |
|
Posted by
| Ignis
(26 posts) Bio
|
Date
| Reply #3 on Wed 24 Aug 2005 09:29 AM (UTC) |
Message
| okay, I can get my aliases, triggers, timers and what-nots working, and I know a decent bit about vb, but I can't seem to get scripting working in mc, any idea what I'm doing wrong?
I have scripting enabled, I don't have any saved scripts yet though, I also have kinda taken the easy way out with my previous aliases and triggers and not actually tried calling a script function to work.
Error number: -2146827864
Event: Execution of line 1 column 1
Description: Object required: '[string: "who"]'
Line in error:
Called by: Immediate execution
if the error message means anything to anyone | Top |
|
Posted by
| Larkin
(278 posts) Bio
|
Date
| Reply #4 on Wed 24 Aug 2005 07:44 PM (UTC) |
Message
| Can you post the code that causes the error? Or don't you know yet which bit of code is doing this?
It appears that you're trying to execute a script function "who" and the function or object isn't found. Did you specify the proper target (i.e., script versus world)? | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #5 on Wed 24 Aug 2005 09:56 PM (UTC) |
Message
| You're probably forgetting to include a script command at all.
Remember, to send something to the world, you need to tell the script engine to SEND.
"who"
would be as if you simply typed "who" on a line in a script.
to send, you need to use this:
send "who"
or World.Send "who"
but in most cases, the world is unnecessary. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | 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.
21,884 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top