Difference between revisions of "Script: Trap spike 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(0x00) { <span style="color:#0000FF">if</span> (isDead|<...")
 
 
Line 28: Line 28:
 
       <span style="color:#0000FF">break</span>;
 
       <span style="color:#0000FF">break</span>;
 
     }
 
     }
     <span style="color:#0000FF">int</span> Q4GH = [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x03, 0x0A);
+
     <span style="color:#0000FF">int</span> Q4GH = [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x03, 0x0A);
 
     [[Engine Function:_loseHP|<span style="color:#FF0000;font-weight:bold">loseHP</span>]](target, Q4GH);
 
     [[Engine Function:_loseHP|<span style="color:#FF0000;font-weight:bold">loseHP</span>]](target, Q4GH);
 
   }
 
   }
 
   <span style="color:#0000FF">return</span> (0x01);
 
   <span style="color:#0000FF">return</span> (0x01);
 
  }
 
  }

Latest revision as of 20:52, 18 October 2018

inherits globals;
trigger enterrange(0x00)
{
  if (isDead(target))
  {
    return (0x01);
  }
  int Q62A = getObjType(this);
  loc Q61U = getLocation(this);
  if (!hasObjVar(this, "disarmed"))
  {
    switch (Q62A)
    {
    case 0x1108
      doLocAnimation(Q61U, 0x1109, 0x01, 0x10, 0x00, 0x00);
      break;
    case 0x111B
      doLocAnimation(Q61U, 0x111C, 0x01, 0x10, 0x00, 0x00);
      break;
    case 0x119A
      doLocAnimation(Q61U, 0x119B, 0x01, 0x0E, 0x00, 0x00);
      break;
    case 0x11A0
      doLocAnimation(Q61U, 0x11A1, 0x01, 0x0E, 0x00, 0x00);
      break;
    default
      break;
    }
    int Q4GH = dice(0x03, 0x0A);
    loseHP(target, Q4GH);
  }
  return (0x01);
}