Difference between revisions of "Script: Dec1 wall face one"

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> message(<span style="color:#800000">"chest_wall_fire_check"</span>) {...")
 
 
Line 11: Line 11:
 
     for(<span style="color:#0000FF">int</span> i = 0x00; i < [[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](Q67G); i++)
 
     for(<span style="color:#0000FF">int</span> i = 0x00; i < [[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](Q67G); i++)
 
     {
 
     {
       [[Engine Function:_loseHP|<span style="color:#FF0000;font-weight:bold">loseHP</span>]](Q67G[i], [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x14, 0x05));
+
       [[Engine Function:_loseHP|<span style="color:#FF0000;font-weight:bold">loseHP</span>]](Q67G[i], [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x14, 0x05));
 
     }
 
     }
 
   }
 
   }
Line 47: Line 47:
 
   for(<span style="color:#0000FF">int</span> i = 0x00; i < [[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](Q67G); i++)
 
   for(<span style="color:#0000FF">int</span> i = 0x00; i < [[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](Q67G); i++)
 
   {
 
   {
     [[Engine Function:_loseHP|<span style="color:#FF0000;font-weight:bold">loseHP</span>]](Q67G[i], [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x14, 0x05));
+
     [[Engine Function:_loseHP|<span style="color:#FF0000;font-weight:bold">loseHP</span>]](Q67G[i], [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x14, 0x05));
 
   }
 
   }
 
   [[Engine Function:_callback|<span style="color:#FF0000;font-weight:bold">callback</span>]](this, 0x05, 0x23);
 
   [[Engine Function:_callback|<span style="color:#FF0000;font-weight:bold">callback</span>]](this, 0x05, 0x23);
 
   <span style="color:#0000FF">return</span> (0x00);
 
   <span style="color:#0000FF">return</span> (0x00);
 
  }
 
  }

Latest revision as of 22:31, 18 October 2018

inherits globals;
trigger message("chest_wall_fire_check")
{
  list Q67G;
  if (!hasObjVar(this, "disarmed"))
  {
    setType(this, 0x1111);
    callback(this, 0x05, 0x23);
    getMobsInRange(Q67G, getLocation(this), 0x03);
    for(int i = 0x00; i < numInList(Q67G); i++)
    {
      loseHP(Q67G[i], dice(0x14, 0x05));
    }
  }
  return (0x00);
}
trigger message("wall_trap_disarm")
{
  int Q5DQ;
  if (!hasObjVar(this, "disarmed"))
  {
    setObjVar(this, "disarmed", Q5DQ);
  }
  return (0x00);
}
trigger message("wall_trap_reload")
{
  if (hasObjVar(this, "disarmed"))
  {
    removeObjVar(this, "disarmed");
  }
  return (0x00);
}
trigger callback(0x23)
{
  list Q67G;
  getMobsInRange(Q67G, getLocation(this), 0x03);
  if (numInList(Q67G) == 0x00)
  {
    setType(this, 0x1110);
    return (0x00);
  }
  for(int i = 0x00; i < numInList(Q67G); i++)
  {
    loseHP(Q67G[i], dice(0x14, 0x05));
  }
  callback(this, 0x05, 0x23);
  return (0x00);
}