Difference between revisions of "Script: Teleporter"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">inherits</span> itemmanip; <span style="color:#0000FF">trigger</span> enterrange(0x00) { <span style="color:#0000FF">int</span> Q62G = [...") |
|||
Line 33: | Line 33: | ||
[[Script_Function:_Q5Z2|<span style="color:#2B91AF">Q5Z2</span>]](target, destination); | [[Script_Function:_Q5Z2|<span style="color:#2B91AF">Q5Z2</span>]](target, destination); | ||
[[Engine Function:_setLastValidTerrainLoc|<span style="color:#FF0000;font-weight:bold">setLastValidTerrainLoc</span>]](target, destination); | [[Engine Function:_setLastValidTerrainLoc|<span style="color:#FF0000;font-weight:bold">setLastValidTerrainLoc</span>]](target, destination); | ||
− | <span style="color:#0000FF">int</span> r = [[ | + | <span style="color:#0000FF">int</span> r = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](target, destination); |
<span style="color:#0000FF">return</span> (!r); | <span style="color:#0000FF">return</span> (!r); | ||
} | } | ||
<span style="color:#0000FF">return</span> (0x01); | <span style="color:#0000FF">return</span> (0x01); | ||
} | } |
Latest revision as of 07:09, 19 October 2018
inherits itemmanip;
trigger enterrange(0x00) { int Q62G = getZ(getLocation(this)); int Q5YP = getZ(getLocation(target)); int Q4HE = Q62G - Q5YP; if ((Q4HE > 0x10) || (Q4HE < (0x00 - 0x10))) { return (0x01); } if (hasObjVar(this, "dest")) { loc destination = getObjVar(this, "dest"); } else { bark(this, "No dest Object variable found."); return (0x01); } if (isPlayer(target)) { if (hasObjVar(this, "accessList")) { if (!isInObjVarListSet(this, "accessList", target)) { if (!isEditing(target)) { return (0x01); } } } Q5Z2(target, destination); setLastValidTerrainLoc(target, destination); int r = teleport(target, destination); return (!r); } return (0x01); }