local j = {x1 = 990, x2 = 1010, y1= 990, y2 = 1010, z1 = 5, z2= 9}
local to = {
["temple"] = {x=1063, y=607, z=7},
["depot"] = {x=1037, y=586, z=7},
["dp"] = {x=1037, y=586, z=7},
["teleports"] = {x=1158, y=689, z=7},
["jail"] = {x=1150, y=848, z=6},
["prek"] = {x=1381, y=593, z=7},
["cudz"] = {x=975, y=818, z=7},
["xypoz"] = {x=1657, y=1110, z=7},
["carlin"] = {x=1203, y=507, z=7},
["thais"] = {x=1062, y=581, z=7},
["tps"] = {x=1158, y=689, z=7},
["ship"] = {x=1006, y=576, z=6},
["desert"] = {x=873, y=632, z=6},
["trainers"] = {x=1095, y=793, z=8},
["train"] = {x=1109, y=441, z=7},
["donate"] = {x=987, y=420, z=7},
["arena"] = {x=1027, y=505, z=7},
["duel"] = {x=1137, y=702, z=7},
["island"] = {x=1030, y=798, z=7},
["die"] = {x=1650, y=1110, z=8},
["turtle"] = {x=2207, y=1484, z=7},
["yalahar"] = {x=1516, y=1172, z=7},
["edron"] = {x=2106, y=1499, z=8},
["stonehome"] = {x=2222, y=1438, z=7},
["port hope"] = {x=1763, y=1228, z=7},
["cuddle town"] = {x=1440, y=509, z=7},
["joez"] = {x=1639, y=727, z=6},
["udz"] = {x=1893, y=1442, z=7},
["godz"] = {x=1674, y=846, z=7},
["garden"] = {x=1619, y=585, z=7},
["crez"] = {x=1097, y=862, z=6},
["chuz"] = {x=1100, y=917, z=7},
["kelz"] = {x=1674, y=846, z=7},
["monument"] = {x=1095, y=1029, z=7},
["allyz"] = {x=1154, y=809, z=7},
["bar"] = {x=1234, y=725, z=7},
["battle"] = {x=1861, y=1200, z=7},
["lucz"] = {x=1038, y=789, z=7},
["there"] = {x=1162, y=691, z=7},
["hanz"] = {x=2161, y=1024, z=7},
["hell"] = {x=1340, y=1158, z=7},
}
function onSay(cid, words, param, channel)
local p = param:lower()
if getPlayerPromotionLevel(cid) == 1 or getPlayerGroupId(cid) >= 4 then
if getCreatureCondition(cid,CONDITION_INFIGHT) == false then
local p = getCreaturePosition(cid)
if p.x >= j.x1 and p.x <= j.x2 and p.y >= j.y1 and p.y <= j.y2 and p.z >= j.z1 and p.z <= j.z2 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are in jail!")
return true
end
if to[p] ~= nil then
doTeleportThing(cid,to[p])
doSendMagicEffect(to[p],10)
doPlayerSendTextMessage(cid,4,"Teleported to "..p..".")
else
doPlayerSendTextMessage(cid,4,"Invalid Location.")
end
else
doPlayerSendTextMessage(cid,4,"Lose PZ.")
end
else
doPlayerSendTextMessage(cid,4,"Sorry, you need promotion.")
end
return true
end