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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  help with a run-kill-script

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

help with a run-kill-script

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Isman   (1 post)  [Biography] bio
Date Mon 19 May 2003 08:40 PM (UTC)  quote  ]
Message
hi there, i just wanted to build a script that will check if there are enemys on tha field,and then the script automatically will kill it - else, it should wald through a map by an run=Array(n,nw,w,sw,s,so,o,no)if there is no enemy..magic shield should be checked to, and when it ends, a new shild should be made...is that possible n how hard to make such a script?..thx 4 help
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 19 May 2003 09:02 PM (UTC)  quote  ]
Message
Yes it is possible, do a bit of a search in this forum, a few people have done similar things, they might give you ideas. I think there was a recent post about detecting enemies and hitting them, and a while back there was a "wilderness walker" which walked in various directions.

Basically you need some triggers, eg. one to match "is there an enemy" - whatever that is for you, and another "my shield has run out". I would start with those two, and at least automate that part.

You can test these triggers without actually going into battle by using a little-documented feature - the "debug simulated world input" window. Go to a quiet part of the MUD, and then hit Shift+Ctrl+F12.

Then type in what you expect to see (better have made an exact copy from an earlier battle), eg.

"The Orc lunges at you"

Hit <enter> and it will pretend that that came from the MUD - then check that the trigger fires and does what you want it to. The debug window remembers what you entered from time to time, so if the trigger doesn't work you can fix it, and try again.

Make sure you put a "newline" in the debug window or the trigger won't fire. One way is to use Ctrl+Enter when typing in your test text, another is to enter a newline in hex, eg. \0A

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


1,356 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]