Posts: 177
	Threads: 28
	Joined: Jul 2014
	
	
 
	
	
		Hey guys,
I have a couple of lua mods that use GetClosestAetheryteToMapIDPos, but now I get errors in the mod when tryiing to call it.
failed with [string "C:\MinionApp\Bots\FFXIVMinion\LuaMods\/LedgendaryFishing/LedgendaryFishing.lua"]:659. attempt to call global 'GetClosestAetheryteToMapIDPos' (a nil value)
Is there an equivalent function I can use that does the same thing?
Regards
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 2,170
	Threads: 65
	Joined: Oct 2013
	
	
 
 
	
	
	
		
	Posts: 177
	Threads: 28
	Joined: Jul 2014
	
	
 
	
		
		
		07-23-2015, 05:44 PM 
(This post was last modified: 07-23-2015, 06:36 PM by tadeus.)
	 
	
		 (07-23-2015, 05:43 PM)Ace Wrote:  GetAetheryteByMapID
Thank you!!!
Well, that fixed one problem.
Now teleport doesn't do anything :(
Code:
local tele = GetAetheryteByMapID(LedgendaryFishing.Locations[targetLocation].mapId,LedgendaryFishing.Locations[targetLocation].pos)
dfish("New Teleport: "..tostring(tele))
Player:Stop()
Player:Teleport(tele)
When it executes that last line, nothing happens.  No teleport, no error messages.
Ok, I figured out what's going on.
The new function isn't returning the ID of the Aetheryte, it's returning the same MapID that's supplied in the parameter list.
For Swiftperch it should have returned 13, but returned 138 which is the MapID for Western La Noscea.
	
 
	
	
	
		
	
 
 
	
	
	
		
	Posts: 40
	Threads: 5
	Joined: Jun 2015
	
	
 
	
	
		Does perhaps "GetAetheryteByID" work? Have the same issue with TaskManager currently.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 2,170
	Threads: 65
	Joined: Oct 2013
	
	
 
	
	
		It's actually used as:
Code:
local mapid,aethid = GetAetheryteByMapID(LedgendaryFishing.Locations[targetLocation].mapId,LedgendaryFishing.Locations[targetLocation].pos)
		
	
 
 
	
	
	
		
	Posts: 40
	Threads: 5
	Joined: Jun 2015
	
	
 
	
		
		
		07-23-2015, 08:34 PM 
(This post was last modified: 07-23-2015, 08:42 PM by Ace.)
	 
	
		So I assume for TaskManager it would be like this:
Was:
Code:
local tele = GetClosestAetheryteToMapIDPos(location.map,location)
dbg("teleporting player to aetherite ".. tele..", mesh: ("..location.mesh..")")
Player:Teleport(tele)
should be:
Code:
local mapid,aethid = GetAetheryteByMapID(location.map,location)
dbg("teleporting player to aetherite ".. aethid ..", mesh: ("..location.mesh..")")
Player:Teleport(aethid)
		
	
 
 
	
	
	
		
	Posts: 2,170
	Threads: 65
	Joined: Oct 2013
	
	
 
	
	
		I edited your post, so now it is correct, yes. :)
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 40
	Threads: 5
	Joined: Jun 2015
	
	
 
 
	
	
	
		
	Posts: 229
	Threads: 41
	Joined: May 2015
	
	
 
	
	
		FYI this line doesn't work:
dbg("teleporting player to aetherite ".. aethid ..", mesh: ("..location.mesh..")")
getting an error about location is nil
works fine with just:
local mapid,aethid = GetAetheryteByMapID(LedgendaryFishing.Locations[targetLocation].mapId,LedgendaryFishing.Locations[targetLocation].pos)
Player:Teleport(aethid)
I assume the dbg line is supposed to write that text to the console.