eq2emu/docs/lua_functions/AddImmunitySpell.md

22 lines
560 B
Markdown
Raw Normal View History

### Function: AddImmunitySpell(ImmunityType, Spawn)
2025-05-04 14:34:15 -04:00
**Description:**
Add an Immunity to the Spawn by the Immunity Type.
2025-05-04 14:34:15 -04:00
**Parameters:**
- `ImmunityType`: UInt8 - Immunity Type to add.
- `Spawn`: Spawn - Spawn to apply immunity.
2025-05-04 14:34:15 -04:00
**Returns:** None.
**Notes:**
- See IMMUNITY_TYPE defines for more details.
- If Spawn is specified only the Spawn receives the Immunity, otherwise if it is in a Spell Script we will apply to all Spell Targets.
2025-05-04 14:34:15 -04:00
**Example:**
```lua
-- Example usage: Immunity Type 7 makes NPC immune to AOE spells.
AddImmunitySpell(7, NPC)
2025-05-04 14:34:15 -04:00
```