antiblock
Elveron
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
(Adm)Santos

Troca De Livros Diarias

Question

Alguem que entenda bem de quests me diga se ta bem ou nao e como meto para poder apenas trocar 3 livros por dia..

Desde ja obrigado

 

quest bookday begin
state start begin
when 20011.chat."Feira do Livro" begin
            say_title("Uriel:")
            say("")
            say("Bem-vindo Aventureiro,")
            say("já ouviste falar da feira do livro?")
            say("Antes de mais deixa-me apresentar,")
            say("meu nome é Uriel e sou perito em livros.")
            say("Já li quase todos os livros do mundo,")
            say("faltam me ler alguns que sao bastante raros.")
            say("Por isso eu fiz uma feira do livro,")
say("para ver se alguem tem algum que nunca tenha")
say("lido.")
            say("")
 
            if math.random(2) == 1 then
                wait()
                say_pc_name()
                say("")
                say("Se tiveres algum livro que queiras trocar por")
                say("um dos meus, basta arrastares ele até mim.")
say("")
say("Ha, quase me esquecia!")
say("Infelizmente só posso trocar 3 livros por dia.")
                say("")
            end
        end
when 20011.take with item.vnum == 50300 == 1 begin
say_title("Uriel")
say("")
say("Tens a certeza que queres trocar este Livro")
say("por um dos meus Manuais?")
say("")
local answ = select("Sim", "Não")
if answ == 1 then
local num = number(1,44)
local tomes = {50401,50402,50403,50404,50405,50416,50417,50418,50419,50420,50431,50432,50433,50434,50435,50446,50447,50448,50449,50450,50461,50462,50463,50464,50465,50466,50476,50477,50478,50479,50480,50481,50496,50495,50494,50493,50492,50491,50506,50507,50508,50509,50510,50511}
item.remove(50300,3)
pc.setqf("next_time", get_time()+number(24, 24)*60*60)
pc.give_item2(tonumber(tomes[num]),1)
end
end
end 

Share this post


Link to post
Share on other sites

4 answers to this question

  • 0

fiz de cabeça deve dar

quest bookday begin
	state start begin
		when login begin
			pc.setqf("max",3)
			set_state(troca)
		end
	end
	state troca begin
		when 20011.chat."Feira do Livro" begin
            say_title("Uriel:")
            say("")
            say("Bem-vindo Aventureiro,")
            say("já ouviste falar da feira do livro?")
            say("Antes de mais deixa-me apresentar,")
            say("meu nome é Uriel e sou perito em livros.")
            say("Já li quase todos os livros do mundo,")
            say("faltam me ler alguns que sao bastante raros.")
            say("Por isso eu fiz uma feira do livro,")
			say("para ver se alguem tem algum que nunca tenha")
			say("lido.")
            say("")
 
            if math.random(2) == 1 then
                wait()
                say_pc_name()
                say("")
                say("Se tiveres algum livro que queiras trocar por")
                say("um dos meus, basta arrastares ele até mim.")
				say("")
				say("Ha, quase me esquecia!")
				say("Infelizmente só posso trocar 3 livros por dia.")
                say("")
            end
        end
		when 20011.take with item.vnum == 50300 == 1 begin
			say_title("Uriel")
			say("")
			say("Tens a certeza que queres trocar este Livro")
			say("por um dos meus Manuais?")
			say("")
			local answ = select("Sim", "Não")
			if answ == 1 then
				if pc.getqf("next_time") > get_time()
					say("ainda não podes trocar")
					
				else
					if pc.getqf("max") <= 2 then
						local num = number(1,44)
						local tomes = {50401,50402,50403,50404,50405,50416,50417,50418,50419,50420,50431,50432,50433,50434,50435,50446,50447,50448,50449,50450,50461,50462,50463,50464,50465,50466,50476,50477,50478,50479,50480,50481,50496,50495,50494,50493,50492,50491,50506,50507,50508,50509,50510,50511}
						item.remove(50300,3)
						pc.give_item2(tonumber(tomes[num]),1)
						pc.setqf("max",pc.getqf("max")+1)
					elseif pc.getqf("max") == 3 then
						pc.setqf("max",pc.getqf("max")+1)
					
						pc.setqf("next_time", get_time()+number(24, 24)*60*60)
						pc.setqf("max",0)
					
					end
				end
			end
		end	
	end
