> 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/getmyid.md).

# npc.getmyid

```lua
npc.getmyid()
```

|                         |                                                                     |
| ----------------------- | ------------------------------------------------------------------- |
| id                      | `0x0072`                                                            |
| arguments               | 0                                                                   |
| result                  | Int: goes to the very next call, or to `npc.lua(npc.getmyid(), fn)` |
| in NPC Kit              | yes                                                                 |
| measured from a kit NPC | returns                                                             |
| vanilla scripts         | 164 calls in 73 of 1114 scripts                                     |

## What it does

Gives the NPC's own index in its script set: the number other calls take as an actor. A result.

## Result

The index.

## Timing

Returns at once.

## In NPC Kit

`npc.actor("id")` names an NPC as an argument; `getmyid` is the same for the caller, and can feed a call that takes an actor first: `npc.common2effectplay(npc.getmyid(), 11)`.

## Used with

* [common2effectplay](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/common2effectplay.md), [getx\_12b](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/getx_12b.md).

## Example

An effect played on the NPC itself, which has no `npc.actor` for itself outside a talk.

```lua
sparkle = function()
    npc.sebsoundplay(0, 46);
    npc.common2effectplay(npc.getmyid(), 11);
    npc.wait(150);
end,
```
