[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  help

help

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


Posted by Leon   (1 post)  [Biography] bio
Date Tue 26 Oct 2004 02:49 PM (UTC)
Message
How to compse a vb script which would do as follows:
1. perform an action, for example "look".
2. wait for 10 seconds.
3. perform action "go <directrion> and direction is taken from txt file.

the scripts runs until last direction in the txt file, file body exaple: n, se, ne.

Leon
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #1 on Tue 26 Oct 2004 11:38 PM (UTC)
Message
Does the direction have to be taken from a text file? Since that adds a lot of complexity.
You can (assuming youre writing to a text file, or whatever) just as easily put it in a variable, and then read it from that.

Use a DoAfter (MC function) to add your timer (since you cant wait 10 seconds from within the script engine).

Once you get the string (which is delimited by commas it looks like) you can just parse it into an array (using the VB function "split") and then read through the array and send "go XXX" where XXX is the contents of your current array location.

If you want to add a time delay between things being sent, you can always use a speedwalk queue, and then youll use the array to queue things.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] 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.


7,836 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]