No categories assigned

LUA:GetMostHated

Revision as of 20:50, 28 August 2013 by Jabantiz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: GetMostHated()

Gets the spawn with the most hate in the given spawns hate list


Syntax

GetMostHated(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn who's hate list we want to look in

Usage

function hailed_busy(NPC, Spawn)
    local hated = GetMostHated(NPC)
    if hated ~= nil then
        Say(NPC, GetName(Hated) .. " I hate you the most")
    end
end

This will make the spawn say who is at the top of there hate list when hailed while in combat