Postado Fevereiro 26, 2018 7 anos Em 26/02/2018 em 01:19, xWhiteWolf disse: cola o script no seu comentário por favor pra eu n acabar pegando o errado Desculpa a demora, o script é esse aqui: Citar local terrarica = {4475} local terraspecial = {4485} local terra = {4471} local terraa = { [-1] = 2229, ---- skull [0] = 1294, --- small stone [10] = 2149, -- Small Emerald [12] = 2146, -- Small Sapphire [20] = 2145, -- Small Diamond [30] = 2150, -- Small Amethyst [60] = 2147, -- Small Ruby [80] = 2144, -- Black Pearls [100] = 2143, -- White Pearls [120] = 7761, -- small enchanted emerald [140] = 7759, -- Small Enchanted Sapphiire [160] = 7762, -- Small Enchanted Amethyst [180] = 7760, -- Small Enchanted Ruby [200] = 2157 -- Pepita de Ouro } local config = { storage = 19333, chance = 70, --- chance de achar um item ou não k = 2, --- constante de level.. quanto maior, mais fácil é upar. (a fórmula é level ao quadrado dividido pela constante) experience = 19334 } local function getDrops(uid, special, rica) local drops = {} for lvl, premio in pairs(terraa) do if lvl <= getPlayerStorageValue(uid, config.storage) then if (lvl >= 20 and lvl < 30 and rica) or (lvl >= 12 and lvl < 20 and special) or (not special and not rica and lvl < 12) then table.insert(drops, premio) end end end return drops end function onUse(cid, item, fromPosition, itemEx, toPosition) if isInArray(terra, itemEx.itemid) or isInArray(terraspecial, itemEx.itemid) or isInArray(terrarica, itemEx.itemid) then local drops = getDrops(cid, isInArray(terraspecial, itemEx.itemid), isInArray(terrarica, itemEx.itemid)) doPlayerSetStorageValue(cid, config.experience, getPlayerStorageValue(cid, config.experience)+1) local experience = getPlayerStorageValue(cid, config.experience) if experience >= config.k *(getPlayerStorageValue(cid, config.storage) + 1) 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) ..".") doSendMagicEffect(getCreaturePosition(cid),98) doSendAnimatedText(getCreaturePosition(cid), 'Mining UP', 100, cid) 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 else doPlayerSendTextMessage(cid, 20, "You have picked ".. getPlayerStorageValue(cid, config.experience) .." from ".. config.k *(getPlayerStorageValue(cid, config.storage) + 1) ..". Keep it up.") 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, 289) doSendAnimatedText(toPosition , 'TiickK!', 169) else doSendMagicEffect(toPosition, 288) doSendAnimatedText(toPosition , "Puuff!", 61) return true end elseif itemEx.itemid == item.itemid then doPlayerSendTextMessage(cid, 27, "You're currenctly level "..getPlayerStorageValue(cid, config.storage)..".") end return true end @xWhiteWolf Consegue me ajudar? Editado Março 9, 2018 7 anos por Gimdain (veja o histórico de edições)
Postado Abril 3, 2018 7 anos Onde está o script ? to precisando xD e em qual pasta eu coloco o .lua? Editado Abril 3, 2018 7 anos por Maurilio1067 esqueci de perguntar a pasta (veja o histórico de edições)
Postado Abril 3, 2018 7 anos Autor @Maurilio1067 ta literalmente em cima do arquivo: "Enfim, vamos ao script: actions\scripts\mining.lua:"
Postado Maio 11, 2018 7 anos Sistema toooooop demais, já coloquei no meu servidor 100% aprovado O meu server é TFS 1.3 OTX 3.10
Postado Maio 28, 2018 6 anos Teria como colocar esse sistema para ter um limite de level? por exemplo até no máximo nivel 200 ou quando chegasse a partir do nivel 100 ficasse cada vez mais hard de upar.
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.