Jump to content

Bug quest biologist


Go to solution Solved by xUniverse,

Recommended Posts

Hello, how are you?

Can someone help me with this bug? All quest are visible.

 

dHfpD0r.png

 

Example one quest

 

----------------------------------------------------
--COLLECT QUEST_lv40
--METIN2 Collecting Quest
----------------------------------------------------
quest collect_quest_lv40  begin
	state start begin
	end
	state run begin
		when login or levelup with pc.level >= 40 and not pc.is_gm() begin
			set_state(information)
		end
	end
	state information begin
		when letter begin
			local v = find_npc_by_vnum(20084)
			if v != 0 then
				target.vid("__TARGET__", v, "Girab")
			end
			send_letter("Estudo do Biólogo")
		end
		when button or info begin
			say_title("Estudo do Biólogo")
			say()
			say("Girab, o Biólogo, precisa")
			say("falar com você com urgência.")
			say("Procure ele e o ajude.")
			say()
		end
		when __TARGET__.target.click or 20084.chat."Livro de Maldições" begin
			target.delete("__TARGET__")
			say_title("Girab:")
			say()
			---                                                   l
			say("Oh! Por favor, preciso novamente de ajuda...")
			say("Como você sabe, eu coleto informações sobre os")
			say("monstros que ameaçam constantemente nosso reino,")
			say("mas tenho que reconhecer, não posso fazer isso")
			say("sozinho. Na verdade, eu deveria buscar eu mesmo")
			say("esta informação. Você pode imaginar o enorme")
			say("problema que tenho, porque sou um simples biólogo.")
			say("Por favor me ajude. Naturalmente receberá uma")
			say("uma boa recompensa pela ajuda.")
			say()

			wait()
			say_title("Girab:")
			say()
			---                                                   l
			say("Recentes investigações me fizeram pensar")
			say("que os fanáticos não eram o que pensávamos.")
			say("Durante anos, eles estiveram comprometidos")
			say("em adorar demônios satânicos, trazendo o caos")
			say("e a guerra em nossa época. Para cancelar")
			say("sua magia, precisarei saber seus rituais.")
			say("Por favor ajude-me, é muito importante!")
			say()
			say()
			wait()
			say_title("Girab:")
			say()
			say("Eu estudo agora os Livros de Maldições.")
			say("Eu preciso deles para minhas experiências.")
			say("Você poderia me trazer 15 Livros de Maldições?")
			say("Essa quantidade deve ser suficiente. Ajude-me,")
			say("mas terá que me trazer um por um. Para que")
			say("eu tenha tempo de estudá-los detalhadamente!")
			say ("")
			set_state(go_to_disciple)
			pc.setqf("duration",0) 
			pc.setqf("collect_count",0)
			pc.setqf("drink_drug",0) 
		end
	end
	state go_to_disciple begin
		when letter begin
			send_letter("Estudo do Biólogo")
		end
		when button or info begin
			say_title("As Magias do Vale Suryong.")
			---                                                   l
			say()
			say("O Girab, o Biólogo está analisando as magias")
			say("antigas existentes no Vale Suryong.")
			say(" estão no Livro de Maldições.")
			say("Traga-me 15 Livros de Maldições, mas reforço,")
			say("um de cada vez, porque é um estudo demorado")
			say()
			say()
			say()
			say_item_vnum(30047)
			say_reward("Já entregou".." "..pc.getqf("collect_count").." Livro de Maldições")
			say()
		end
		when 71035.use begin 
			if get_time() < pc.getqf("duration") then
				say()
				say("Você não pode usar o Soro da Persuasão ainda.")
				say()
				return
			end
			if pc.getqf("drink_drug") == 1 then
				say()
				say("Você já usou o Soro da Persuasão.")
				say()
				return
			end
			if pc.count_item(30047) == 0 then
				say_title("Girab:")
				say()
				say("Quando você for entregar os Livros,")
				say("poderá usar o Soro da Persuasão.")
				say()
				return
			end
			item.remove()
			pc.setqf("drink_drug",1)
		end

		when 20084.chat."GM: collect_quest_lv40.skip_delay" with pc.count_item(30047) > 0 and pc.is_gm() and get_time() <= pc.getqf("duration") begin
			say(mob_name(20084))
			say("Você é GM, OK")
			pc.setqf("duration", get_time()-1)
			return
		end
		
		when kill with npc.get_race() == 706 or npc.get_race() == 707 begin
			local s = number(1, 2)
			if s == 1 and pc.count_item(30047)==0 then
			pc.give_item2(30047, 1)
			send_letter("Você encontrou o Livro da Maldição.")
			end
		end
		
		when 20084.chat."O Livro de Maldições" with pc.count_item(30047) > 0 begin
			if get_time() > pc.getqf("duration") then
				if  pc.count_item(30047) > 0 then
					say_title("Girab:")
					say()
					---                                                   l
					say("Oh...Você trouxe o Livro de Maldições.")
					say("Eu tenho que verificar isso...")
					say("um momento por favor...")
					say()
					pc.remove_item(30047, 1)
					if  is_test_server()  then 
						pc.setqf("duration",get_time()+2) 
					else
						pc.setqf("duration",get_time()+60*60*4) -----------------------------------22½Ã°£
					end
					wait()

					local pass_percent
					if pc.getqf("drink_drug") == 0 then
						pass_percent = 60
					else
						pass_percent = 90
					end
					local s = number(1,100)
					if s <= pass_percent  then
						if pc.getqf("collect_count") < 14 then         
							local index =pc.getqf("collect_count")+1
							pc.setqf("collect_count",index)     
							say_title("Girab:")
							say()
							say("Ohh!! Obrigado... este está perfeito...")
							say("Agora só faltam ".." "..15-pc.getqf("collect_count").. " Livro de Maldições!")
							say("Boa sorte!")
							say()
							pc.setqf("drink_drug",0)         
							return
						end
						say_title("Girab:")
						say()
						say("Você trouxe todos os livros!")
						say("Por fim poderei descobrir os rituais que")
						say("tanto intervem na Guerra. Muito Obrigado!")
						say("Agora só preciso da Pedra da Alma Fanática,")
						say("para finalizar as análises desta seita mágica.")
						say("Ela pode ser obtida derrotando os monstros da")
						say("Gomi 1. Você pode me trazer uma?")
						say()
						pc.setqf("collect_count",0)
						pc.setqf("drink_drug",0)
						pc.setqf("duration",0)
						set_state(key_item)
						return
					else
						say_title("Girab:")
						say()
						say("Humm... este livro quebrou.")
						say("Desculpa, mas não posso usá-lo.")
						say("As partes mais importantes estão borradas.")
						say("Por favor, traga-me outro.")
						say()
						pc.setqf("drink_drug",0)         
						return
					end
				else
					say_title("Girab:")
					say()
					say("Você não tem "..item_name(30047).."!")
					return
				end
			else
				say_title("Girab:")
				say()
				---                                                   l
				say("Olá o que você quer?")
				say("Ainda não terminei de analisar!")
				say("A ciência é precisa e sensível e, acima de tudo,")
				say("você tem ser muito paciente. Volte mais tarde.")
				say()
				return
			end
		end
	end

	state key_item begin
		when letter begin
			send_letter("Estudo do Biólogo")
			if pc.count_item(30221) > 0 then
				local v = find_npc_by_vnum(20084)
				if v != 0 then
					target.vid("__TARGET__", v, "CGirab")
				end
			end
		end
		when button or info begin
			if pc.count_item(30221) > 0 then
				say_title("A Pedra da Alma Fanática")
				say()
				---                                                   l
				say("Finalmente você encontrou a Pedra da")
				say("Alma Fanática, leve-a para o Girab.")
				say()
				return
			end
			say_title("A Pedra da Alma Fanática")
			say()
			---                                                   l
			say("Falta ao Girab a Pedra da Alma Fanática para ")
			say("concluir os estudos de rituais satânicos. Teremos ")
			say("poder contra fanáticos torturadores e executores. ")
			say()
			say()
			say_item_vnum(30221)
			say("Você pode obtê-la das "..mob_name(2032)..", ")
			say(""..mob_name(2033)..", "..mob_name(2034).."")
			say("e "..mob_name(2035).."")
			say()
		end
		--when 2032.kill or 2033.kill or 2034.kill or 2035.kill begin
		when kill with npc.get_race() == 2032 or npc.get_race() == 2033 or npc.get_race() == 2035 begin
			local s = number(1, 3)
			if s == 1 and pc.count_item(30221) == 0 then
				pc.give_item2(30221, 1)
				send_letter("Você dropou a Pedra da Alma Fanática")
			end
		end
		when __TARGET__.target.click or 20084.chat."Entregar a Pedra da Alma Fanática" with pc.count_item(30221) > 0 begin
			target.delete("__TARGET__")
			if pc.count_item(30221) > 0 then 
				say_title("Girab:")
				say()
				say("Ohh!!! Muito Obrigado... Estes fanáticos,")
				say("finalmente vão se colocar em seu devido lugar...")
				---                                                   l
				say("Retorne ao Baek-Go que ele vai te recompensar")
				say("por seu árduo trabalho na busca de informações")
				say("sobre as maldições. Estou em dívida com você.")
				say("Eu vou te ver em breve aqui de volta!")
				say("Boa Sorte!") 
				say()
				pc.remove_item(30221,1)
				set_state(__reward)
			else
				say_title("Girab:")
				say()
				say("Você não tem a "..item_name(30221).."!")
				say()
				return
			end
		end
	end

	state __reward begin
		when letter begin
			send_letter("A Recompensa do Biólogo:")
			local v = find_npc_by_vnum(20018)
			if v != 0 then
				target.vid("__TARGET__", v, "Baek-Go")
			end
		end
		when button or info begin
			say_title("A Recompensa do Biólogo")
			say()
			---                                                   l
			say("Como recompensa por trazer os 15 livros,")
			say("e a Pedra da Alma Fanática.")
			say("Recebeu a receita para a poção secreta.")
			say("Baek-Go está esperando para lhe dar")
			say("sua merecida recompensa.")
			say()
		end
		when __TARGET__.target.click or 20018.chat."A Receita Secreta" begin
			target.delete("__TARGET__")
			say_title("Baek-Go:")
			say()
			say("Ah foi você quem ajudou o Biólogo,")
			say("a investigar os fanáticos.")
			say("Você é um bom rapaz.")
			say("Por sua valentia e determinação lhe darei")
			say("15 pontos de velocidade de Ataque permanentes.")
			say("Obrigado.")
			say()
			-----------                                                   l
			say_title("Recompensa:")
			say_reward("Bonus Permanente: +5% de velocidade de ataque,")
			say_reward("Gold: 200.000")
			say_reward("Experiência: 20%.")
			say_reward("Item: 1 Pergaminho da Paz")
			say()
			affect.add_collect(apply.ATT_SPEED,5,60*60*24*365*60) --60³â		
			pc.give_item2(25040)
			pc.change_money(200000)
			pc.give_exp2(1367400)
			clear_letter()
			set_quest_state("collect_quest_lv50", "run")
			set_state(__complete)
		end
	end
	state __complete begin
	end
