No categories assigned

LUA:GetPet

Revision as of 17:08, 11 September 2013 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: GetPet() = Gets the combat pet for the given spawn ==== Syntax ==== var = GetPet(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn) : ''param1'' is...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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