Ir para conteúdo
  • Cadastre-se

(Resolvido)Ajuda Cave Super Up


Ir para solução Resolvido por Vodkart,

Posts Recomendados

Fala Galera Do Tk Muito bom Ter Vcs De Volta... Fiquei Preocupado Com o Tempo Off

Gostaria de Pedir Vcs Ajuda Com Um Script De Super Up

O nome E Killua Cave Owners

Entao.....

O problema e que sao 18 Caves supre up

e o player compra um item para conseguir usar a cave por 4 horas

mas gostaria de colocar que o player nao pode usar outro item da cave enquanto nao acabar o tempo da primeira que ele usou 

pq o player compra a cave 1 e a cave 2  e a cave 3 mas ele so pode usar uma por vez ai as outras ficam ocupadas....

segue o script 

local function filtrateString(str)
    if type(str) ~= "string" then
        return false
    end
    local first, last = 0, 0
    local second, final = 0, #str
        local limitedeuso = 49015
        local textofinal1 = "Voce ja esta sob efeito da pot de experiencia espere o efeito acabar."
    for i = 1, #str do
        if string.byte(str:sub(i,i)) == string.byte('a') then
            first = i + 2
            for t = first, #str do
                if string.byte(str:sub(t,t)) == string.byte(' ') then
                    last = t - 1
                    break
                end
            end
        end
        if string.byte(str:sub(i,i)) == string.byte('b') then
            second = i + 2
        end
    end
    return {str:sub(first, last), str:sub(second, final)}
end


function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) > 15000 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 15000, porem nao pode usar a cave exclusiva.")
    return false
    end
        if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    
    else
        doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
    end
    return true
end

 

Obrigado +Rep

Link para o post
Compartilhar em outros sites
local function filtrateString(str)
    if type(str) ~= "string" then
        return false
    end
    local first, last = 0, 0
    local second, final = 0, #str
        local limitedeuso = 49015
        local textofinal1 = "Voce ja esta sob efeito da pot de experiencia espere o efeito acabar."
    for i = 1, #str do
        if string.byte(str:sub(i,i)) == string.byte('a') then
            first = i + 2
            for t = first, #str do
                if string.byte(str:sub(t,t)) == string.byte(' ') then
                    last = t - 1
                    break
                end
            end
        end
        if string.byte(str:sub(i,i)) == string.byte('b') then
            second = i + 2
        end
    end
    return {str:sub(first, last), str:sub(second, final)}
end
function doPlayerHaveCave(cid)
	local count = 0
		for i = 822081, 822098 do
			if getGlobalStorageValue(i) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(i))[2]) - os.time() > 0 then
				count = count + 1
			end
		end
	return count
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) > 15000 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 15000, porem nao pode usar a cave exclusiva.") return false
    elseif doPlayerHaveCave(cid) > 0 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce ja possui uma cave propria.") return false
    end
        if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    
    else
        doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
    end
    return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
52 minutos atrás, Vodkart disse:

local function filtrateString(str) if type(str) ~= "string" then return false end local first, last = 0, 0 local second, final = 0, #str local limitedeuso = 49015 local textofinal1 = "Voce ja esta sob efeito da pot de experiencia espere o efeito acabar." for i = 1, #str do if string.byte(str:sub(i,i)) == string.byte('a') then first = i + 2 for t = first, #str do if string.byte(str:sub(t,t)) == string.byte(' ') then last = t - 1 break end end end if string.byte(str:sub(i,i)) == string.byte('b') then second = i + 2 end end return {str:sub(first, last), str:sub(second, final)} end function doPlayerHaveCave(cid) local count = 0 for i = 822081, 822098 do if getGlobalStorageValue(i) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(i))[2]) - os.time() > 0 then count = count + 1 end end return count end function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) > 15000 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 15000, porem nao pode usar a cave exclusiva.") return false elseif doPlayerHaveCave(cid) > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce ja possui uma cave propria.") return false end if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.") elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) else doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.") end return true end

Obrigado vodcart mas ainda da pra usar mais de 1 sendo dono de alguma..... 

