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

# npc.effectread\_e0

```lua
npc.effectread_e0(slot, file)
```

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

## What it does

Loads an effect file into one of the 32 script effect slots, as [questeffectread\_1db](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/questeffectread_1db.md) does for a quest file. The generic form: the number is the effect file itself.

## Arguments

### `slot` (Int)

The slot, 0 to 31 (others are clamped). Shared by every script: vanilla uses 0 to 15 and 31, so a kit NPC is safest on 16 to 30.

### `file` (Int)

The effect file. Vanilla: `201`, `206`, `189`, `137`, `130`, `129`, `151` to `155`. What each file shows has no bundled table.

## Timing

Returns at once; the file loads on its own.

## In NPC Kit

Not tested on a kit NPC. A slot still holding an effect ignores the read.

## Used with

* [effectreadsync\_e1](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/effectreadsync_e1.md), [effectplay\_e2](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/effectplay_e2.md), [effectcancel\_e4](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/effectcancel_e4.md).
* [locationeffectread\_128](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/locationeffectread_128.md), [questeffectread\_1db](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/questeffectread_1db.md): the other files.

## Example

```lua
flash = function()
    npc.effectread_e0(17, 201);
    npc.effectreadsync_e1(17);
    npc.effectplay_e2(17, 0);
end,
```

## Pitfalls

* A read into a busy slot does nothing, with no error.
