Ive been using the config.lua method of summoning pets to thier owner
Summons
maxPlayerSummons = 1
teleportAllSummons = "yes"
teleportPlayerSummons = "yes"
However this doesnt work when entering teleports or going up and down stairs.
Someone wrote me this script and it did not work at all.
is there any other method to permanently lock a summon to its owner while going up and down stairs and through teleports?
I understand the difficulty of this request, and I hope someone is out there who can handle it.
Summons
maxPlayerSummons = 1
teleportAllSummons = "yes"
teleportPlayerSummons = "yes"
However this doesnt work when entering teleports or going up and down stairs.
Someone wrote me this script and it did not work at all.
Code:
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
is there any other method to permanently lock a summon to its owner while going up and down stairs and through teleports?
I understand the difficulty of this request, and I hope someone is out there who can handle it.