Auto follow player
This script uses game-client's follow (green square) when there are no monsters from specific list on screen and not targeting anything.
This script walks by iself, not using follow (green square), trying to keep at least X sqms when there are no monsters from specific list on screen and not targeting anything.
This script uses game-client's follow (green square) when there are no monsters from specific list on screen and not targeting anything.
But also walks by iself, not using follow (green square), trying to keep at least X sqms when THERE ARE monsters from specific list on screen OR targeting anything.
That means: If no monsters = follow using game-client (green square); If there monsters, walk by itself sqm by sqm.
This script uses game-client's follow (green square) when there are no monsters from specific list on screen and not targeting anything.
local Player = 'Player name'
local Monsters = { 'Demon', 'Demon Skeleton', 'Ghoul' }
if connected() then
local follow_creature = followed()
if maround(0, table.unpack(Monsters)) == 0 and target().id == 0 then
if (follow_creature.id == 0 or (follow_creature.id > 0 and follow_creature.name:lower() ~= Player:lower())) and paround(0, Player) > 0 then
follow(Player)
wait(1000)
end
elseif follow_creature.id > 0 then
stop()
end
end
This script walks by iself, not using follow (green square), trying to keep at least X sqms when there are no monsters from specific list on screen and not targeting anything.
local Player = 'Player name'
local PlayerDistance = 3 -- Distance to stay away from player.
local Monsters = { 'Demon', 'Demon Skeleton', 'Ghoul' }
if connected() then
local monsters_around = maroundreachable(0, table.unpack(Monsters))
if monsters_around == 0 and target().id == 0 then
local creature = getcreature(Player)
if creature.id > 0 and creature.dist > PlayerDistance then
reachcreature(Player, PlayerDistance)
end
end
end
This script uses game-client's follow (green square) when there are no monsters from specific list on screen and not targeting anything.
But also walks by iself, not using follow (green square), trying to keep at least X sqms when THERE ARE monsters from specific list on screen OR targeting anything.
That means: If no monsters = follow using game-client (green square); If there monsters, walk by itself sqm by sqm.
local Player = 'Player name'
local Monsters = { 'Demon', 'Demon Skeleton', 'Ghoul' }
if connected() then
local follow_creature = followed()
if maround(0, table.unpack(Monsters)) == 0 and target().id == 0 then
if (follow_creature.id == 0 or (follow_creature.id > 0 and follow_creature.name:lower() ~= Player:lower())) and paround(0, Player) > 0 then
follow(Player)
wait(1000)
end
else
if follow_creature.id > 0 then
stop()
wait(200, 300)
end
local creature = getcreature(Player)
if creature.id > 0 and creature.dist > PlayerDistance then
reachcreature(Player, PlayerDistance)
end
end
end