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

# npc.effectcancel\_e4

```lua
npc.effectcancel_e4(slot)
```

|                         |                                 |
| ----------------------- | ------------------------------- |
| id                      | `0x00E4`                        |
| arguments               | 1: Int                          |
| in NPC Kit              | yes                             |
| measured from a kit NPC | returns                         |
| vanilla scripts         | 241 calls in 95 of 1114 scripts |

## What it does

Stops the effect in a script effect slot. The slot is free again once the game has cleared the effect.

## Arguments

### `slot` (Int)

The slot, 0 to 31 (others are clamped).

## Timing

Returns at once.

## In NPC Kit

After it the slot plays nothing until it is read again; a read straight after the cancel can be ignored while the slot is still being cleared, so give it a [wait](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/wait.md) or use another slot. Not tested on a kit NPC.

## Used with

* [effectplay\_e2](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/effectplay_e2.md) before it.
* [questeffectread\_1db](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/questeffectread_1db.md) to load the slot again.

## Example

```lua
stop = function()
    npc.effectcancel_e4(16);
end,
```

## Pitfalls

* A free slot is left as it is; nothing breaks.
