Difference between revisions of "Script Function: Q5SK"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5SK(<span style="color:#0000FF">obj</span> house, <span style="color:#0000FF">obj</span>...") |
|||
Line 1: | Line 1: | ||
+ | <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5SK(<span style="color:#0000FF">obj</span> house, <span style="color:#0000FF">obj</span> Q5HY) | ||
+ | { | ||
+ | <span style="color:#0000FF">obj</span> Q5AB = [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]](); | ||
+ | <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjListVar|<span style="color:#FF0000;font-weight:bold">hasObjListVar</span>]](house, <span style="color:#800000">"myhousedoors"</span>)) | ||
+ | { | ||
+ | <span style="color:#0000FF">list</span> doors; | ||
+ | [[Engine Function:_getObjListVar|<span style="color:#FF0000;font-weight:bold">getObjListVar</span>]](doors, house, <span style="color:#800000">"myhousedoors"</span>); | ||
+ | <span style="color:#0000FF">if</span> ([[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](doors) > 0x00) | ||
+ | { | ||
+ | Q5AB = doors[0x00]; | ||
+ | } | ||
+ | } | ||
+ | <span style="color:#0000FF">else</span> | ||
+ | { | ||
+ | <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](house, <span style="color:#800000">"myhousedoor"</span>)) | ||
+ | { | ||
+ | Q5AB = [[Engine Function:_getObjVar|<span style="color:#FF0000;font-weight:bold">getObjVar</span>]](house, <span style="color:#800000">"myhousedoor"</span>); | ||
+ | } | ||
+ | } | ||
+ | <span style="color:#0000FF">if</span> (Q5AB == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]()) | ||
+ | { | ||
+ | <span style="color:#0000FF">return</span> (0x00); | ||
+ | } | ||
+ | <span style="color:#0000FF">obj</span> Q5NC = [[Engine Function:_mobileHasObjWithListObjOfObj|<span style="color:#FF0000;font-weight:bold">mobileHasObjWithListObjOfObj</span>]](Q5HY, <span style="color:#800000">"whatIUnlock"</span>, Q5AB); | ||
+ | <span style="color:#0000FF">if</span> (Q5NC == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]()) | ||
+ | { | ||
+ | <span style="color:#0000FF">return</span> (0x00); | ||
+ | } | ||
+ | <span style="color:#0000FF">return</span> (0x01); | ||
+ | } | ||
+ | |||
<span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5SK(<span style="color:#0000FF">obj</span> house, <span style="color:#0000FF">obj</span> Q5HY) | <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5SK(<span style="color:#0000FF">obj</span> house, <span style="color:#0000FF">obj</span> Q5HY) | ||
{ | { |
Latest revision as of 15:07, 12 October 2018
function int Q5SK(obj house, obj Q5HY) { obj Q5AB = NULL(); if (hasObjListVar(house, "myhousedoors")) { list doors; getObjListVar(doors, house, "myhousedoors"); if (numInList(doors) > 0x00) { Q5AB = doors[0x00]; } } else { if (hasObjVar(house, "myhousedoor")) { Q5AB = getObjVar(house, "myhousedoor"); } } if (Q5AB == NULL()) { return (0x00); } obj Q5NC = mobileHasObjWithListObjOfObj(Q5HY, "whatIUnlock", Q5AB); if (Q5NC == NULL()) { return (0x00); } return (0x01); }
function int Q5SK(obj house, obj Q5HY) { obj Q5AB = NULL(); if (hasObjListVar(house, "myhousedoors")) { list doors; getObjListVar(doors, house, "myhousedoors"); if (numInList(doors) > 0x00) { Q5AB = doors[0x00]; } } else { if (hasObjVar(house, "myhousedoor")) { Q5AB = getObjVar(house, "myhousedoor"); } } if (Q5AB == NULL()) { return (0x00); } obj Q5NC = mobileHasObjWithListObjOfObj(Q5HY, "whatIUnlock", Q5AB); if (Q5NC == NULL()) { return (0x00); } return (0x01); }