Soult 0 #1 Postado 9 Julho, 2008 [b]Nome:[/b] Livros dando skills. . [b]Versão:[/b] 8.1 . [b]Tipo do script:[/b] Action. . [b]Servidor Testado:[/b] Aries 0.4.5. . [b]Autor:[/b] Gerax,Slumper. Olá mais uma vez A action é assim você da use no livro e ganha skill de acordo com um livro. Cada livro é uma skill e tem 5 livros que é que vale a Sword,Axe,Club,Distance,Shielding. 1° Passo va em Data/Action. e vá em actions.xml Lá ponha isso. <action itemid="1980" script="clubbook.lua"/> <action itemid="1982" script="swordbook.lua"/> <action itemid="1983" script="axebook.lua"/> <action itemid="1985" script="distancebook.lua"/> <action itemid="1986" script="shieldingbook.lua"/> 2° Passo agora vá em Data/Actions/Scripts copie i cole algum arquivo .lua e renomei para clubbook apague oque tiver dentro i cole isso. function onUse(cid, item, frompos, item2, topos) skill_level = getPlayerSkill(cid,1) rand = math.random(skill_level,100) if rand < 95 then doPlayerAddSkillTry(cid,1,9000000) doPlayerSendTextMessage(cid,22,"You have learn how to use better Club Weapons.") doRemoveItem(item.uid,1) else doPlayerSendTextMessage(cid,22,"Your learning failed") end end Faça a mesma coisa que você fez só que não coloque clubook coloque swordbook abra o arquivo e cole isso. function onUse(cid, item, frompos, item2, topos) skill_level = getPlayerSkill(cid,2) rand = math.random(skill_level,100) if rand < 95 then doPlayerAddSkillTry(cid,2,9000000) doPlayerSendTextMessage(cid,22,"You have learn how to use better sword weapons.") doRemoveItem(item.uid,1) else doPlayerSendTextMessage(cid,22,"Your learning failed") end end Faça a mesma coisa de novo que você fez em cima i renomei para axebook e cole isso. function onUse(cid, item, frompos, item2, topos) skill_level = getPlayerSkill(cid,3) rand = math.random(skill_level,100) if rand < 95 then doPlayerAddSkillTry(cid,3,9000000) doPlayerSendTextMessage(cid,22,"You have learn how to use better Axe Weapons.") doRemoveItem(item.uid,1) else doPlayerSendTextMessage(cid,22,"Your learning failed") end end Faça isso de novo i renomei para distancebook e cole isso function onUse(cid, item, frompos, item2, topos) skill_level = getPlayerSkill(cid,4) rand = math.random(skill_level,100) if rand < 95 then doPlayerAddSkillTry(cid,4,9000000) doPlayerSendTextMessage(cid,22,"You have learn how to use better distance weapons ") doRemoveItem(item.uid,1) else doPlayerSendTextMessage(cid,22,"Your learning failed") end end Agora faça de novo i renomei para shieldingbook e cole isso. function onUse(cid, item, frompos, item2, topos) skill_level = getPlayerSkill(cid,5) rand = math.random(skill_level,100) if rand < 95 then doPlayerAddSkillTry(cid,5,9000000) doPlayerSendTextMessage(cid,22,"You have learn how to use Shields better.") doRemoveItem(item.uid,1) else doPlayerSendTextMessage(cid,22,"Your learning failed") end end OBS: As ids dos livros são 1980, 1983, 1985, 1986 e 1982 Atenciosamente Arch~ Compartilhar este post Link para o post
GOD Winter 0 #3 Postado 11 Julho, 2008 Nuss mt rox vo por nu meo ot =] aprovado Winter~~ Compartilhar este post Link para o post
[ B a l i l l o ] 0 #4 Postado 12 Julho, 2008 Nota-se um erro neste script. A função addSkillTry adiciona uma 'try' diretamente no arquivo do player, try é "um attack", exemplo: Vc foi e deu 5 hits (de melee, ou seja, com sua arma) num Orc, vc adquiriu 5 trys. Para upar de skill, é necessário tantas try's... vc dando 9000000 de try's (conforme mostra o script) poderá upar mais que um skill ou (se o skill for alto) poderá nem upar o skill :S Tenta ver melhor isso ai no seu script. Compartilhar este post Link para o post
Seven Log 0 #5 Postado 13 Fevereiro, 2009 Muito Bom! Alem do livro dar Def vai dar magia Nota:9.8 Vlw T+ Compartilhar este post Link para o post
elitonnos 0 #6 Postado 13 Fevereiro, 2009 Noossa, posso fazer destes livros itens vip ! E que custam um dinheirão ! kkkkkkk mê, excelente idéia essa dos livros, porque eu estava querendo 'fazer' uns itens vip .. essa vai pra lista kkkkkkk Abraços e aprovadíssimo . (: Compartilhar este post Link para o post