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
➜ Scripts Which Call on Aliases which call on... triggers!?
|
Scripts Which Call on Aliases which call on... triggers!?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Crpp2
(2 posts) Bio
|
| Date
| Mon 09 Jun 2008 12:05 AM (UTC) |
| Message
| Okay, guys. I'm sorry if this is at all redundant to other posts/topics, but I tried looking through them all and I didn't find much relevant. I'm using VBScripts, and I am rather new to the whole business. To cut to the chase, here's the issue:
I am trying to go through a certain area on my MUD and attack different MOBs using only the numpad. The inherent difficulty here is that there are a number of different mobs with different keywords.
So, my plan is to make a variable called "mob" and have a trigger for each different mob.
As in, trigger "a skeleton is here, etc. etc." to store "skeleton" in variable "mob." Soooo, that's all working so far. However, the next problem is... how do I make a numpad key SEND what is stored in "mob?"
I figured I might be able to write a script that does this all without even using MUSHClient's graphical Alias/Trigger/Variable features, but I really am so far at a loss for how I would do it even with a completely scripted function (I only really know how to write small things, like subroutines).
If anyone can help/provide insight, I would greatly appreciate it. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Mon 09 Jun 2008 12:24 AM (UTC) |
| Message
| That's quite easy to do. First make the keypad item send some sort of word you won't normally need (eg. "attackit").
Then make an alias to match on that word, and insert the mob name, like this:
<aliases>
<alias
match="attackit"
enabled="y"
expand_variables="y"
sequence="100"
>
<send>kill @target</send>
</alias>
</aliases>
See http://mushclient.com/faq point 21, for how that target variable would get set up. You could use an alias or a trigger with "send to variable" basically, to make it set up manually or automatically.
When you hit the number-pad key, whatever is there gets sent back through MUSHclient's command-processor, which is why the alias catches it.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Crpp2
(2 posts) Bio
|
| Date
| Reply #2 on Mon 09 Jun 2008 12:55 AM (UTC) |
| Message
| !!!
Thanks a lot. It works. :D:D
You're awesome. xD | | 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,534 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top