Skip to content
f3re edited this page Feb 9, 2015 · 2 revisions

PinList

  • The PinList is a lua metatable.
  • The PinList returns a lua table, where the value of each entry is an object of type PIN.
  • All list indices start at 1
  • Global constants of the form X_Y_Z can be found at http://wiki.esoui.com/Constant_Values

Pin Table Attributes

  • Each Pin has 3 parameters which differ based on pin type
  • For example, for Quest Pins the parameters are journalindex, stepindex, conditionindex
  • Attributes will be added for params of each Pin type over the coming weeks/months
type
Returns Pin type (number) corresponding to global constant MAP_PIN_TYPE_
pos
Returns a (table) containing the (x,y,z) position of the Pin.
journalindex
Returns Pin journal index (number) for Quest Pins.
stepindex
Returns Pin step index (number) for Quest Pins.
conditionindex
Returns Pin condition index (number) for Quest Pins.
---

Accessing the PinList

  • The PinList 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.
  • Example:
local pl = PinList("nearest,onmesh,type="..tostring(g("MAP_PIN_TYPE_QUEST_OFFER")))
if ( pl ) then
   local p = pl[1]
   if(ValidTable(p)) then
      -- the 'd' command is a global command for printing out information into the console
      local pinpos = p.pos
      d("Nearest quest offer at ("..tostring(pinpos.x)..","..tostring(pinpos.y)..","..tostring(pinpos.z)..")")  
   end  
end

PinList Filters

maxdistance=number
Returns Pins within a distance of "number".
mindistance=number
Returns Pins beyond a distance of "number".
nearest
Returns the closest Pin.
onmesh
Returns Pins which are on the navigation mesh.
type=number
Returns Pins with the global constant MAP_PIN_TYPE_ "number"
journalindex=number
Returns Quest pins with journal index "number".
stepindex=number
Returns Quest pins with step index "number".
conditionindex=number
Returns Quest pins with condition index "number".

PinList Functions

:GetByIndex(number)
Returns Pin from the global PinList at index "number".
:HasPin(type,param1,param2,param3)
Scans the global PinList for a Pin of MAP_PIN_TYPE type with param values matching param1, param2, and param3. Returns true if a matching Pin is found and false otherwise.
:FindPin(type,param1,param2,param3)
Scans the global PinList for a Pin of MAP_PIN_TYPE type with param values matching param1, param2, and param3. Returns the Pin table if the matching Pin is found and nil otherwise.
:GetPinCount()
Returns the global Pin count (number)
Clone this wiki locally