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
(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.
Does perhaps "GetAetheryteByID" work? Have the same issue with TaskManager currently.
It's actually used as:
Code:
local mapid,aethid = GetAetheryteByMapID(LedgendaryFishing.Locations[targetLocation].mapId,LedgendaryFishing.Locations[targetLocation].pos)
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)
I edited your post, so now it is correct, yes. :)
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.