function onSay(cid, words, param)
local c = { levelmin = 80,
reipos = {x = 1071, y = 1044, z = 1}, ----------------- x,y,z, as coordenadas do Castelo do NPC do Rei no MAP.
reino1pos = {x = 450, y = 1367, z = 7}, ----------------- x,y,z, as coordenadas do reino da "Fairy Tail", aonde so os players da Fairy Tail podem ir.
reino2pos = {x = 997, y = 785, z = 6}, -----------------x,y,z, as coordenadas do reino da "Phantom Lord", aonde so os players da Phantom Lord podem ir.
}
if isPlayerPzLocked(cid) then
doPlayerSendCancel(cid, "You cannot use this command during battle.")
return true
end
if param == '' then
if getPlayerLevel(cid) < c.levelmin then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa alcançar o lvl 80 para poder ir ate o Rei.")
return false
elseif getPlayerLevel(cid) > c.levelmin and getPlayerReino(cid) == tostring("0") then
doTeleportThing(cid,c.reipos)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Agora vá falar com o Rei e escolher sua Nação!")
return true
elseif getPlayerLevel(cid) > c.levelmin and getPlayerReino(cid) == tostring("Fairy Tail") then
doTeleportThing(cid,c.reino1pos)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Bem-Vindo "..getPlayerName(cid).." a Guilda Fairy Tail.")
return true
elseif getPlayerLevel(cid) > c.levelmin and getPlayerReino(cid) == tostring("Phantom Lord") then
doTeleportThing(cid,c.reino2pos)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Bem-Vindo "..getPlayerName(cid).." a Guild Phantom Lord.")
return true
elseif getPlayerLevel(cid) > c.levelmin and getPlayerReino(cid) == tostring("Blue Pegasus") then
doTeleportThing(cid,c.reino3pos)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Bem-Vindo "..getPlayerName(cid).." a Guilda Blue Pegasus.")
return true
elseif getPlayerLevel(cid) > c.levelmin and getPlayerReino(cid) == tostring("Lamia Scale") then
doTeleportThing(cid,c.reino4pos)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Bem-Vindo "..getPlayerName(cid).." a Guilda Lamia Scale.")
return true
elseif getPlayerLevel(cid) > c.levelmin and getPlayerReino(cid) == tostring("Cait Shelte") then
doTeleportThing(cid,c.reino5pos)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Bem-Vindo "..getPlayerName(cid).." a Guilda Cait Shelte.")
return true
end
end
return true
end