end

Share this post


Link to post
Share on other sites
antiblock
diamwall
  • 0

 

fiz de cabeça deve dar

quest bookday begin
	state start begin
		when login begin
			pc.setqf("max",3)
			set_state(troca)
		end
	end
	state troca begin
		when 20011.chat."Feira do Livro" begin
            say_title("Uriel:")
            say("")
            say("Bem-vindo Aventureiro,")
            say("já ouviste falar da feira do livro?")
            say("Antes de mais deixa-me apresentar,")
            say("meu nome é Uriel e sou perito em livros.")
            say("Já li quase todos os livros do mundo,")
            say("faltam me ler alguns que sao bastante raros.")
            say("Por isso eu fiz uma feira do livro,")
			say("para ver se alguem tem algum que nunca tenha")
			say("lido.")
            say("")
 
            if math.random(2) == 1 then
                wait()
                say_pc_name()
                say("")
                say("Se tiveres algum livro que queiras trocar por")
                say("um dos meus, basta arrastares ele até mim.")
				say("")
				say("Ha, quase me esquecia!")
				say("Infelizmente só posso trocar 3 livros por dia.")
                say("")
            end
        end
		when 20011.take with item.vnum == 50300 == 1 begin
			say_title("Uriel")
			say("")
			say("Tens a certeza que queres trocar este Livro")
			say("por um dos meus Manuais?")
			say("")
			local answ = select("Sim", "Não")
			if answ == 1 then
				if pc.getqf("next_time") > get_time()
					say("ainda não podes trocar")
					
				else
					if pc.getqf("max") <= 2 then
						local num = number(1,44)
						local tomes = {50401,50402,50403,50404,50405,50416,50417,50418,50419,50420,50431,50432,50433,50434,50435,50446,50447,50448,50449,50450,50461,50462,50463,50464,50465,50466,50476,50477,50478,50479,50480,50481,50496,50495,50494,50493,50492,50491,50506,50507,50508,50509,50510,50511}
						item.remove(50300,3)
						pc.give_item2(tonumber(tomes[num]),1)
						pc.setqf("max",pc.getqf("max")+1)
					elseif pc.getqf("max") == 3 then
						pc.setqf("max",pc.getqf("max")+1)
					
						pc.setqf("next_time", get_time()+number(24, 24)*60*60)
						pc.setqf("max",0)
					
					end
				end
			end
		end	
	end
end

 

Vou testar, desde já muito obrigado meu +1 

Share this post


Link to post
Share on other sites
  • 0

olha eu encontrei um bug nisso que fiz

 

versão correta :

