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.
 Entire forum ➜ MUSHclient ➜ General ➜ programing an auto sail program

programing an auto sail program

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


Posted by Ixne   (1 post)  Bio
Date Mon 19 Aug 2002 08:54 AM (UTC)
Message
Ok, on this mud I play on when sailing theres a short delay from when you type sail <dir> till you arive at that place and sometimes when sailing somewhere kinda far its rather annoying to have to have to manually sail there so I was wondering how to code a program to sail a dir, get a trigger for when it hits the destination, then sail again.

sail east
The ship is pointed east.
450 hps|215 sp|499 mp > The ship sails east.
Only the wide open ocean can be seen.

Thats what happens when you type sail <dir> in the mud.
You type sail <dir> the ship gets pointed one way then a few heartbeats later it sails that way.

So, how would you be able to sail a dir, then sail a different dir, then another dir etc?
Top

Posted by Guest1   USA  (256 posts)
Date Reply #1 on Wed 21 Aug 2002 09:18 AM (UTC)
Message
I dont know what the syntax would be, but basically I think you would have to have set runs and write little subroutines for each one of them, PROVIDING there is functionability to insert a delay between commands.. Nick I presume you can advise if delays like this are possible, and if so, what the syntax is..?

For example, if you have a regular run from A to B, you set an alias of 'sailA2B' which calls a subroutine.. the subroutine would then send:

World.send "sail east"
wait 2
World.send "sail east"
wait 2
World.send "sail west"
wait 2
..and so on

Although this would only be much use when you're sailing from and to known places.

The other option is to contact the coders of the MUD and tell them it sucks and they should remove the directional "The ship is pointed xxx" messages, or at least put it all on one line with "The ship sails xxx" message.
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.


9,941 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.