I override a few functions - this is one of them for teleporting...
Just throw in a new addin
module.def
MyMods.lua
Just throw in a new addin
module.def
Code:
[Module]
Name=MyMods
Version=1
Files=MyMods.lua
Enabled=1
Dependencies=FFXIVMINION -- optional parameter, to include functions from other LUA modules, FFXIVMinion uses minionlib for example
MyMods.lua
Code:
mymods = {}
-- Initializing function
function mymods.ModuleInit()
-- Function overrides
ShouldTeleport = mymods.ShouldTeleport
end
function mymods.ShouldTeleport(pos)
if (IsPositionLocked() or IsLoading() or ControlVisible("SelectString") or ControlVisible("SelectIconString") or IsShopWindowOpen()) then
return false
end
if (ml_task_hub:CurrentTask().noTeleport) then
return false
end
if (gTeleport == "0") then
return false
else
if (gParanoid == "0") then
return true
else
-- local players = EntityList("type=1,maxdistance=50")
local players = EntityList("type=1")
local nearbyPlayers = TableSize(players)
if nearbyPlayers > 0 then
return false
end
return true
end
end
end
-- Registering the Events
RegisterEventHandler("Module.Initalize",mymods.ModuleInit) -- the initialization function, gets called only once at startup of the game