Script: Trap spike trap

From Ultima Online: The Second Age
Revision as of 08:07, 5 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">inherits</span> globals; <span style="color:#0000FF">trigger</span> enterrange(0x00) { <span style="color:#0000FF">if</span> (isDead|<...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
inherits globals;
trigger enterrange(0x00)
{
  if (isDead(target))
  {
    return (0x01);
  }
  int Q62A = getObjType(this);
  loc Q61U = getLocation(this);
  if (!hasObjVar(this, "disarmed"))
  {
    switch (Q62A)
    {
    case 0x1108
      doLocAnimation(Q61U, 0x1109, 0x01, 0x10, 0x00, 0x00);
      break;
    case 0x111B
      doLocAnimation(Q61U, 0x111C, 0x01, 0x10, 0x00, 0x00);
      break;
    case 0x119A
      doLocAnimation(Q61U, 0x119B, 0x01, 0x0E, 0x00, 0x00);
      break;
    case 0x11A0
      doLocAnimation(Q61U, 0x11A1, 0x01, 0x0E, 0x00, 0x00);
      break;
    default
      break;
    }
    int Q4GH = dice(0x03, 0x0A);
    loseHP(target, Q4GH);
  }
  return (0x01);
}