Jump to content

[ Dead Download Link ] Deviltower Quest with new functions [ We Need You ]


Recommended Posts

I want to share this Quest with the community.

The texts are in german but you can translate it if you want.

 

The main quest is original but start and end is different. You have 2 options to start the run when you are level 75.

 

https://mega.co.nz/#!9xxkwAgL!_vBVB2fbaU6fP84C2T-0OX4lYaZMelERX2xU3C_rsR0

  • Metin2 Dev 1
  • Good 3
  • Love 1
Link to comment
Share on other sites

quest deviltower_zone begin
	state start begin
		when login begin
			if pc.get_map_index() == 66 then			
				if pc.get_x() < 2048+88 or pc.get_y() < 6656+577 or pc.get_x() > 2048+236 or pc.get_y() > 6656+737 then
					pc.warp((5376+532)*100, (512+596+4)*100, 65)
				end
				pc.set_warp_location(65, 5376+532, 512+596+4)
			if pc.get_map_index() >  660000 and pc.get_map_index() < 670000 then
				pc.set_warp_location(65, 5376+532, 512+596+4)
			end
		end
	when 20348.click begin
		if pc.get_level() < 30 then 
			say_title("Guardian of demons tower")
			say("")
			say("You have not accumulated enough combat")
			say("experience!")
			say("")
			say_reward("Come back here once you reach level 30.")
			return
		end
		if pc.get_level() > 29 and pc.get_level() < 75 then
			say_title("Guardian of demons tower")
			say("")
			say("The Demon Tower is home to horrible creatures,")
			say("who love nothing more than to kill you.")
			say("The bonuses 'Strong against undead' and 'Arrow resistant'")
			say("you could be very helpful!")
			say("")
			say_reward("Do you really want to enter the Demon Tower?")
			local betreten = select("Enter Demon Tower", "Abort") 
			if betreten == 1 then 
				pc.warp(216500, 727000) 				
			end
			if betreten == 2 then
				return
			end
		end
		if pc.get_level() > 74 then
			say_title("Guardian of demons tower")
			say("")
			say("The Demon Tower is home to horrible creatures,")
			say("who love nothing more than to kill you.")
			say("The bonuses 'Strong against undead' and 'Arrow resistant'")
			say("you could be very helpful!")
			say("")
			say_reward("As you reach level 75, you can choose")
			say_reward("your group from the normal entry and the entry.")
			local betreten_75 = select("Enter Demon Tower normal", "Enter Demon Tower as a group", "Abort") 
			if betreten_75 == 1 then 
				pc.warp(216500, 727000) 				
			end
			if betreten_75 == 2 then
				if party.is_party() then
					say_title("Guardian of demons tower")
					say("")
					say("Please make sure that all group members are in")
					say("the temple!")
					say("")
					say_reward("Do you really want to enter the Demon Tower")
					say_reward("with your group?")
					local gruppe_betreten = select("Enter Demon Tower as a group", "Abort")
					if gruppe_betreten == 1 then
						d.join(66, special.devil_tower[1][1], special.devil_tower[1][2])
						d.spawn_mob(8015, 120, 615)
					end
					if gruppe_betreten == 2 then
						return
					end
				end
				if not party.is_party() then
					say_title("Guardian of demons tower")
					say("")
					say("You can specify this option only run when")
					say("you find yourself in a group.")
					say("")
					say_reward("You find yourself in any groups.")
					return
				end
			end
			if betreten_75 == 3 then
				return
			end
		end
	end
	when 8015.kill begin
		timer("zeit_bis_port", 10)
		d.notice("You have the Metin hardness destroyed!")
		d.notice("In 10 seconds you will be teleported to the first level.")
	end
	when zeit_bis_port.timer begin
		d.new_jump_all(66, special.devil_tower[1][1], special.devil_tower[1][2])
		d.regen_file("data/dungeon/deviltower2_regen.txt")
		d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/deviltower3_regen.txt")
	end
	--when devil_stone2.kill begin
	--d.jump_all_local(special.devil_tower[2][1], special.devil_tower[2][2])
	--end
	when devil_stone3.kill begin
		--d.jump_all_local(special.devil_tower[3][1], special.devil_tower[3][2])
		--d.set_exit_all_at_eliminate(6)
		--d.set_warp_at_eliminate(6, d.get_map_index(), 100, 100)
		--d.set_warp_at_eliminate(4, 65, 5376+532, 512+596+4)
		d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[3][1], special.devil_tower[3][2], "data/dungeon/deviltower4_regen.txt")
		d.check_eliminated()
		--d.exit_all()
	end
	function get_4floor_stone_pos()
		local positions = {
		{368, 629},
		{419, 630},
		{428, 653},
		{422, 679},
		{395, 689},
		{369, 679},
		{361, 658},
		}
		for i = 1, 6 do
		local j = number(i, 7)
		if i != j then
			local t = positions[i];
			positions[i] = positions[j];
			positions[j] = t;
		end
		end
		--for i = 1, 7 do
	--	positions[i][1] = positions[i][1] * 100
	--	positions[i][2] = positions[i][2] * 100
	 --   end
		return positions
	end
	when 8016.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		d.setf("level", 4)
		-- ¦A²{¤j¶q©Çª«¤Î»s³y¯u¥ÛÀY©M°²¥ÛÀY
		--d.regen_file("data/dungeon/deviltower4_regen.txt")
		local positions = deviltower_zone.get_4floor_stone_pos()
		for i = 1, 6 do
		chat(positions[i][1], positions[i][2])
		d.set_unique("fake" .. i , d.spawn_mob(8017, positions[i][1], positions[i][2]))
		end
		chat(positions[7][1], positions[7][2])
		local vid = d.spawn_mob(8017, positions[7][1], positions[7][2])
		chat(vid)
		d.set_unique("real", vid)
		server_loop_timer('devil_stone4_update', 10, pc.get_map_index())
		server_timer('devil_stone4_fail1', 5*60, pc.get_map_index())

		d.notice("Find the right Metinstone and destroyed him.");
		d.notice("The false Metin stones will disappear!");
		d.notice("You have 15 minutes time!");
	end

	when devil_stone4_fail1.server_timer begin
		if d.select(get_server_timer_arg()) then
		d.notice("Remaining time: 10 minutes")
		server_timer('devil_stone4_fail2', 5*60, get_server_timer_arg())
		end
	end

	when devil_stone4_fail2.server_timer begin
		if d.select(get_server_timer_arg()) then
		d.notice("Remaining time: 5 minutes")
		server_timer('devil_stone4_fail', 5*60, get_server_timer_arg())
		end
	end

	when devil_stone4_fail.server_timer begin
		if d.select(get_server_timer_arg()) then
		d.notice("The time is up")
		d.notice("You will now be teleported to the outsidet")
		d.exit_all()
		clear_server_timer('devil_stone4_update', get_server_timer_arg())
		end
	end

	when devil_stone4_update.server_timer begin
		if d.select(get_server_timer_arg()) then
		if not d.is_unique_dead("real") then
			for i = 1, 6 do
			if d.getf("fakedead" .. i) == 0 then
				if d.unique_get_hp_perc("fake" .. i) < 50 then
				d.purge_unique("fake" .. i)
				d.setf("fakedead" .. i, 1)
				d.notice("The wrong Metin Stone has disappeared..");
				end
			end
			end
		else
			--d.clear_regen()
			--d.regen_file("data/dungeon/deviltower5_regen.txt")
			server_timer("devil_stone4_end", 5, get_server_timer_arg())
			d.notice("You have destroyed the right Metin stone.");
			d.notice("You will now be teleported to the next level")
			clear_server_timer('devil_stone4_fail1', get_server_timer_arg())
			clear_server_timer('devil_stone4_fail2', get_server_timer_arg())
			clear_server_timer('devil_stone4_fail', get_server_timer_arg())
		end
		else
		server_timer('devil_stone4_stop_timer', 1, get_server_timer_arg())
		end
	end

	when devil_stone4_stop_timer.server_timer begin
		clear_server_timer('devil_stone4_update', get_server_timer_arg())
	end

	when devil_stone4_end.server_timer begin
		if d.select(get_server_timer_arg()) then
		d.setf("level", 5)
		d.setf("stone_count", 5)
		d.notice("You are now in the 5th. Layer")
		d.notice("open all old seal to get to the next level.")
		d.notice("You have 20 minutes to open all the seals.")
		d.jump_all(special.devil_tower[4][1], special.devil_tower[4][2])
		server_timer('devil_stone5_fail1', 5*60, get_server_timer_arg())
		clear_server_timer('devil_stone4_update', get_server_timer_arg())

		d.set_regen_file("data/dungeon/deviltower5_regen.txt")

		d.spawn_mob(20073, 421, 452)
		d.spawn_mob(20073, 380, 460)
		d.spawn_mob(20073, 428, 414)
		d.spawn_mob(20073, 398, 392)
		d.spawn_mob(20073, 359, 426)
		end
	end
	when devil_stone5_fail1.server_timer begin
		if d.select(get_server_timer_arg()) then
		d.notice("Remaining time: 15 Minutes")
		server_timer('devil_stone5_fail2', 5*60, get_server_timer_arg())
		end
	end

	when devil_stone5_fail2.server_timer begin
		if d.select(get_server_timer_arg()) then
		d.notice("Remaining time: 10 Minutes")
		server_timer('devil_stone5_fail3', 5*60, get_server_timer_arg())
		end
	end

	when devil_stone5_fail3.server_timer begin
		if d.select(get_server_timer_arg()) then
		d.notice("Remaining time: 5 Minutes")
		server_timer('devil_stone5_fail', 5*60, get_server_timer_arg())
		end
	end

	when devil_stone5_fail.server_timer begin
		if d.select(get_server_timer_arg()) then
		d.notice("The time is up")
		d.notice("You will now be teleported to the outside")
		d.exit_all()
		end
	end

	--when devil_stone4.kill begin
		--d.setf("level", 5)
		--d.setf("stone_count", 4)
		--d.clear_regen()
		--d.regen_file("data/dungeon/deviltower5_regen.txt")
		--d.jump_all_local(special.devil_tower[4][1], special.devil_tower[4][2])
	--end

	when 1062.kill with pc.in_dungeon() and d.getf("level") == 5 begin
		local KILL_COUNT_FOR_DROP_KEY = 5
		--if is_test_server() then
		--KILL_COUNT_FOR_DROP_KEY = 1
		--end
		local n =d.getf("count") + 1
		d.setf("count", n) 
		if n == KILL_COUNT_FOR_DROP_KEY then
		-- bla bla 3
		game.drop_item(50084, 1)
		d.setf("count", 0)
		end
	end
	when devil_stone5.take with item.vnum == 50084 begin
		npc.purge()
		item.remove()
		d.setf("stone_count", d.getf("stone_count") - 1)
		if d.getf("stone_count") <= 0 then
		d.setf("level", 6)
		d.clear_regen()
		d.regen_file("data/dungeon/deviltower6_regen.txt")

		d.notice("You have opened all the old seal.")
		d.notice("You will now be teleported to the 6th level.")
		d.jump_all(special.devil_tower[5][1], special.devil_tower[5][2])
		clear_server_timer('devil_stone5_fail1', get_server_timer_arg())
		clear_server_timer('devil_stone5_fail2', get_server_timer_arg())
		clear_server_timer('devil_stone5_fail3', get_server_timer_arg())
		clear_server_timer('devil_stone5_fail', get_server_timer_arg())
		else
		d.notice("There remains a number of "..d.getf("stone_count").." Sealing")
		end
	end

	when devil_stone6.kill begin
		--d.jump_all(special.devil_tower[6][1], special.devil_tower[6][2])
		d.kill_all()
	   -- d.set_warp_at_eliminate(3*60, 65, 5376+532, 512+596+4)
		d.check_eliminated()
		timer("stolzerking_killed", 5)
	end
	when stolzerking_killed.timer begin
		cmdchat("CMD1")
		d.spawn_mob(9012, 395, 200)
		d.spawn_mob(20074, 392, 209)
		d.spawn_mob(20075, 405, 209)
		d.spawn_mob(20076, 399, 209)
		d.spawn_mob(9003, 402, 200)
		d.setqf("can_refine", 1)
		d.notice("You killed the proud demon king, thus completing the first part of the dungeon.")
		d.notice("As a reward, you are allowed an item if the demonic forging improve.")
		d.notice("If you need something for the second part of the dungeon, you can buy it at the General Store.")
		d.notice("You will be teleported in 2 Minutes automatically to the next level.")
		timer("zeit_zum_uppen", 110)
	end
	when zeit_zum_uppen.timer begin
		d.notice("In 10 seconds you will be teleported to the next level.")
		timer("zeit_bis_mordesebene", 10)
	end

	when zeit_bis_mordesebene.timer begin
		d.clear_regen()

		d.spawn_mob(8018, 639, 658)
		d.spawn_mob(8018, 611, 637)
		d.spawn_mob(8018, 596, 674)
		d.spawn_mob(8018, 629, 670)

		d.setf("level", 7)

		d.jump_all(2048+590, 6656+638)
	end
	
	when 8018.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		local cont = d.getf("7_stone_kill") + 1
		d.setf("7_stone_kill", cont)

		if cont >= 4 then
			d.setf("7_stone_kill", 0)
			d.set_regen_file("data/dungeon/deviltower7_regen.txt")
		end	
	end

	when 8019.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		game.drop_item(30300, 1)
	end

	when 30300.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		pc.remove_item("30300", 1)

		local pct = number(1,10)

		if pct == 1 then
			-- bla bla 7
			game.drop_item(30302, 1)
			d.clear_regen()
		else
			-- bla bla 8
			game.drop_item(30301, 1)
			
		end
	end

	when 30302.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		-- bla bla 9
		say_title("Map of Zin Grotto")
		say("")
		say("Congratulations! You've found the right card.")
		say("")
		say_reward("You will be teleported to the next level now.")
		pc.remove_item("30302", 1)
		timer("devil_jump_8", 6)
		d.clear_regen()
	end
	when devil_jump_8.timer begin
		d.setf("level", 8)
		d.jump_all(2048+590, 6656+403)
		d.set_regen_file("data/dungeon/deviltower8_regen.txt")
		d.spawn_mob(20366, 640, 460)
		local _count= pc.count_item(30302)-- bla bla 11
		pc.remove_item(30302,_count)
		
	end

	when 1040.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		local pct1 = number(1, 5)
		if pct1 == 1 then
			local pct2 = number(1, 10)
			if pct2 == 1 then
				-- bla bla 12
				game.drop_item(30304, 1)
			else
				-- bla bla 13
				game.drop_item(30304, 1)
			end
		else
			return
		end
	end

	when 20366.take with item.vnum == 30304 begin
		-- bla bla 14
		npc.purge()
		item.remove()
		d.kill_all()
		timer("devil_jump_9", 6)
		
	end
	when devil_jump_9.timer begin
		d.setf("level", 9)
		d.jump_all(2048+590, 6656+155)
		d.regen_file("data/dungeon/deviltower9_regen.txt")
	end
	when 1093.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		d.kill_all()
		timer("sensi_killed", 5)
	end
	when sensi_killed.timer begin
		cmdchat("CMD1")
		d.kill_all()
		d.spawn_mob(9012, 618, 187)
		d.spawn_mob(20074, 611, 179)
		d.spawn_mob(20075, 620, 170)
		d.spawn_mob(20076, 628, 179)
		d.spawn_mob(9003, 621, 187)
		d.setqf("can_refine", 1)
		d.notice("You killed the Grim Reaper, thus completing the second part of the dungeon.")
		d.notice("As a reward, you are allowed an item if the demonic forging improve.")
		d.notice("If you would like to continue the dungeon, you can buy potions you again at the General Store.")
		d.notice("You will be teleported in 2 Minutes automatically to the next level.")
		timer("zeit_nach_sensi", 110)
	end
	when zeit_nach_sensi.timer begin
		d.notice("In 10 seconds you will be teleported to the next level.")
		timer("zeit_bis_gemeinerking", 10)
	end
	when zeit_bis_gemeinerking.timer begin
		d.jump_all(2048+590, 6656+155)
		d.kill_all()
		d.spawn_mob(1094, 620, 170)
		d.notice("The Common Demon King is on the loose here.")
		d.notice("Kill him to get to the next level.")
	end
	when 1094.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		timer("zeit_bis_bt", 10)
		d.notice("You killed the demon king Commons.")
		d.notice("In 10 seconds you will be teleported to the last level.")
	end
	when zeit_bis_bt.timer begin
		d.jump_all(2048+590, 6656+155)
		d.kill_all()
		d.spawn_mob(1095, 620, 170)
		d.notice("Du befindest dich auf der letzten Ebene des Dämonenturmes.")
		d.notice("Töte den Blauen Tod und du wirst reich belohnt!")
	end
	when 1095.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		cmdchat("CMD1")
		d.kill_all()
		d.spawn_mob(9012, 618, 187)
		d.spawn_mob(20074, 611, 179)
		d.spawn_mob(20075, 620, 170)
		d.spawn_mob(20076, 628, 179)
		d.spawn_mob(9003, 621, 187)
		d.setqf("can_refine", 1)
		d.notice("You killed the blue death, thus completing the Demon Tower.")
		d.notice("Congratulations!")
		d.notice("You can once again an item if the demonic forging improve. Best of luck!")
		notice_all("".. pc.get_name() .." has killed the blue death, thus completing the Demon Tower.")
	end
end
end

English version ( I hope you're like it )

 

Meanwhile thanks for topic.

 

Kind Regards

HaveBeen

  • Good 1
  • Love 6

Plain logic saves lives.

Link to comment
Share on other sites

That quest have some errors.

If you use timer instead of server_timer, if the player who do the action go out, the timer will not complete.

 

Furthermore, you have duplicated sentences as that

   when 1093.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
        d.kill_all()
        timer("sensi_killed", 5)
    end
    when sensi_killed.timer begin
        cmdchat("CMD1")
        d.kill_all()
d.kill_all() two times, you only need one

 

At the end, when you kill 1095, I think is better put a server_timer with a d.exit_all()

 

To avoid errors with duplicated .kill, I recommend you use

when kill with npc.get_race() == mob_vnum begin
 

Regards, good ideas ^^.

Link to comment
Share on other sites

That quest have some errors.

If you use timer instead of server_timer, if the player who do the action go out, the timer will not complete.

 

Furthermore, you have duplicated sentences as that

   when 1093.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
        d.kill_all()
        timer("sensi_killed", 5)
    end
    when sensi_killed.timer begin
        cmdchat("CMD1")
        d.kill_all()
       
d.kill_all() two times, you only need one

 

At the end, when you kill 1095, I think is better put a server_timer with a d.exit_all()

 

To avoid errors with duplicated .kill, I recommend you use

when kill with npc.get_race() == npc_vnum begin
 

Regards, good ideas ^^.

 

you need the second d.kill_all() after the timer because with the first d.kill_all() only the first "versions" of the mobs die. (the mobs who drop the zin-bong-in key have 2 lives)

so with the second d.kill_all() the next "versions" die

 

i tried to do it without first ^^

 

@Shogun:

These are the new functions:

 

- the Text at the Guard looks better

- if you rechead level 75 you have the option to start the run with your current group

- run goes to blue death

- after "Stolzer Dämonenkönig", Death Reaper and Blue Death all 3 blacksmiths will spawn (after every boss you can refine once)

- the run is designed in 3 parts (to "Stolzer Dämonenkönig", to Death Reaper, to Blue Death)

- after every part there is a "cmdchat" (you have to configure your client to see it --> for example: "Congratulations! You have succesfully ended Part 1 of the Deviltower!")

- you can't click on the blacksmithes (much players would use this to get back to the "Metin des Mordes" part after killing the black death)

- after every part there spawn teleporter and "gemischtwarenhändlerin"

Link to comment
Share on other sites

  • 2 months later...

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.