Difference between revisions of "Script Function: CheckStatus"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> checkStatus() { <span style="color:#0000FF">if</span> (isContainer|<span style="c...") |
|||
Line 5: | Line 5: | ||
<span style="color:#0000FF">list</span> Q4E4; | <span style="color:#0000FF">list</span> Q4E4; | ||
[[Engine Function:_getContents|<span style="color:#FF0000;font-weight:bold">getContents</span>]](Q4E4, this); | [[Engine Function:_getContents|<span style="color:#FF0000;font-weight:bold">getContents</span>]](Q4E4, this); | ||
− | while([[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](Q4E4)) | + | <span style="color:#0000FF">while</span>([[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](Q4E4)) |
{ | { | ||
<span style="color:#0000FF">list</span> args; | <span style="color:#0000FF">list</span> args; |
Latest revision as of 17:49, 7 October 2018
function void checkStatus() { if (isContainer(this)) { list Q4E4; getContents(Q4E4, this); while(numInList(Q4E4)) { list args; if (!hasScript(Q4E4[0x00], <span style="color:#800000">"vended"</span>)) { attachScript(Q4E4[0x00], <span style="color:#800000">"vended"</span>); } message(Q4E4[0x00], <span style="color:#800000">"checkStatus"</span>, args); removeItem(Q4E4, 0x00); } } if (Q4SH() < 0x00) { if (!Q4Z0(this)) { setObjVar(this, <span style="color:#800000">"vendedPrice"</span>, getValue(this)); } } return (); }