Script: Test floor

From Ultima Online: The Second Age
Revision as of 11:24, 5 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">trigger</span> leaverange(0x02) { <span style="color:#0000FF">int</span> Q5YO = getX|<span style="color:#FF0000;font-weight:bold">getX</span...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
trigger leaverange(0x02)
{
  int Q5YO = getX(getLocation(target));
  int Q62F = getX(getLocation(this));
  list Q67G;
  if (!hasObjVar(this, "working") && (Q5YO < Q62F))
  {
    setObjVar(this, "working", 0x01);
    doLocAnimation(getLocation(this), 0x3709, 0x02, 0x38, 0x00, 0x00);
    setType(this, 0x3727);
    callback(this, 0x01, 0x01);
    clearList(Q67G);
    getMobsAt(Q67G, getLocation(this));
    for(int i = 0x00; i < numInList(Q67G); i++)
    {
      loseHP(Q67G[i], 0x03E8);
    }
  }
  return (0x01);
}
trigger callback(0x01)
{
  if (hasObjVar(this, "working"))
  {
    removeObjVar(this, "working");
  }
  deleteObject(this);
  return (0x00);
}