NPC Code:
// assume the player says "you are a carrot, *flinch*"
if (playerchats) {
tokenize #c;
/*
this cuts up the line "you are a carrot, *flinch*" into a new string at every space and comma. so it is:
#t(0) = you
#t(1) = are
#t(2) = a
#t(3) = carrot
#t(4) = *flinch*
meaning no only does it break at every space and comma it also cuts them.
*/
// Now strequals()
if (strequals(Owner,#a)&&strequals(#a,Owner)) {
/*
since it is making sure the two strings equal each other the two strings are interchangible.
*/
if (strequals(#t(0),you)&&strequals(#t(1),are)&&streq uals(#t(2),a)&&strequals(#t(3),carrot)) {
showimg 201,@Yesh i am,20,120;
changeimgvis 201,4;
}
}
}
hope this helped, e-mail me:
[email protected] if u have ne further questions.