Script: Statue spikes one

From Ultima Online: The Second Age
Revision as of 21:21, 18 October 2018 by Grimoric (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
inherits sndfx;
trigger message("disarm")
{
  if (!hasObjVar(this, "disarmed"))
  {
    setObjVar(this, "disarmed", 0x01);
    callBack(this, 0x3C, 0x24);
  }
  return (0x00);
}
trigger callback(0x24)
{
  if (hasObjVar(this, "disarmed"))
  {
    removeObjVar(this, "disarmed");
  }
  return (0x00);
}
trigger enterrange(0x01)
{
  if (!hasObjVar(this, "disarmed"))
  {
    loc Q61U - getLocation(this);
    sfx(Q61U, 0x022D, 0x00);
    doLocAnimation(Q61U, 0x11A1, 0x01, 0x0E, 0x00, 0x00);
  }
  return (0x01);
}
trigger enterrange(0x00)
{
  if (!hasObjVar(this, "disarmed"))
  {
    loc Q61U - getLocation(this);
    sfx(Q61U, 0x022D, 0x00);
    doLocAnimation(Q61U, 0x11A1, 0x01, 0x0E, 0x00, 0x00);
    loseHP(target, dice(0x0A, 0x05));
  }
  return (0x01);
}