Ir para conteúdo

Featured Replies

Postado

Bom dia galera,

estou com um scripts aqui ele ta funcionando 100%

unica diferença que ao voce dar use no iten Present Box, ao invez de vir 1 iten, sempre vem 2 itens, tentei de tudo nao consegui identificar onde eu altero!!

 

plx ajuda ai

local items = {
    	[5468] = {maxAmmount = 1, chance = 50},
    	[8982] = {maxAmmount = 1, chance = 50},
	[10310] = {maxAmmount = 1, chance = 50},
	[2829] = {maxAmmount = 1, chance = 50},
}

function onUse(cid, item)
    for i, e in pairs(items) do
        if math.random(200) <= e.chance then
            local ammount = math.random(1, e.maxAmmount)
            
            doPlayerAddItem(cid, i, ammount)
            doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i))
        end
    end
    doRemoveItem(item.uid)
    return true
end

 

  • Respostas 9
  • Visualizações 370
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Testa ai para ver se deu

 

Spoiler

local items = {
        [5468] = {maxAmmount = 1, chance = 50},
        [8982] = {maxAmmount = 1, chance = 50},
    [10310] = {maxAmmount = 1, chance = 50},
    [2829] = {maxAmmount = 1, chance = 50},
}

function onUse(cid, item)
    for i, e in pairs(items) do
        if math.random(100) <= e.chance then
            local ammount = math.random(1, e.maxAmmount)
            
            doPlayerAddItem(cid, i, ammount)
            doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i))
        end
    end
    doRemoveItem(item.uid)
    return true
end

 

giphy.gif

Postado
  • Autor
1 minuto atrás, PedroSTT disse:

Testa ai para ver se deu

 

  Ocultar conteúdo

local items = {
        [5468] = {maxAmmount = 1, chance = 50},
        [8982] = {maxAmmount = 1, chance = 50},
    [10310] = {maxAmmount = 1, chance = 50},
    [2829] = {maxAmmount = 1, chance = 50},
}

function onUse(cid, item)
    for i, e in pairs(items) do
        if math.random(100) <= e.chance then
            local ammount = math.random(1, e.maxAmmount)
            
            doPlayerAddItem(cid, i, ammount)
            doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i))
        end
    end
    doRemoveItem(item.uid)
    return true
end

 

Eai pedro blz!

testei aqui, ainda continua vindo em 2, e as vezes não da nenhum :(

ou sera que esse scripts ta bugado?

Postado
Agora, mateusmoretti disse:

Eai pedro blz!

testei aqui, ainda continua vindo em 2, e as vezes não da nenhum :(

ou sera que esse scripts ta bugado?


Pera , então teste agr 

Spoiler

local items = {
        [5468] = {maxAmmount = 1, chance = 50},
        [8982] = {maxAmmount = 1, chance = 50},
    [10310] = {maxAmmount = 1, chance = 50},
    [2829] = {maxAmmount = 1, chance = 50},
}

function onUse(cid, item)
    for i, e in pairs(items) do
        if math.random(100) <= e.chance then
            local ammount = math.random(1)
            
            doPlayerAddItem(cid, i, ammount)
            doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i))
        end
    end
    doRemoveItem(item.uid)
    return true
end

 

giphy.gif

Postado
  • Autor
3 minutos atrás, PedroSTT disse:


Pera , então teste agr 

  Ocultar conteúdo

local items = {
        [5468] = {maxAmmount = 1, chance = 50},
        [8982] = {maxAmmount = 1, chance = 50},
    [10310] = {maxAmmount = 1, chance = 50},
    [2829] = {maxAmmount = 1, chance = 50},
}

function onUse(cid, item)
    for i, e in pairs(items) do
        if math.random(100) <= e.chance then
            local ammount = math.random(1)
            
            doPlayerAddItem(cid, i, ammount)
            doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i))
        end
    end
    doRemoveItem(item.uid)
    return true
end

 

Ainda persiste, vem de 2 ou 3 agora!

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