Script Function: Lock it

From Ultima Online: The Second Age
Revision as of 10:06, 21 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> lock_it(<span style="color:#0000FF">obj</span> Q4XN, <span style="color:#0000FF">int</span...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int lock_it(obj Q4XN, int start, int stop)
 {
   if (!hasObjVar(Q4XN, "isLocked"))
   {
     attachScript(Q4XN, "locked");
     lockLevel = random(start, stop);
     setObjVar(Q4XN, "isLocked", lockLevel);
     setObjVar(Q4XN, "lockLevel", lockLevel);
     return (0x01);
   }
   return (0x00);
 }