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

Posted by Crpp2 on Mon 09 Jun 2008 12:05 AM — 3 posts, 15,794 views.

#0
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.
Australia Forum Administrator #1
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.


#2
!!!

Thanks a lot. It works. :D:D

You're awesome. xD