Difference between revisions of "Script: Autofix2"
From Ultima Online: The Second Age
Line 34: | Line 34: | ||
<span style="color:#0000FF">trigger</span> callback(0x93) | <span style="color:#0000FF">trigger</span> callback(0x93) | ||
{ | { | ||
− | [[Script:_Statfix|<span style="color:#2B91AF">statfix</span>]](this); | + | [[Script Function:_Statfix|<span style="color:#2B91AF">statfix</span>]](this); |
<span style="color:#0000FF">return</span> (0x01); | <span style="color:#0000FF">return</span> (0x01); | ||
} | } |
Latest revision as of 03:29, 19 October 2018
inherits globals;
function void statfix(obj it) { for(int i = 0x00; i < 0x03; i++) { int Q5G7 = getRealStat(it, i); int Q5W9 = Q5G7; if (Q5G7 < 0x00) { Q5W9 = 0x00; } if (Q5G7 >= 0xC8) { Q5W9 = 0x00; } if (Q5W9 != Q5G7) { int Q527 = setRealStat(it, i, Q5W9); } } return (); }
trigger creation { if (!isEditing(this)) { callback(this, 0x05, 0x93); } return (0x01); }
trigger callback(0x93) { statfix(this); return (0x01); }