Undead Slayer 0 #1 Postado 12 Julho, 2008 ------------------------------- Nome: Mining System Versão: 8.0+ Tipo do script: Action Servidor Testado: Aeries Server 3.0 (Yurots 1.2) Autor: Runando ------------------------------- Esse é um script de mineração novo, diferente dos outros, pois possui exhaust, o player so pode minerar de 15 em 15 segundos, alem de ter uns efeitos ROX Va em data/action/scripts, copie qualquer arquivo, renomeie para Mining Sistem, apague tudo dentro e coloque isto: ----- Pick Sistem by Runando ----- function onUse(cid, item, frompos, item2, topos) -------- PAUSA -------- local pause = 15000 -------- FRASES -------- local msg_found_good = "Parabens, você achou um Iron Ore." local msg_found_bad = "Você achou uma Small Stone. Poise, melhor sorte da proxima vez." local msg_not_found = "Você não achou nada. Poise, melhor sorte da proxima vez." local msg_broken_pick = "Sua pick quebrou. Poise, melhor sorte da proxima vez." local msg_exhaust = "Você esta cansado, descanse para mineirar de novo" local msg_not_local = "Você não esta mineirando no lugar certo." local pos = getPlayerPosition(cid) -------- RANDOM -------- local rand = math.random(1,100) -------- STORAGE -------- local the_storage = 64000 local begin_storage = 1 -------- PRIMEIRO SISTEMA -------- if item2.actionid == X then -------- X = Actionid a ser colocada em todas as pedras que podem ser mineradas if getPlayerStorageValue(cid,the_storage) <= begin_storage then if rand >= 1 and rand <= 20 then doSendAnimatedText(pos,'Mining',18) doPlayerAddItem(cid,5880,1) doSendMagicEffect(pos,12) doPlayerSendTextMessage(cid,22,msg_found_good) setPlayerStorageValue(cid,the_storage,begin_storage) addEvent(to_pause,pause,cid) elseif rand >= 21 and rand <= 50 then doSendAnimatedText(pos,'Mining',18) doPlayerAddItem(cid,1294,1) doSendMagicEffect(pos,12) doPlayerSendTextMessage(cid,22,msg_found_bad) setPlayerStorageValue(cid,the_storage,begin_storage) addEvent(to_pause,pause,cid) elseif rand >= 51 and rand <= 90 then doSendAnimatedText(pos,'Not Found',5) doSendMagicEffect(pos,2) doPlayerSendTextMessage(cid,22,msg_not_found) setPlayerStorageValue(cid,the_storage,begin_storage) addEvent(to_pause,pause,cid) elseif rand >= 91 and rand <= 100 then doSendAnimatedText(pos,'Broken',5) doPlayerRemoveItem(cid,2553,1) doSendMagicEffect(pos,31) doPlayerSendTextMessage(cid,22,msg_broken_pick) setPlayerStorageValue(cid,the_storage,begin_storage) addEvent(to_pause,pause,cid) else doPlayerSendCancel(cid,msg_exhaust) end else doPlayerSendCancel(cid,msg_not_local) end end function to_pause(cid) -------- FRASES -------- local mining_again = "Você ja descansou, pode minerar de novo." -------- STORAGE -------- local the_storage = 64000 local end_storage = 0 -------- SEGUNDO SISTEMA -------- doPlayerSendTextMessage(cid,22,mining_again) setPlayerStorageValue(cid,the_storage,end_storage) end SUBTITUA X PELA A ACTION ID A SER COLOCADA EM TODAS AS PEDRAS QUE PODEM SER MINERADAS Agora, vamos a TAG. è possivel que ja tenha um sistema de minerar no OT, para subtituilo, va em action.xml, e procure pelo numero 2553, você deve achar algo assim: <action itemid="2553" script="ALGUM NOME.lua"/> Se você achar, subtitu-a isto por: <action itemid="2553" script="Mining Sistem.lua"/> Se você não achar, apenas acrescente isto: <action itemid="2553" script="Mining Sistem.lua"/> Creditos: 100% Runando ESPERO TER AJUDADO COMENTEM Compartilhar este post Link para o post
Dark 3 #2 Postado 15 Julho, 2008 Você gosta de usar addEvent em Aprovado Compartilhar este post Link para o post
Undead Slayer 0 #3 Postado 17 Julho, 2008 fazer o q? os kra vive pedindo sistema com tempo, viciei né Compartilhar este post Link para o post
mendez 0 #4 Postado 19 Julho, 2008 Axei bem criativo os coisas q podem acontecer, porém o exausted n funciona, logo e so + 1 mining system comum =/ Compartilhar este post Link para o post
Undead Slayer 0 #5 Postado 29 Julho, 2008 funciona sim, vc que deve ter dado pau ae no script Compartilhar este post Link para o post
ryandometal 0 #6 Postado 29 Julho, 2008 Ficou bem legal, ja coloquei no meu ot, ainda mais nosso server com um scripter como vc xD Parabéns, ficou muito bom. Compartilhar este post Link para o post
Kofesco II 0 #7 Postado 26 Março, 2009 Cara testei aki em um OT 8.4 e deu certoooooooooooo Vlwwwwwwwwwwwwwwwwwwwww Fiquei tentando vários tutoriais sobre isso e só o teu deu certo Vlwwwwww Compartilhar este post Link para o post