Script: Dec2 statue one

From Ultima Online: The Second Age
Revision as of 22:54, 5 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">inherits</span> globals; <span style="color:#0000FF">trigger</span> use { <span style="color:#0000FF">int</span> Q4FS = getX|<span sty...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
inherits globals;
trigger use
{
  int Q4FS = getX(getLocation(this));
  int Q4FT = getY(getLocation(this));
  int Q4FU = getZ(getLocation(this));
  int Q5CG = Q4FU + 0x01;
  loc Q5C0 = Q4FS, Q4FT, Q5CG;
  loc trapLocation = 0x14CB, 0x023C, 0x00;
  list Q5DQ;
  if (!hasObjVar(this, "working"))
  {
    callback(this, 0x05, 0x24);
    int Q64U = teleport(this, Q5C0);
    messageToRange(trapLocation, 0x0A, "disarm", Q5DQ);
    setObjVar(this, "working", 0x01);
  }
  return (0x01);
}
trigger callback(0x24)
{
  int Q4FS = getX(getLocation(this));
  int Q4FT = getY(getLocation(this));
  int Q4FU = getZ(getLocation(this));
  int Q5CG = Q4FU - 0x01;
  loc Q5C0 = Q4FS, Q4FT, Q5CG;
  if (hasObjVar(this, "working"))
  {
    removeObjVar(this, "working");
  }
  int Q64U = teleport(this, Q5C0);
  return (0x01);
}