function onSay(cid, words, param, channel)
local tabble = {
["promo"] = {reqVoc= 7, needLevel=717217},
}
local param,config = string.lower(param),{pid = getPlayerGUID(cid),newlv = 1}
if not tabble[param] then
doPlayerPopupFYI(cid, "O comando correto é !pally promo.") return true
elseif getTilePzInfo(getCreaturePosition(cid)) == false then
doPlayerPopupFYI(cid, "Você precisa estar em pz para resetar.") return true
elseif getPlayerLevel(cid) < tabble[param].needLevel then
doPlayerPopupFYI(cid, "You need be "..tabble[param].needLevel.." level or more.") return true
elseif tabble[param].reqVoc == nil and getPlayerStorageValue(cid, 887978) >= 1 then
doPlayerPopupFYI(cid, "Você já virou promo.") return true
elseif tabble[param].reqVoc ~= nil and getPlayerVocation(cid) ~= tabble[param].reqVoc then
doPlayerPopupFYI(cid, "You dont have the required vocation.") return true
end
if tabble[param].reqVoc == nil then setPlayerStorageValue(cid, 887978, 1) end
local newvoc = tabble[param].reqVoc ~= nil and (tabble[param].reqVoc+1) or 5
setPlayerStorageValue(cid, 887979, newvoc)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.newlv..", `experience` = "..getExperienceForLevel(config.newlv)..",`manamax` = "..config.mana..",`health` = "..config.life..", `healthmax` = "..config.life..",`mana` = "..config.mana.." WHERE `id` = "..config.pid)
return true
end