Postado Julho 28, 2023 1 ano Galera, uso esse script de mining, queria ajuda de voces em relaçao a minerar, desde o player ficar com a pick para poder minerar, queria q ao equipar a pick (perto da pedra) ele ja ficasse minerando, sem ter q ficar clicando ou usar alguma hotkey, alguem pode ajudar pf ! Grato desde ja SCRIPT: Citar terra = {1353,1354,1355,8633,8634,8635,8636,} levels = { [-1] = 2145, ---- skull } local config = { storage = 19333, chance = 25, --- 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 } function onUse(cid, item, fromPosition, itemEx, toPosition) local drops = {} function getDrops(cid) for i= -1,getPlayerStorageValue(cid, config.storage) do if levels[i] then table.insert(drops, levels[i]) 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, "Parabens, voce subiu de nivel! Seu nivel atual e "..getPlayerStorageValue(cid, config.storage) ..".") if getPlayerStorageValue(cid, config.storage) == 1000 then doPlayerSendTextMessage(cid, 20, "Por alcancar o nivel "..getPlayerStorageValue(cid, config.storage) .." voce foi premiado com o capacete de mineracao.") doPlayerAddItem(cid, 7497, 1, true) end end if config.chance >= math.random(1,150) then if #drops >= 1 then local item = drops[math.random(1,#drops)] doPlayerSendTextMessage(cid, 27, "Voce encontrou um(a) "..getItemNameById(item)..".") doSendAnimatedText(toPosition, "Sucesso", 210) doPlayerAddItem(cid, item, 1, true) end doSendMagicEffect(toPosition, 3) else doSendAnimatedText(toPosition, "Tack", 180) doSendMagicEffect(toPosition, 2) return true end elseif itemEx.itemid == item.itemid then doPlayerSendTextMessage(cid, 27, "Voce esta atualmente no nivel "..getPlayerStorageValue(cid, config.storage)..".") else return false end return true end
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.