Walk on monster soul
#64
This will walk on monster souls when added to map.
--[[
Script made by Lee (Discord: l33_) - www.trainorcreations.com
If you want to support my work, feel free to donate at https://trainorcreations.com/donate
PS. Stop ripping off my work and selling it as your own.
]]--
local iPos = nil
local iID = 34132
macro(500, "Walk on Monster Soul", function()
if iPos then
autoWalk(iPos, 100, { ignoreNonPathable = true })
end
end)
UI.Button("Clear Position", function()
iPos = nil
end)
onAddThing(function(tile, thing)
if thing:getId() == iID then
local tmpPosition = tile:getPosition()
local pPosition = pos()
if tmpPosition and pPosition then
if tmpPosition.z == pPosition.z and getDistanceBetween(pos(), tmpPosition) <= 7 then
iPos = tmpPosition
return
end
end
end
end)
onRemoveThing(function(tile, thing)
if thing:getId() == iID then
if tmpPosition and pPosition then
if tmpPosition.z == pPosition.z and getDistanceBetween(pos(), tmpPosition) <= 7 then
iPos = nil
return
end
end
end
end)
14 Oct 2021