metis
08-10-2017, 01:37 PM
I need script for follow my Firend .
only if zero monster in screen OR i dont have target monster(Targeting auto)
Now it changes every 1 sec from Follow to Target Monster and vice versa
local player = "XXXX"
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)
OR
Module.New("follow", function(module)
Creature.Follow("XXXX")
module:Delay(3000)
end)
EDIT. DONE. It was enough to add a label to the walker and its call.
only if zero monster in screen OR i dont have target monster(Targeting auto)
Now it changes every 1 sec from Follow to Target Monster and vice versa
local player = "XXXX"
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)
OR
Module.New("follow", function(module)
Creature.Follow("XXXX")
module:Delay(3000)
end)
EDIT. DONE. It was enough to add a label to the walker and its call.