ID:1322030
 
(See the best response by NNAAAAHH.)
Code:
verb
attack(mob/m in oview(1))
m.health -= usr.damage


Problem description:
I am looking in the dm reference and see that we can set up macros to be used to handle verb to key events. I am trying to set it up so that when the player presses 'a' it is the macro for this verb. In the dm reference I should be doing:

macro
a return "attack"


This is under macros(client script)

However I am not sure where this is suppose to go in the coding exactly. Is this because the macro(client script) is meaning that it would something where you hit a than enter to enter the command into the input area, and it is not just checking for the actual keyboard input of the a key?
Best response
You could, instead, use the macro editor inside the skin editor to set macros like this one. Open your skin reference to learn more on the skin editor and what you can do. winset() and winget() can be used to change macro sets out as well. I'm sure others will be along shortly to tell you more about soft-coding macros into your source here too.
I forgot to add that I know how to do so through the interface, but how do I use winget and winset for it? I am trying to figure out how to handle the macros code as setting the macro to repeat in the interface is causing an error so I want to set up the recursion/tick myself to handle the repeat instead of it just repeating constantly.
In response to Akando5959
Read the skin reference.

Macro
A keyboard shortcut with a command. Macros belong to a set, which can be attached to a window.


Parameter|  |Format|    |Supported by|  |Default|   |Misc. info
macro| |""| |Main| |""| |Macro set to use, if any. Use the name of a macro set defined in the skin file. Not valid for panes.
The best way to do this, in my opinion, is with winset() because you can cause it to occur wherever you want in the code.
Awesome I got it working with that, now to just set up the recursion stuff. Thank you both for your help.
Of course, no problem.