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 ➜ How might I pause and then resume a speedwalk?

How might I pause and then resume a speedwalk?

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


Posted by Weston   (28 posts)  Bio
Date Sun 03 Oct 2004 07:02 PM (UTC)
Message
You may have heard this before, but this time I would like some specifics, please!


I was thinking of using two aliases.
One named 'pause' to temporary stop, and at the same time store the speedwalk queue.

Then I would do my stuff; attack something for example.

Then I would use that second alias, named 'resume'. It would get the saved speedwalk queue and execute it as a speedwalk.


The best that I've been able to do is:

dim speedwalkQueue
dim iCount

speedwalkQueue = World.GetQueue

If Not IsEmpty (speedwalkQueue) Then
for iCount = lbound (speedwalkQueue) to ubound (speedwalkQueue)
world.addalias "", "resume", speedwalkQueue (iCount), eEnabled or eAliasSpeedWalk, ""
world.discardqueue
next
End If


The problem with this solution is that I end up with ten different aliases each with one direction.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Sun 03 Oct 2004 07:57 PM (UTC)

Amended on Sun 03 Oct 2004 08:00 PM (UTC) by Flannel

Message

<aliases>
  <alias
   name="SpeedwalkResume"
   match="^resume$"
   enabled="y"
   echo_alias="y"
   regexp="y"
   ignore_case="y"
   send_to="12"
   sequence="100"
  >
  <send>queue getvariable(&quot;TempQueue&quot;), false
enablealias &quot;speedwalkresume&quot;, 0
getvariable&quot;TempQueue&quot;, &quot;&quot;
</send>
  </alias>
  <alias
   match="^pause$"
   enabled="y"
   echo_alias="y"
   regexp="y"
   ignore_case="y"
   send_to="12"
   sequence="100"
  >
  <send>dim speedwalkQueue
dim iCount
dim NewQueue

newQueue = &quot;&quot;
speedwalkQueue = World.GetQueue
world.discardqueue
If Not IsEmpty (speedwalkQueue) Then
for iCount = lbound (speedwalkQueue) to ubound (speedwalkQueue)
newQueue = newQueue &amp; speedwalkQueue(iCount) &amp; VBCrLf
setvariable &quot;QueueTemp&quot;, newQueue
next
End If
enablealias &quot;speedwalkresume&quot;, 1</send>
  </alias>
</aliases>


~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Weston   (28 posts)  Bio
Date Reply #2 on Mon 04 Oct 2004 04:30 PM (UTC)
Message
Thank you very much for helping, Flannel!

When I tried your aliases I got this error message:
Quote:
Execution of line 3 column 1

Wrong number of arguments or invalid property assignment: 'getvariable'
Line in error:


So then I changed the aliases to:


Quote:
<alias
match="^pause$"
enabled="y"
echo_alias="y"
regexp="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>dim speedwalkQueue
dim iCount
dim NewQueue

newQueue = &quot;&quot;
speedwalkQueue = World.GetQueue
If Not IsEmpty (speedwalkQueue) Then
for iCount = lbound (speedwalkQueue) to ubound (speedwalkQueue)
newQueue = newQueue &amp; speedwalkQueue(iCount) &amp; VBCrLf
world.DeleteVariable &quot;QueueTemp&quot;
setvariable &quot;QueueTemp&quot;, newQueue
world.discardqueue
next
End If
enablealias &quot;speedwalkresume&quot;, 1</send>
</alias>
<alias
name="SpeedwalkResume"
match="^resume$"
enabled="y"
echo_alias="y"
regexp="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>dim speedwalkQueue2

speedwalkQueue2 = world.GetVariable (&quot;QueueTemp&quot;)
world.addalias &quot;SpeedwalkResume2&quot;, &quot;resume2&quot;, speedwalkQueue2, 5121, &quot;&quot;
world.Execute &quot;resume2&quot; '</send>
</alias>



My 'resume' alias might not be pretty, but it actually seems to work.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Mon 04 Oct 2004 07:55 PM (UTC)

Amended on Mon 04 Oct 2004 07:56 PM (UTC) by Flannel

Message
My error was because it was QueueTemp and in my alias I had TempQueue.
If you change it, it should work.

And that way you wont have to worry about adding aliases, or anything.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Weston   (28 posts)  Bio
Date Reply #4 on Tue 05 Oct 2004 01:36 AM (UTC)
Message
That did it. It works now!
Thanks again, Flannel.
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.


19,023 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.