Actually, I would get a mining rock image, put it into an npc, have the weapon trigger the mining action, and have the rock npc detect the action, then do stuff.
But to answer your question, you would do
NPC Code:
setplayerprop #c,#v(tiles[playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2]);
That would make your chat text the tile that you are hitting with the axe. Then just check if that tile is the one you want.