Hello. I need to do a script that will teleport players from a given position to the temple after entering the command / shift lever. I am using otx 3.
I have something like that, but it only works for players who pronounce the command. I need the script to transfer everyone in this area.
I have something like that, but it only works for players who pronounce the command. I need the script to transfer everyone in this area.
Code:
local arena = {
from = {x=1000, y=1000, z=7}, -- left top corner of arena
to = {x=1010, y=1010, z=7}, -- right bottom corner of arena
temple = { x = 500, y = 500, z = 7 } -- change it to temple pos
}
function onSay(player, words, param)
broadcastMessage("Test teleportacji grupowej.", MESSAGE_STATUS_CONSOLE_RED)
if isInRange(getPlayerPosition(player), arena.from,arena.to) then
player:teleportTo(player:getTown():getTemplePosition())
end
return true
end