Mh, you could've used keypressed too.
NPC Code:
if (keypressed){
if (strequals(#p(1), q)){
//menu code here
}
}
and for the showstats, if you have so many you might want to consider using.
NPC Code:
showstats allstats-whatever you don't want // Not sure if 'allstats' is correct, but it was something similiar.