Script Function: Q58J
From Ultima Online: The Second Age
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 (); }