actionleftmouse is sent whenever the player clicks on the NPC.
You'd have to use the event "mousedown". It is triggered when any button was pressed, no matter where you pressed it.
Your script would have to look like that:
NPC Code:
if (playertouchsme) {
toweapons Test;
}
if (mousedown && leftmousebutton) {
putnpc block.gif,test.txt,mousex,mousey;
}
That
should work.