Magician Posted August 22, 2016 at 11:14 AM Share Posted August 22, 2016 at 11:14 AM quest point_system begin state start begin when login begin set_state( point_system ) pc.setqf("point", 0) end end state point_system begin -- Quando se mata Chef orc Ganha-se 10 Pontos when 691.kill begin local index =pc.getqf("point")+10 pc.setqf("point",index) syschat(" Parabéns Ganhaste 10 Pontos") end -- Quando se Mata Rainha Aranha ganha-se 15 Pontos when 2091.kill begin local index =pc.getqf("point")+15 pc.setqf("point",index) syschat(" parabéns ganhaste 15 Pontos") end -- Quando se mata Tartaruga Gigante Ganha-se 15 Pontos when 2191.kill begin local index =pc.getqf("point")+15 pc.setqf("point",index) syschat(" Parabéns ganhas-te 15 pontos") -- Quando se Mata o Dragão Azul ganha-se 25 Pontos end when 2493.kill begin local index=pc.getqf("point")+25 pc.setqf("point",index) syschat("Parabéns Ganhaste 25 Pontos") end when 20084.chat."Sistema De Pontos" begin local i = select("Mais Sobre o Sistema", "Pedra Iris", "Espada Venenosa+2") if 1==i then say("Boas Eu Sou Responsavél Pelo") say(" Sistema de Pontos Apesar do ") say(" Sistema ter sido criado por ") say(" MAGICIAN ") say(" Sistema foi Feito para a UPGAMES ") say("Este Sistema Funciona Basicamente") say(" da Seguinte Forma ao matares") say_reward(" o chef orc ganhas 10 pontos") say_reward(" a Rainha aranha ganhas 15 pontos") say_reward("a Tartaruga Gigante ganhas 15 pontos") say_reward(" o dragão azul ganhas 25 Pontos") say_reward(" TENS "..pc.getqf("point").." Pontos ") elseif 2==i then say("Boas Queres Trocar 100 Pontos por") say(" Uma Pedra Iris ") if pc.getqf("point")>=100 then local index =pc.getqf("point")-100 pc.setqf("point", index) pc.give_item2(IDPedraIRIS) wait() say("Recebeste Pedra Iris com Sucesso") syschat("Recebeste Pedra IRIS") else wait() say(" Não Tens 100 Pontos ") end elseif 3==i then say("queres Trocar 500 Pontos por Uma ") say("Espada Venenosa") if pc.getqf("point")>=500 then local index =pc.getqf("point")-500 pc.setqf("point", index) pc.give_item2(idoITEM) wait() say("Recebeste Espada Venenosa Com Sucesso") syschat("Recebeste Espada Venenosa+2") else wait() say(" Não Tens 500 Pontos ") end end end end end quest tinha sido feito por mi para a upgames Link to comment Share on other sites More sharing options...
carmo94 Posted March 26, 2018 at 05:08 PM Share Posted March 26, 2018 at 05:08 PM @Magician como colocar em ordem ? Link to comment Share on other sites More sharing options...
GODSPEED Posted March 26, 2018 at 06:48 PM Share Posted March 26, 2018 at 06:48 PM 1 hora atrás, carmo94 disse: @Magician como colocar em ordem ? quest point_system begin state start begin when login begin set_state( point_system ) pc.setqf("point", 0) end end state point_system begin -- Quando se mata Chef orc Ganha-se 10 Pontos when 691.kill begin local index =pc.getqf("point")+10 pc.setqf("point",index) syschat(" Parabéns Ganhaste 10 Pontos") end -- Quando se Mata Rainha Aranha ganha-se 15 Pontos when 2091.kill begin local index =pc.getqf("point")+15 pc.setqf("point",index) syschat(" parabéns ganhaste 15 Pontos") end -- Quando se mata Tartaruga Gigante Ganha-se 15 Pontos when 2191.kill begin local index =pc.getqf("point")+15 pc.setqf("point",index) syschat(" Parabéns ganhas-te 15 pontos") -- Quando se Mata o Dragão Azul ganha-se 25 Pontos end when 2493.kill begin local index=pc.getqf("point")+25 pc.setqf("point",index) syschat("Parabéns Ganhaste 25 Pontos") end when 20084.chat."Sistema De Pontos" begin local i = select("Mais Sobre o Sistema", "Pedra Iris", "Espada Venenosa+2") if 1==i then say("Boas Eu Sou Responsavél Pelo") say(" Sistema de Pontos Apesar do ") say(" Sistema ter sido criado por ") say(" MAGICIAN ") say(" Sistema foi Feito para a UPGAMES ") say("Este Sistema Funciona Basicamente") say(" da Seguinte Forma ao matares") say_reward(" o chef orc ganhas 10 pontos") say_reward(" a Rainha aranha ganhas 15 pontos") say_reward("a Tartaruga Gigante ganhas 15 pontos") say_reward(" o dragão azul ganhas 25 Pontos") say_reward(" TENS "..pc.getqf("point").." Pontos ") elseif 2==i then say("Boas Queres Trocar 100 Pontos por") say(" Uma Pedra Iris ") if pc.getqf("point")>=100 then local index =pc.getqf("point")-100 pc.setqf("point", index) pc.give_item2(IDPedraIRIS) wait() say("Recebeste Pedra Iris com Sucesso") syschat("Recebeste Pedra IRIS") else wait() say(" Não Tens 100 Pontos ") end elseif 3==i then say("queres Trocar 500 Pontos por Uma ") say("Espada Venenosa") if pc.getqf("point")>=500 then local index =pc.getqf("point")-500 pc.setqf("point", index) pc.give_item2(idoITEM) wait() say("Recebeste Espada Venenosa Com Sucesso") syschat("Recebeste Espada Venenosa+2") else wait() say(" Não Tens 500 Pontos ") end end end end end Link to comment Share on other sites More sharing options...
oserra Posted April 10, 2018 at 04:34 PM Share Posted April 10, 2018 at 04:34 PM Para organizarem-se melhor, fiz uma lib e uma quest, editáveis e muito mais simples de entender do que estar a ler 40 linhas de código repetidas: boss.lua: https://pastebin.com/5DfFA1VF quest: https://pastebin.com/FFnNnqXa Não esquecer de adicionar a linha no questlib, juntamente com o ficheiro .lua na pasta quest: dofile(get_locale_base_path().."/quest/boss.lua") Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now