Script Function: fixStats
From Ultima Online: The Second Age
function int fixStats(obj Q68S) { list Q4O3; loc Q5AH = getLocation(Q68S); int Q5TS; obj item; int Q5NC; int Q5NG; for(Q5TS = 0x01; Q5TS < 0x1A; Q5TS++) { item = getItemAtSlot(Q68S, Q5TS); append(Q4O3, item); if (item != NULL()) { Q5NC = teleport(item, Q5AH); } } Q5NG = Q5ML(Q68S); int Q52R = numInList(Q4O3) + 0x01; for(Q5TS = 0x01; Q5TS < Q52R; Q5TS++) { item = Q4O3[Q5TS - 0x01]; if (item != NULL()) { Q5NC = equipObj(item, Q68S, Q5TS); } } setNaturalAC(Q68S, 0x00); return (Q5NG); }