Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Solaras
(4 posts) bio
|
| Date |
Mon 13 Jun 2005 03:25 PM (UTC) [ quote
] |
| 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) [ quote
] |
| 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.
1,439 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )