Weapon help

Posted by Nick Gammon on Sat 31 Jan 2004 09:59 PM — 9 posts, 24,401 views.

Australia Forum Administrator #0
Make the keypad keys contains keypad-1, keypad-2, and so on up to keypad-9 or whatever.

Then make 9 aliases, like this:


<aliases>
  <alias
   match="keypad-1"
   enabled="y"
   variable="w1"
   send_to="9"
   sequence="100"
  >
  <send>axe</send>
  </alias>
</aliases>


That will pick up the keypad-1 and send "axe" to "variable w1".

You can copy the above and paste (click the "paste" button) in the aliases list 9 times, and then go back and edit each one to change what it matches on, and what it sets the variable to.
Amended on Sat 31 Jan 2004 10:00 PM by Nick Gammon
Australia Forum Administrator #1
Make sure that the alias exactly matches what the keypad is sending (no trailing spaces for example) and that aliases are enabled.
USA #2
Which version of MC are you using and do you have scripting enabled?
Australia Forum Administrator #3
send_to="9" means send to variable.

So, the "send to" combo box should have "variable" in it.

Thus, the alias sends "axe" to "w1".

I tried pasting it, it works OK.

Make sure you put "keypad-1" as the keypad action, and paste the alias into the alias list.

If it doesn't work, in what way does it not work? Can you give the error message or behaviour?
Australia Forum Administrator #4
In my alias the "send" line was:

<send>axe</send>

Thus, it should have "axe" in the send box (not "<send>axe</send>"). Did you copy the entire XML code from my first post, or did you copy line-by-line? It is starting to sound like you did.

You should be able to copy from <aliases> to </aliases> as one whole block, and then click the "paste" button in the alias list.

That should set up everything, including the "send to variable" and everything.

(Edited to add emphasis to instructions).
Amended on Sun 01 Feb 2004 11:27 PM by Nick Gammon
USA #5
Think I see the problem.

<alias
<alias stuff here>
>
</alias>

should probably be

<alias>
<alias stuff here>
</alias>


What I suspect is happening (admittedly havent tested this) is the broken alias flag means the alias never actually gets processed so MC has no clue what to do with the "axe" input from the send commands.
Amended on Sun 01 Feb 2004 11:14 PM by Meerclar
Australia Forum Administrator #6

No, the problem is that you are not clicking on the "paste" button as I suggested.

Do not start a new alias, and paste the XML code given into the "send" box as you have done. Delete that alias. Now, copy the alias as given above, go to the alias list window and click on the "paste" button, like this:

That will set up the entire alias, checkboxes, where to send to, the lot. It is supposed to be really easy to use.

Amended on Sun 01 Feb 2004 11:26 PM by Nick Gammon
Australia Forum Administrator #7
Again, you have to do this via an alias.

First set up the macro (F2 or whatever) and in the macro "send" box type "steal_macro".

Then make an alias to pick that up, and expand the variable, like this ...


<aliases>
  <alias
   match="steal_macro"
   enabled="y"
   expand_variables="y"
   sequence="100"
  >
  <send>steal @w1</send>
  </alias>
</aliases>


This will do "steal @w1" and (unlike macros) you can expand variables, so this will work for you.
Australia Forum Administrator #8
In the "send" box enter both commands by pressing Ctrl+Enter to start a new line.