if(owner.dir==NORTH)
P.cx=-6
P.y+=1
if(owner.dir==EAST)
P.cx=-11
P.x+=1
if(owner.dir==WEST)
P.cx=11
P.x-=1
if(owner.dir==SOUTH)
P.cy=8
P.y-=1
if(owner.dir==NORTHEAST)
P.cy=-8
P.cx=-11
P.y+=1
P.x+=1
if(owner.dir==NORTHWEST)
P.cy=-8
P.cx=11
P.y+=1
P.x-=1
if(owner.dir==SOUTHEAST)
P.cy=8
P.cx=-11
P.y-=1
P.x+=1
if(owner.dir==SOUTHWEST)
P.cy=8
P.cx=11
P.y-=1
P.x-=1
But there has to be an easier way to do stuff like this than a whole bunch of if statements, I just cant seem to think of a good method