You are viewing an old version of this page. Return to the latest version.
Version of 16:31, 28 August 2013 by I need to Update My Profile
Difference between revisions of "LUA:GetEncounter"
(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: GetEncounter() = |
| − | + | Gets an array of all the spawns in the encounter list | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | GetEncounter(param1) | |
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1'' (Spawn | + | ; Required - ''param1'' (Spawn) |
| − | : ''param1'' is the spawn | + | : ''param1'' is the spawn who's encounter list we want to get |
| − | |||
| − | |||
==== Usage ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
| − | function | + | function hailed_busy(NPC, Spawn) |
| − | + | local encounter = GetEncounter(NPC) | |
| − | + | if encounter ~= nil then | |
| + | for index, value in pairs(encounter) do | ||
| + | Say(NPC, GetName(value)) | ||
| + | end | ||
| + | end | ||
end | end | ||
</pre> | </pre> | ||
| − | This | + | This will list all the spawns in the encounter when hailed while in combat |
| − | |||
| − | |||
| − | |||
Latest revision as of 21:13, 28 August 2013
LUA Functions: GetEncounter()
Gets an array of all the spawns in the encounter list
Syntax
GetEncounter(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the spawn who's encounter list we want to get
Usage
function hailed_busy(NPC, Spawn)
local encounter = GetEncounter(NPC)
if encounter ~= nil then
for index, value in pairs(encounter) do
Say(NPC, GetName(value))
end
end
end
This will list all the spawns in the encounter when hailed while in combat