Difference between revisions of "Script Function: Q5S5"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5S5(<span style="color:#0000FF">int</span> Q5T4, <span style="color:#0000FF">obj</span> Q...") |
|||
Line 26: | Line 26: | ||
<span style="color:#0000FF">if</span> ([[Engine Function:_isNPC|<span style="color:#FF0000;font-weight:bold">isNPC</span>]](Q5HY)) | <span style="color:#0000FF">if</span> ([[Engine Function:_isNPC|<span style="color:#FF0000;font-weight:bold">isNPC</span>]](Q5HY)) | ||
{ | { | ||
− | <span style="color:#0000FF">if</span> (![[ | + | <span style="color:#0000FF">if</span> (![[Script_Function:_isOwnedPet|<span style="color:#2B91AF">isOwnedPet</span>]](Q5HY)) |
{ | { | ||
<span style="color:#0000FF">return</span> (0x00); | <span style="color:#0000FF">return</span> (0x00); |
Latest revision as of 06:03, 24 October 2018
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); }