Script for changing values of numeric keypad?

Posted by Gamoneterik on Thu 25 Nov 2010 12:21 AM — 7 posts, 36,130 views.

#0
95% of the time my numeric keypad is exactly as it's supposed to be: North, South, East, etc.

But I would like to be able to make an alias that switches the values of the cardinal points to "Evade North", "Evade East" etc. whereby "Evade" is a class ability that allows me to move more freely in times of combat.

Can this be done?

If so, please let me know how. Cheers.
#1
You can press and hold ctrl to get another set of keypad buttons. You need to look on the Keypad and check to see it.
#2
I was thinking about this topic some more and have a question. Why does the keypad not have a save and load like the macros, aliases, triggers, and variables? Could the feature be added? Or would it be to difficult?
Australia Forum Administrator #3
You can do it with ImportXML:

Template:function=ImportXML
ImportXML

The documentation for the ImportXML script function is available online. It is also in the MUSHclient help file.



As an example, in Lua:


ImportXML ('<keypad> <key name="0" > <send>dodge left</send> </key> </keypad>')


And in VBscript:


ImportXML "<keypad> <key name=""1"" > <send>dodge right</send> </key> </keypad>"

#4
ImportXML ('<keypad> <key name="0" > <send>dodge left</send> </key> </keypad>')

how do i replace <send>dodge left</send> with a script function instead?

--
#5
Miraj said:

ImportXML ('<keypad> <key name="0" > <send>dodge left</send> </key> </keypad>')

how do i replace <send>dodge left</send> with a script function instead?

--


nvm ... got it:

<send>/lua mix_stun_powder()</send>

where /lua is my alias for running a script.

--
Australia Forum Administrator #6
Or you could send some word, eg. "dodge_left_script" and make an alias that matches that, and then calls your script.