Marco Posted November 17, 2016 Share Posted November 17, 2016 Boas pessoal, eu sabia em tempos contudo já esqueci, o que se trata.. É seguinte, eu tenho uma quest de lotaria, no entanto pede yang, o que eu queria era alterar e em vez de pedir yang pedir um item :/ Deixo a quest: quest lotaria begin state start begin when 20031.chat."Lotaria" begin if 3600 > get_global_time() - pc . getqf ( "lottery_last_play" ) then say ("Deves esperar 1 Hora antes de repetir o jogo") return end say_title ( "Aposta" ) say ("Deves esperar 1 Hora 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 2" ) 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 > 3 then say_title("Aposta") say("Deves introduzir um numero entre 1 e 2") 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 Link to comment Share on other sites More sharing options...
Karbust Posted November 17, 2016 Share Posted November 17, 2016 Hidden Content Give reaction to this post to see the hidden content. Link to comment Share on other sites More sharing options...
Marco Posted November 17, 2016 Author Share Posted November 17, 2016 if pc.count_item("xxx") >= 1 then Obrigadooo Link to comment Share on other sites More sharing options...
PACI Posted November 17, 2016 Share Posted November 17, 2016 Não precisas das aspas btw Link to comment Share on other sites More sharing options...
Magician Posted November 17, 2016 Share Posted November 17, 2016 if scelta == 1 then if pc . gold >= 50000 then pc . changegold ( - 50000 ) troca para Hidden Content Give reaction to this post to see the hidden content. Link to comment Share on other sites More sharing options...
Recommended Posts