Postado Abril 24, 2018 7 anos 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
Postado Abril 25, 2018 7 anos 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
Postado Abril 25, 2018 7 anos Autor 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....
Postado Abril 25, 2018 7 anos 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
Postado Abril 25, 2018 7 anos Autor 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
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.