ok well this has no onwall detections (it wouldn't be hard to add)
I just made this off the top of my head and didn't feel like adding onwall lol...
this is the basic stuff
NPC Code:
if(created){
//ani junk
timeout=0.05;
}
if(timeout){
this.rnd=int(random(0,4))
if(this.rnd==0) y--;
elseif(this.rnd==1) x--;
elseif(this.rnd==2) y++;
elseif(this.rnd==3) x++;
}