View Single Post
  #6  
Old 05-25-2001, 06:26 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
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;
}
}
}