function onSay(cid, words, param, channel)
local destinations = {
["1"] = {p = {x=501, y=515, z=7}, l = 10, c = 100, v = 12345},
["2"] = {p = {x=500, y=439, z=7}, l = 20, c = 200, v = 67891},
["3"] = {p = {x=761, y=657, z=10}, l = 50, c = 300, v = 23456}
}
local tp = destinations[param]
if(param == "") then
doPlayerSendCancel(cid, "Command param required.")
return true
end
if(getPlayerLevel(cid) < tp.l) then
doPlayerSendCancel(cid, "Your level is not high enough.")
[B]if not getTileInfo(getCreaturePosition(cid)).protection then
[/B]doPlayerSendCancel(cid, "You are currently in a fight.")
elseif(getPlayerPremiumDays(cid) < 1) then
doPlayerSendCancel(cid, "You must have premium.")
else
doPlayerRemoveMoney(cid, tp.c)
doTeleportThing(cid, tp.p)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have successfully teleported to ".. param ..".")
end
return true
end