function trigger_slot_26() /* entry=394 class_id=0x0A18 slot=0x26 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    ref, /* [BP+0Ah] type=0x69 */
    qHi, /* [BP+0Ch] type=0x69 */
    npcNum, /* [BP+0Eh] type=0x69 */
    mapNum, /* [BP+10h] type=0x69 */
    baseLink, /* [BP+12h] type=0x69 */
    searchtype, /* [BP+14h] type=0x69 */
    scmd, /* [BP-02h] type=0x69 */
    cmd, /* [BP-04h] type=0x69 */
    a, /* [BP-06h] type=0x69 */
    b, /* [BP-08h] type=0x69 */
    c, /* [BP-0Ah] type=0x69 */
    d, /* [BP-0Ch] type=0x69 */
    item, /* [BP-0Eh] type=0x24 */
    aitem, /* [BP-10h] type=0x24 */
    newLink, /* [BP-12h] type=0x69 */
    item2; /* [BP-14h] type=0x24 */

  set_info(0x021B, 0);
  newLink = baseLink;
  aitem = ref;
  cmd = (mapNum & 3);
  if (cmd == 0) {
    for item in nearby_items(shape=searchtype, origin=aitem) {
      /* loopnext  */
    }
  }
  else if (cmd == 1) {
    for item in nearby_items(shape=searchtype, origin=aitem) {
      /* loopnext  */
    }
  }
  else if (cmd == 2) {
    for item in nearby_items(shape=searchtype, origin=aitem) {
      /* loopnext  */
    }
  }
  else if (cmd == 3) {
    scmd = (qHi & 7);
    if (scmd == 0) {
      d = (qHi / 8);
      /* loop_selector item in nearby_items(shape=0x0476, origin=aitem) */
      while (!condition) {
        if (Item.getQLo(item) == baseLink) {
          a = Item.getNPCNum(item);
          c = (a & 15);
          b = Item.getMapArray(item);
          b = (((a & 0x00E0) * 8) + b);
          FREE.slot_30(d, c, b, item);
        }
        /* loopnext  */
      }
    }
    else if (scmd == 1) {
      d = (qHi / 8);
      /* loop_selector item in nearby_items(shape=searchtype, origin=aitem) */
      while (!condition) {
        if (Item.getQLo(item) == baseLink) {
          if (d == 31) {
            suspend;
          }
          else {
            c = Item.getFrame(item);
            b = Item.getShape(item);
            a = (b & 0x00FF);
            b = (b & 0x0700);
            b = (b / 8);
            b = (b + c);
            suspend;
            /* bit_not  */
          }
        }
        /* loopnext  */
      }
    }
    else if (scmd == 2) {
      a = (qHi / 8);
      /* loop_selector item in nearby_items(shape=searchtype, origin=aitem) */
      while (!condition) {
        /* loopnext  */
      }
    }
    else if (scmd == 3) {
      for item in nearby_items(shape=searchtype, origin=aitem) {
        if (Item.getQLo(item) == baseLink) {
          a = (qHi / 8);
          spawn TRIGGER.slot_22(a, item, arg_06);
        }
        /* loopnext  */
      }
    }
    else if (scmd == 4) {
      a = (qHi / 8);
      newLink = (newLink + a);
    }
    else if (scmd == 5) {
      a = (qHi / 8);
      newLink = (newLink - a);
    }
    else if (scmd == 6) {
      d = (qHi / 8);
      /* loop_selector item in nearby_items(shape=0x0476, origin=aitem) */
      while (!condition) {
        if (Item.getQLo(item) == baseLink) {
          a = Item.getNPCNum(item);
          c = (a & 15);
          b = Item.getMapArray(item);
          b = (((a & 0x00E0) * 8) + b);
          if (b == 0) {
            if (Item.create(c, b, item2) == 1) {
              suspend;
            }
          }
        }
        /* loopnext  */
      }
    }
  }
  /* word_to_dword  */
  /* pop_result  */
  return;
}
