Postado Fevereiro 1, 2018 7 anos @gutalo Por sorte achei como resolver. Substitui o script de mining por esse: Spoiler terra = {8636,8633,8634,8635} skills = { [-1] = 2229, ---- skull [0] = 2148, --- Cent [1] = 3976, --- worm [5] = 2152, -- Dollar [10] = 12779, -- Senzu Green [15] = 12468, -- Mystic root [20] = 12469, -- Magic Crystal [25] = 5877, -- Refine Stone [30] = 2144, -- God Senzy [35] = 2160, ---Gold Bar [40] = 6500, -- Mystic Senzu [45] = 13539, -- Blue Gold [50] = 2146, -- Small Enchanted Ruby [55] = 6548, -- Small Enchanted Ruby [60] = 6551, -- Vamp Dust [65] = 6549, -- Small Enchanted Ruby [70] = 2149, -- Life Crystal [75] = 5902, -- Life Crystal [80] = 2147, -- Life Crystal [90] = 5944, -- Life Crystal [100] = 6547 -- Life Crystal } local config = { storage = 20338, chance = 30, --- chance de achar um item ou não k = 1, --- constante de level.. quanto maior, mais fácil é upar. (a fórmula é level ao quadrado dividido pela constante) experience = 19334 } function onUse(cid, item, fromPosition, itemEx, toPosition) local drops = {} function getDrops(cid) for i= -1,getPlayerStorageValue(cid, config.storage) do if skills then table.insert(drops, skills) end end return true end if isInArray(terra, itemEx.itemid) then getDrops(cid) doPlayerSetStorageValue(cid, config.experience, getPlayerStorageValue(cid, config.experience)+1) local experience = getPlayerStorageValue(cid, config.experience) if experience >= (8+(getPlayerStorageValue(cid, config.storage)^2))/config.k then doPlayerSetStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage)+1) doPlayerSendTextMessage(cid, 27, "Congratulations, you have leveled! Your currect level is "..getPlayerStorageValue(cid, config.storage) ..".") if getPlayerStorageValue(cid, config.storage) == 50 then doPlayerSendTextMessage(cid, 20, "For reaching level "..getPlayerStorageValue(cid, config.storage) .." you have been awarded with Mining Helmet.") doPlayerAddItem(cid, 7497, 1, true) end end if config.chance >= math.random(1,100) then if #drops >= 1 then local item = drops[math.random(1,#drops)] doPlayerSendTextMessage(cid, 27, "You have found a "..getItemNameById(item)..".") doPlayerAddItem(cid, item, 1, true) end doSendMagicEffect(toPosition, 3) else doSendMagicEffect(toPosition, 2) return true end elseif itemEx.itemid == item.itemid then doPlayerSendTextMessage(cid, 27, "You're currenctly level "..getPlayerStorageValue(cid, config.storage)..".") else return false end return true end créditos: Radamanthys Wov
Postado Fevereiro 1, 2018 7 anos Autor 17 minutos atrás, gabriel28 disse: @gutalo Por sorte achei como resolver. Substitui o script de mining por esse: Ocultar conteúdo terra = {8636,8633,8634,8635} skills = { [-1] = 2229, ---- skull [0] = 2148, --- Cent [1] = 3976, --- worm [5] = 2152, -- Dollar [10] = 12779, -- Senzu Green [15] = 12468, -- Mystic root [20] = 12469, -- Magic Crystal [25] = 5877, -- Refine Stone [30] = 2144, -- God Senzy [35] = 2160, ---Gold Bar [40] = 6500, -- Mystic Senzu [45] = 13539, -- Blue Gold [50] = 2146, -- Small Enchanted Ruby [55] = 6548, -- Small Enchanted Ruby [60] = 6551, -- Vamp Dust [65] = 6549, -- Small Enchanted Ruby [70] = 2149, -- Life Crystal [75] = 5902, -- Life Crystal [80] = 2147, -- Life Crystal [90] = 5944, -- Life Crystal [100] = 6547 -- Life Crystal } local config = { storage = 20338, chance = 30, --- chance de achar um item ou não k = 1, --- constante de level.. quanto maior, mais fácil é upar. (a fórmula é level ao quadrado dividido pela constante) experience = 19334 } function onUse(cid, item, fromPosition, itemEx, toPosition) local drops = {} function getDrops(cid) for i= -1,getPlayerStorageValue(cid, config.storage) do if skills then table.insert(drops, skills) end end return true end if isInArray(terra, itemEx.itemid) then getDrops(cid) doPlayerSetStorageValue(cid, config.experience, getPlayerStorageValue(cid, config.experience)+1) local experience = getPlayerStorageValue(cid, config.experience) if experience >= (8+(getPlayerStorageValue(cid, config.storage)^2))/config.k then doPlayerSetStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage)+1) doPlayerSendTextMessage(cid, 27, "Congratulations, you have leveled! Your currect level is "..getPlayerStorageValue(cid, config.storage) ..".") if getPlayerStorageValue(cid, config.storage) == 50 then doPlayerSendTextMessage(cid, 20, "For reaching level "..getPlayerStorageValue(cid, config.storage) .." you have been awarded with Mining Helmet.") doPlayerAddItem(cid, 7497, 1, true) end end if config.chance >= math.random(1,100) then if #drops >= 1 then local item = drops[math.random(1,#drops)] doPlayerSendTextMessage(cid, 27, "You have found a "..getItemNameById(item)..".") doPlayerAddItem(cid, item, 1, true) end doSendMagicEffect(toPosition, 3) else doSendMagicEffect(toPosition, 2) return true end elseif itemEx.itemid == item.itemid then doPlayerSendTextMessage(cid, 27, "You're currenctly level "..getPlayerStorageValue(cid, config.storage)..".") else return false end return true end créditos: Radamanthys Wov Ta só upando o mining, n ta pegando item algum. Nao ta entregando mais os itens. Resolveu o erro de conflito. edit 1: OBRIGADO AMIGO!!! RESOLVEU!!! 100% só tive que fazer uma alteração no que você me mandou... Editado Fevereiro 1, 2018 7 anos por gutalo (veja o histórico de edições)
Postado Fevereiro 1, 2018 7 anos @gutalo De nada. :D Se resolveu, marque como melhor resposta para poderem fechar o tópico.
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.