set a temporary string, let's call it
this.clientwants, then you have this in the NPCW:
NPC Code:
in created portion:
setstring this.headsallowed<racehere>, bobhead.gif, ilikecheese.gif, monkey.gif, carl.gif;
rest of script
player says what head and it's set to this.clientwants
checkhead();
if (this.headisgood == true) {
sethead script here
} else setplayerprop Not a valid head;
// this goes at the bottom or wherever you put your functions
function checkhead();
this.headisgood = false;
tokenize this.headsallowed;
for (this.z = 0; this.z < tokenscount; this.z++) {
if (strequals(#s(this.clientwants),#t(this.z))) {
this.headisgood = true;
break;
}
}
}