Here's a lua manual, and qFox has made a list of the different lua-commands for the emulators
here.
If the game is simple enough, it's not that hard to make a script that draws hitboxes around enemies. Because of the way boxes are drawn in lua, you want to have a function that, given a point (x,y) and a width and height, draws a box around (x,y) with that given height and width. Such a script could look something like: (xoffset and yoffset is how many pixels the box is moved from the center, useful in some cases, but they should be both 0).
local function box(xcenter,ycenter,width,height,xoffset,yoffset,color)
left = xcenter-width/2+xoffset
down = ycenter+height/2-yoffset
right = xcenter+width/2+xoffset
up = ycenter-height/2-yoffset
if (left > 0 and left <255> 0 and right <255> 0 and down <224> 0 and up < 224) then
gui.drawbox(left,down,right,up,color);
end;
end;
The if-statements are to make sure that the box is on screen, otherwise the box isn't drawn. Now, if you put the enemy's x and y position as the xcenter and ycenter argument, and give the function values for width and height, it draws a box around the enemy.
Ex: Let's say that the enemy's x and y positions are stored at RAM addresses $0100 and $0101 respectively. To draw a red 16*16 pixel box around that enemy, you write:
enemy1x = memory.readbyte(0x100)
enemy1y = memory.readbyte(0x101)
box(enemy1x, enem1y, 16,16,0,0,"red")
If the enemies' hitboxes are of different sizes, you'll have to make some if-statement or so that takes respect to what type of enemy you're dealing with, and in that case you'll have to find the RAM address for the enemy type.