10-26-2013, 11:19 PM
Wondering if it's possible to add a setting to NOT teleport if players are near, i'd love to have the option selected while gathering but obviously if people are close I wouldn't wanna let it run.
Thanks.
Thanks.
function e_movetogatherable:execute()
local pos = EntityList:Get(ml_task_hub.CurrentTask().gatherid).pos
if (pos ~= nil and pos ~= 0) then
local Playerliste = EntityList("nearest,type=1,maxdistance=25")
if ( (TableSize(Playerliste) == 0) and (gGatherTP == "1") ) then
GameHacks:TeleportToXYZ(pos.x,pos.y,pos.z)
else
local newTask = ffxiv_task_movetopos:Create()
newTask.pos = pos
newTask.range = 1.5
newTask.gatherRange = 1.0
ml_task_hub:CurrentTask():AddSubTask(newTask)
end
end
end