No categories assigned

LUA:GetMostHated

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