Difference between revisions of "Script: L1floorspikes"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">trigger</span> enterrange(0x00) { <span style="color:#0000FF">int</span> damage; <span style="color:#0000FF">if</span> (!hasObjVar|<span...")
 
 
Line 4: Line 4:
 
   <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>))
 
   {
 
   {
     damage = [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x03, 0x05);
+
     damage = [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x03, 0x05);
 
     [[Engine Function:_setCurHP|<span style="color:#FF0000;font-weight:bold">setCurHP</span>]](target, [[Engine Function:_getCurHP|<span style="color:#FF0000;font-weight:bold">getCurHP</span>]](target) - damage);
 
     [[Engine Function:_setCurHP|<span style="color:#FF0000;font-weight:bold">setCurHP</span>]](target, [[Engine Function:_getCurHP|<span style="color:#FF0000;font-weight:bold">getCurHP</span>]](target) - damage);
 
   }
 
   }

Latest revision as of 21:27, 18 October 2018

trigger enterrange(0x00)
{
  int damage;
  if (!hasObjVar(this, "disarmed"))
  {
    damage = dice(0x03, 0x05);
    setCurHP(target, getCurHP(target) - damage);
  }
  return (0x00);
}
trigger message("FSdisarm")
{
  int Q5DQ;
  if (!hasObjVar(this, "disarmed"))
  {
    setObjVar(this, "disarmed", Q5DQ);
  }
  return (0x00);
}
trigger message("FSreload")
{
  int Q5DQ;
  if (!hasObjVar(this, "disarmed"))
  {
    setObjVar(this, "disarmed", Q5DQ);
  }
  return (0x00);
}