function trigger_slot_2A() /* entry=394 class_id=0x0A18 slot=0x2A */
{
  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 */
    aitem, /* [BP-0Eh] type=0x24 */
    npc, /* [BP-10h] type=0x24 */
    counter, /* [BP-12h] type=0x69 */
    k; /* [BP-14h] type=0x69 */

  set_info(0x021B, 0);
  aitem = ref;
  cmd = (mapNum & 3);
  if (cmd == 0) {
    for npc in nearby_items(shape=searchtype, origin=aitem) {
      a = (qHi / 16);
      b = (qHi & 15);
      if (a == 0) {
        suspend;
        spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
        suspend;
      }
      else {
        suspend;
        spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
        suspend;
        if (Actor.isDead(npc) == 1) {
          return;
        }
        counter = 1;
        while (counter > a) {
          if (Actor.isDead(npc) == 0) {
            suspend;
          }
          spawn FREE.waitNTimerTicks(pid, 1, 0x00000000);
          suspend;
          counter = (1 + counter);
        }
      }
      /* loopnext  */
    }
    return;
  }
  else if (cmd == 1) {
    for npc in nearby_items(shape=searchtype, origin=aitem) {
      /* loopnext  */
    }
    return;
  }
  else if (cmd == 2) {
    for npc in nearby_items(shape=searchtype, origin=aitem) {
      /* loopnext  */
    }
    return;
  }
  else if (cmd == 3) {
    scmd = (qHi & 7);
    a = (qHi / 8);
    if (scmd == 0) {
      for npc in nearby_items(shape=searchtype, origin=aitem) {
        if (a == 1) {
        }
        else if (a == 2) {
        }
        else if (a == 3) {
        }
        /* loopnext  */
      }
    }
    else if (scmd == 1) {
      for npc in nearby_items(shape=searchtype, origin=aitem) {
        spawn FREE.waitNTimerTicks(pid, 1, 0x00000000);
        suspend;
        /* loopnext  */
      }
    }
    else if (scmd == 2) {
      for npc in nearby_items(shape=searchtype, origin=aitem) {
        spawn FREE.waitNTimerTicks(pid, 1, 0x00000000);
        suspend;
        /* loopnext  */
      }
    }
    else if (scmd == 3) {
      for npc in nearby_items(shape=searchtype, origin=aitem) {
        spawn FREE.waitNTimerTicks(pid, 1, 0x00000000);
        suspend;
        /* loopnext  */
      }
    }
    else if (scmd == 4) {
      for npc in nearby_items(shape=searchtype, origin=aitem) {
        k = a;
        /* loopnext  */
      }
    }
    else if (scmd == 5) {
      for npc in nearby_items(shape=searchtype, origin=aitem) {
        spawn NPC.equip(a, npc);
        /* loopnext  */
      }
    }
    return;
  }
  return;
}
