-
Notifications
You must be signed in to change notification settings - Fork 52
EntityList
MMOMinion edited this page Oct 1, 2013
·
25 revisions
- The EntityList is a lua metatable.
- The EntityList returns a lua table, where the index of each entry represents the EntityID and the value at this index is an objects of type ENTITY.
- On the Index of this table you can find the AggroList and the PartyList.
- The EntityList can be called with several filters, seperated by comma, which can be combined to get the entity(-ies) wanted. Make sure you use a combination of filters which can logically combined, meaning, using "nearest,lowesthealth" wont work, since each of it excludes the usage of the other.
- Example:
local el = EntityList("nearest,onmesh,gatherable,maxdistance=20")
if ( el ) then
local i,e = next(el)
while (i~=nil and e~=nil) do
-- the 'd' command is a global command for printing out information into the console
d("EntityID: ".. tostring(i).. " Entity : "..tostring(e))
local i,e = next(el,i)
end
end
- maxdistance=number
- Returns Entities within a distance of "number".
- mindistance=number
- Returns Entities beyond a distance of "number".
- nearest
- Returns the closest Entity.
- targetingme
- Returns Entities which are targeting the player.
- targeting=number
- Returns Entities which target the entity with the ID "number".
- los
- Returns Entities within line of sight to the player.
- alive
- Returns Entities with health > 0.
- dead
- Returns Entities with health == 0.
- onmesh
- Returns Entities which are on the navigation mesh.
- gatherable
- Returns Entities which you can gather or harvest.
- minlevel=number
- Returns Entities with a level higher than "number".
- maxlevel=number
- Returns Entities with a level lower than "number".
- lowesthealth
- Returns the Entity with the lowest health.
- shortestpath
- Returns the Entity with the shortest path (navigation path, not direct distance!).
- type=number
- Returns Entities with the enum ENTITYTYPE "number"
- chartype=number
- Returns Entities with the enum CHARACTERTYPE"number"
- exclude=number
- Returns Entities without the one with the entityID "number"
- aggro
- Returns Entities which are having aggro towards the player.
- attackable
- Returns Entities which you can attack.
- ownerid=number
- Returns the Entity which has an owner with the ID "number". This can be used to get for ex. the Pet from the Player
- fateid=number
- Returns Entities which belong to the fate with the ID "number".
- distanceto=number
- Calculates every distance-filter towards the entityID passed as "number" instead of the player.