Difference between revisions of "Script: Add door to key"
From Ultima Online: The Second Age
Line 1: | Line 1: | ||
− | <span style="color:#0000FF">inherits</span> [[ | + | <span style="color:#0000FF">inherits</span> [[Script:_lock_it|<span style="color:#2B91AF">lock_it</span>]]; |
<span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q45B(<span style="color:#0000FF">obj</span> Q4MZ, <span style="color:#0000FF">obj</span> key) | <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q45B(<span style="color:#0000FF">obj</span> Q4MZ, <span style="color:#0000FF">obj</span> key) |
Revision as of 10:03, 21 October 2018
inherits lock_it;
function int Q45B(obj Q4MZ, obj key) { list Q5Z5; int Q51N = getObjType(key); switch (Q51N) { case 0x100E case 0x100F case 0x1010 case 0x1012 case 0x1013 break; default bark(key, "Honestly, I'm not a key."); return (0x00); break; } if (hasObjVar(key, "whatIUnlock")) { getObjListVar(Q5Z5, key, "whatIUnlock"); } appendToList(Q5Z5, Q4MZ); setObjVar(key, "whatIUnlock", Q5Z5); return (0x01); }
function int Q51O(obj key, obj Q4MZ) { if (!hasObjVar(key, "whatIUnlock")) { return (0x00); } list Q665; getObjListVar(Q665, key, "whatIUnlock"); if (isInList(Q665, Q4MZ)) { return (0x01); } return (0x00); }
function int Q51Q(obj key, obj Q4MZ) { if (!hasObjVar(Q4MZ, "isLocked")) { int one = getObjVar(Q4MZ, "lockLevel"); setObjVar(Q4MZ, "isLocked", one); return (0x01); } removeObjVar(Q4MZ, "isLocked"); return (0x00); }