Ir para conteúdo

Featured Replies

  • Respostas 16
  • Visualizações 666
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local items = {{2160, 25}, {12618, 5}, {12618, 8}, {12618, 10}, {11640, 3}, {11641, 2}} local min_level = 100 --Level mínimo para pegar os items do baú. local time = 18000

  • aqui::       Editando::   local items = {{2394, 100}            ---  ID do item, quantidade local time = 60     --  tempo Em minutos.   if getPlayerLevel(cid) >= 10 then       --  Level Mi

Postado

aqui::  

 

local items = {{2394, 100}, {2391, 100}, {2393, 100}, {2392, 100}}

local time = 60     --Em minutos. 
local storage = 91838
function onUse(cid, item, frompos, item2, topos)
        if getPlayerLevel(cid) >= 10 then
        if getPlayerStorageValue(cid, storage) < os.time() then
            local it = items[math.random(#items)]
            doPlayerAddItem(cid, it[1], it[2])
            doPlayerSendTextMessage(cid, 27, "Você recebeu "..it[2].." "..getItemNameById(it[1])..". Você poderá pegar sua próxima recompensa em "..time.." minutos.")
            setPlayerStorageValue(cid, storage, os.time() + time * 60)
        else
            return doPlayerSendCancel(cid, "Você pegou sua recompensa recentemente, aguarde.")
        end
        else
 doPlayerSendCancel(cid,"Voce só podera Pegar recompensa com Level 10+")
        end
    return true
end

 

 
Editando::
 
local items = {{2394, 100}            ---  ID do item, quantidade
local time = 60     --  tempo Em minutos.  
if getPlayerLevel(cid) >= 10 then       --  Level Minimo para pegar o Premio 
Postado
  • Autor

Deixei assim gente

 

 

aqui::  

 

[spoiler

]local items = {{2394, 100}, {2391, 100}, {2393, 100}, {2392, 100}}

local time = 60     --Em minutos. 
local storage = 91838
function onUse(cid, item, frompos, item2, topos)
        if getPlayerLevel(cid) >= 10 then
        if getPlayerStorageValue(cid, storage) < os.time() then
            local it = items[math.random(#items)]
            doPlayerAddItem(cid, it[1], it[2])
            doPlayerSendTextMessage(cid, 27, "Você recebeu "..it[2].." "..getItemNameById(it[1])..". Você poderá pegar sua próxima recompensa em "..time.." minutos.")
            setPlayerStorageValue(cid, storage, os.time() + time * 60)
        else
            return doPlayerSendCancel(cid, "Você pegou sua recompensa recentemente, aguarde.")
        end
        else
 doPlayerSendCancel(cid,"Voce só podera Pegar recompensa com Level 10+")
        end
    return true
end
 
Editando::
 
local items = {{2394, 100}            ---  ID do item, quantidade
local time = 60     --  tempo Em minutos.  
if getPlayerLevel(cid) >= 10 then       --  Level Minimo para pegar o Premio 

 

 

Posta ai como tu deixou o script.

local items = {{11446,1}, {11442,1}, {11441, 1}, {11449, 1}, {11448, 1}, {11453, 1}, {11451,1}, {11443,1}, {11447,1}, {11444,1}, {11445,1}, {11450,1}, {11452,1}},


local waittime = 1800 --Em segundos.
local storage = 918318
function onUse(cid, item, frompos, item2, topos)

if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para pegar seu premio novamente.")
return false
end
local it = items[math.random(#items)]
doPlayerAddItem(cid, it[1], it[2])
doPlayerSendTextMessage(cid, 27, "Você recebeu "..it[2].." "..getItemNameById(it[1])..".Pegue sua recompensa novamente em 30 minutos!")
exhaustion.set(cid, storage, waittime)
end

 

Editado por Gabriel Linha (veja o histórico de edições)

Atensiosamente, Gabriel L.

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo