local config = {
1 = {x = x, y = y, z = z},
2 = {x = x, y = y, z = z},
3 = {x = x, y = y, z = z}
}
function onSay(cid, words, param, channel)
param = param:lower()
if hasCondition(cid, CONDITION_INFIGHT) == TRUE then
doPlayerSendCancel(cid, "You may not teleport while in combat.")
return true
end
if param == '1' then
if doTeleportThing(cid, config.1, true) then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
end
elseif param == '2' then
if doTeleportThing(cid, config.2, true) then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
end
elseif param == '3' then
if doTeleportThing(cid, config.3, true) then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
end
else
doPlayerSendCancel(cid, "There is no such place.")
return true
end
return true
end