Reduce random AFK offset to from 5 nodes to 1 node
parent
e615a3794b
commit
0a926f429a
4
init.lua
4
init.lua
|
@ -124,7 +124,9 @@ function teleports.teleportate(parameters)
|
||||||
teleports.lastplayername = playername
|
teleports.lastplayername = playername
|
||||||
player:setpos({x=pos2.x,y=pos2.y+0.5,z=pos2.z})
|
player:setpos({x=pos2.x,y=pos2.y+0.5,z=pos2.z})
|
||||||
else
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue