Difference between revisions of "LUA:GetPet"

(Created page with "= LUA Functions: GetPet() = Gets the combat pet for the given spawn ==== Syntax ==== var = GetPet(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn) : ''param1'' is...")
 
(No difference)

Latest revision as of 17:08, 11 September 2013

LUA Functions: GetPet()

Gets the combat pet for the given spawn


Syntax

var = GetPet(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn who's pet we want to get


Usage

function hailed(NPC, Spawn)
    local pet = GetPet(Spawn)
    if pet ~= nil then
        Say(NPC, "Your pets name is: " .. GetName(pet))
    end
end

The NPC will respond with the name of the players pet if they have one

Notes

Returns a spawn