Difference between revisions of "Script Function: Q58J"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q58J(<span style="color:#0000FF">obj</span> me, <span style="color:#0000FF">obj</span> Q6...") |
(No difference)
|
Latest revision as of 04:00, 12 October 2018
function void Q58J(obj me, obj Q68S, string Q68D) { string Q5XK; obj multi = getMultiSlaveId(me); int Q4H3 = getDecayMax(multi); if (Q4H3 == 0xFFFF) { Q5XK = " is ageless."; } else { int Q4FW = getDecayCount(multi); if (Q4FW == 0x00) { Q5XK = " is like new."; } else { if (Q4FW < (Q4H3 / 0x04)) { Q5XK = " is slightly worn."; } else { if (Q4FW < (0x02 * Q4H3 / 0x04)) { Q5XK = " is somewhat worn."; } else { if (Q4FW < (0x03 * Q4H3 / 0x04)) { Q5XK = " is fairly worn."; } else { if (Q4FW < (0x13 * Q4H3 / 0x14)) { Q5XK = " is greatly worn."; } else { Q5XK = " is in danger of collapsing."; } } } } } } string Q5CQ = "This "; concat(Q5CQ, Q68D); concat(Q5CQ, Q5XK); barkTo(me, Q68S, Q5CQ); return (); }