Thread: testnpc
View Single Post
  #7  
Old 01-17-2006, 11:59 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by ApothiX
PHP Code:
function onNPC(checkxcheckycheckwcheckh) {
  
temp.npclist getnearestnpcs(checkx,checky);

  for(
temp.npclisttemp.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.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote