> For the complete documentation index, see [llms.txt](https://fehdead.gitbook.io/npc-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setposbynaviicon.md).

# npc.setposbynaviicon

```lua
npc.setposbynaviicon(groupId, entryId)
```

|                         |                                |
| ----------------------- | ------------------------------ |
| id                      | `0x030D`                       |
| arguments               | 2: Int, Int                    |
| in NPC Kit              | yes                            |
| measured from a kit NPC | returns                        |
| vanilla scripts         | 96 calls in 83 of 1114 scripts |

## What it does

Places the NPC at one of the map's navigation-map icons, facing that icon's heading: the spot the map marks for its save crystal, for example, without writing its coordinates.

## Arguments

### `groupId` (Int)

The icon group. Vanilla: `3` (81 of 96 calls), in the scripts that read `getcrystalid(3, 0)` just before, so `3` is the save crystal; `8` (13) and `6` (2) are not identified.

### `entryId` (Int)

The entry within the group, from `0`; every vanilla call passes `0`. An entry past the group's end does nothing.

## Timing

Returns at once.

## In NPC Kit

A press in the editor's Move group. An entry the map doesn't have leaves the NPC where it is.

## Used with

* [setpos2](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setpos2.md): the placement it ends in (position and heading).
* `getcrystalid`: whether the map has a crystal entry.
* [rmove](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/rmove.md): a walk away from the spot afterwards.

## Example

A moogle who appears at the save crystal's spot and walks to its stall.

```lua
init = function()
    npc.setposbynaviicon(3, 0);   -- at the crystal's spot, with its heading
    npc.rmove(72.0, 4.0, 39.0);   -- then off to the stall
end,
```

## Pitfalls

* The spot is where the map puts the crystal itself: an NPC left there overlaps it.
