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:GetHateList"
(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: GetHateList() = |
| − | + | Gets an array of all the spawns in the given spawns hate list | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | GetHateList(param1) | |
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1'' (Spawn | + | ; Required - ''param1'' (Spawn) |
| − | : ''param1'' is the spawn | + | : ''param1'' is the spawn who's hate list we want to get |
| − | |||
| − | |||
==== Usage ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
| − | function | + | function hailed_busy(NPC, Spawn) |
| − | + | local hateList = GetHateList(NPC) | |
| − | + | if hateList ~= nil then | |
| + | for index, value in pairs(hateList) do | ||
| + | Say(NPC, GetName(value)) | ||
| + | end | ||
| + | end | ||
end | end | ||
</pre> | </pre> | ||
| − | This | + | This will list all the spawns in the hate list when hailed while in combat |
| − | |||
| − | |||
| − | |||
Latest revision as of 21:17, 28 August 2013
LUA Functions: GetHateList()
Gets an array of all the spawns in the given spawns hate list
Syntax
GetHateList(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the spawn who's hate list we want to get
Usage
function hailed_busy(NPC, Spawn)
local hateList = GetHateList(NPC)
if hateList ~= nil then
for index, value in pairs(hateList) do
Say(NPC, GetName(value))
end
end
end
This will list all the spawns in the hate list when hailed while in combat