<?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%3AGetAreaData</id>
	<title>API:GetAreaData - 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%3AGetAreaData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetAreaData&amp;action=history"/>
	<updated>2026-10-18T14:42:04Z</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:GetAreaData&amp;diff=30340&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:GetAreaData&amp;diff=30340&amp;oldid=prev"/>
		<updated>2026-10-16T19:43:01Z</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 the map areas the player is currently in, with their influence ids.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
areas = GetAreaData()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;areas : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Array of area tables, indexed from 1.&lt;br /&gt;
&lt;br /&gt;
Each area table has these fields:&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;areaName&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; || Name of the area.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;areaNumber&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Area number.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;areaID&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Area id. Always equal to &amp;lt;code&amp;gt;areaNumber&amp;lt;/code&amp;gt; in the result.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;influenceID&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Influence id of the area, or 0 if it has none. Use it with [[API:GetInfluenceData|GetInfluenceData]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;hasPQButNoInfluence&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The client skips areas whose area number and area id differ, so only entries where both match are returned.&lt;br /&gt;
* If the zone tracker is not set up, or there is no player object, or the Lua state is not available, 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;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Finding the influence id of the current area, from &amp;lt;code&amp;gt;ea_objectivetrackers/source/publicquesttrackerwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local areaData = GetAreaData()&lt;br /&gt;
&lt;br /&gt;
if( areaData == nil )&lt;br /&gt;
then&lt;br /&gt;
    return nil, false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local hasPQButNoInfluence = false&lt;br /&gt;
for key, value in ipairs( areaData )&lt;br /&gt;
do&lt;br /&gt;
    if (value.influenceID ~= 0)&lt;br /&gt;
    then&lt;br /&gt;
        -- Return whatever value.hasPQButNoInfluence is&lt;br /&gt;
        return value.influenceID, value.hasPQButNoInfluence&lt;br /&gt;
    elseif( value.hasPQButNoInfluence )&lt;br /&gt;
    then&lt;br /&gt;
        hasPQButNoInfluence = true&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetInfluenceData|GetInfluenceData]]&lt;br /&gt;
* [[API:GetActiveObjectivesData|GetActiveObjectivesData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>