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

Gammon Forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Scripts Which Call on Aliases which call on... triggers!?
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Scripts Which Call on Aliases which call on... triggers!?

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

Posted by Crpp2   (2 posts)  [Biography] bio
Date Mon 09 Jun 2008 12:05 AM (UTC)
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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 09 Jun 2008 12:24 AM (UTC)
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:

  <send>kill @target</send>

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
[Go to top] top

Posted by Crpp2   (2 posts)  [Biography] bio
Date Reply #2 on Mon 09 Jun 2008 12:55 AM (UTC)

Thanks a lot. It works. :D:D

You're awesome. xD
[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.


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.


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 FutureQuest]