eu comprei a primeira usei ela ae comprei ae segunda fui usar e usou normal....

Link para o post
Compartilhar em outros sites
  • Solução
local function filtrateString(str)
    if type(str) ~= "string" then
        return false
    end
    local first, last = 0, 0
    local second, final = 0, #str
        local limitedeuso = 49015
        local textofinal1 = "Voce ja esta sob efeito da pot de experiencia espere o efeito acabar."
    for i = 1, #str do
        if string.byte(str:sub(i,i)) == string.byte('a') then
            first = i + 2
            for t = first, #str do
                if string.byte(str:sub(t,t)) == string.byte(' ') then
                    last = t - 1
                    break
                end
            end
        end
        if string.byte(str:sub(i,i)) == string.byte('b') then
            second = i + 2
        end
    end
    return {str:sub(first, last), str:sub(second, final)}
end
function doPlayerHaveCave(cid)
	local count = 0
		for i = 822081, 822098 do
			if tonumber(filtrateString(getGlobalStorageValue(i))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(i))[2]) - os.time() > 0 then
				count = count + 1
			end
		end
	return count
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) > 15000 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 15000, porem nao pode usar a cave exclusiva.") return false
    elseif doPlayerHaveCave(cid) > 0 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce ja possui uma cave propria.") return false
    end
        if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    
    else
        doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
    end
    return true
end

 

tenta assim

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
3 minutos atrás, Vodkart disse:

local function filtrateString(str)
    if type(str) ~= "string" then
        return false
    end
    local first, last = 0, 0
    local second, final = 0, #str
        local limitedeuso = 49015
        local textofinal1 = "Voce ja esta sob efeito da pot de experiencia espere o efeito acabar."
    for i = 1, #str do
        if string.byte(str:sub(i,i)) == string.byte('a') then
            first = i + 2
            for t = first, #str do
                if string.byte(str:sub(t,t)) == string.byte(' ') then
                    last = t - 1
                    break
                end
            end
        end
        if string.byte(str:sub(i,i)) == string.byte('b') then
            second = i + 2
        end
    end
    return {str:sub(first, last), str:sub(second, final)}
end
function doPlayerHaveCave(cid)
	local count = 0
		for i = 822081, 822098 do
			if tonumber(filtrateString(getGlobalStorageValue(i))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(i))[2]) - os.time() > 0 then
				count = count + 1
			end
		end
	return count
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) > 15000 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 15000, porem nao pode usar a cave exclusiva.") return false
    elseif doPlayerHaveCave(cid) > 0 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce ja possui uma cave propria.") return false
    end
        if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    
    else
        doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
    end
    return true
end

 

tenta assim

Agora funcionou perfeintamente obrigado Mestre dos Scripptss

Link para o post
Compartilhar em outros sites

@Vodkart salve vodkart, vi que você arrumou o script pro rapaz, queria saber se você poderia arrumar esse pra mim tambem, é o mesmo script, só que no meu tem 36 caves, não sei que linhas você mexeu, poderia arrumar pra mim? Obrigado.

 

Spoiler

local function filtrateString(str)
	if type(str) ~= "string" then
		return false
	end
	local first, last = 0, 0
	local second, final = 0, #str
	for i = 1, #str do
		if string.byte(str:sub(i,i)) == string.byte('a') then
			first = i + 2
			for t = first, #str do
				if string.byte(str:sub(t,t)) == string.byte(' ') then
					last = t - 1
					break
				end
			end
		end
		if string.byte(str:sub(i,i)) == string.byte('b') then
			second = i + 2
		end
	end
	return {str:sub(first, last), str:sub(second, final)}
end


function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) > 600 then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 600, porem nao pode usar a cave exclusiva.")
	return false
	end
    	if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822099))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822099, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 19 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822100))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822100, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 20 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822101))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822101, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 21 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822102))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822102, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 22 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822103))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822103, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 23 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822104))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822104, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 24 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822105))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822105, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 25 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822106))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822106, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 26 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822822))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822822, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 27 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822108))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822108, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 28 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822109))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822109, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 29 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822110))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822110, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 30 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822111))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822111, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 31 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822112))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822112, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 32 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822113))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822113, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 33 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822114))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822114, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 34 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822115))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822115, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 35 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822116))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822116, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 36 e pode upar lá por 4 horas.")
	else
		doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
	end
	return true
