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
➜ VBscript
➜ help with a run-kill-script
|
help with a run-kill-script
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Isman
(1 post) Bio
|
| Date
| Mon 19 May 2003 08:40 PM (UTC) |
| 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 | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Mon 19 May 2003 09:02 PM (UTC) |
| 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 | | 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.
10,400 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top