Script: Hyth1 blade switch

From Ultima Online: The Second Age
Revision as of 22:08, 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">list</span> Q5DQ; <span style="...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
inherits globals;
trigger use
{
  list Q5DQ;
  int Q5A2 = getObjType(this);
  loc trapLocation = 0x1764, 0x20, 0x16;
  switch (Q5A2)
  {
  case 0x1093
    [[messageToRange|messageToRange]](trapLocation, 0x01, "disarm", Q5DQ);
    callback(this, 0x3C, 0x24);
    break;
  case 0x1095
    [[messageToRange|messageToRange]](trapLocation, 0x01, "reset", Q5DQ);
    break;
  default
    break;
  }
  return (0x01);
}
trigger callback(0x24)
{
  list Q5DQ;
  loc trapLocation = 0x1764, 0x20, 0x16;
  int Q5A2 = getObjType(this);
  if (Q5A2 == 0x1095)
  {
    setType(this, 0x1093);
    [[messageToRange|messageToRange]](trapLocation, 0x01, "reset", Q5DQ);
  }
  return (0x00);
}