No categories assigned

LUA:GetSkill

LUA Functions: GetSkill()

Gets the skill for the given entity

Syntax

GetSkill(param1, param2)


Parameters

Required - param1 (Spawn), param2 (string)
param1 is the entity who's skill we want to get
param2 is the name of the skill we want

Usage

function hailed(NPC, Spawn)
    skill = GetSkill(Spawn, "Offence")
    if skill ~= nil then
        Say(NPC, "You have the offence skill")
    else
        Say(NPC, "You do not have the offence skill")
    end
end

The hailed NPC will respond if the player has the offence skill or not

Notes

This can only be used on an Entity