Quote:
|
Originally Posted by ApothiX
PHP Code:
function onNPC(checkx, checky, checkw, checkh) {
temp.npclist = getnearestnpcs(checkx,checky);
for(temp.npclist: temp.npc) {
if(temp.npc.x in |checkx,checkx+checkw| && test.npc.y in |checky,checky+checkh|) {
return true;
}
}
return false;
}
|
I think you have the for loop 'backwards' (switch temp.npc and temp.npclist)

. And test.npc.y should be temp.npc.y. Not bad for 30 seconds though

. Other than that, it looks like it'll do what he wants.