Script Function: Q4MO
From Ultima Online: The Second Age
function void Q4MO(loc place) { int Q66J; int Q66I; int Q66K; int left; int right; int Q546; int lower; int Q547; int Q4AU = getTile(place); int x = getX(place); int y = getY(place); loc Q5DL = place; int c = 0x00; int Q62L = getTile(place); setX(Q5DL, x - 0x01); left = getTile(Q5DL); setY(Q5DL, y - 0x01); Q66J = getTile(Q5DL); setX(Q5DL, x); Q66I = getTile(Q5DL); setX(Q5DL, x + 0x01); Q66K = getTile(Q5DL); setY(Q5DL, y); right = getTile(Q5DL); setY(Q5DL, y + 0x01); Q547 = getTile(Q5DL); setX(Q5DL, x); lower = getTile(Q5DL); setX(Q5DL, x - 0x01); Q546 = getTile(Q5DL); if (Q502(Q4AU)) { return (); } if ((Q502(Q66J)) && (!Q502(left)) && (!Q502(Q66I))) { Q62L = 0x07; c = 0x01; } if ((Q502(Q66K)) && (!Q502(right)) && (!Q502(Q66I))) { Q62L = 0x08; c = 0x01; } if ((Q502(Q547)) && (!Q502(right)) && (!Q502(lower))) { Q62L = 0x09; c = 0x01; } if ((Q502(Q546)) && (!Q502(left)) && (!Q502(lower))) { Q62L = 0x0A; c = 0x01; } if ((Q502(left)) && (!Q502(right))) { Q62L = 0x03; c = 0x01; } if ((Q502(right)) && (!Q502(left))) { Q62L = 0x06; c = 0x01; } if ((Q502(Q66I)) && (!Q502(lower))) { Q62L = 0x04; c = 0x01; } if ((Q502(lower)) && (!Q502(Q66I))) { Q62L = 0x05; c = 0x01; } if ((Q502(left)) && (Q502(Q66I))) { Q62L = 0x0D; c = 0x01; } if ((Q502(left)) && (Q502(lower))) { Q62L = 0x0C; c = 0x01; } if ((Q502(right)) && (Q502(Q66I))) { Q62L = 0x0E; c = 0x01; } if ((Q502(right)) && (Q502(lower))) { Q62L = 0x0B; c = 0x01; } if (c) { setTile(place, Q64K[Q62L]); } return (); }