Jump to content

Quest teleport error


Recommended Posts

Hello guys, I made a new topic to ask you for help.
 
Well, the problem is : Why doesn't teleport me in map1 after I kill the "boss" ? 
 
Here is the quest :

quest banditrun begin
	state start begin
		when 20355.chat."A New Threat" begin
			if party.is_party() then
				if party.is_leader() then
					if pc.get_level()>=25 then
						say_title("Captain")
						say("")
						say("Hello "..pc.get_name().."!")
						say("Do you want to explore this new")
						say("threat with your friends?")
						say("I warn you, it's very dangerous,")
						say("it swarming with enemies!")
						say("")
						say_reward("Would you like to enter?")
						if select("Yes !", "Maybe later")==2 then return end
						d.setf("dBandit", 0)
						d.new_jump_all(198, 5912, 5908)
						d.regen_file("data/dungeon/banditrun1/banditrun1.txt")
					else
						say_title("Captain")
						say("")
						say("Come back when you reached level 25!")
					end
				else
					say_title("Captain")
					say("")
					say("You must be the group leader!")
				end
			else
				say_title("Captain")
				say("")
				say("You must be in a group!")
			end
		end
		when login with pc.in_dungeon() begin
			if d.getf("dBandit") == 0 then
				d.notice("You must destroy the Metin2 Stones!")
				timer("Rest1", 60*5)
				d.setf("metins", 2)
			end
		end
		when 8005.kill with pc.in_dungeon() begin
			if d.getf("dBandit") == 0 then
				d.setf("metins", d.getf("metins") - 1)
				if d.getf("metins") == 0 then
					d.setf("dBandit", 1)
					timer("dnext",5)
					cleartimer("Rest1")
					d.kill_all()
				else
					d.notice("There are "..d.getf("metins").." metins left.")
				end
			end
		end

		when dnext.timer begin
			if d.getf("dBandit") == 1 then
				d.notice("You have destroyed a Metin Of Darkness")
				timer("Rest1", 60*5)
				d.regen_file("data/dungeon/banditrun1/banditrun5.txt")
				d.regen_file("data/dungeon/banditrun1/banditrun6.txt")
			end
		end
		when 8006.kill with pc.in_dungeon() begin
			if d.getf("dBandit") == 1 then
				d.kill_all()
				cleartimer("Rest1")
				timer("dnext2", 5)
				d.setf("dBandit", 2)
				d.setf("metins", 6)
			end
		end
		when dnext2.timer begin
			if d.getf("dBandit") == 2 then
				d.notice("You need to destroy all metins in this map ! ")
				d.notice("Good luck, you have 5 minutes.")
				timer("Rest1", 60*5)
				d.regen_file("data/dungeon/banditrun1/banditrun3.txt")
			end
		end
		when 8007.kill with pc.in_dungeon() begin
			if d.getf("dBandit")==2 then
				d.setf("metins", d.getf("metins") - 1)
				if d.getf("metins") == 0 then
					cleartimer("Rest1")
					d.notice("Well done ! In 10 seconds you will meet the final boss.")
					timer("dnext23", 10)
					d.kill_all()
					d.setf("dBandit", 3)
				else
					d.notice("There are "..d.getf("metins").." metins left.")
				end
			end
		end
		when dnext23.timer begin
			if d.getf("dBandit") == 3 then
				d.regen_file("data/dungeon/banditrun1/banditrun4.txt")
				d.notice("You need to kill this boss to")
				d.notice("recover the stoled items")
			end
		end
		when 491.kill with pc.in_dungeon() begin
			if d.getf("dBandit")==3 then
				d.notice("Well done, young warrior ! The bandits were driven successfully.")
				d.notice("In 60 seconds you will be teleported in town.")
				timer("raus", 60)
			end
		end
		when Rest1.timer begin
			d.notice("The time has expired, you will be teleported out of the dungeon.")
			d.exit_all()
		end
		when raus.timer begin
			d.exit_all()
		end
	end
end

PS: I was trying to change the "d.exit_all()" with "warp_all_to_village" and it didn't work, any sugestion?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.