PHP Code:
for(temp.i = 0; i < 4; i ++) {
if (player.dir == i) {
temp.tx = int(this.x + (i==1?-1:(i==3?1:0));
temp.ty = int(this.y + (i==0?-1:(i==2?1:0));
if (tiletype(tx, ty) != 22) {
goto(tx, ty);
}
}
}
PHP Code:
temp.a = {
{ 0,-1},
{-1, 0},
{ 0, 1},
{ 1, 0}
};
temp.b = player.dir;
if (tiletype(int(this.x + a[b][0], this.y + a[b][1])) != 22) {
goto(int(this.x + a[b][0], this.y + a[b][1]);
}
dunno if they work (no vecx/y used ;o)