quest bookday begin
	state start begin
		when login begin
			pc.setqf("max",3)
			set_state(troca)
		end
	end
	state troca begin
		when 20011.chat."Feira do Livro" begin
            say_title("Uriel:")
            say("")
            say("Bem-vindo Aventureiro,")
            say("já ouviste falar da feira do livro?")
            say("Antes de mais deixa-me apresentar,")
            say("meu nome é Uriel e sou perito em livros.")
            say("Já li quase todos os livros do mundo,")
            say("faltam me ler alguns que sao bastante raros.")
            say("Por isso eu fiz uma feira do livro,")
			say("para ver se alguem tem algum que nunca tenha")
			say("lido.")
            say("")
 
            if math.random(2) == 1 then
                wait()
                say_pc_name()
                say("")
                say("Se tiveres algum livro que queiras trocar por")
                say("um dos meus, basta arrastares ele até mim.")
				say("")
				say("Ha, quase me esquecia!")
				say("Infelizmente só posso trocar 3 livros por dia.")
                say("")
            end
        end
		when 20011.take with item.vnum == 50300 == 1 begin
			say_title("Uriel")
			say("")
			say("Tens a certeza que queres trocar este Livro")
			say("por um dos meus Manuais?")
			say("")
			local answ = select("Sim", "Não")
			if answ == 1 then
				if get_time() < pc.getqf("next_time") then
					say("ainda não podes trocar")
					
				else
					if pc.getqf("max") <= 2 then
						local num = number(1,44)
						local tomes = {50401,50402,50403,50404,50405,50416,50417,50418,50419,50420,50431,50432,50433,50434,50435,50446,50447,50448,50449,50450,50461,50462,50463,50464,50465,50466,50476,50477,50478,50479,50480,50481,50496,50495,50494,50493,50492,50491,50506,50507,50508,50509,50510,50511}
						item.remove(50300,3)
						pc.give_item2(tonumber(tomes[num]),1)
						pc.setqf("max",pc.getqf("max")+1)
					elseif pc.getqf("max") == 3 then
						pc.setqf("max",pc.getqf("max")+1)
					
						pc.setqf("next_time", get_time()+number(24, 24)*60*60)
						pc.setqf("max",0)
					
					end
				end
			end
		end	
	end
end

Share this post


Link to post
Share on other sites
  • 0

 

olha eu encontrei um bug nisso que fiz

 

versão correta :

quest bookday begin
	state start begin
		when login begin
			pc.setqf("max",3)
			set_state(troca)
		end
	end
	state troca begin
		when 20011.chat."Feira do Livro" begin
            say_title("Uriel:")
            say("")
            say("Bem-vindo Aventureiro,")
            say("já ouviste falar da feira do livro?")
            say("Antes de mais deixa-me apresentar,")
            say("meu nome é Uriel e sou perito em livros.")
            say("Já li quase todos os livros do mundo,")
            say("faltam me ler alguns que sao bastante raros.")
            say("Por isso eu fiz uma feira do livro,")
			say("para ver se alguem tem algum que nunca tenha")
			say("lido.")
            say("")
 
            if math.random(2) == 1 then
                wait()
                say_pc_name()
                say("")
                say("Se tiveres algum livro que queiras trocar por")
                say("um dos meus, basta arrastares ele até mim.")
				say("")
				say("Ha, quase me esquecia!")
				say("Infelizmente só posso trocar 3 livros por dia.")
                say("")
            end
        end
		when 20011.take with item.vnum == 50300 == 1 begin
			say_title("Uriel")
			say("")
			say("Tens a certeza que queres trocar este Livro")
			say("por um dos meus Manuais?")
			say("")
			local answ = select("Sim", "Não")
			if answ == 1 then
				if get_time() < pc.getqf("next_time") then
					say("ainda não podes trocar")
					
				else
					if pc.getqf("max") <= 2 then
						local num = number(1,44)
						local tomes = {50401,50402,50403,50404,50405,50416,50417,50418,50419,50420,50431,50432,50433,50434,50435,50446,50447,50448,50449,50450,50461,50462,50463,50464,50465,50466,50476,50477,50478,50479,50480,50481,50496,50495,50494,50493,50492,50491,50506,50507,50508,50509,50510,50511}
						item.remove(50300,3)
						pc.give_item2(tonumber(tomes[num]),1)
						pc.setqf("max",pc.getqf("max")+1)
					elseif pc.getqf("max") == 3 then
						pc.setqf("max",pc.getqf("max")+1)
					
						pc.setqf("next_time", get_time()+number(24, 24)*60*60)
						pc.setqf("max",0)
					
					end
				end
			end
		end	
	end
end

 

Mano aparece a aba do uriel a falar etc mas depois quando arrasto o livro para cima do uriel nao acontece nada nem ele me fica com o livro nem me da o manual simplesmente nao faz nada :( 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this