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

# npc.locationeffectread\_128

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

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

## What it does

Loads a location effect file (one tied to a place) 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.

## 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 location effect file. Vanilla: `27`, `22`, `26`, `28`, `35`, `5`, `36`, `11`, `29`, `37`. 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).

## Example

```lua
glow = function()
    npc.locationeffectread_128(18, 27);
    npc.effectreadsync_e1(18);
    npc.effectplay_e2(18, 0);
end,
```

## Pitfalls

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