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
➜ Perlscript
➜ DoAfterSpecial
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Solaras
(4 posts) Bio
|
Date
| Mon 13 Jun 2005 03:25 PM (UTC) |
Message
| Hi,
I am new to Mushclient and so having some issues with a few things. One of which is utilising DoAfterSpecial effectively.
In Perl, I am attempting to set a variable = 1, then after 1 second set it = 0. What I can't figure out is how to do this in DoAfterSpecial. Currently I am using timers and setting them true or false and I find this to be cludgy.
Example:
$world->SetVariable("eatingyarrow", "1");
$world->EnableTimer("eatingyarrow", true);
$world->ResetTimer("eatingyarrow");
This is what I tried with DoAfterSpecial and failed miserably at:
$world->SetVariable("eatingyarrow", "1");
$world->DoAfterSpecial (1, '$world->SetVariable("eatingYarrow", "0");', 12);
| Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Mon 13 Jun 2005 05:47 PM (UTC) |
Message
| Works for me.
This is the alias I used to test it.
<aliases>
<alias
match="asdf"
enabled="y"
echo_alias="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>$world->SetVariable("eatingyarrow", 1);
$world->DoAfterSpecial (1, '$world->SetVariable("eatingYarrow", 0);', 12);
</send>
</alias>
</aliases>
I did make 0 and 1 into numbers (instead of strings) but also tested as strings, and it worked just as well. |
~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.
11,776 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top