end

 

 

       112674.gif

 

 

 

Link para o post
Compartilhar em outros sites
25 minutos atrás, Zzyzx disse:

@Vodkart salve vodkart, vi que você arrumou o script pro rapaz, queria saber se você poderia arrumar esse pra mim tambem, é o mesmo script, só que no meu tem 36 caves, não sei que linhas você mexeu, poderia arrumar pra mim? Obrigado.

 

  Mostrar conteúdo oculto


local function filtrateString(str)
	if type(str) ~= "string" then
		return false
	end
	local first, last = 0, 0
	local second, final = 0, #str
	for i = 1, #str do
		if string.byte(str:sub(i,i)) == string.byte('a') then
			first = i + 2
			for t = first, #str do
				if string.byte(str:sub(t,t)) == string.byte(' ') then
					last = t - 1
					break
				end
			end
		end
		if string.byte(str:sub(i,i)) == string.byte('b') then
			second = i + 2
		end
	end
	return {str:sub(first, last), str:sub(second, final)}
end


function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) > 600 then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 600, porem nao pode usar a cave exclusiva.")
	return false
	end
    	if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822099))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822099, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 19 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822100))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822100, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 20 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822101))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822101, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 21 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822102))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822102, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 22 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822103))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822103, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 23 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822104))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822104, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 24 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822105))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822105, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 25 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822106))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822106, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 26 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822822))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822822, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 27 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822108))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822108, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 28 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822109))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822109, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 29 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822110))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822110, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 30 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822111))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822111, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 31 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822112))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822112, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 32 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822113))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822113, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 33 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822114))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822114, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 34 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822115))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822115, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 35 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822116))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822116, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 36 e pode upar lá por 4 horas.")
	else
		doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
	end
	return true
end

 

 

 

 

local function filtrateString(str)
	if type(str) ~= "string" then
		return false
	end
	local first, last = 0, 0
	local second, final = 0, #str
	for i = 1, #str do
		if string.byte(str:sub(i,i)) == string.byte('a') then
			first = i + 2
			for t = first, #str do
				if string.byte(str:sub(t,t)) == string.byte(' ') then
					last = t - 1
					break
				end
			end
		end
		if string.byte(str:sub(i,i)) == string.byte('b') then
			second = i + 2
		end
	end
	return {str:sub(first, last), str:sub(second, final)}
end
function doPlayerHaveCave(cid)
	local count = 0
		for i = 822081, 822116 do
			if tonumber(filtrateString(getGlobalStorageValue(i))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(i))[2]) - os.time() > 0 then
				count = count + 1
			end
		end
	return count
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) > 600 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 600, porem nao pode usar a cave exclusiva.") return false
    elseif doPlayerHaveCave(cid) > 0 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce ja possui uma cave propria.") return false
    end
    	if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822099))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822099, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 19 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822100))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822100, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 20 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822101))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822101, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 21 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822102))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822102, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 22 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822103))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822103, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 23 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822104))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822104, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 24 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822105))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822105, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 25 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822106))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822106, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 26 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822822))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822822, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 27 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822108))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822108, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 28 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822109))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822109, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 29 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822110))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822110, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 30 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822111))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822111, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 31 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822112))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822112, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 32 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822113))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822113, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 33 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822114))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822114, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 34 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822115))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822115, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 35 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822116))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822116, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 36 e pode upar lá por 4 horas.")
	else
		doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
	end
	return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
33 minutos atrás, Zzyzx disse:

@Vodkart salve vodkart, vi que você arrumou o script pro rapaz, queria saber se você poderia arrumar esse pra mim tambem, é o mesmo script, só que no meu tem 36 caves, não sei que linhas você mexeu, p Boderia arrumar pra mim? Obrigado.

 

  Mostrar conteúdo oculto


