Script: Trap mushroom

From Ultima Online: The Second Age
Revision as of 08:09, 5 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">trigger</span> enterrange(0x02) { <span style="color:#0000FF">if</span> (<span style="color:#FF0000;font-weight:bold">isDead</span>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
trigger enterrange(0x02)
{
  if (isDead(target))
  {
    return (0x01);
  }
  if (!hasObjVar(this, "working"))
  {
    setObjVar(this, "working", 0x01);
    callback(this, 0x02, 0x01);
    doLocAnimation(getLocation(this), 0x1126, 0x03, 0x09, 0x00, 0x00);
    loseHP(target, dice(0x02, 0x04));
  }
  return (0x01);
}
trigger callback(0x01)
{
  if (hasObjVar(this, "working"))
  {
    removeObjVar(this, "working");
  }
  return (0x00);
}