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

# npc.effectsync

```lua
npc.effectsync()
```

|                         |                                                   |
| ----------------------- | ------------------------------------------------- |
| id                      | `0x00DE`                                          |
| arguments               | 0                                                 |
| in NPC Kit              | yes                                               |
| measured from a kit NPC | waits: holds the script until its condition holds |
| vanilla scripts         | 1135 calls in 190 of 1114 scripts                 |

## What it does

Holds the script until the effect in script effect slot 0 is gone: [effectsync\_e3](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/effectsync_e3.md) with the slot fixed at 0.

## Timing

Waits, once a frame, until slot 0 is free; a free slot 0 goes on at once. No limit.

## In NPC Kit

Slot 0 is shared with the map: this can wait on a map effect. Prefer the slot forms on 16 to 30. Not tested on a kit NPC.

## Used with

* [effectplay](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/effectplay.md) before it.

## Example

```lua
flash = function()
    npc.questeffectread(217);
    npc.effectreadsync();
    npc.effectplay(0);
    npc.effectsync();
end,
```

## Pitfalls

* Waits for whatever holds slot 0, the map's effects included.