end

 

I created 1 script to skip the time the bug happened

pc.setqf("duration", get_time()-1) <<< use player is bug wall quest =/

 

Sorry my baddd english

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

First bio quest start

 

Quote

 

quest bio_1_start begin  

     state start begin 
        when login or levelup with pc.level >= 10 and not pc.is_gm() begin 
            set_state(information) 
        end     
    end 

    state information begin 

 

First bio quest end

Quote

            clear_letter() 
            set_quest_state("bio_2_start", "run")
            set_state(__complete) 

 

 

Second Quest (and all) start

Quote

quest bio_2_start begin
    state start begin
    end
    state run begin
        when login or levelup with pc.level >= 20 begin
            set_state(information)
        end    
    end

    state information begin 

 

Your welcome :) 

Link to comment
Share on other sites

hace 1 hora, amosth dijo:

the bug is in the database player> quest

only some players have this problem.

If you create a new PJ, does the same thing happen? or the quest are OK?

Did you do "reload q" when you applied the last changes in the quest? May be "reload q" generated the error..

----

Se vôce cria um novo personagem, acontece a mesma coisa? ou tá bom?
Você fez "reload q" depois de alterar a quest? Pode ser que isso tenha gerado o erro..

Link to comment
Share on other sites

3 hours ago, xUniverse said:

