Script: Cov1 switches

From Ultima Online: The Second Age
Revision as of 00:44, 6 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; messageToRa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
inherits globals;
trigger use
{
  list Q5DQ;
  messageToRange(getLocation(this), 0x0C, "switch", Q5DQ);
  return (0x00);
}
trigger message("switch")
{
  if (getObjType(this) == 0x108F)
  {
    setType(this, 0x1090);
    return (0x00);
  }
  if (getObjType(this) == 0x1090)
  {
    setType(this, 0x108F);
    return (0x00);
  }
  if (getObjType(this) == 0x1091)
  {
    setType(this, 0x1092);
    return (0x00);
  }
  if (getObjType(this) == 0x1092)
  {
    setType(this, 0x1091);
    return (0x00);
  }
  return (0x00);
}