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 ➜ Alias help

Alias help

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


Posted by Gurlag   (4 posts)  Bio
Date Sat 02 Jul 2011 02:20 AM (UTC)
Message
Im trying to make a speedwalk but my mud dosnt accept the command north how would i have it enter N instead of North when doing a speedwalk?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 02 Jul 2011 03:19 AM (UTC)
Message
I vaguely recall we had this problem before, but can't find the solution easily. This will do it, turn off the inbuilt speedwalks, and paste in this alias instead:


<aliases>
  <alias
   match="#*"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>

local s = EvaluateSpeedwalk("%1")

s = string.gsub (s, "%%a+", {
      north = "n",
      south = "s", 
      east = "e",
      west = "w",
      up = "u",
      down = "d",
-- others here
    } )

ColourNote ("cyan", "", "Speedwalking:")
ColourNote ("cyan", "", s)

Execute (s)

</send>
  </alias>
</aliases>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


Basically this looks for a speedwalk starting with "#", and then uses the script routine EvaluateSpeedwalk to convert the speedwalk. It then takes the results from that and replaces "north" by "n" and so on. Then it echos on the screen where you are going, and sends the speedwalk. Just delete the two ColourNote lines if you don't want to see the speedwalk echoed.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Gurlag   (4 posts)  Bio
Date Reply #2 on Sat 02 Jul 2011 01:24 PM (UTC)
Message
how do i turn off the inbuild speedwalks?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 03 Jul 2011 12:51 AM (UTC)
Message
World configuration -> Input -> Commands -> Speed Walking

- 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.


15,937 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.