1
0
EQ2Emu/docs/lua_functions/DismissPet.md

22 lines
542 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Function: DismissPet(Spawn)
**Description:**
Dismisses (despawns) the specified players active pet. This works for combat pets, cosmetic pets, deity pets, etc., causing them to vanish as if the player dismissed them manually.
**Parameters:**
- `spawn` (Spawn) - Spawn object representing `spawn`.
**Returns:** None.
**Example:**
```lua
-- From Spells/AA/SummonAnimatedTome.lua
function remove(Caster, Target)
RemoveSpellBonus(Target)
pet = GetCosmeticPet(Caster)
if pet ~= nil then
DismissPet(pet)
end
```