mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-14 14:44:55 +02:00
Full Distribution
This commit is contained in:
18
data/talkactions/scripts/teleport_to_town.lua
Normal file
18
data/talkactions/scripts/teleport_to_town.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
function onSay(player, words, param)
|
||||
if not player:getGroup():getAccess() then
|
||||
return true
|
||||
end
|
||||
|
||||
local town = Town(param)
|
||||
if town == nil then
|
||||
town = Town(tonumber(param))
|
||||
end
|
||||
|
||||
if town == nil then
|
||||
player:sendCancelMessage("Town not found.")
|
||||
return false
|
||||
end
|
||||
|
||||
player:teleportTo(town:getTemplePosition())
|
||||
return false
|
||||
end
|
Reference in New Issue
Block a user