Difference between revisions of "Script: Mushroom"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">inherits</span> sndfx; <span style="color:#0000FF">trigger</span> enterrange(0x02) { <span style="color:#0000FF">if</span> (!hasObjVar...")
 
 
Line 9: Line 9:
 
     [[Engine Function:_callback|<span style="color:#FF0000;font-weight:bold">callback</span>]](this, 0x02, 0x01);
 
     [[Engine Function:_callback|<span style="color:#FF0000;font-weight:bold">callback</span>]](this, 0x02, 0x01);
 
     [[Engine Function:_setType|<span style="color:#FF0000;font-weight:bold">setType</span>]](this, 0x1126);
 
     [[Engine Function:_setType|<span style="color:#FF0000;font-weight:bold">setType</span>]](this, 0x1126);
     [[Engine Function:_loseHP|<span style="color:#FF0000;font-weight:bold">loseHP</span>]](target, [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x02, 0x04));
+
     [[Engine Function:_loseHP|<span style="color:#FF0000;font-weight:bold">loseHP</span>]](target, [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x02, 0x04));
 
   }
 
   }
 
   <span style="color:#0000FF">return</span> (0x01);
 
   <span style="color:#0000FF">return</span> (0x01);

Latest revision as of 21:55, 18 October 2018

inherits sndfx;
trigger enterrange(0x02)
{
  if (!hasObjVar(this, "working"))
  {
    sfx(getLocation(this), 0x011B, 0x00);
    setObjVar(this, "working", 0x01);
    callback(this, 0x02, 0x01);
    setType(this, 0x1126);
    loseHP(target, dice(0x02, 0x04));
  }
  return (0x01);
}
trigger callback(0x01)
{
  if (hasObjVar(this, "working"))
  {
    removeObjVar(this, "working");
  }
  setType(this, 0x1125);
  if (!isInArea("dungn", getLocation(this), 0x00))
  {
    deleteObject(this);
  }
  return (0x00);
}