Difference between revisions of "Script Function: Q5XR"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5XR(<span style="color:#0000FF">obj</span> Q5G0, <span style="color:#0000FF">int</span>...") |
|||
Line 1: | Line 1: | ||
+ | <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5XR(<span style="color:#0000FF">obj</span> Q5G0, <span style="color:#0000FF">int</span> newType) | ||
+ | { | ||
+ | <span style="color:#0000FF">int</span> Q5G2 = [[Engine Function:_getObjType|<span style="color:#FF0000;font-weight:bold">getObjType</span>]](Q5G0); | ||
+ | <span style="color:#0000FF">string</span> Q5WW = Q5G2; | ||
+ | <span style="color:#0000FF">string</span> Q5WV = newType; | ||
+ | <span style="color:#0000FF">if</span> (Q5G2 != newType) | ||
+ | { | ||
+ | [[Engine Function:_setType|<span style="color:#FF0000;font-weight:bold">setType</span>]](Q5G0, newType); | ||
+ | [[Engine Function:_attachScript|<span style="color:#FF0000;font-weight:bold">attachScript</span>]](Q5G0, Q5WV); | ||
+ | [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](Q5G0, Q5WW); | ||
+ | } | ||
+ | <span style="color:#0000FF">return</span> (); | ||
+ | } | ||
+ | |||
<span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5XR(<span style="color:#0000FF">obj</span> Q5G0, <span style="color:#0000FF">int</span> newType) | <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5XR(<span style="color:#0000FF">obj</span> Q5G0, <span style="color:#0000FF">int</span> newType) | ||
{ | { |
Latest revision as of 05:24, 12 October 2018
function void Q5XR(obj Q5G0, int newType) { int Q5G2 = getObjType(Q5G0); string Q5WW = Q5G2; string Q5WV = newType; if (Q5G2 != newType) { setType(Q5G0, newType); attachScript(Q5G0, Q5WV); detachScript(Q5G0, Q5WW); } return (); }
function void Q5XR(obj Q5G0, int newType) { int Q5G2 = getObjType(Q5G0); string Q5WW = Q5G2; string Q5WV = newType; if (Q5G2 != newType) { setType(Q5G0, newType); attachScript(Q5G0, Q5WV); detachScript(Q5G0, Q5WW); } return (); }