<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetMapPointData</id>
	<title>API:GetMapPointData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetMapPointData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetMapPointData&amp;action=history"/>
	<updated>2026-10-18T04:52:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetMapPointData&amp;diff=30428&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetMapPointData&amp;diff=30428&amp;oldid=prev"/>
		<updated>2026-10-16T19:44:26Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Game}}&lt;br /&gt;
Returns information about one point (pin) shown on a map display window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pointData = GetMapPointData(mapDisplayName, pointIndex)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;mapDisplayName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the map display window.&lt;br /&gt;
;pointIndex : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Index of the point on that map, as supplied by the map&amp;#039;s point events.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;pointData : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Data about the point, or nothing if the point is not found.&lt;br /&gt;
&lt;br /&gt;
Fields set for every point:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pointType&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Type of the point, compared with &amp;lt;code&amp;gt;SystemData.MapPips&amp;lt;/code&amp;gt; values.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Id of the thing the point stands for (for a quest point, the quest id).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mapIcon&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Map icon id for [[API:GetMapIconData|GetMapIconData]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Further fields depend on the point type. Static points add &amp;lt;code&amp;gt;zone&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;distance&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;, distance from the player rounded down to a whole number). The stock tooltip code also reads fields such as &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;realm&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;services&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rewards&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;difficulty&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;glyphsRequired&amp;lt;/code&amp;gt; for particular point types.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* &amp;lt;code&amp;gt;pointIndex&amp;lt;/code&amp;gt; is converted to an integer.&lt;br /&gt;
* If the map data is not loaded, or no point with that index exists on that map, the function returns nothing. The stock UI checks the result for &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The function needs at least two arguments and only reads the last two.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;easystem_tooltips/source/maptooltips.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for _, ptIndex in ipairs( points ) do&lt;br /&gt;
    local ptData = GetMapPointData( mapDisplay, ptIndex )&lt;br /&gt;
    if (ptData ~= nil) then&lt;br /&gt;
        ptData.pointIndex = ptIndex&lt;br /&gt;
&lt;br /&gt;
        local sortIndex = MapPointSortOrder[ptData.pointType]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From &amp;lt;code&amp;gt;easystem_utils/source/maputils.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local pointData = GetMapPointData( mapDisplay, ptIndex )&lt;br /&gt;
&lt;br /&gt;
if( pointData.pointType == SystemData.MapPips.QUEST_AREA) then&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetQuestPointConditions|GetQuestPointConditions]]&lt;br /&gt;
* [[API:GetMapIconData|GetMapIconData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>