Difference between revisions of "Script: Dec1 axe trap"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">inherits</span> globals; <span style="color:#0000FF">trigger</span> enterrange(0x03) { <span style="color:#0000FF">if</span> (!hasObjV...")
 
 
Line 14: Line 14:
 
   <span style="color:#0000FF">if</span> (![[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"disarmed"</span>))
 
   <span style="color:#0000FF">if</span> (![[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"disarmed"</span>))
 
   {
 
   {
     [[Engine Function:_loseHP|<span style="color:#FF0000;font-weight:bold">loseHP</span>]](target, [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x14, 0x05));
+
     [[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>]](0x14, 0x05));
 
   }
 
   }
 
   <span style="color:#0000FF">return</span> (0x01);
 
   <span style="color:#0000FF">return</span> (0x01);

Latest revision as of 21:32, 18 October 2018

inherits globals;
trigger enterrange(0x03)
{
  if (!hasObjVar(this, "disarmed"))
  {
    setType(this, 0x114C);
  }
  return (0x01);
}
trigger enterrange(0x02)
{
  if (!hasObjVar(this, "disarmed"))
  {
    loseHP(target, dice(0x14, 0x05));
  }
  return (0x01);
}
trigger leaverange(0x04)
{
  setType(this, 0x114B);
  return (0x01);
}
trigger message("axe_disarm")
{
  int Q5DQ;
  if (!hasObjVar(this, "disarmed"))
  {
    setObjVar(this, "disarmed", Q5DQ);
    setType(this, 0x114B);
  }
  return (0x00);
}
trigger message("axe_reload")
{
  if (hasObjVar(this, "disarmed"))
  {
    removeObjVar(this, "disarmed");
  }
  return (0x00);
}