Difference between revisions of "Script Function: Q4CL"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4CL(<span style="color:#0000FF">obj</span> it, <span style="color:#0000FF">obj</span> use...") |
(No difference)
|
Latest revision as of 16:27, 12 October 2018
function int Q4CL(obj it, obj user) { obj Q4E2 = getTopmostContainer(it); if ((Q4E2 != NULL()) && (Q4E2 != user)) { return (0x00); } int power; power = Q4SO(it); if (power <= 0x00) { return (0x00); } if (Q42M() < 0x00) { systemMessage(user, "This crystal can not be recharged."); return (0x00); } if (Q42M() >= Q55T) { systemMessage(user, "This crystal is already fully charged."); return (0x00); } int num = charges + power; if (num >= Q55T) { num = Q55T; systemMessage(user, "You completely recharge the crystal."); } else { systemMessage(user, "You recharge the crystal."); } Q43X(num); Q442(it); Q5RE(); return (0x01); }