Script Function: Q4Y7
From Ultima Online: The Second Age
function int Q4Y7(int Q5NY, int Q4HG, list Q65O) { int Q4GW = hasObjVar(this, "debugSkillInfo"); while(numInList(Q65O)) { setArrayIntElem(0x00, 0x00, Q5NY, Q65O[0x00]); setArrayIntElem(0x00, 0x03, Q5NY, Q4HG); obj Q61Z = createNoResObjectAt(Q65O[0x00], getLocation(this)); int Q571 = 0x00; int Q4Q1 = getResource(Q571, Q61Z, "metal", 0x03, 0x00); setArrayIntElem(0x00, 0x04, Q5NY, Q571); int val; if (isReallyWeapon(Q61Z)) { val = Q571 + (getWeaponSpeed(Q61Z) * getAverageDamage(Q61Z) / 0x0C); } else { val = Q571 + (getMaxArmorClass(Q61Z) * 0x02); } setArrayIntElem(0x00, 0x05, Q5NY, val); string description = getNameByType(Q65O[0x00]); toUpper(description, 0x00, 0x01); if (Q4GW) { description = description + ". $" + val + ", " + Q571 + " metal"; } else { description = "Build " + description + ", " + Q571 + " metal."; } setArrayStrElem(0x00, 0x02, Q5NY, description); deleteObject(Q61Z); removeItem(Q65O, 0x00); Q5NY++; } return (Q5NY); }