1
0
EQ2Emu/docs/lua_functions/DismissPet.md

542 B
Raw Permalink Blame History

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:

-- From Spells/AA/SummonAnimatedTome.lua
function remove(Caster, Target)
    RemoveSpellBonus(Target)
    pet = GetCosmeticPet(Caster)
    if pet ~= nil then
        DismissPet(pet)
    end