Script: Lever2

From Ultima Online: The Second Age
Revision as of 20:08, 5 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">trigger</span> message(<span style="color:#800000">"activate"</span>) { <span style="color:#0000FF">if</span> (getObjType|<span style="color...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
trigger message("activate")
{
  if (getObjType(this) == 0x1095)
  {
    setType(this, 0x1093);
    processTriggerCmds(this, "a");
  }
  return (0x00);
}
trigger message("deactivate")
{
  if (getObjType(this) == 0x1093)
  {
    setType(this, 0x1095);
    processTriggerCmds(this, "d");
  }
  return (0x00);
}
trigger use
{
  list args;
  int Q65M = getObjType(this);
  if (Q65M == 0x1095)
  {
    message(this, "activate", args);
  }
  else
  {
    message(this, "deactivate", args);
  }
  return (0x00);
}