Difference between revisions of "Script: Jailcheck"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">inherits</span> globals; <span style="color:#0000FF">member</span> <span style="color:#0000FF">int</span> Q5M6; <span style="color:#0000FF...") |
|||
Line 28: | Line 28: | ||
[[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](Q4XN, <span style="color:#800000">"UnJailLoc"</span>); | [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](Q4XN, <span style="color:#800000">"UnJailLoc"</span>); | ||
} | } | ||
− | <span style="color:#0000FF">int</span> Q527 = [[ | + | <span style="color:#0000FF">int</span> Q527 = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q4XN, Q4U3); |
<span style="color:#0000FF">return</span> (); | <span style="color:#0000FF">return</span> (); | ||
} | } |
Latest revision as of 07:33, 19 October 2018
inherits globals;
member int Q5M6;
trigger creation { callback(this, 0x0708, 0x74); return (0x01); }
function int Q4ZC(obj Q4XN) { loc Q51A = 0x14AB, 0x0496, 0x00; loc Q5AH = getLocation(Q4XN); if (getDistanceInTiles(Q51A, Q5AH) < 0x32) { return (0x01); } return (0x00); }
function void Q65W(obj Q4XN) { loc Q4U3 = 0x05E0, 0x05F9, 0x28; if (hasObjVar(Q4XN, "UnJailLoc")) { Q4U3 = getObjVar(Q4XN, "UnJailLoc"); removeObjVar(Q4XN, "UnJailLoc"); } int Q527 = teleport(Q4XN, Q4U3); return (); }
trigger callback(0x74) { shortcallback(this, 0x01, 0x75); if (Q4ZC(this)) { Q5M6 = 0x01; Q65W(this); } return (0x01); }
trigger callback(0x75) { if (Q5M6) { systemMessage(this, "You have been released from jail"); } if (hasObjVar(this, "UnJailLoc")) { removeObjVar(this, "UnJailLoc"); } if (hasObjVar(this, "NoLogOut")) { removeObjVar(this, "NoLogOut"); } detachScript(this, "jailcheck"); return (0x01); }