Script Function: Q5S5
From Ultima Online: The Second Age
function int Q5S5(int Q5T4, obj Q5IP, obj Q5HY) { obj ship = getMultiSlaveId(Q5IP); int Q5SH = getObjVar(ship, "myshipdir"); Q5SH = Q5SH * 0x02; int Q5I1 = getFacing(Q5HY); int Q4IA = Q5SH - Q5I1; if (Q4IA < 0x00) { Q4IA = 0x08 + Q4IA; } int Q4DX = 0x06; if (Q5T4 == 0x01) { Q4DX = 0x02; } if (Q4IA == Q4DX) { loc Q4D0 = getLocation(Q5HY); moveDir(Q4D0, Q5I1); moveDir(Q4D0, Q5I1); return (!Q5S8(Q5HY, Q4D0, Q5I1, 0x09)); } else { if (isNPC(Q5HY)) { if (!isOwnedPet(Q5HY)) { return (0x00); } } } return (0x01); }