Script Function: Q4DV
From Ultima Online: The Second Age
function void Q4DV(list Q5NJ, obj Q5UB, obj Q4HS, string Q5N4) { int Q4YD; int Q4YB; int Q55Y; int Q4P9; int Q4P8; int Q4Q1; Q4Q1 = getResource(Q4YD, Q5UB, Q5N4, 0x03, 0x02); Q4Q1 = getResource(Q4YB, Q4HS, Q5N4, 0x03, 0x02); Q4Q1 = getResource(Q55Y, Q4HS, Q5N4, 0x03, 0x00); if (Q4YB + Q4YD > Q55Y) { transferResources(Q4HS, Q5UB, Q55Y - Q4YB, Q5N4); Q4P8 = Q55Y; Q4P9 = Q4YD - (Q55Y - Q4YB); } else { transferResources(Q4HS, Q5UB, Q4YD, Q5N4); Q4P8 = Q4YB + Q4YD; Q4P9 = 0x00; } appendToList(Q5NJ, Q4P9); appendToList(Q5NJ, Q4P8); return (); }