function onThink(interval, lastExecution)
for _, cid in ipairs(getPlayersOnline()) do
for _, pid in ipairs(getCreatureSummons(cid)) do
local summonPos, playerPos = getThingPos(pid), getThingPos(cid)
local thisPlayer, thisSummon = {x = summonPos.x + 5, y = summonsPos.y, z = summonPos.z}, {x = playerPos.x - 5, y = playerPos.y, z = playerPos.z}
if getDistanceBetween(thisPlayer, thisSummon) >= 5 then
doTeleportThing(pid, playerPos, true)
end
end
end
return true
end