Josef88
06-02-2016, 07:55 PM
hey all
I have found this script on the forum wich is working perfectly.
local player = "charname"
Module.New("AutoFollow", function(module)
for i = CREATURES_LOW, CREATURES_HIGH do
local creature = Creature.GetFromIndex(i)
if creature:isValid() and creature:ID() ~= Self.ID() then
if creature:isOnScreen() and creature:isVisible() and creature:isAlive() and creature:isReachable() then
local name = creature:Name()
if creature:isPlayer() and creature:Name():lower() == player:lower() and not creature:isFollowed() then
creature:Follow()
end
end
end
end
module:Delay(1000)
end)
Although, I'd need another one, which will still follow a character, but on a distance. Like 3-4sqms away.
I have found this script on the forum wich is working perfectly.
local player = "charname"
Module.New("AutoFollow", function(module)
for i = CREATURES_LOW, CREATURES_HIGH do
local creature = Creature.GetFromIndex(i)
if creature:isValid() and creature:ID() ~= Self.ID() then
if creature:isOnScreen() and creature:isVisible() and creature:isAlive() and creature:isReachable() then
local name = creature:Name()
if creature:isPlayer() and creature:Name():lower() == player:lower() and not creature:isFollowed() then
creature:Follow()
end
end
end
end
module:Delay(1000)
end)
Although, I'd need another one, which will still follow a character, but on a distance. Like 3-4sqms away.