If you create a new PJ, does the same thing happen? or the quest are OK?

Did you do "reload q" when you applied the last changes in the quest? May be "reload q" generated the error.. 

----

Se vôce cria um novo personagem, acontece a mesma coisa? ou tá bom?
Você fez "reload q" depois de alterar a quest? Pode ser que isso tenha gerado o erro..

When I create a new player, everything is fine.

Link to comment
Share on other sites

  • Solution
hace 5 horas, amosth dijo:

When I create a new player, everything is fine.

So /reload q is the problem. Don't use this command in a server with players, only in test server, it isn't safe. When you modify a quest is better to do a reboot to apply the changes.

Close the server, open player.quest in db and fix manually the quests of players with problems (you can compare with the rows of a player without problems or more fast you can make a query to do it). Then start the server again. And don't use /reload  q.

  • Love 2
Link to comment
Share on other sites

  • Premium
3 hours ago, xUniverse said:

So /reload q is the problem. Don't use this command in a server with players, only in test server, it isn't safe. When you modify a quest is better to do a reboot to apply the changes.

Close the server, open player.quest in db and fix manually the quests of players with problems (you can compare with the rows of a player without problems or more fast you can make a query to do it). Then start the server again. And don't use /reload  q.

True Story guys

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 5

      Effect weapons

    2. 3

      Crystal Metinstone

    3. 3

      Feeding game source to LLM

    4. 113

      Ulthar SF V2 (TMP4 Base)

    5. 3

      Feeding game source to LLM

    6. 0

      Target Information System

    7. 3

      Feeding game source to LLM

    8. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.