diff --git a/init.lua b/init.lua index 81b18e8..fa03049 100644 --- a/init.lua +++ b/init.lua @@ -124,7 +124,9 @@ function teleports.teleportate(parameters) teleports.lastplayername = playername player:setpos({x=pos2.x,y=pos2.y+0.5,z=pos2.z}) else - player:setpos({x=pos2.x-5+math.random(1, 10),y=pos2.y+3,z=pos2.z-5+math.random(1, 10)}) + -- Small chance to "miss" destiation by 1 node horizontally to prevent afk players + -- from teleporting forever + player:setpos({x=pos2.x-2+math.random(1, 3),y=pos2.y+0.5,z=pos2.z-2+math.random(1, 3)}) end end end