Phokencio 23 Posted March 25, 2014 Boas acabei de criar/modificar uma quest de lotaria que é a seguinte: quest lotaria begin state start begin when 20041.chat."Lotaria" begin if 30 > get_global_time() - pc . getqf ( "lottery_last_play" ) then say ("Deves esperar 30 segundos antes de repetir o jogo") return end say_title ( "Aposta" ) say ("Deves esperar 30 segundos antes de jogar novamente.") say_reward ("Preciso de: 50.000 Yang") say ("Queres continuar?") local scelta = select ( "Sim","Nao" ) if scelta == 1 then if pc . gold >= 50000 then pc . changegold ( - 50000 ) local k repeat say_title ( "Aposta" ) say ( "Introduz um numero de 1 a 20" ) say ("Se corresponder ao numero") say ("eligido podes ganhar o") say ("maior premio de 50.000.000 Yang!!") k = tonumber(input()) if k == nil then say_title("Aposta") say("Insere o numero!") local s = select("Continuar", "Anular") if s == 2 then return end else if k <= 0 then say_title("Aposta") say("Deves introduzir um numero positivo!") local s = select("Continuar", "Anular") if s == 2 then return end else if k > 20 then say_title("Aposta") say("Deves introduzir um numero entre 1 e 20") local s = select("Continuar", "Anular") if s == 2 then return end else break end end end until false say("Numero elegido: " .. k ) wait () say ("Agora procedemos o numero") local random_number = tostring(number(1,20)) say("Numero elaborado: " .. random_number) if random_number == tostring(k) then say ("Que sortudo, acabas-te de ganhar 50kk!") say_reward ("Recebes-te 50.000.000 Yang") pc.changegold ( 50000000 ) else say ("Sinto muito mas nem sempre se ganha!") end end pc.setqf("lottery_last_play" , get_global_time()) return end end end end O que acham? Sou noob nestas coisas xD 3 Darui, ©FULL and yumeid reacted to this Share this post Link to post Share on other sites
Unk3n0w7 1,321 Posted March 25, 2014 tu não criaste/modificaste !Só mudaste falas , e o npc . Share this post Link to post Share on other sites
Phokencio 23 Posted March 25, 2014 neps coloquei no meu server e estava bugada, tive a ver qual era o erro que ela tinha Share this post Link to post Share on other sites
©FULL 84 Posted April 9, 2014 Bem, não quero saber se foste tu que as fizeste ou se as editas-te, só sei que me vão dar geito! Obrigado por teres postado, tens o meu + 1. Cumprimentos. Share this post Link to post Share on other sites
βŁά©Ќ§†ŏ®ε™ 145 Posted December 22, 2014 quest lotaria begin state start begin when 20041.chat."Lotaria" begin if 30 > get_global_time() - pc . getqf ( "lottery_last_play" ) then say ("Deves esperar 30 segundos antes de repetir o jogo") return end say_title ( "Aposta" ) say ("Deves esperar 30 segundos antes de jogar novamente.") say_reward ("Preciso de: 50.000 Yang") say ("Queres continuar?") local scelta = select ( "Sim","Nao" ) if scelta == 1 then if pc . gold >= 50000 then pc . changegold ( - 50000 ) local k repeat say_title ( "Aposta" ) say ( "Introduz um numero de 1 a 20" ) say ("Se corresponder ao numero") say ("eligido podes ganhar o") say ("maior premio de 50.000.000 Yang!!") k = tonumber(input()) if k == nil then say_title("Aposta") say("Insere o numero!") local s = select("Continuar", "Anular") if s == 2 then return end else if k <= 0 then say_title("Aposta") say("Deves introduzir um numero positivo!") local s = select("Continuar", "Anular") if s == 2 then return end else if k > 20 then say_title("Aposta") say("Deves introduzir um numero entre 1 e 20") local s = select("Continuar", "Anular") if s == 2 then return end else break end end end until false say("Numero elegido: " .. k ) wait () say ("Agora procedemos o numero") local random_number = tostring(number(1,20)) say("Numero elaborado: " .. random_number) if random_number == tostring(k) then say ("Que sortudo, acabas-te de ganhar 50kk!") say_reward ("Recebes-te 50.000.000 Yang") pc.changegold ( 50000000 ) else say ("Sinto muito mas nem sempre se ganha!") end end pc.setqf("lottery_last_play" , get_global_time()) return end end end end Share this post Link to post Share on other sites
DeathOfKill 2 Posted August 19, 2020 Seria legal se anunciasse no chat quando alguém ganhasse!^^ Share this post Link to post Share on other sites
Luts 36 Posted August 19, 2020 9 horas atrás, DeathOfKill disse: Seria legal se anunciasse no chat quando alguém ganhasse!^^ Não percebi se queres que informe toda a gente ou só informe a pessoa em si Mas mesmo assim vou te ensinar duas funções ;) Só para a pessoa: Função: notice Exemplo de quest: quest X begin state start begin when login begin notice("Conseguiste entrar! uau") end end end Para toda a gente: Função: notice_all Exemplo de quest: quest X begin state start begin when login begin notice_all("O jogador "..pc.get_name().." entrou!") end end end Share this post Link to post Share on other sites
DeathOfKill 2 Posted August 19, 2020 Top.obrigado^^ Share this post Link to post Share on other sites
Keevin Aguiar 0 Posted August 10, 2021 Em 22/12/2014 at 12:58, βŁά©Ќ§†ŏ®ε™ disse: quest lotaria begin state start begin when 20041.chat."Lotaria" begin if 30 > get_global_time() - pc . getqf ( "lottery_last_play" ) then say ("Deves esperar 30 segundos antes de repetir o jogo") return end say_title ( "Aposta" ) say ("Deves esperar 30 segundos antes de jogar novamente.") say_reward ("Preciso de: 50.000 Yang") say ("Queres continuar?") local scelta = select ( "Sim","Nao" ) if scelta == 1 then if pc . gold >= 50000 then pc . changegold ( - 50000 ) local k repeat say_title ( "Aposta" ) say ( "Introduz um numero de 1 a 20" ) say ("Se corresponder ao numero") say ("eligido podes ganhar o") say ("maior premio de 50.000.000 Yang!!") k = tonumber(input()) if k == nil then say_title("Aposta") say("Insere o numero!") local s = select("Continuar", "Anular") if s == 2 then return end else if k <= 0 then say_title("Aposta") say("Deves introduzir um numero positivo!") local s = select("Continuar", "Anular") if s == 2 then return end else if k > 20 then say_title("Aposta") say("Deves introduzir um numero entre 1 e 20") local s = select("Continuar", "Anular") if s == 2 then return end else break end end end until false say("Numero elegido: " .. k ) wait () say ("Agora procedemos o numero") local random_number = tostring(number(1,20)) say("Numero elaborado: " .. random_number) if random_number == tostring(k) then say ("Que sortudo, acabas-te de ganhar 50kk!") say_reward ("Recebes-te 50.000.000 Yang") pc.changegold ( 50000000 ) else say ("Sinto muito mas nem sempre se ganha!") end end pc.setqf("lottery_last_play" , get_global_time()) return end end end end É possivel q ao inves de gold pra fazer a aposta precise de um item especifico ??? desde já agradeço !!! Share this post Link to post Share on other sites