Results of testing:
Trying your suggested code for npc and plugin, the code merely checks for the proper item on the client's head (the lowest value slot in which an item can appear from the @itemlist). If that passes, returns a 1 and check ends. If that fails, returns a 0 and check ends. I.e., the for loop 1-22 is not executing past a true
Code:
if ($client->GetItemIDAt($i) == $item) {
return 1;
}
as none of the other sent items in @itemlist are numerically correct to correspond with $i, returning a 0.
My quest continues...