tempz
08-31-2016, 04:24 PM
Can anyone help me with a follow script that will work smooth while targeting is on, im trying to use this script but it does not work well. It keeps following while trying to target monster.
Could someone tell me how to make it so it stops following when monsters on screen and continues when monsters are dead?
local target = ""
Module("autoFollow", function(module)
local player = Creature(target)
print(target)
if player:isOnScreen(true) then
Creature.Follow(target)
end
end, false)
function onSpeak(chat, msg)
chat:SendYellowMessage(Self.Name(), msg)
if (msg == "start") then
Module("autoFollow"):Start()
chat:SendOrangeMessage("Console", string.format("Started following %s.", target ))
elseif (msg == "stop") then
Module("autoFollow"):Stop()
chat:SendOrangeMessage("Console", "Stoped following.")
elseif msg:match("^name") then
local name = msg:match("^follow (.+)")
if name then
Module("autoFollow"):Stop()
target = name
chat:SendOrangeMessage("Control", "New player added.")
end
end
end
function onClose() end
local chat = Channel("autoFollow", onSpeak, onClose)
Could someone tell me how to make it so it stops following when monsters on screen and continues when monsters are dead?
local target = ""
Module("autoFollow", function(module)
local player = Creature(target)
print(target)
if player:isOnScreen(true) then
Creature.Follow(target)
end
end, false)
function onSpeak(chat, msg)
chat:SendYellowMessage(Self.Name(), msg)
if (msg == "start") then
Module("autoFollow"):Start()
chat:SendOrangeMessage("Console", string.format("Started following %s.", target ))
elseif (msg == "stop") then
Module("autoFollow"):Stop()
chat:SendOrangeMessage("Console", "Stoped following.")
elseif msg:match("^name") then
local name = msg:match("^follow (.+)")
if name then
Module("autoFollow"):Stop()
target = name
chat:SendOrangeMessage("Control", "New player added.")
end
end
end
function onClose() end
local chat = Channel("autoFollow", onSpeak, onClose)