You are viewing an old version of this page. Return to the latest version.
Version of 16:30, 28 August 2013 by I need to Update My Profile
Difference between revisions of "LUA:GetMostHated"
(Created page with "= LUA Functions: AddHate() = Adds hate to ''param2'' from ''param1'' ==== Syntax ==== AddHate(param1, param2, param3) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''...") |
|||
| Line 1: | Line 1: | ||
| − | = LUA Functions: | + | = LUA Functions: GetMostHated() = |
| − | + | Gets the spawn with the most hate in the given spawns hate list | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | GetMostHated(param1) | |
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1'' (Spawn | + | ; Required - ''param1'' (Spawn) |
| − | : ''param1'' is the spawn | + | : ''param1'' is the spawn who's hate list we want to look in |
| − | |||
| − | |||
==== Usage ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
| − | function | + | function hailed_busy(NPC, Spawn) |
| − | + | local hated = GetMostHated(NPC) | |
| − | + | if hated ~= nil then | |
| + | Say(NPC, GetName(Hated) .. " I hate you the most") | ||
| + | end | ||
end | end | ||
</pre> | </pre> | ||
| − | This | + | This will make the spawn say who is at the top of there hate list when hailed while in combat |
| − | |||
| − | |||
| − | |||
Latest revision as of 20:50, 28 August 2013
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