• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Summon teleport script

Code:
function onThink(interval, lastExecution, thinkInterval)
   local maxDistance = 10
   for _, pid in ipairs(getPlayersOnline()) do
      local sums = getCreatureSummons(pid)
      if #sums > 0 then
         for i = 1, #sums do
            if getThingPos(pid).z ~= getThingPos(sums[i]).z or
                   getDistanceBetween(getThingPos(pid), getThingPos(sums[i])) > maxDistance then
               doTeleportThing(sums[i], getThingPos(pid))
               doSendMagicEffect(getThingPos(pid), 21)
            end
         end
      end
   end
   return true
end
 
Back
Top