Good morning, someone could convert these scripts to tfs 1.3, is a dungeon system.
-- Config # --
local areafrom = {x = 695, y = 152, z = 8} -- ENTRADA from
local areato = {x = 706, y = 163, z = 8} -- ENTRADA to
local pos_exit = {x = 708, y = 158, z = 8} -- POS SAIDA
local pos_entrance = {x = 706, y = 158, z = 8} -- POS ENTRADA
local global_stor = 30050
local player_stor = 45319
local timetokick_free = {60, "min"} -- tempo
local timetokick_vip = {90, "min"} -- tempo
-- END --
local function convertTime(a)
if(type(tonumber(a)) == "number" and a > 0) then
if (a <= 3599) then
local minute = math.floor(a/60)
local second = a - (60 * minute)
if(second == 0) then
return ((minute)..((minute > 1) and " minutos" or " minuto"))
else
return ((minute ~= 0) and ((minute>1) and minute.." minutos e " or minute.." minuto e ").. ((second>1) and second.." segundos" or second.." segundo") or ((second>1) and second.." segundos" or second.. " segundo"))
end
else
local hour = math.floor(a/3600)
local minute = math.floor((a - (hour * 3600))/60)
local second = (a - (3600 * hour) - (minute * 60))
if (minute == 0 and second > 0) then
return (hour..((hour > 1) and " horas e " or " hora e "))..(second..((second > 1) and " segundos" or " segundo"))
elseif (second == 0 and minute > 0) then
return (hour..((hour > 1) and " horas e " or " hora e "))..(minute..((minute > 1) and " minutos" or " minuto"))
elseif (second == 0 and minute == 0) then
return (hour..((hour > 1) and " horas" or " hora"))
end
return (hour..((hour > 1) and " horas, " or " hora, "))..(minute..((minute > 1) and " minutos e " or " minuto e "))..(second..((second > 1) and " segundos" or " segundo"))
end
end
end
local function doRemoveMonstersInArea(from, to)
for x = from.x, to.x do
for y = from.y, to.y do
local pos = {x=x, y=y, z = from.z}
local m = getTopCreature(pos).uid
if m > 0 and isMonster(m) then
doRemoveCreature(m)
end
end
end
end
local function getPlayersInArea(fromPos, toPos)
local cave_exc_players = {}
for _, pid in ipairs(getPlayersOnline()) do
if isInRange(getPlayerPosition(pid), fromPos, toPos) then
table.insert(cave_exc_players, pid)
end
end
return cave_exc_players
end
local function kickPlayerFromArea(cid, p)
for _, pid in ipairs(getPlayersOnline()) do
if isPlayer(pid) and isInRange(getPlayerPosition(pid), p[1], p[2]) then
doTeleportThing(pid, p[3])
doSendMagicEffect(p[3], CONST_ME_TELEPORT)
doCreatureSay(pid, 'You were kicked out of the room.', TALKTYPE_ORANGE_1)
end
end
end
local function mathtime(table) -- by dwarfer
local unit = {"sec", "min", "hour", "day"}
for i, v in pairs(unit) do
if v == table[2] then
return table[1](60^(v == unit[4] and 2 or i-1))(v == unit[4] and 24 or 1)
end
end
return error("Bad declaration in mathtime function.")
end
function onUse(cid, item, frompos, item2, topos)
local check_player = getPlayersInArea(areafrom, areato);
if getGlobalStorageValue(cid, global_stor) - os.time() <= 0 and getPlayerStorageValue(cid, player_stor) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "Infelizmente o servidor deu SaveServer ou caiu e você perdeu sua Cave Exclusiva. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, player_stor) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, global_stor) - os.time() > 0 and getPlayerStorageValue(cid, player_stor) - os.time() <= 0 then
if #check_player > 0 then
doPlayerSendTextMessage(cid, 27, "Possui um jogador nesta Cave Exclusiva. Aguarde ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
else
doPlayerSendTextMessage(cid, 27, "Esta Cave Exclusiva está ocupada, o jogador não se encontra nela no momento, mas pode voltar. Aguarde ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
end
elseif getGlobalStorageValue(cid, global_stor) - os.time() > 0 and getPlayerStorageValue(cid, player_stor) - os.time() > 0 then
if #check_player > 0 then
doTeleportThing(cid, pos_exit)
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerSendTextMessage(cid, 27, "Você saiu da Cave Exclusiva. Você ainda possui ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
return true
else
doTeleportThing(cid, pos_entrance)
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerSendTextMessage(cid, 27, "Você entrou na Cave Exclusiva. Você ainda possui ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
return true
end
elseif getGlobalStorageValue(cid, global_stor) - os.time() <= 0 and getPlayerStorageValue(cid, player_stor) - os.time() <= 0 and getPlayerItemCount(cid, 12707) >= 1 then
if getPlayerStorageValue(cid, 45343) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "Você já possui uma Cave Exclusiva. Só pode haver 1 Cave Exclusiva por personagem.")
return true
end
if doPlayerRemoveItem(cid, 12707, 1) then
if isPremium(cid) then
setGlobalStorageValue(cid, global_stor, os.time()+90*60)
setPlayerStorageValue(cid, player_stor, os.time()+90*60)
setPlayerStorageValue(cid, 45343, os.time()+90*60)
addEvent(kickPlayerFromArea, mathtime(timetokick_vip) * 1000, cid, {areafrom, areato, pos_exit})
else
setGlobalStorageValue(cid, global_stor, os.time()+60*60)
setPlayerStorageValue(cid, player_stor, os.time()+60*60)
setPlayerStorageValue(cid, 45343, os.time()+60*60)
addEvent(kickPlayerFromArea, mathtime(timetokick_free) * 1000, cid, {areafrom, areato, pos_exit})
end
doRemoveMonstersInArea(areafrom, areato)
doTeleportThing(cid, pos_entrance)
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerSendTextMessage(cid, 27, "Você entrou na Cave Exclusiva. Você possui ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
end
else
doPlayerSendTextMessage(cid, 27, "Você não possui o item.")
end
return true
end
local areafrom = {x = 695, y = 152, z = 8} -- ENTRADA from
local areato = {x = 706, y = 163, z = 8} -- ENTRADA to
local pos_exit = {x = 708, y = 158, z = 8} -- POS SAIDA
local pos_entrance = {x = 706, y = 158, z = 8} -- POS ENTRADA
local global_stor = 30050
local player_stor = 45319
local timetokick_free = {60, "min"} -- tempo
local timetokick_vip = {90, "min"} -- tempo
-- END --
local function convertTime(a)
if(type(tonumber(a)) == "number" and a > 0) then
if (a <= 3599) then
local minute = math.floor(a/60)
local second = a - (60 * minute)
if(second == 0) then
return ((minute)..((minute > 1) and " minutos" or " minuto"))
else
return ((minute ~= 0) and ((minute>1) and minute.." minutos e " or minute.." minuto e ").. ((second>1) and second.." segundos" or second.." segundo") or ((second>1) and second.." segundos" or second.. " segundo"))
end
else
local hour = math.floor(a/3600)
local minute = math.floor((a - (hour * 3600))/60)
local second = (a - (3600 * hour) - (minute * 60))
if (minute == 0 and second > 0) then
return (hour..((hour > 1) and " horas e " or " hora e "))..(second..((second > 1) and " segundos" or " segundo"))
elseif (second == 0 and minute > 0) then
return (hour..((hour > 1) and " horas e " or " hora e "))..(minute..((minute > 1) and " minutos" or " minuto"))
elseif (second == 0 and minute == 0) then
return (hour..((hour > 1) and " horas" or " hora"))
end
return (hour..((hour > 1) and " horas, " or " hora, "))..(minute..((minute > 1) and " minutos e " or " minuto e "))..(second..((second > 1) and " segundos" or " segundo"))
end
end
end
local function doRemoveMonstersInArea(from, to)
for x = from.x, to.x do
for y = from.y, to.y do
local pos = {x=x, y=y, z = from.z}
local m = getTopCreature(pos).uid
if m > 0 and isMonster(m) then
doRemoveCreature(m)
end
end
end
end
local function getPlayersInArea(fromPos, toPos)
local cave_exc_players = {}
for _, pid in ipairs(getPlayersOnline()) do
if isInRange(getPlayerPosition(pid), fromPos, toPos) then
table.insert(cave_exc_players, pid)
end
end
return cave_exc_players
end
local function kickPlayerFromArea(cid, p)
for _, pid in ipairs(getPlayersOnline()) do
if isPlayer(pid) and isInRange(getPlayerPosition(pid), p[1], p[2]) then
doTeleportThing(pid, p[3])
doSendMagicEffect(p[3], CONST_ME_TELEPORT)
doCreatureSay(pid, 'You were kicked out of the room.', TALKTYPE_ORANGE_1)
end
end
end
local function mathtime(table) -- by dwarfer
local unit = {"sec", "min", "hour", "day"}
for i, v in pairs(unit) do
if v == table[2] then
return table[1](60^(v == unit[4] and 2 or i-1))(v == unit[4] and 24 or 1)
end
end
return error("Bad declaration in mathtime function.")
end
function onUse(cid, item, frompos, item2, topos)
local check_player = getPlayersInArea(areafrom, areato);
if getGlobalStorageValue(cid, global_stor) - os.time() <= 0 and getPlayerStorageValue(cid, player_stor) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "Infelizmente o servidor deu SaveServer ou caiu e você perdeu sua Cave Exclusiva. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, player_stor) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, global_stor) - os.time() > 0 and getPlayerStorageValue(cid, player_stor) - os.time() <= 0 then
if #check_player > 0 then
doPlayerSendTextMessage(cid, 27, "Possui um jogador nesta Cave Exclusiva. Aguarde ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
else
doPlayerSendTextMessage(cid, 27, "Esta Cave Exclusiva está ocupada, o jogador não se encontra nela no momento, mas pode voltar. Aguarde ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
end
elseif getGlobalStorageValue(cid, global_stor) - os.time() > 0 and getPlayerStorageValue(cid, player_stor) - os.time() > 0 then
if #check_player > 0 then
doTeleportThing(cid, pos_exit)
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerSendTextMessage(cid, 27, "Você saiu da Cave Exclusiva. Você ainda possui ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
return true
else
doTeleportThing(cid, pos_entrance)
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerSendTextMessage(cid, 27, "Você entrou na Cave Exclusiva. Você ainda possui ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
return true
end
elseif getGlobalStorageValue(cid, global_stor) - os.time() <= 0 and getPlayerStorageValue(cid, player_stor) - os.time() <= 0 and getPlayerItemCount(cid, 12707) >= 1 then
if getPlayerStorageValue(cid, 45343) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "Você já possui uma Cave Exclusiva. Só pode haver 1 Cave Exclusiva por personagem.")
return true
end
if doPlayerRemoveItem(cid, 12707, 1) then
if isPremium(cid) then
setGlobalStorageValue(cid, global_stor, os.time()+90*60)
setPlayerStorageValue(cid, player_stor, os.time()+90*60)
setPlayerStorageValue(cid, 45343, os.time()+90*60)
addEvent(kickPlayerFromArea, mathtime(timetokick_vip) * 1000, cid, {areafrom, areato, pos_exit})
else
setGlobalStorageValue(cid, global_stor, os.time()+60*60)
setPlayerStorageValue(cid, player_stor, os.time()+60*60)
setPlayerStorageValue(cid, 45343, os.time()+60*60)
addEvent(kickPlayerFromArea, mathtime(timetokick_free) * 1000, cid, {areafrom, areato, pos_exit})
end
doRemoveMonstersInArea(areafrom, areato)
doTeleportThing(cid, pos_entrance)
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerSendTextMessage(cid, 27, "Você entrou na Cave Exclusiva. Você possui ".. convertTime(getGlobalStorageValue(cid, global_stor) - os.time()) ..".")
end
else
doPlayerSendTextMessage(cid, 27, "Você não possui o item.")
end
return true
end
local m_1 = {x=697, y=154, z=8}
local m_2 = {x=697, y=160, z=8}
local m_3 = {x=704, y=154, z=8}
local m_4 = {x=703, y=161, z=8}
function onUse(cid, item, frompos, itemEx, topos)
local ran_2 = math.random(1, 100)
local ran_3 = math.random(1, 100)
local ran_4 = math.random(1, 100)
if(itemEx.itemid == 12704) then
if getPlayerStorageValue(cid, 45315) <= 0 then -- QTD = 1
doCreateMonster("Cave Frost Dragon", m_1, false, true);
elseif getPlayerStorageValue(cid, 45315) == 1 then -- QTD = 2
if (ran_2 <= 85) then
doCreateMonster("Cave Frost Dragon", m_2, false, true);
end
doCreateMonster("Cave Frost Dragon", m_1, false, true);
elseif getPlayerStorageValue(cid, 45315) == 2 then -- QTD = 3
if (ran_2 <= 85) then
doCreateMonster("Cave Frost Dragon", m_2, false, true);
end
if (ran_3 <= 60) then
doCreateMonster("Cave Frost Dragon", m_3, false, true);
end
doCreateMonster("Cave Frost Dragon", m_1, false, true);
elseif getPlayerStorageValue(cid, 45315) == 3 then -- QTD = 4
if (ran_2 <= 85) then
doCreateMonster("Cave Frost Dragon", m_2, false, true);
end
if (ran_3 <= 60) then
doCreateMonster("Cave Frost Dragon", m_3, false, true);
end
if (ran_4 <= 50) then
doCreateMonster("Cave Frost Dragon", m_4, false, true);
end
doCreateMonster("Cave Frost Dragon", m_1, false, true);
end
doTransformItem(item.uid, 12705)
doDecayItem(item.uid)
elseif(itemEx.itemid == 12705) then
doPlayerSendCancel(cid, "Aguarde 15 segundos para usar novamente.")
end
return true
end
local m_2 = {x=697, y=160, z=8}
local m_3 = {x=704, y=154, z=8}
local m_4 = {x=703, y=161, z=8}
function onUse(cid, item, frompos, itemEx, topos)
local ran_2 = math.random(1, 100)
local ran_3 = math.random(1, 100)
local ran_4 = math.random(1, 100)
if(itemEx.itemid == 12704) then
if getPlayerStorageValue(cid, 45315) <= 0 then -- QTD = 1
doCreateMonster("Cave Frost Dragon", m_1, false, true);
elseif getPlayerStorageValue(cid, 45315) == 1 then -- QTD = 2
if (ran_2 <= 85) then
doCreateMonster("Cave Frost Dragon", m_2, false, true);
end
doCreateMonster("Cave Frost Dragon", m_1, false, true);
elseif getPlayerStorageValue(cid, 45315) == 2 then -- QTD = 3
if (ran_2 <= 85) then
doCreateMonster("Cave Frost Dragon", m_2, false, true);
end
if (ran_3 <= 60) then
doCreateMonster("Cave Frost Dragon", m_3, false, true);
end
doCreateMonster("Cave Frost Dragon", m_1, false, true);
elseif getPlayerStorageValue(cid, 45315) == 3 then -- QTD = 4
if (ran_2 <= 85) then
doCreateMonster("Cave Frost Dragon", m_2, false, true);
end
if (ran_3 <= 60) then
doCreateMonster("Cave Frost Dragon", m_3, false, true);
end
if (ran_4 <= 50) then
doCreateMonster("Cave Frost Dragon", m_4, false, true);
end
doCreateMonster("Cave Frost Dragon", m_1, false, true);
end
doTransformItem(item.uid, 12705)
doDecayItem(item.uid)
elseif(itemEx.itemid == 12705) then
doPlayerSendCancel(cid, "Aguarde 15 segundos para usar novamente.")
end
return true
end
function onLogin(cid)
local temple_cave_exc = {x = 2052, y = 2051, z = 7}
if getPlayerStorageValue(cid, 45316) == 1 then
setPlayerStorageValue(cid, 45316, 0)
doTeleportThing(cid, temple_cave_exc)
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você não pode logar na sala da Cave Exclusiva. Você foi teleportado para o templo.")
end
return true
end
function onDeath(cid, corpse)
if getPlayerStorageValue(cid, 45316) == 1 then
setPlayerStorageValue(cid, 45316, 0)
end
return true
end
local temple_cave_exc = {x = 2052, y = 2051, z = 7}
if getPlayerStorageValue(cid, 45316) == 1 then
setPlayerStorageValue(cid, 45316, 0)
doTeleportThing(cid, temple_cave_exc)
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você não pode logar na sala da Cave Exclusiva. Você foi teleportado para o templo.")
end
return true
end
function onDeath(cid, corpse)
if getPlayerStorageValue(cid, 45316) == 1 then
setPlayerStorageValue(cid, 45316, 0)
end
return true
end
function onStepIn(cid, item, position, fromPosition)
if (not isPlayer(cid)) then
return false
end
if isPlayer(cid) then
if getPlayerStorageValue(cid, 45316) <= 0 then
setPlayerStorageValue(cid, 45316, 1)
doPlayerPopupFYI(cid," [+] Cave Exclusiva [+]\n # Área totalmente exclusiva do servidor #\n\n- TUTORIAL -\n Os monstros da Cave Exclusiva lhe oferecem +20% EXP e LOOT.\n Para entrar, basta clicar(dar USE) na porta. Vai consumir 1 Cave Exclusiva(ITEM).\n Para sumonar os monstros, use a alavanca no centro da sala (cooldown de 15seg).\n Para sair da Cave Exclusiva, basta clicar(dar USE) na porta.\n Após seu tempo esgotar, você será teleportado para o TEMPLO.\n Se morrer, você perderá items/xp normalmente.\n Se sair da Cave Exclusiva, poderá voltar se seu tempo ainda não tiver expirado.\n Se morrer dentro da Cave Exclusiva, poderá voltar se seu tempo ainda não tiver expirado.\n\n- COMANDOS -\n!cave quantidade (valor)\n > Você pode escolher a quantidade de monstros. \n Mínimo 1 e máximo 4. (Exemplo: !cave qtd 4)\n\n!cave tempo\n > Mostra o tempo que você possui na Cave Exclusiva.\n\n\nFREE ACCOUNT = 60 minutos\nVIP ACCOUNT = 90 minutos")
end
end
return true
end
if (not isPlayer(cid)) then
return false
end
if isPlayer(cid) then
if getPlayerStorageValue(cid, 45316) <= 0 then
setPlayerStorageValue(cid, 45316, 1)
doPlayerPopupFYI(cid," [+] Cave Exclusiva [+]\n # Área totalmente exclusiva do servidor #\n\n- TUTORIAL -\n Os monstros da Cave Exclusiva lhe oferecem +20% EXP e LOOT.\n Para entrar, basta clicar(dar USE) na porta. Vai consumir 1 Cave Exclusiva(ITEM).\n Para sumonar os monstros, use a alavanca no centro da sala (cooldown de 15seg).\n Para sair da Cave Exclusiva, basta clicar(dar USE) na porta.\n Após seu tempo esgotar, você será teleportado para o TEMPLO.\n Se morrer, você perderá items/xp normalmente.\n Se sair da Cave Exclusiva, poderá voltar se seu tempo ainda não tiver expirado.\n Se morrer dentro da Cave Exclusiva, poderá voltar se seu tempo ainda não tiver expirado.\n\n- COMANDOS -\n!cave quantidade (valor)\n > Você pode escolher a quantidade de monstros. \n Mínimo 1 e máximo 4. (Exemplo: !cave qtd 4)\n\n!cave tempo\n > Mostra o tempo que você possui na Cave Exclusiva.\n\n\nFREE ACCOUNT = 60 minutos\nVIP ACCOUNT = 90 minutos")
end
end
return true
end
function onStepIn(cid, item, position, fromPosition)
if (not isPlayer(cid)) then
return false
end
if isPlayer(cid) then
if getPlayerStorageValue(cid, 45316) == 1 then
setPlayerStorageValue(cid, 45316, 0)
end
end
return true
end
if (not isPlayer(cid)) then
return false
end
if isPlayer(cid) then
if getPlayerStorageValue(cid, 45316) == 1 then
setPlayerStorageValue(cid, 45316, 0)
end
end
return true
end
local function convertTime(a)
if(type(tonumber(a)) == "number" and a > 0) then
if (a <= 3599) then
local minute = math.floor(a/60)
local second = a - (60 * minute)
if(second == 0) then
return ((minute)..((minute > 1) and " minutos" or " minuto"))
else
return ((minute ~= 0) and ((minute>1) and minute.." minutos e " or minute.." minuto e ").. ((second>1) and second.." segundos" or second.." segundo") or ((second>1) and second.." segundos" or second.. " segundo"))
end
else
local hour = math.floor(a/3600)
local minute = math.floor((a - (hour * 3600))/60)
local second = (a - (3600 * hour) - (minute * 60))
if (minute == 0 and second > 0) then
return (hour..((hour > 1) and " horas e " or " hora e "))..(second..((second > 1) and " segundos" or " segundo"))
elseif (second == 0 and minute > 0) then
return (hour..((hour > 1) and " horas e " or " hora e "))..(minute..((minute > 1) and " minutos" or " minuto"))
elseif (second == 0 and minute == 0) then
return (hour..((hour > 1) and " horas" or " hora"))
end
return (hour..((hour > 1) and " horas, " or " hora, "))..(minute..((minute > 1) and " minutos e " or " minuto e "))..(second..((second > 1) and " segundos" or " segundo"))
end
end
end
function onSay(cid, words, param)
if(not checkExhausted(cid, 666, 2)) then
return true
end
if param == "qtd 1" or param == "quantidade 1" then
if getPlayerStorageValue(cid, 45315) <= 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] A quantidade de monstros já está registrada como 1 em seu personagem.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] Você alterou a quantidade de monstros para 1 (chance = 100%).")
setPlayerStorageValue(cid, 45315, 0)
end
elseif param == "qtd 2" or param == "quantidade 2" then
if getPlayerStorageValue(cid, 45315) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] A quantidade de monstros já está registrada como 2 em seu personagem.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] Você alterou a quantidade de monstros para 2 (chance = 85%).")
setPlayerStorageValue(cid, 45315, 1)
end
elseif param == "qtd 3" or param == "quantidade 3" then
if getPlayerStorageValue(cid, 45315) == 2 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] A quantidade de monstros já está registrada como 3 em seu personagem.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] Você alterou a quantidade de monstros para 3 (chance = 60%).")
setPlayerStorageValue(cid, 45315, 2)
end
elseif param == "qtd 4" or param == "quantidade 4" then
if getPlayerStorageValue(cid, 45315) == 3 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] A quantidade de monstros já está registrada como 4 em seu personagem.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] Você alterou a quantidade de monstros para 4 (chance = 50%).")
setPlayerStorageValue(cid, 45315, 3)
end
elseif param == "tempo" or param == "time" then
-- SALA 1
if getGlobalStorageValue(cid, 30050) - os.time() <= 0 and getPlayerStorageValue(cid, 45319) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45319) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30050) - os.time() > 0 and getPlayerStorageValue(cid, 45319) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45319) - os.time()) ..". (Sala: 1)")
end
-- SALA 2
if getGlobalStorageValue(cid, 30051) - os.time() <= 0 and getPlayerStorageValue(cid, 45320) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45320) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30051) - os.time() > 0 and getPlayerStorageValue(cid, 45320) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45320) - os.time()) ..". (Sala: 2)")
end
-- SALA 3
if getGlobalStorageValue(cid, 30052) - os.time() <= 0 and getPlayerStorageValue(cid, 45321) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45321) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30052) - os.time() > 0 and getPlayerStorageValue(cid, 45321) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45321) - os.time()) ..". (Sala: 3)")
end
-- SALA 4
if getGlobalStorageValue(cid, 30053) - os.time() <= 0 and getPlayerStorageValue(cid, 45322) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45322) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30053) - os.time() > 0 and getPlayerStorageValue(cid, 45322) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45322) - os.time()) ..". (Sala: 4)")
end
-- SALA 5
if getGlobalStorageValue(cid, 30054) - os.time() <= 0 and getPlayerStorageValue(cid, 45323) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45323) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30054) - os.time() > 0 and getPlayerStorageValue(cid, 45323) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45323) - os.time()) ..". (Sala: 5)")
end
-- SALA 6
if getGlobalStorageValue(cid, 30055) - os.time() <= 0 and getPlayerStorageValue(cid, 45324) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45324) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30055) - os.time() > 0 and getPlayerStorageValue(cid, 45324) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45324) - os.time()) ..". (Sala: 6)")
end
-- SALA 7
if getGlobalStorageValue(cid, 30056) - os.time() <= 0 and getPlayerStorageValue(cid, 45325) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45325) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30056) - os.time() > 0 and getPlayerStorageValue(cid, 45325) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45325) - os.time()) ..". (Sala: 7)")
end
-- SALA 8
if getGlobalStorageValue(cid, 30057) - os.time() <= 0 and getPlayerStorageValue(cid, 45326) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45326) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30057) - os.time() > 0 and getPlayerStorageValue(cid, 45326) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45326) - os.time()) ..". (Sala: 8)")
end
-- SALA 9
if getGlobalStorageValue(cid, 30058) - os.time() <= 0 and getPlayerStorageValue(cid, 45327) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45327) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30058) - os.time() > 0 and getPlayerStorageValue(cid, 45327) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45327) - os.time()) ..". (Sala: 9)")
end
-- SALA 10
if getGlobalStorageValue(cid, 30059) - os.time() <= 0 and getPlayerStorageValue(cid, 45328) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45328) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30059) - os.time() > 0 and getPlayerStorageValue(cid, 45328) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45328) - os.time()) ..". (Sala: 10)")
end
-- SALA 11
if getGlobalStorageValue(cid, 30060) - os.time() <= 0 and getPlayerStorageValue(cid, 45329) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45329) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30060) - os.time() > 0 and getPlayerStorageValue(cid, 45329) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45329) - os.time()) ..". (Sala: 11)")
end
-- SALA 12
if getGlobalStorageValue(cid, 30061) - os.time() <= 0 and getPlayerStorageValue(cid, 45330) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45330) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30061) - os.time() > 0 and getPlayerStorageValue(cid, 45330) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45330) - os.time()) ..". (Sala: 12)")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cave Exclusiva: Informe um valor válido.")
end
return true
end
if(type(tonumber(a)) == "number" and a > 0) then
if (a <= 3599) then
local minute = math.floor(a/60)
local second = a - (60 * minute)
if(second == 0) then
return ((minute)..((minute > 1) and " minutos" or " minuto"))
else
return ((minute ~= 0) and ((minute>1) and minute.." minutos e " or minute.." minuto e ").. ((second>1) and second.." segundos" or second.." segundo") or ((second>1) and second.." segundos" or second.. " segundo"))
end
else
local hour = math.floor(a/3600)
local minute = math.floor((a - (hour * 3600))/60)
local second = (a - (3600 * hour) - (minute * 60))
if (minute == 0 and second > 0) then
return (hour..((hour > 1) and " horas e " or " hora e "))..(second..((second > 1) and " segundos" or " segundo"))
elseif (second == 0 and minute > 0) then
return (hour..((hour > 1) and " horas e " or " hora e "))..(minute..((minute > 1) and " minutos" or " minuto"))
elseif (second == 0 and minute == 0) then
return (hour..((hour > 1) and " horas" or " hora"))
end
return (hour..((hour > 1) and " horas, " or " hora, "))..(minute..((minute > 1) and " minutos e " or " minuto e "))..(second..((second > 1) and " segundos" or " segundo"))
end
end
end
function onSay(cid, words, param)
if(not checkExhausted(cid, 666, 2)) then
return true
end
if param == "qtd 1" or param == "quantidade 1" then
if getPlayerStorageValue(cid, 45315) <= 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] A quantidade de monstros já está registrada como 1 em seu personagem.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] Você alterou a quantidade de monstros para 1 (chance = 100%).")
setPlayerStorageValue(cid, 45315, 0)
end
elseif param == "qtd 2" or param == "quantidade 2" then
if getPlayerStorageValue(cid, 45315) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] A quantidade de monstros já está registrada como 2 em seu personagem.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] Você alterou a quantidade de monstros para 2 (chance = 85%).")
setPlayerStorageValue(cid, 45315, 1)
end
elseif param == "qtd 3" or param == "quantidade 3" then
if getPlayerStorageValue(cid, 45315) == 2 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] A quantidade de monstros já está registrada como 3 em seu personagem.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] Você alterou a quantidade de monstros para 3 (chance = 60%).")
setPlayerStorageValue(cid, 45315, 2)
end
elseif param == "qtd 4" or param == "quantidade 4" then
if getPlayerStorageValue(cid, 45315) == 3 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] A quantidade de monstros já está registrada como 4 em seu personagem.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Cave Exclusiva] Você alterou a quantidade de monstros para 4 (chance = 50%).")
setPlayerStorageValue(cid, 45315, 3)
end
elseif param == "tempo" or param == "time" then
-- SALA 1
if getGlobalStorageValue(cid, 30050) - os.time() <= 0 and getPlayerStorageValue(cid, 45319) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45319) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30050) - os.time() > 0 and getPlayerStorageValue(cid, 45319) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45319) - os.time()) ..". (Sala: 1)")
end
-- SALA 2
if getGlobalStorageValue(cid, 30051) - os.time() <= 0 and getPlayerStorageValue(cid, 45320) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45320) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30051) - os.time() > 0 and getPlayerStorageValue(cid, 45320) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45320) - os.time()) ..". (Sala: 2)")
end
-- SALA 3
if getGlobalStorageValue(cid, 30052) - os.time() <= 0 and getPlayerStorageValue(cid, 45321) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45321) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30052) - os.time() > 0 and getPlayerStorageValue(cid, 45321) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45321) - os.time()) ..". (Sala: 3)")
end
-- SALA 4
if getGlobalStorageValue(cid, 30053) - os.time() <= 0 and getPlayerStorageValue(cid, 45322) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45322) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30053) - os.time() > 0 and getPlayerStorageValue(cid, 45322) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45322) - os.time()) ..". (Sala: 4)")
end
-- SALA 5
if getGlobalStorageValue(cid, 30054) - os.time() <= 0 and getPlayerStorageValue(cid, 45323) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45323) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30054) - os.time() > 0 and getPlayerStorageValue(cid, 45323) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45323) - os.time()) ..". (Sala: 5)")
end
-- SALA 6
if getGlobalStorageValue(cid, 30055) - os.time() <= 0 and getPlayerStorageValue(cid, 45324) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45324) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30055) - os.time() > 0 and getPlayerStorageValue(cid, 45324) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45324) - os.time()) ..". (Sala: 6)")
end
-- SALA 7
if getGlobalStorageValue(cid, 30056) - os.time() <= 0 and getPlayerStorageValue(cid, 45325) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45325) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30056) - os.time() > 0 and getPlayerStorageValue(cid, 45325) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45325) - os.time()) ..". (Sala: 7)")
end
-- SALA 8
if getGlobalStorageValue(cid, 30057) - os.time() <= 0 and getPlayerStorageValue(cid, 45326) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45326) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30057) - os.time() > 0 and getPlayerStorageValue(cid, 45326) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45326) - os.time()) ..". (Sala: 8)")
end
-- SALA 9
if getGlobalStorageValue(cid, 30058) - os.time() <= 0 and getPlayerStorageValue(cid, 45327) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45327) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30058) - os.time() > 0 and getPlayerStorageValue(cid, 45327) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45327) - os.time()) ..". (Sala: 9)")
end
-- SALA 10
if getGlobalStorageValue(cid, 30059) - os.time() <= 0 and getPlayerStorageValue(cid, 45328) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45328) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30059) - os.time() > 0 and getPlayerStorageValue(cid, 45328) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45328) - os.time()) ..". (Sala: 10)")
end
-- SALA 11
if getGlobalStorageValue(cid, 30060) - os.time() <= 0 and getPlayerStorageValue(cid, 45329) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45329) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30060) - os.time() > 0 and getPlayerStorageValue(cid, 45329) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45329) - os.time()) ..". (Sala: 11)")
end
-- SALA 12
if getGlobalStorageValue(cid, 30061) - os.time() <= 0 and getPlayerStorageValue(cid, 45330) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Infelizmente o servidor deu SaveServer ou caiu e você perdeu seu acesso. Lamentamos muito o ocorrido, aguarde ".. convertTime(getPlayerStorageValue(cid, 45330) - os.time()) .." para acessar alguma Cave Exclusiva novamente.")
elseif getGlobalStorageValue(cid, 30061) - os.time() > 0 and getPlayerStorageValue(cid, 45330) - os.time() > 0 then
doPlayerSendTextMessage(cid, 27, "[Cave Exclusiva] Você ainda possui ".. convertTime(getPlayerStorageValue(cid, 45330) - os.time()) ..". (Sala: 12)")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cave Exclusiva: Informe um valor válido.")
end
return true
end