function elevator_gotHit() /* entry=124 class_id=0x021E slot=0x06 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    ref, /* [BP+0Ah] type=0x69 */
    ke, /* [BP+0Ch] type=0x69 */
    item, /* [BP-02h] type=0x24 */
    lowQuality, /* [BP-04h] type=0x69 */
    direction, /* [BP-06h] type=0x69 */
    n, /* [BP-08h] type=0x24 */
    nT; /* [BP-0Ah] type=0x69 */

  set_info(0x020C, *(arg_06));
  process_exclude();
  if ((ref == 1) || (Ultima8Engine.getUnkCrusaderFlag() != 1)) {
    return;
  }
  else {
    FREE.slot_33(0x0220, 0);
    /* global_address global_id=0x3C */
    while (!Actor.isBusy()) {
      spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
      suspend;
    }
    /* global_address global_id=0x3C */
    if (!Actor.getSomeFlagProbablyCrouch()) {
      /* global_address global_id=0x3C */
      /* global_address global_id=0x3C */
      suspend;
    }
    item = ref;
    lowQuality = Item.getQLo(arg_06);
    direction = Item.getQHi(arg_06);
    /* loopscr value_u8=0x24 */
    /* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */
    while (!condition) {
      if (item == *(arg_06)) {
        if (!Actor.isNPC(item)) {
          if (item == 1) {
            n = item;
          }
        }
        else {
          nT = Item.getShape(item);
        }
      }
      /* loopnext  */
    }
    set_info(0x0220, 0);
    if (direction == 0) {
    }
    else {
      direction = (direction - 1);
    }
    if (lowQuality >= 16) {
      /* global_address global_id=0x3C */
      spawn ELEVATOR.slot_20(Actor.getMap(pid, lowQuality), direction, arg_06);
      suspend;
    }
    else if (lowQuality == 16) {
      /* global_address global_id=0x3C */
      spawn ELEVATOR.slot_20(Actor.getMap(pid, 4), direction, arg_06);
      suspend;
    }
    else if (lowQuality == 17) {
      spawn ELEVATOR.slot_20(pid, 17, 10, direction, arg_06);
      suspend;
    }
    else if (lowQuality == 18) {
      spawn ELEVATOR.slot_20(pid, 18, 24, direction, arg_06);
      suspend;
    }
    /* global_address global_id=0x3C */
    while (!Actor.isBusy()) {
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
    }
    FREE.slot_33(0x0220, 0);
  }
  return;
}