local function filtrateString(str)
	if type(str) ~= "string" then
		return false
	end
	local first, last = 0, 0
	local second, final = 0, #str
	for i = 1, #str do
		if string.byte(str:sub(i,i)) == string.byte('a') then
			first = i + 2
			for t = first, #str do
				if string.byte(str:sub(t,t)) == string.byte(' ') then
					last = t - 1
					break
				end
			end
		end
		if string.byte(str:sub(i,i)) == string.byte('b') then
			second = i + 2
		end
	end
	return {str:sub(first, last), str:sub(second, final)}
end


function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) > 600 then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 600, porem nao pode usar a cave exclusiva.")
	return false
	end
    	if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822099))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822099, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 19 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822100))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822100, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 20 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822101))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822101, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 21 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822102))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822102, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 22 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822103))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822103, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 23 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822104))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822104, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 24 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822105))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822105, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 25 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822106))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822106, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 26 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822822))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822822, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 27 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822108))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822108, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 28 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822109))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822109, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 29 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822110))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822110, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 30 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822111))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822111, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 31 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822112))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822112, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 32 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822113))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822113, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 33 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822114))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822114, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 34 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822115))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822115, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 35 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822116))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822116, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 36 e pode upar lá por 4 horas.")
	else
		doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
	end
	return true
end

 

 

Ou mano me passar a parte do mapa com essas 36 caves tem como?

Link para o post
Compartilhar em outros sites
11 minutos atrás, mullino disse:

Ou mano me passar a parte do mapa com essas 36 caves tem como?

 

tae

https://mega.nz/#!opg23RyR!Np-8N36Gb4cOczpXFJoouro4Pu7Qo40AumiUgM6u-4o

 

 

       112674.gif

 

 

 

Link para o post
Compartilhar em outros sites
1 hora atrás, Zzyzx disse:

 

tae

https://mega.nz/#!opg23RyR!Np-8N36Gb4cOczpXFJoouro4Pu7Qo40AumiUgM6u-4o

 

 

obrigado

 

Editado por mullino (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 3 months later...
Em 25/04/2018 em 10:34, Vodkart disse:

local function filtrateString(str)
    if type(str) ~= "string" then
        return false
    end
    local first, last = 0, 0
    local second, final = 0, #str
        local limitedeuso = 49015
        local textofinal1 = "Voce ja esta sob efeito da pot de experiencia espere o efeito acabar."
    for i = 1, #str do
        if string.byte(str:sub(i,i)) == string.byte('a') then
            first = i + 2
            for t = first, #str do
                if string.byte(str:sub(t,t)) == string.byte(' ') then
                    last = t - 1
                    break
                end
            end
        end
        if string.byte(str:sub(i,i)) == string.byte('b') then
            second = i + 2
        end
    end
    return {str:sub(first, last), str:sub(second, final)}
end
function doPlayerHaveCave(cid)
	local count = 0
		for i = 822081, 822098 do
			if tonumber(filtrateString(getGlobalStorageValue(i))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(i))[2]) - os.time() > 0 then
				count = count + 1
			end
		end
	return count
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) > 15000 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 15000, porem nao pode usar a cave exclusiva.") return false
    elseif doPlayerHaveCave(cid) > 0 then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce ja possui uma cave propria.") return false
    end
        if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
        doRemoveItem(item.uid)
        setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
        doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
                elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then
                doPlayerSendTextMessage(cid,22,textofinal1)
    
    else
        doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
    end
    return true
end

 

tenta assim

Alguém por favor poderia me enviar esse script de SuperUP completo? Estou procurando a dias e não acho, estou montando um otserver do 0 e queria colocar esses sistema, aguardo resposta <3

Link para o post
Compartilhar em outros sites
10 horas atrás, fiordy disse:

Alguém por favor poderia me enviar esse script de SuperUP completo? Estou procurando a dias e não acho, estou montando um otserver do 0 e queria colocar esses sistema, aguardo resposta <3

 

pede na área de pedidos que alguem vai poder te passar sem problemas

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo