Jump to content
Sign in to follow this  
Endymion

[Release]Blazingpurgatory

Recommended Posts

Quest:

quest bramyPiekiel begin
	state start begin
		when 20351.chat."Bramy Piekieł " with pc.get_map_index() == 11 begin
			say_title(mob_name(npc.get_race())..":") -- npc name
			say("Bóg wszystkich demonów, Sung Mahi, przebudził się.") -- blablabla
			say("Nadchodzi koniec ludzkości! Jego niszczycielska moc jest")-- blablabla
			say("jeszcze osłabiona, a jego wszystkowidzące oczy nadal są zamglone.")-- blablabla
			say("Jego podwładni nie spoczną jednak, dopóki ich mistrz nie powstanie")-- blablabla
			say("w pełnej sile, by stawić czoła temu światu.")-- blablabla
			wait()
			say_title(mob_name(npc.get_race())..":") -- npc name
			say("Jego wierny poplecznik Razador, Władca Ognia, ma za zadanie uwolnić z lochu legendarnego Czerwonego Smoka.")-- blablabla
			say("Jeśli jego plan się powiedzie, droga do władzy dla jego mistrza będzie jeszcze szersza")-- blablabla
			say("[DELAY=900]Czy jesteście gotowi na nową próbę ognia?[/DELAY]")-- blablabla
			wait()
			say_title(mob_name(npc.get_race())..":")
			if pc.get_level() >= 100 or pc.is_gm() then 
				if party.is_party() or pc.is_gm()  then
					if party.is_leader() or pc.is_gm() then
						say_reward("Czy chcesz razem ze swoją grupą zwiedzić Bramy piekieł?") -- Do You want enter into Blazingpurgatory with Your party?
						if select("Tak!", "Nie!") == 1 then
							pc.setqf("bp", 1)
							d.join(235)
						end
					else
						say_reward("Nie jesteś liderem grupy!") -- You are not party leader!
					end
				else
					say_reward("Nie posiadasz grupy!") -- You do not have party!
				end
			else
				say_reward("Nie masz przynajmniej 100 poziomu!") -- You do not have 100 level!
			end
		end

		when login with pc.get_map_index() >= 2350000 and pc.get_map_index() <= 2355000 and pc.getqf("bp") > 0 begin
			say_title("Bramy Piekieł:") -- Dungeon name
			say("Witajcie w Bramach Piekieł!") -- blabla
			say("Oddychajcie głęboko, gdyż przy następnym waszym kroku otworzą się ... Bramy Piekieł!")-- blabla
			say("Czekają na was zjednoczeni, z orężem wzniesionym do walki i okrutnym uśmiechem na ustach.")-- blabla
			say("Czy sprostacie temu wyzwaniu?")-- blabla
			say_reward("[DELAY=1800]Przekonajmy się...[/DELAY]")-- blabla
			d.setf("numerKOD", number(1, 100))
			if party.is_party() then
				if party.is_leader() then
					--d.notice("NUMER KODU: "..d.getf("numerKOD"))
					--d.notice(kodBramy(d.getf("numerKOD"), 7))
					d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_flamenpc.txt")
					for i = 1,6 do
						d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_gate_"..i..".txt")
					end
					d.setf("pietro", 0)
					pc.setqf("bp", 0)
				end
			else
				if pc.is_gm() then
					--d.notice("NUMER KODU: "..d.getf("numerKOD"))
					--d.notice(kodBramy(d.getf("numerKOD"), 7))
					d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_flamenpc.txt")
					for i = 1,6 do
						d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_gate_"..i..".txt")
					end
					d.setf("pietro", 0)
					pc.setqf("bp", 0)
				end
			end
		end
		
		when 20385.click with pc.get_map_index() >= 2350000 and pc.get_map_index() <= 2355000 and d.getf("blokNPC") == 0 begin
			d.setf("pietro", d.getf("pietro")+1)
			if d.getf("pietro") < 7 then
				d.setf("blokNPC", 1)
				d.clear_regen()
				d.kill_all()
				d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_flamenpc.txt")
				d.notice("Brama została otworzona") -- Gate was open!
				local bramy = {
								{2,3,4,5,6},
								{1,3,4,5,6},
								{1,2,4,5,6},
								{1,2,3,5,6},
								{1,2,3,4,6},
								{1,2,3,4,5},
							}
				for i = 1,table.getn(bramy[d.getf("pietro")]) do
					d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_gate_"..bramy[d.getf("pietro")][i]..".txt")
				end
				d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_monster_"..d.getf("pietro")..".txt")
			end
		end
			when 20350.chat."Zwalcz Razdora..." with pc.in_dungeon() begin -- Fight with Razador...
				say("A więc chcecie walczyć z Razadorem?") -- So You want fight with Razador?
				say("Hmm... Jesteście naprawdę odważni...") -- You must be so brave!
				say()
				say_reward("Najpierw musicie jednak podać mi sekretny kod!") -- First You must enter password.
				say_reward("Po przejściu każdego poziomu dostawaliście kolejny znak...") -- After finish all gates You get one letter of password.
				say()
				say("Wprowadź kod!")
				say()
				local wprowadzKOD = tostring(input())
				if wprowadzKOD == kodBramy(d.getf("numerKOD"), 7) then
					if pc.count_item(30142) < 2 then
						d.notice("Przekażcie wszystkie pieczęcie Liderowi grupy!") -- Leader of party must have all seals.
						say("Musisz mieć przy sobie dwie zdobyte wcześniej pieczęcie!") -- You must have two seals.
						return
					end
					say("Uuuu... Przeszliście wszystkie poziomy Bram Piekieł!") -- Wow! You finished all gates...
					say()
					say_reward("Razador już na was czeka!") -- Razador is waiting for You...
					say()
					pc.remove_item(30142, 2)
					timer("Razador", 5)
				else
					say("Ten kod jest nieprawidłowy!") -- That password is wrong!
					say()
					say_reward("Spróbujcie wprowadzić go jeszcze raz!") -- Try enter password again.
					say()
				end
			end
		
		when Razador.timer begin
			d.setf("pietro", d.getf("pietro")+1)
			d.jump_all(8111,6864)
			d.notice("(Razador) Kto jest na tyle odważny by mi przeszkadzać?!") -- Who is to enough brave to disturb me?!
			d.set_regen_file("data/dungeon/bramypiekiel/blazingpurgatory_monster_7.txt")
		end
		
		when kill with pc.get_map_index() >= 2350000 and pc.get_map_index() <= 2355000 begin
			if d.getf("pietro") == 1 then
				if npc.get_race() == 8014 then
					d.setf("blokNPC", 0)
					d.clear_regen()
					d.kill_all()
					d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_flamenpc.txt")
					d.notice("Pierwszym znakiem waszego kodu jest: "..kodBramy(d.getf("numerKOD"), 1)) -- First letter of Your passowrd is...
					d.notice("Zapamiętajcie go dobrze! Będzie wam jeszcze potrzebny...") -- Remember that letter! It will be important later...
				end
			elseif d.getf("pietro") == 2 then
				d.setf("killCount", d.getf("killCount")+1)
				if d.getf("killCount") == 100 then
					d.setf("blokNPC", 0)
					d.clear_regen()
					d.kill_all()
					d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_flamenpc.txt")
					game.drop_item_with_ownership(30142,1)
					d.notice("Przekażcie List liderowi grupy! Będzie mu jeszcze potrzebny...") -- Leader of party must have that seal! 
					d.notice("")
					d.notice("Drugim znakiem waszego kodu jest: "..kodBramy(d.getf("numerKOD"), 2))-- Second letter of Your passowrd is...
					d.notice("Zapamiętajcie go dobrze! Będzie wam jeszcze potrzebny...")-- Remember that letter! It will be important later...
				end
			elseif d.getf("pietro") == 3 then
				d.setf("killCount2", d.getf("killCount2")+1)
				if d.getf("killCount2") == 230 then
					d.setf("blokNPC", 0)
					d.clear_regen()
					d.kill_all()
					d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_flamenpc.txt")
					d.notice("Trzecim znakiem waszego kodu jest: "..kodBramy(d.getf("numerKOD"), 3))-- Third letter of Your passowrd is...
					d.notice("Zapamiętajcie go dobrze! Będzie wam jeszcze potrzebny...")-- Remember that letter! It will be important later...
				end
			elseif d.getf("pietro") == 4 then
				d.setf("killCount3", d.getf("killCount3")+1)
				if d.getf("killCount3") == 200 then
					d.setf("blokNPC", 0)
					d.clear_regen()
					d.kill_all()
					d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_flamenpc.txt")
					d.notice("Czwartym znakiem waszego kodu jest: "..kodBramy(d.getf("numerKOD"), 4))-- Fourth letter of Your passowrd is...
					d.notice("Zapamiętajcie go dobrze! Będzie wam jeszcze potrzebny...")-- Remember that letter! It will be important later...
				end
			elseif d.getf("pietro") == 5 then
				if npc.get_race() == 8014 then
					d.setf("blokNPC", 0)
					d.clear_regen()
					d.kill_all()
					d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_flamenpc.txt")
					d.notice("Piątym znakiem waszego kodu jest: "..kodBramy(d.getf("numerKOD"), 5))-- Fifth letter of Your passowrd is...
					d.notice("Zapamiętajcie go dobrze! Będzie wam jeszcze potrzebny...")-- Remember that letter! It will be important later...
				end
			elseif d.getf("pietro") == 6 then
				d.setf("killCount4", d.getf("killCount4")+1)
				if d.getf("killCount4") == 150 then
					game.drop_item_with_ownership(30142,1)
					d.notice("Przekażcie List liderowi grupy! Będzie mu jeszcze potrzebny...")-- Leader of party must have that seal! 
				end
				if d.getf("killCount4") == 230 then
					d.setf("blokNPC", 0)
					d.clear_regen()
					d.kill_all()
					d.regen_file("data/dungeon/bramypiekiel/blazingpurgatory_flamenpc2.txt")
					d.notice("Szóstym znakiem waszego kodu jest: "..kodBramy(d.getf("numerKOD"), 6))-- Sixth letter of Your passowrd is...
					d.notice("Zapamiętajcie go dobrze! Będzie wam jeszcze potrzebny...")-- Remember that letter! It will be important later...
				end	
			elseif d.getf("pietro") == 7 then
				if npc.get_race() == 6091 then
					d.notice("Za 60 sekund zostaniecie przeniesieni.") -- You will be teleported after 60 sec.
					notice_all("[Kanał "..pc.get_channel_id().."] ~~ Gracz "..pc.get_name().." pokonał Razadora!") -- [Channel x] ~~ Player 'playerName' killed Razador!
					local boss = {30516, 30517, 30188, 30501, 51001}
					game.drop_item_with_ownership(boss[number(1, table.getn(boss))], 1)
					d.clear_regen()
					d.kill_all()
					timer("wroc", 60)
				end
			end
		end
		when wroc.timer begin
			d.exit_all()
		end
	end
end

 

List of codes

function kodBramy(vnum, pietro)
	local slowa = {
					{"4","u","4","l","z","n"},
					{"m","j","s","i","k","h"},
					{"l","y","6","8","p","j"},
					{"r","n","1","u","7","6"},
					{"r","n","1","u","7","6"},
					{"l","6","b","6","a","3"},
					{"7","l","i","a","2","d"},
					{"z","g","a","3","b","d"},
					{"2","j","y","j","4","x"},
					{"2","j","y","j","4","x"},
					{"o","z","m","r","z","w"},
					{"t","e","d","j","t","m"},
					{"s","n","c","8","c","p"},
					{"e","c","o","x","6","4"},
					{"e","c","o","x","6","4"},
					{"y","m","u","8","4","6"},
					{"r","2","t","t","t","2"},
					{"r","2","t","t","t","2"},
					{"5","p","j","x","r","y"},
					{"j","a","s","4","g","i"},
					{"j","a","s","4","g","i"},
					{"3","h","d","g","z","a"},
					{"x","8","d","9","z","m"},
					{"x","8","d","9","z","m"},
					{"m","o","i","r","b","i"},
					{"z","m","1","y","5","n"},
					{"c","3","k","4","2","3"},
					{"c","3","k","4","2","3"},
					{"z","p","t","p","n","o"},
					{"5","z","s","y","8","x"},
					{"l","d","5","z","a","p"},
					{"l","d","5","z","a","p"},
					{"7","w","3","g","j","r"},
					{"u","e","y","n","l","j"},
					{"u","e","y","n","l","j"},
					{"e","l","s","c","o","t"},
					{"y","9","z","w","a","8"},
					{"7","m","r","8","4","x"},
					{"y","1","9","u","x","j"},
					{"6","4","f","z","3","g"},
					{"6","4","f","z","3","g"},
					{"d","o","p","k","x","w"},
					{"d","o","p","k","x","w"},
					{"r","i","p","m","9","s"},
					{"p","o","c","f","o","t"},
					{"p","o","c","f","o","t"},
					{"y","9","f","1","g","1"},
					{"y","9","f","1","g","1"},
					{"g","k","c","f","o","1"},
					{"6","l","r","z","r","w"},
					{"6","l","r","z","r","w"},
					{"o","3","o","2","f","e"},
					{"j","g","6","s","j","4"},
					{"x","f","5","t","5","u"},
					{"1","s","9","n","t","3"},
					{"k","p","t","j","5","t"},
					{"r","x","t","2","u","m"},
					{"w","l","4","2","c","w"},
					{"u","z","7","n","u","d"},
					{"h","o","t","a","o","g"},
					{"5","l","p","j","s","y"},
					{"f","3","n","f","d","9"},
					{"9","t","t","k","j","r"},
					{"t","8","l","a","3","d"},
					{"y","h","o","t","t","1"},
					{"m","r","o","u","m","t"},
					{"i","x","c","y","7","g"},
					{"3","a","w","z","j","f"},
					{"k","z","3","e","s","y"},
					{"p","g","i","2","m","6"},
					{"l","p","t","y","a","6"},
					{"l","l","g","d","7","h"},
					{"s","r","s","t","4","1"},
					{"m","y","o","m","x","8"},
					{"9","p","d","e","7","z"},
					{"8","n","3","r","i","6"},
					{"a","m","a","e","c","3"},
					{"s","9","z","c","u","p"},
					{"h","k","e","a","j","b"},
					{"3","z","3","o","u","d"},
					{"w","9","b","9","8","a"},
					{"o","3","o","2","f","e"},
					{"j","g","6","s","j","4"},
					{"x","f","5","t","5","u"},
					{"1","s","9","n","t","3"},
					{"k","p","t","j","5","t"},
					{"r","x","t","2","u","m"},
					{"w","l","4","2","c","w"},
					{"u","z","7","n","u","d"},
					{"h","o","t","a","o","g"},
					{"5","l","p","j","s","y"},
					{"f","3","n","f","d","9"},
					{"9","t","t","k","j","r"},
					{"t","8","l","a","3","d"},
					{"y","h","o","t","t","1"},
					{"m","r","o","u","m","t"},
					{"i","x","c","y","7","g"},
					{"3","a","w","z","j","f"},
					{"k","z","3","e","s","y"},
					{"p","g","i","2","m","6"},
					{"l","p","t","y","a","6"},
					{"l","l","g","d","7","h"},
					{"s","r","s","t","4","1"},
					{"m","y","o","m","x","8"},
					{"9","p","d","e","7","z"},
					{"8","n","3","r","i","6"},
					{"a","m","a","e","c","3"},
					{"s","9","z","c","u","p"},
					{"h","k","e","a","j","b"},
					{"3","z","3","o","u","d"},
					{"w","9","b","9","8","a"},
					{"x","8","g","d","s","o"},
					{"6","9","h","3","w","u"},
					{"r","b","e","3","w","9"},
					{"b","t","t","2","9","z"},
					{"g","3","6","s","j","t"},
					{"x","5","2","5","a","k"},
					{"3","x","s","8","r","r"},
					{"9","t","r","f","m","y"},
					{"3","k","k","k","o","k"},
					{"a","p","p","2","d","c"},
					{"g","o","f","g","4","z"},
					{"2","x","n","n","4","7"},
					{"6","s","3","2","f","w"},
					{"o","t","k","9","k","b"},
					{"t","o","b","f","x","1"},
					{"t","c","l","o","r","6"},
					{"y","2","3","2","g","g"},
					{"a","z","m","p","a","8"},
					{"1","3","p","a","t","i"},
					{"7","x","h","w","r","e"},
					{"d","e","1","t","j","n"},
					{"h","g","o","2","b","6"},
					{"r","5","2","z","r","g"},
					{"l","4","t","f","s","z"},
					{"f","r","g","5","9","y"},
					{"s","2","j","m","r","c"},
					{"g","3","w","i","m","d"},
					{"h","a","6","a","1","b"},
					{"3","g","3","o","a","o"},
					{"3","s","s","e","o","o"},
					{"3","1","1","k","7","x"},
					{"a","t","j","1","6","b"},
					{"s","t","7","x","i","u"},
					{"6","z","i","w","z","j"},
					{"4","r","f","p","2","k"},
					{"x","e","d","3","n","y"},
					{"p","t","4","i","d","b"},
					{"j","3","l","m","a","a"},
					{"g","i","b","4","3","i"},
					{"d","8","1","6","h","d"},
					{"1","x","z","u","o","d"},
					{"c","7","a","c","o","s"},
					{"c","f","e","f","a","h"},
					{"k","3","4","y","z","j"},
					{"h","a","p","r","y","i"},
					{"i","r","1","s","h","j"},
					{"9","d","l","k","c","k"},
					{"b","8","y","7","g","u"},
					{"5","s","e","5","w","1"},
				}
	if pietro == 7 then
		local str = slowa[vnum][1]..""..slowa[vnum][2]..""..slowa[vnum][3]..""..slowa[vnum][4]..""..slowa[vnum][5]..""..slowa[vnum][6]
		return tostring(str)
	else
		return slowa[vnum][pietro]
	end
end

 

Map and regens file:

http://www.ascarial.pl/endyItems/ascarialBramyPiekiel.zip

Thanks & greetings.

  • Love 12

Share this post


Link to post

Sorry for being soo noob :) but what is that list of codes where should I put them O.o?

P.D: Client side? 

Share this post


Link to post

Put it into questlib.lua and add into quest_functions that: kodBramy

 

Share this post


Link to post

Great and thanks for the release, but why we not use the official quest for the Blazing Purgatory?

quest flame_dungeon begin
	state start begin	
		when 20394.click with pc.get_level() >= 90 begin
			pc.give_item2(71175, 1)
			set_state(run)
		end
	end

	state run begin
	
	function setting()
		return 
		{
		["bossroom_entry_pos"] = {8109,6867},
		["boss_pos"] = {686,637},
		["doors_pos"] = {
			{320,394},
			{293,359},
			{333,321},
			{378,320},
			{400,355},
			{394,401}
		},
		["idoors_pos"] = {
			{268,447},
			{234,359},
			{300,264},
			{454,217},
			{470,355},
			{467,469}
		},
		["doors_dir"] = {135,90,210,152,90,223},
		["idoors_dir"] = {135,90,210,135,90,239},
		["dungeon_entry_pos"] = {7762, 6739},-- 던전에 처음 들어오는 곳
		["DUNGEON_MAN_bpos"] = {690,722},
		["DUNGEON_MAN_pos"] = {354,362},
		["LEVEL2_STONE_pos"] = {195,352},
		["LEVEL4_TARGET_pos"] = {470,175},
		["LEVEL5_STONE_pos"] = {
				{486, 345},
				{511, 336},
				{525, 349},
				{521, 365},
				{503, 372},
				{486, 365},
				{500, 354}
		},
		["LEVEL6_TARGET_pos"] = {511,480},
		["outside_entry_pos"] = {6142,7068}, --입장시켜주는애 서있는 곳
		["YAK_pos"] = {376, 397} -- 약환 부하
		
		}
	end
	function is_flamed(idx) -- 적룡성에 있는지 확인 
		return idx >= 351 * 10000 and idx < (351 + 1) *10000
	end
	function make_dungeon() -- 던전 만들기
		local setting = flame_dungeon.setting()
		d.new_jump_party(351, setting.dungeon_entry_pos[1], setting.dungeon_entry_pos[2])
		-- d.spawn_mob_ac_dir(20385, setting.DUNGEON_MAN_pos[1], setting.DUNGEON_MAN_pos[2],0)
		-- d.spawn_mob(YAK,setting.YAK_pos[1],setting.YAK_pos[2])
		d.regen_file("data/dungeon/flame_dungeon/npc.txt")
		d.setf("level",0)
		for i=1,6 do
			d.set_unique("door"..i, d.spawn_mob_ac_dir(20387, setting.doors_pos[i][1], setting.doors_pos[i][2],setting.doors_dir[i]))
		end
		for i=1,6 do
			d.set_unique("idoor"..i, d.spawn_mob_ac_dir(20388, setting.idoors_pos[i][1], setting.idoors_pos[i][2],setting.idoors_dir[i]))
		end
		d.setf("clear_count",0)
		d.setf("started",0)
		d.setf("dungeon_enter",0) -- 정상적으로 입장했는지? // 비정상 : 0 정상 : 1 // 튕기면 입장제한시간을 기록 안함
	end	
	function go_boss() -- 보스룸 가기 
		local setting = flame_dungeon.setting()
		if pc.get_level() < 104 then --레벨확인
            -- syschat(gameforge.flame_dungeon._580_notice)
            say(gameforge.flame_dungeon._580_notice)
            return
		else
			if pc.getf("main_quest_flame_lv103", "__status")==main_quest_flame_lv103.__COMPLETE__ then -- 선행퀘스트 확인
				-- say_title(gameforge.flame_dungeon._010_say)
                say(gameforge.flame_dungeon._010_say)
				local warp = select(gameforge.flame_dungeon._020_select,gameforge.flame_dungeon._030_select)
				if warp == 1 then
					d.setf("level",17)
					d.jump_all(setting.bossroom_entry_pos[1],setting.bossroom_entry_pos[2])
					d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_fild_boss.txt")
				--	d.spawn_mob(20385,setting.DUNGEON_MAN_bpos[1],setting.DUNGEON_MAN_bpos[2])
					d.spawn_mob(6091,setting.boss_pos[1],setting.boss_pos[2])
				end
			else 
                -- syschat(gameforge.flame_dungeon._040_notice)
                say(gameforge.flame_dungeon._040_notice)
                return
			end
		end
	end
	function level_clear() -- 레벨 깼을때, 리젠클리어, 지역클리어
		d.setf("level",0)
		d.clear_regen()
		d.purge_area(750000,620000,817400,689400) -- 맵전체 -- d.purge() 사용고려
	end
	function clear_timer(inx) -- 타이머 다지우기
		clear_server_timer ("flame_dungeon_0m_left_timer", inx)
		clear_server_timer ("flame_dungeon_1m_left_timer", inx)
		clear_server_timer ("flame_dungeon_5m_left_timer", inx)
		clear_server_timer ("flame_dungeon_10m_left_timer", inx)
		clear_server_timer ("flame_dungeon_15m_left_timer", inx)
		clear_server_timer ("flame_dungeon_30m_left_timer", inx)
		clear_server_timer ("flame_dungeon_45m_left_timer", inx)
		clear_server_timer ("killed_A_1", inx)
		clear_server_timer ("killed_A_2", inx)
		clear_server_timer ("flame_dungeon_ticket_remove", inx)	
	end
	
		when login begin
			local idx = pc.get_map_index()
			local setting = flame_dungeon.setting()
			if idx == 351 then
				pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
			elseif flame_dungeon.is_flamed(idx) then -- 던전 입장, 보스룸 입장 예외
			------------------------------------------------------------------------------------------------------------------------------------------------------
			--아래의 두줄중 위에줄을 사용하면 던전에서 종료했을경우 다시 원래 위치로 돌아온다. 아래줄을 활성화 하면 던전에서 종료했을 경우 던전 밖으로 나가게 된다.
			--던전에서 종료했을 경우 다시 원래 위치로 돌아올 경우, 던전에서 나가는 방법을 만들어줘야 하기 때문에 적룡성비의 나가기란 옵션을 활성화 해줘야 한다.
			------------------------------------------------------------------------------------------------------------------------------------------------------
				-- pc.set_warp_location(0, 0 , 0) --튕겼을때 다시 돌아오게 만들어 주는 부분
				pc.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) -- 던전 나갔을 때 밖으로 튕기게함
				local ticketGroup = {get_special_item_group (10033)}
				if d.getf("dungeon_enter") == 0 then -- 진행중이 아니면
					local canPass = false
					for i=1, table.getn(ticketGroup),2 do 
						if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
							canPass = true
							break
						end
					end

					if get_global_time() - pc.getf("flame_dungeon","exit_time") < 30 * 60 then -- 입장제한시간이 걸렸으면
						notice_multiline(gameforge.flame_dungeon._050_notice,d.notice)
						say(gameforge.flame_dungeon._060_say)
						timer("flame_dungeon_warp_timer", 5)
					elseif not canPass then
						notice_multiline(gameforge.flame_dungeon._070_notice,d.notice)
						say(gameforge.flame_dungeon._080_say)
						timer("flame_dungeon_warp_timer", 5)
					elseif pc.get_level() < 100 then
						notice_multiline(gameforge.flame_dungeon._090_notice,d.notice)
						say(gameforge.flame_dungeon._100_say)
						timer("flame_dungeon_warp_timer", 5)
					end
				elseif pc.getf("flame_dungeon","ticket_delete") == 0 then -- 진행중인데 티켓이 안지워졌을경우
					
					for i=1, table.getn(ticketGroup),2 do 
						if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
							pc.remove_item(ticketGroup[i], ticketGroup[i+1])
							break
						end
					end
					pc.setf("flame_dungeon","ticket_delete",1)
				end
			else
				pc.setf("flame_dungeon","ticket_delete",0)
			end
		end
		when flame_dungeon_warp_timer.timer begin
			local setting = flame_dungeon.setting()
			pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
		end
		when logout begin
			local idx = pc.get_map_index()
			if flame_dungeon.is_flamed(idx) then 
				if d.getf("dungeon_enter") == 1 then -- 정상적인 던전 입장 후 로그아웃
					pc.setf("flame_dungeon","exit_time",get_global_time()) -- 인스턴스 안에서의 마지막 시간을 기록, 근데 시간제한 때문에 or 그냥 튕긴거면 안기록
				end
				

			end
		end
		when 20394.chat.gameforge.flame_dungeon._110_npcChat begin
		
			local setting = flame_dungeon.setting()
			if party.is_party() then
				-- 던전 도중 나갈 경우 재입장 가능하도록
				local party_check = 0
				if d.find(party.getf("dungeon_index")) then
					party_check = (d.getf_from_map_index("party_leader_pid", party.getf("dungeon_index")) == party.get_leader_pid())
				end
				
				if d.find(party.getf("dungeon_index")) and party_check then
					if get_global_time() - pc.getf("flame_dungeon","exit_time") < 5 * 60 then -- 접종 이후 5분 내?
						local dungeon_level = d.getf_from_map_index("level", party.getf("dungeon_index"))
						if dungeon_level == 17 then -- 보스
							pc.warp(setting.bossroom_entry_pos[1] * 100, setting.bossroom_entry_pos[2] * 100, party.getf("dungeon_index"))
						else
							pc.warp(setting.dungeon_entry_pos[1] * 100, setting.dungeon_entry_pos[2] * 100, party.getf("dungeon_index"))
						end
					else -- 5분 초과하여 재 입장 불가
						say_title(mob_name(20394))
                        say(gameforge.flame_dungeon._590_say)
					end
				else
					local pids = {party.get_member_pids()}
					local noTicketMembers = {}
					local notEnoughLevelMembers = {}
					local ticketCheck = true
					local levelCheck = true
					local ticketGroup = {get_special_item_group (10033)}
					for i, pid in next, pids, nil do
						q.begin_other_pc_block(pid)
						local canPass = false
						for idx=1, table.getn(ticketGroup),2 do 
							if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
								canPass = true
								break
							end
						end
						
						if not canPass then
							table.insert(noTicketMembers, pc.get_name())
							ticketCheck = false
						end
						if pc.level < 100 then
							table.insert(notEnoughLevelMembers, pc.get_name())
							levelCheck = false
						end
						q.end_other_pc_block()
					end

					if not ticketCheck then
						say_title(mob_name(20394))
						say(gameforge.flame_dungeon._610_say)
						for i, name in next, noTicketMembers, nil do
							say(color(1,1,0), "    "..name)
						end
						if levelCheck then
							return
						else
							wait()
						end
					end

					if not levelCheck then
						say_title(mob_name(20394))
						say(gameforge.flame_dungeon._630_say)
						for i, name in next, notEnoughLevelMembers, nil do
							say(color(1,1,0), "    "..name)
						end
						return
					end

					if party.is_leader() then
						say(gameforge.flame_dungeon._120_say)
						local warp = select(gameforge.flame_dungeon._130_select,gameforge.flame_dungeon._140_select)
						if warp == 1 then
							if party.is_map_member_flag_lt("exit_time", get_global_time() - 30 * 60 ) then
								flame_dungeon.make_dungeon()
							else
								--say("test : 파티원의 입장 제한시간이 끝나지 않았습니다.")
								say(gameforge.flame_dungeon._600_say)
							end
						end
						
						party.setf("flame_dungeon_boss_kill_count", 0)
						
					else
						say(gameforge.flame_dungeon._150_say)
					end
				end
			else
				say(gameforge.flame_dungeon._160_say)
			end
		end
		-- when 20394.chat."Test : 리소스확인" with is_test_server() begin -- 테스트용
			-- local setting = flame_dungeon.setting()
			-- pc.setf("flame_dungeon","fdRtest",1)
			-- pc.warp( setting.dungeon_entry_pos[1]*100, setting.dungeon_entry_pos[2]*100, 351)
		-- end
		
		
		when 20394.chat."TEST : Init time limit init" with is_test_server() begin -- 테스트용
			pc.setf("flame_dungeon","exit_time",get_global_time()-1800)
			say("Done")
		end
		-- when 20385.chat."Test : 현재 상태" with is_test_server() begin -- 테스트용
			-- say("남은 몬스터 : "..d.count_monster())
			-- say("level : "..d.getf("level"))
			-- say("Dmap index : "..d.get_map_index())
			-- say("Pmap index : "..pc.get_map_index())
			-- say("access limit : "..pc.getf("flame_dungeon","exit_time"))
			-- say("global time : "..get_global_time())
			-- if flame_dungeon.is_flamed(d.get_map_index()) then
				-- say("in dungeon") -- is_flamed 함수 체크
			-- end
			-- if d.is_unique_dead("stone1") then
				-- say("stone1 is dead")
			-- else
				-- say("stone1 is not dead")
			-- end
		-- end
		-- when 20385.chat."처음으로" begin -- 테스트용
			-- say("초기화 합니다")
			-- flame_dungeon.clear_timer(d.get_map_index())
			-- flame_dungeon.make_dungeon()
		-- end
		when 20385.chat."Test : Boss Room" with is_test_server() begin -- 테스트용
			flame_dungeon.go_boss()
		end
		
		-- < 시간 경과 타이머>
		-- when 20385.chat."나가기" begin -- 던전에서 튕기지 않게 할 경우 활성화
			-- local setting = flame_dungeon.setting()
			-- say("밖으로 나가시겠습니까?")
			-- local warp = select("확인","취소")
			-- if warp == 1 then
				-- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
			-- end
		-- end
		when flame_dungeon_45m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 45),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer('flame_dungeon_30m_left_timer', 15*60, get_server_timer_arg())
			end
		end
		when flame_dungeon_30m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 30),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer('flame_dungeon_15m_left_timer', 15*60, get_server_timer_arg())
			end
		end
		when flame_dungeon_15m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 15),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer('flame_dungeon_5m_left_timer', 10*60, get_server_timer_arg())
			end
		end
		when flame_dungeon_5m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 5),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer('flame_dungeon_1m_left_timer', 4*60, get_server_timer_arg())
			end
		end
		when flame_dungeon_1m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 1),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer ("flame_dungeon_0m_left_timer", 60, get_server_timer_arg())
			end
		end
		when flame_dungeon_0m_left_timer.server_timer begin
			local setting = flame_dungeon.setting()
			if d.select(get_server_timer_arg()) then		
				notice_multiline(gameforge.flame_dungeon._190_notice,d.notice)
				notice_multiline(gameforge.flame_dungeon._200_notice,d.notice)
				server_timer("dungeon_end_timer",10,d.get_map_index())	
			end
		end	


		-- <<<< 던전 진행>>>> --
		when 20385.chat.gameforge.flame_dungeon._210_npcChat with npc.lock() begin -- '0x'는 x번째 레벨 퀘스트 받을 수 있는 상태 , '1x'는 x번째 레벨 퀘스트 진행중
			local setting = flame_dungeon.setting()
			if d.getf("started") == 0 then
				say(gameforge.flame_dungeon._230_say)
				say(gameforge.flame_dungeon._240_say)
				wait()
				d.setf("started",1)
				-- 파티원이 튕겨버렸는데 자기만 남아서 exit timer가 리셋되면 안되니깐 다음레벨을 눌렀을때를 시작할때로 봄
				server_timer ("flame_dungeon_45m_left_timer",15*60, d.get_map_index())
				notice_multiline(gameforge.flame_dungeon._250_notice,d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				
				-- 통행증 관련된 처리
				-- 입장 후에 티켓을 없앤 사람을 튕겨내기 위해서 타이머를 이용해 티켓을 제거한다.
				local pids = {party.get_member_pids()}
				local ticketGroup = {get_special_item_group (10033)}
				for i, pid in next, pids, nil do
					q.begin_other_pc_block(pid)
					local canPass = false
					for idx=1, table.getn(ticketGroup),2 do 
						if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
							canPass = true
							pc.remove_item(ticketGroup[idx], ticketGroup[idx+1])
							break
						end
					end
					
					if not canPass then
						pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
					end
					q.end_other_pc_block()
				end
				d.setqf2("flame_dungeon","ticket_delete",1)
				d.setf("dungeon_enter",1)
				
				-- 던전과 파티에 서로에 대한 정보를 저장한다.
				party.setf("dungeon_index", d.get_map_index())
				d.setf("party_leader_pid", party.get_leader_pid())
			end
			if d.getf("level") < 7 then --진행중이 아니면
				if d.getf("clear_count") == 6 then -- 방 여섯개 했으면 보스방
					d.setf("level",7)
				else
					local rand = number(1,6)--랜덤에서 방문체크는 따로 배열없이 방의 문의 열려있는지로 체크함
					local setlev = 0
					d.setf("level",7) -- 혹시 모를 문제가 생겨 레벨이 안잡힐경우를 대비해 보스룸으로 셋팅해둠
					for i=1,50 do
						setlev = setlev + 1
						if setlev > 6 then
							setlev = 1
						end
						if not d.is_unique_dead("door"..setlev) then
							rand = rand - 1
							if rand == 0 then
								d.setf("level",setlev)
								d.setf("clear_count",d.getf("clear_count")+1)
								break
							end	
						end
					end
				end
			end
				if d.getf("level") == 1 then
					say(gameforge.flame_dungeon._260_say)
					notice_multiline(gameforge.flame_dungeon._260_say,d.notice)
					d.kill_unique("door1")
					d.kill_unique("idoor1")
					d.setf("level",11)
					d.regen_file ("data/dungeon/flame_dungeon/".."fd_a.txt")
						
					server_timer ("killed_A_1", 12, d.get_map_index())
				elseif d.getf("level") == 11 then
					say(gameforge.flame_dungeon._270_say)
					say_title(gameforge.flame_dungeon._280_sayTitle .. d.count_monster())
				elseif d.getf("level") == 2 then
						say(gameforge.flame_dungeon._290_say)
						say(gameforge.flame_dungeon._300_say)
						notice_multiline(gameforge.flame_dungeon._290_say,d.notice)
						notice_multiline(gameforge.flame_dungeon._300_say,d.notice)
						d.spawn_mob(20386, setting.LEVEL2_STONE_pos[1], setting.LEVEL2_STONE_pos[2]) -- 봉인석 소환
						d.kill_unique("door2")
						d.kill_unique("idoor2")
						d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_b.txt")
						d.setf("level",12)
				elseif d.getf("level") == 12 then
					say(gameforge.flame_dungeon._310_say)
				elseif d.getf("level") == 3 then
					say(gameforge.flame_dungeon._260_say)
					notice_multiline(gameforge.flame_dungeon._260_say,d.notice)
					d.kill_unique("door3")
					d.kill_unique("idoor3")
					d.setf("level",13)
					d.regen_file ("data/dungeon/flame_dungeon/".."fd_c.txt")
					server_timer ("killed_A_1", 12, d.get_map_index())
				elseif d.getf("level") == 13 then
					say(gameforge.flame_dungeon._270_say)
					say_title(gameforge.flame_dungeon._280_sayTitle..d.count_monster())
				elseif d.getf("level") == 4 then -- 474 178
					say(gameforge.flame_dungeon._320_notice)
					notice_multiline(gameforge.flame_dungeon._320_notice,d.notice)
					d.setf("level",14)
					d.kill_unique("door4")
					d.kill_unique("idoor4")
					d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_d.txt")
					d.spawn_mob(6051,setting.LEVEL4_TARGET_pos[1],setting.LEVEL4_TARGET_pos[2] ) -- 타겟몬스터 소한
				elseif d.getf("level") == 14 then
					say(gameforge.flame_dungeon._330_say)
					say(gameforge.flame_dungeon._340_say)
				elseif d.getf("level") == 5 then -- 510 355
					say(gameforge.flame_dungeon._350_say)
					say(gameforge.flame_dungeon._360_say)
					notice_multiline(gameforge.flame_dungeon._350_say,d.notice)
					notice_multiline(gameforge.flame_dungeon._360_say,d.notice)
					d.kill_unique("door5")
					d.kill_unique("idoor5")
					d.setf("level",15)
					d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					local vis = { 0,0,0,0,0,0,0}
					for i=1,7 do
						vis[i] = 0
					end
					for i = 1, 7 do -- 랜덤하게 돌소환
						local ran = number(1,7)
						local st = 0
						for j = 1, 50 do
							st = st + 1
							if st > 7 then
								st = 1
							end
							if vis[st] == 0 then
								ran = ran - 1
								if ran == 0 then
									vis[st] = 1
									d.set_unique("stone5_"..st, d.spawn_mob(20386, setting.LEVEL5_STONE_pos[i][1], setting.LEVEL5_STONE_pos[i][2]))
									break
								end
							end
						end
					end  
				elseif d.getf("level") == 15 then
					say(gameforge.flame_dungeon._370_say)
				elseif d.getf("level") == 6 then -- 507 490
					say(gameforge.flame_dungeon._380_say) 
					notice_multiline(gameforge.flame_dungeon._380_say,d.notice)
					d.setf("level",16)
					d.kill_unique("door6")
					d.kill_unique("idoor6")
					d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_f.txt")
					d.spawn_mob(8057, setting.LEVEL6_TARGET_pos[1],setting.LEVEL6_TARGET_pos[2]) -- 타겟오브젝트 소환
				elseif d.getf("level") == 16 then
					say(gameforge.flame_dungeon._390_say)
					say(gameforge.flame_dungeon._400_say)
				elseif d.getf("level") == 7 then
					-- setskin(NOWINDOW)
                    flame_dungeon.go_boss()
				else
					say(gameforge.flame_dungeon._410_say)
				end
			npc.unlock()		
		end
	


		when dungeon_end_timer.server_timer begin -- 종료 타이머 (끝나고 나가는거)
			local setting = flame_dungeon.setting()
			if d.select(get_server_timer_arg()) then
				flame_dungeon.clear_timer(d.get_map_index())		
				d.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) 
				d.exit_all()
				d.setf("party_leader_pid", 0)
			end
		end

		when killed_A_1.server_timer begin -- 타이머 돌리기1 (level1,level3)
			if d.select(get_server_timer_arg()) then
				if d.count_monster() <= 0 then -- 1레벨 몬스터 전멸시
					if d.getf("level") == 11 then
						notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
						notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					else
						notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
						notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					end
					d.setf("level",0)
				else 
					server_timer ("killed_A_2", 6, get_server_timer_arg())
				end
			end
		end
		when killed_A_2.server_timer begin -- 타이머 돌리기2 (1과 2 번갈아가면서 돌아감)
			if d.select(get_server_timer_arg()) then
				if d.count_monster() <= 0 then -- 1레벨 몬스터 전멸시
					if d.getf("level") == 11 then
						notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
						notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					else
						notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
						notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					end
					d.setf("level",0)
				else 
					server_timer ("killed_A_1", 6, get_server_timer_arg())
				end
			end
		end

		when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 12 begin -- 2레벨 봉인석 열쇠 드랍
			local i = number(1, 100) -- 100분의 1 확률로 열쇠드랍
			if i == 1 then
				game.drop_item (30329, 1)
			end
		end
		when 20386.take with flame_dungeon.is_flamed(pc.get_map_index()) and item.vnum == 30329 and d.getf("level") == 12 begin -- 2레벨 열쇠 먹었을때
			local i = number(1, 5) -- 5분의 1 확률로 진짜 열쇠
			if i == 1 then
				npc.purge()
				item.remove()
				notice_multiline(gameforge.flame_dungeon._440_notice,d.notice)
				notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
				flame_dungeon.level_clear()
			else
				item.remove()
				say(gameforge.flame_dungeon._450_say)
			end
		end

		when 6051.kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 14 begin
			notice_multiline(gameforge.flame_dungeon._460_notice,d.notice)
			notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
			flame_dungeon.level_clear()
		end

		when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 15 begin -- 5레벨 봉인석 열쇠 드랍
			local i = number(1, 30) -- 30분의 1 확률로 열쇠드랍
			if i == 1 then
				game.drop_item (30330, 1)
			end
		end
		when 20386.take with flame_dungeon.is_flamed(d.get_map_index()) and item.vnum == 30330 and d.getf("level") == 15 begin -- 5레벨 진짜열쇠 먹었을때
			local setting = flame_dungeon.setting()
			if npc.get_vid() == d.get_unique_vid("stone5_1") then -- 첫번째 꺼는 선행되어야 할 일이 필요없으니 찾자마자 제거해줌
				npc.purge()
				item.remove()
				say(gameforge.flame_dungeon._470_say)
				d.setf("stonekill",2) -- 2번 돌을 죽여라
				if d.count_monster() < 100 then
					d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_2") then 
				if d.getf("stonekill") == 2 then -- 2번돌을 죽일 차롄데 2번돌에게 열쇠를 먹였을 때
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._480_say)
					d.setf("stonekill",3)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("2번")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_3") then
				if d.getf("stonekill") == 3 then
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._500_say)
					d.setf("stonekill",4)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("3번")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_4") then
				if d.getf("stonekill") == 4 then
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._510_say)
					d.setf("stonekill",5)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
				--	say("4번")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_5") then
				if d.getf("stonekill") == 5 then
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._520_say)
					d.setf("stonekill",6)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("5번")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_6") then
				if d.getf("stonekill") == 6 then
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._530_say)
					d.setf("stonekill",7)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("6번")
				end
			else 
				if d.getf("stonekill") == 7 then
					npc.purge()
					item.remove()
					notice_multiline(gameforge.flame_dungeon._440_notice,d.notice)
					notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					flame_dungeon.level_clear()
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("7번")
				end
			end
		end

		when 8057.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==16 begin -- 망마석 파괴했을 때
			notice_multiline(gameforge.flame_dungeon._540_notice,d.notice)
			notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
			flame_dungeon.level_clear()
		end

		when 6091.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==17 begin -- 보스 죽였을때
			notice_multiline(gameforge.flame_dungeon._550_notice,d.notice)
			notice_multiline(gameforge.flame_dungeon._560_notice,d.notice)
			server_timer("dungeon_end_timer", 60,d.get_map_index())	
			flame_dungeon.level_clear()
			
			-- 파티원 중, 야마천 잡는 퀘스트(104렙, 105렙 퀘스트) 진행중인 사람이 있으면 퀘스트 클리어 되도록.
			if party.is_party() then
				party.setf("flame_dungeon_boss_kill_count", 1)
			end
			
		end
	end
end

  • Love 5

Share this post


Link to post

I had written this long time ago before I had official quests and I have use this on server on gamecore 2089 which doesn't have function d.find.

Share this post


Link to post

Thanks, I think it will be useful for users of old cores which are still most of them.

Share this post


Link to post

Great and thanks for the release, but why we not use the official quest for the Blazing Purgatory?

quest flame_dungeon begin
	state start begin	
		when 20394.click with pc.get_level() >= 90 begin
			pc.give_item2(71175, 1)
			set_state(run)
		end
	end

	state run begin
	
	function setting()
		return 
		{
		["bossroom_entry_pos"] = {8109,6867},
		["boss_pos"] = {686,637},
		["doors_pos"] = {
			{320,394},
			{293,359},
			{333,321},
			{378,320},
			{400,355},
			{394,401}
		},
		["idoors_pos"] = {
			{268,447},
			{234,359},
			{300,264},
			{454,217},
			{470,355},
			{467,469}
		},
		["doors_dir"] = {135,90,210,152,90,223},
		["idoors_dir"] = {135,90,210,135,90,239},
		["dungeon_entry_pos"] = {7762, 6739},-- 던전에 처음 들어오는 곳
		["DUNGEON_MAN_bpos"] = {690,722},
		["DUNGEON_MAN_pos"] = {354,362},
		["LEVEL2_STONE_pos"] = {195,352},
		["LEVEL4_TARGET_pos"] = {470,175},
		["LEVEL5_STONE_pos"] = {
				{486, 345},
				{511, 336},
				{525, 349},
				{521, 365},
				{503, 372},
				{486, 365},
				{500, 354}
		},
		["LEVEL6_TARGET_pos"] = {511,480},
		["outside_entry_pos"] = {6142,7068}, --입장시켜주는애 서있는 곳
		["YAK_pos"] = {376, 397} -- 약환 부하
		
		}
	end
	function is_flamed(idx) -- 적룡성에 있는지 확인 
		return idx >= 351 * 10000 and idx < (351 + 1) *10000
	end
	function make_dungeon() -- 던전 만들기
		local setting = flame_dungeon.setting()
		d.new_jump_party(351, setting.dungeon_entry_pos[1], setting.dungeon_entry_pos[2])
		-- d.spawn_mob_ac_dir(20385, setting.DUNGEON_MAN_pos[1], setting.DUNGEON_MAN_pos[2],0)
		-- d.spawn_mob(YAK,setting.YAK_pos[1],setting.YAK_pos[2])
		d.regen_file("data/dungeon/flame_dungeon/npc.txt")
		d.setf("level",0)
		for i=1,6 do
			d.set_unique("door"..i, d.spawn_mob_ac_dir(20387, setting.doors_pos[i][1], setting.doors_pos[i][2],setting.doors_dir[i]))
		end
		for i=1,6 do
			d.set_unique("idoor"..i, d.spawn_mob_ac_dir(20388, setting.idoors_pos[i][1], setting.idoors_pos[i][2],setting.idoors_dir[i]))
		end
		d.setf("clear_count",0)
		d.setf("started",0)
		d.setf("dungeon_enter",0) -- 정상적으로 입장했는지? // 비정상 : 0 정상 : 1 // 튕기면 입장제한시간을 기록 안함
	end	
	function go_boss() -- 보스룸 가기 
		local setting = flame_dungeon.setting()
		if pc.get_level() < 104 then --레벨확인
            -- syschat(gameforge.flame_dungeon._580_notice)
            say(gameforge.flame_dungeon._580_notice)
            return
		else
			if pc.getf("main_quest_flame_lv103", "__status")==main_quest_flame_lv103.__COMPLETE__ then -- 선행퀘스트 확인
				-- say_title(gameforge.flame_dungeon._010_say)
                say(gameforge.flame_dungeon._010_say)
				local warp = select(gameforge.flame_dungeon._020_select,gameforge.flame_dungeon._030_select)
				if warp == 1 then
					d.setf("level",17)
					d.jump_all(setting.bossroom_entry_pos[1],setting.bossroom_entry_pos[2])
					d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_fild_boss.txt")
				--	d.spawn_mob(20385,setting.DUNGEON_MAN_bpos[1],setting.DUNGEON_MAN_bpos[2])
					d.spawn_mob(6091,setting.boss_pos[1],setting.boss_pos[2])
				end
			else 
                -- syschat(gameforge.flame_dungeon._040_notice)
                say(gameforge.flame_dungeon._040_notice)
                return
			end
		end
	end
	function level_clear() -- 레벨 깼을때, 리젠클리어, 지역클리어
		d.setf("level",0)
		d.clear_regen()
		d.purge_area(750000,620000,817400,689400) -- 맵전체 -- d.purge() 사용고려
	end
	function clear_timer(inx) -- 타이머 다지우기
		clear_server_timer ("flame_dungeon_0m_left_timer", inx)
		clear_server_timer ("flame_dungeon_1m_left_timer", inx)
		clear_server_timer ("flame_dungeon_5m_left_timer", inx)
		clear_server_timer ("flame_dungeon_10m_left_timer", inx)
		clear_server_timer ("flame_dungeon_15m_left_timer", inx)
		clear_server_timer ("flame_dungeon_30m_left_timer", inx)
		clear_server_timer ("flame_dungeon_45m_left_timer", inx)
		clear_server_timer ("killed_A_1", inx)
		clear_server_timer ("killed_A_2", inx)
		clear_server_timer ("flame_dungeon_ticket_remove", inx)	
	end
	
		when login begin
			local idx = pc.get_map_index()
			local setting = flame_dungeon.setting()
			if idx == 351 then
				pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
			elseif flame_dungeon.is_flamed(idx) then -- 던전 입장, 보스룸 입장 예외
			------------------------------------------------------------------------------------------------------------------------------------------------------
			--아래의 두줄중 위에줄을 사용하면 던전에서 종료했을경우 다시 원래 위치로 돌아온다. 아래줄을 활성화 하면 던전에서 종료했을 경우 던전 밖으로 나가게 된다.
			--던전에서 종료했을 경우 다시 원래 위치로 돌아올 경우, 던전에서 나가는 방법을 만들어줘야 하기 때문에 적룡성비의 나가기란 옵션을 활성화 해줘야 한다.
			------------------------------------------------------------------------------------------------------------------------------------------------------
				-- pc.set_warp_location(0, 0 , 0) --튕겼을때 다시 돌아오게 만들어 주는 부분
				pc.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) -- 던전 나갔을 때 밖으로 튕기게함
				local ticketGroup = {get_special_item_group (10033)}
				if d.getf("dungeon_enter") == 0 then -- 진행중이 아니면
					local canPass = false
					for i=1, table.getn(ticketGroup),2 do 
						if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
							canPass = true
							break
						end
					end

					if get_global_time() - pc.getf("flame_dungeon","exit_time") < 30 * 60 then -- 입장제한시간이 걸렸으면
						notice_multiline(gameforge.flame_dungeon._050_notice,d.notice)
						say(gameforge.flame_dungeon._060_say)
						timer("flame_dungeon_warp_timer", 5)
					elseif not canPass then
						notice_multiline(gameforge.flame_dungeon._070_notice,d.notice)
						say(gameforge.flame_dungeon._080_say)
						timer("flame_dungeon_warp_timer", 5)
					elseif pc.get_level() < 100 then
						notice_multiline(gameforge.flame_dungeon._090_notice,d.notice)
						say(gameforge.flame_dungeon._100_say)
						timer("flame_dungeon_warp_timer", 5)
					end
				elseif pc.getf("flame_dungeon","ticket_delete") == 0 then -- 진행중인데 티켓이 안지워졌을경우
					
					for i=1, table.getn(ticketGroup),2 do 
						if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
							pc.remove_item(ticketGroup[i], ticketGroup[i+1])
							break
						end
					end
					pc.setf("flame_dungeon","ticket_delete",1)
				end
			else
				pc.setf("flame_dungeon","ticket_delete",0)
			end
		end
		when flame_dungeon_warp_timer.timer begin
			local setting = flame_dungeon.setting()
			pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
		end
		when logout begin
			local idx = pc.get_map_index()
			if flame_dungeon.is_flamed(idx) then 
				if d.getf("dungeon_enter") == 1 then -- 정상적인 던전 입장 후 로그아웃
					pc.setf("flame_dungeon","exit_time",get_global_time()) -- 인스턴스 안에서의 마지막 시간을 기록, 근데 시간제한 때문에 or 그냥 튕긴거면 안기록
				end
				

			end
		end
		when 20394.chat.gameforge.flame_dungeon._110_npcChat begin
		
			local setting = flame_dungeon.setting()
			if party.is_party() then
				-- 던전 도중 나갈 경우 재입장 가능하도록
				local party_check = 0
				if d.find(party.getf("dungeon_index")) then
					party_check = (d.getf_from_map_index("party_leader_pid", party.getf("dungeon_index")) == party.get_leader_pid())
				end
				
				if d.find(party.getf("dungeon_index")) and party_check then
					if get_global_time() - pc.getf("flame_dungeon","exit_time") < 5 * 60 then -- 접종 이후 5분 내?
						local dungeon_level = d.getf_from_map_index("level", party.getf("dungeon_index"))
						if dungeon_level == 17 then -- 보스
							pc.warp(setting.bossroom_entry_pos[1] * 100, setting.bossroom_entry_pos[2] * 100, party.getf("dungeon_index"))
						else
							pc.warp(setting.dungeon_entry_pos[1] * 100, setting.dungeon_entry_pos[2] * 100, party.getf("dungeon_index"))
						end
					else -- 5분 초과하여 재 입장 불가
						say_title(mob_name(20394))
                        say(gameforge.flame_dungeon._590_say)
					end
				else
					local pids = {party.get_member_pids()}
					local noTicketMembers = {}
					local notEnoughLevelMembers = {}
					local ticketCheck = true
					local levelCheck = true
					local ticketGroup = {get_special_item_group (10033)}
					for i, pid in next, pids, nil do
						q.begin_other_pc_block(pid)
						local canPass = false
						for idx=1, table.getn(ticketGroup),2 do 
							if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
								canPass = true
								break
							end
						end
						
						if not canPass then
							table.insert(noTicketMembers, pc.get_name())
							ticketCheck = false
						end
						if pc.level < 100 then
							table.insert(notEnoughLevelMembers, pc.get_name())
							levelCheck = false
						end
						q.end_other_pc_block()
					end

					if not ticketCheck then
						say_title(mob_name(20394))
						say(gameforge.flame_dungeon._610_say)
						for i, name in next, noTicketMembers, nil do
							say(color(1,1,0), "    "..name)
						end
						if levelCheck then
							return
						else
							wait()
						end
					end

					if not levelCheck then
						say_title(mob_name(20394))
						say(gameforge.flame_dungeon._630_say)
						for i, name in next, notEnoughLevelMembers, nil do
							say(color(1,1,0), "    "..name)
						end
						return
					end

					if party.is_leader() then
						say(gameforge.flame_dungeon._120_say)
						local warp = select(gameforge.flame_dungeon._130_select,gameforge.flame_dungeon._140_select)
						if warp == 1 then
							if party.is_map_member_flag_lt("exit_time", get_global_time() - 30 * 60 ) then
								flame_dungeon.make_dungeon()
							else
								--say("test : 파티원의 입장 제한시간이 끝나지 않았습니다.")
								say(gameforge.flame_dungeon._600_say)
							end
						end
						
						party.setf("flame_dungeon_boss_kill_count", 0)
						
					else
						say(gameforge.flame_dungeon._150_say)
					end
				end
			else
				say(gameforge.flame_dungeon._160_say)
			end
		end
		-- when 20394.chat."Test : 리소스확인" with is_test_server() begin -- 테스트용
			-- local setting = flame_dungeon.setting()
			-- pc.setf("flame_dungeon","fdRtest",1)
			-- pc.warp( setting.dungeon_entry_pos[1]*100, setting.dungeon_entry_pos[2]*100, 351)
		-- end
		
		
		when 20394.chat."TEST : Init time limit init" with is_test_server() begin -- 테스트용
			pc.setf("flame_dungeon","exit_time",get_global_time()-1800)
			say("Done")
		end
		-- when 20385.chat."Test : 현재 상태" with is_test_server() begin -- 테스트용
			-- say("남은 몬스터 : "..d.count_monster())
			-- say("level : "..d.getf("level"))
			-- say("Dmap index : "..d.get_map_index())
			-- say("Pmap index : "..pc.get_map_index())
			-- say("access limit : "..pc.getf("flame_dungeon","exit_time"))
			-- say("global time : "..get_global_time())
			-- if flame_dungeon.is_flamed(d.get_map_index()) then
				-- say("in dungeon") -- is_flamed 함수 체크
			-- end
			-- if d.is_unique_dead("stone1") then
				-- say("stone1 is dead")
			-- else
				-- say("stone1 is not dead")
			-- end
		-- end
		-- when 20385.chat."처음으로" begin -- 테스트용
			-- say("초기화 합니다")
			-- flame_dungeon.clear_timer(d.get_map_index())
			-- flame_dungeon.make_dungeon()
		-- end
		when 20385.chat."Test : Boss Room" with is_test_server() begin -- 테스트용
			flame_dungeon.go_boss()
		end
		
		-- < 시간 경과 타이머>
		-- when 20385.chat."나가기" begin -- 던전에서 튕기지 않게 할 경우 활성화
			-- local setting = flame_dungeon.setting()
			-- say("밖으로 나가시겠습니까?")
			-- local warp = select("확인","취소")
			-- if warp == 1 then
				-- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
			-- end
		-- end
		when flame_dungeon_45m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 45),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer('flame_dungeon_30m_left_timer', 15*60, get_server_timer_arg())
			end
		end
		when flame_dungeon_30m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 30),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer('flame_dungeon_15m_left_timer', 15*60, get_server_timer_arg())
			end
		end
		when flame_dungeon_15m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 15),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer('flame_dungeon_5m_left_timer', 10*60, get_server_timer_arg())
			end
		end
		when flame_dungeon_5m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 5),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer('flame_dungeon_1m_left_timer', 4*60, get_server_timer_arg())
			end
		end
		when flame_dungeon_1m_left_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 1),d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				server_timer ("flame_dungeon_0m_left_timer", 60, get_server_timer_arg())
			end
		end
		when flame_dungeon_0m_left_timer.server_timer begin
			local setting = flame_dungeon.setting()
			if d.select(get_server_timer_arg()) then		
				notice_multiline(gameforge.flame_dungeon._190_notice,d.notice)
				notice_multiline(gameforge.flame_dungeon._200_notice,d.notice)
				server_timer("dungeon_end_timer",10,d.get_map_index())	
			end
		end	


		-- <<<< 던전 진행>>>> --
		when 20385.chat.gameforge.flame_dungeon._210_npcChat with npc.lock() begin -- '0x'는 x번째 레벨 퀘스트 받을 수 있는 상태 , '1x'는 x번째 레벨 퀘스트 진행중
			local setting = flame_dungeon.setting()
			if d.getf("started") == 0 then
				say(gameforge.flame_dungeon._230_say)
				say(gameforge.flame_dungeon._240_say)
				wait()
				d.setf("started",1)
				-- 파티원이 튕겨버렸는데 자기만 남아서 exit timer가 리셋되면 안되니깐 다음레벨을 눌렀을때를 시작할때로 봄
				server_timer ("flame_dungeon_45m_left_timer",15*60, d.get_map_index())
				notice_multiline(gameforge.flame_dungeon._250_notice,d.notice)
				notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
				
				-- 통행증 관련된 처리
				-- 입장 후에 티켓을 없앤 사람을 튕겨내기 위해서 타이머를 이용해 티켓을 제거한다.
				local pids = {party.get_member_pids()}
				local ticketGroup = {get_special_item_group (10033)}
				for i, pid in next, pids, nil do
					q.begin_other_pc_block(pid)
					local canPass = false
					for idx=1, table.getn(ticketGroup),2 do 
						if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
							canPass = true
							pc.remove_item(ticketGroup[idx], ticketGroup[idx+1])
							break
						end
					end
					
					if not canPass then
						pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
					end
					q.end_other_pc_block()
				end
				d.setqf2("flame_dungeon","ticket_delete",1)
				d.setf("dungeon_enter",1)
				
				-- 던전과 파티에 서로에 대한 정보를 저장한다.
				party.setf("dungeon_index", d.get_map_index())
				d.setf("party_leader_pid", party.get_leader_pid())
			end
			if d.getf("level") < 7 then --진행중이 아니면
				if d.getf("clear_count") == 6 then -- 방 여섯개 했으면 보스방
					d.setf("level",7)
				else
					local rand = number(1,6)--랜덤에서 방문체크는 따로 배열없이 방의 문의 열려있는지로 체크함
					local setlev = 0
					d.setf("level",7) -- 혹시 모를 문제가 생겨 레벨이 안잡힐경우를 대비해 보스룸으로 셋팅해둠
					for i=1,50 do
						setlev = setlev + 1
						if setlev > 6 then
							setlev = 1
						end
						if not d.is_unique_dead("door"..setlev) then
							rand = rand - 1
							if rand == 0 then
								d.setf("level",setlev)
								d.setf("clear_count",d.getf("clear_count")+1)
								break
							end	
						end
					end
				end
			end
				if d.getf("level") == 1 then
					say(gameforge.flame_dungeon._260_say)
					notice_multiline(gameforge.flame_dungeon._260_say,d.notice)
					d.kill_unique("door1")
					d.kill_unique("idoor1")
					d.setf("level",11)
					d.regen_file ("data/dungeon/flame_dungeon/".."fd_a.txt")
						
					server_timer ("killed_A_1", 12, d.get_map_index())
				elseif d.getf("level") == 11 then
					say(gameforge.flame_dungeon._270_say)
					say_title(gameforge.flame_dungeon._280_sayTitle .. d.count_monster())
				elseif d.getf("level") == 2 then
						say(gameforge.flame_dungeon._290_say)
						say(gameforge.flame_dungeon._300_say)
						notice_multiline(gameforge.flame_dungeon._290_say,d.notice)
						notice_multiline(gameforge.flame_dungeon._300_say,d.notice)
						d.spawn_mob(20386, setting.LEVEL2_STONE_pos[1], setting.LEVEL2_STONE_pos[2]) -- 봉인석 소환
						d.kill_unique("door2")
						d.kill_unique("idoor2")
						d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_b.txt")
						d.setf("level",12)
				elseif d.getf("level") == 12 then
					say(gameforge.flame_dungeon._310_say)
				elseif d.getf("level") == 3 then
					say(gameforge.flame_dungeon._260_say)
					notice_multiline(gameforge.flame_dungeon._260_say,d.notice)
					d.kill_unique("door3")
					d.kill_unique("idoor3")
					d.setf("level",13)
					d.regen_file ("data/dungeon/flame_dungeon/".."fd_c.txt")
					server_timer ("killed_A_1", 12, d.get_map_index())
				elseif d.getf("level") == 13 then
					say(gameforge.flame_dungeon._270_say)
					say_title(gameforge.flame_dungeon._280_sayTitle..d.count_monster())
				elseif d.getf("level") == 4 then -- 474 178
					say(gameforge.flame_dungeon._320_notice)
					notice_multiline(gameforge.flame_dungeon._320_notice,d.notice)
					d.setf("level",14)
					d.kill_unique("door4")
					d.kill_unique("idoor4")
					d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_d.txt")
					d.spawn_mob(6051,setting.LEVEL4_TARGET_pos[1],setting.LEVEL4_TARGET_pos[2] ) -- 타겟몬스터 소한
				elseif d.getf("level") == 14 then
					say(gameforge.flame_dungeon._330_say)
					say(gameforge.flame_dungeon._340_say)
				elseif d.getf("level") == 5 then -- 510 355
					say(gameforge.flame_dungeon._350_say)
					say(gameforge.flame_dungeon._360_say)
					notice_multiline(gameforge.flame_dungeon._350_say,d.notice)
					notice_multiline(gameforge.flame_dungeon._360_say,d.notice)
					d.kill_unique("door5")
					d.kill_unique("idoor5")
					d.setf("level",15)
					d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					local vis = { 0,0,0,0,0,0,0}
					for i=1,7 do
						vis[i] = 0
					end
					for i = 1, 7 do -- 랜덤하게 돌소환
						local ran = number(1,7)
						local st = 0
						for j = 1, 50 do
							st = st + 1
							if st > 7 then
								st = 1
							end
							if vis[st] == 0 then
								ran = ran - 1
								if ran == 0 then
									vis[st] = 1
									d.set_unique("stone5_"..st, d.spawn_mob(20386, setting.LEVEL5_STONE_pos[i][1], setting.LEVEL5_STONE_pos[i][2]))
									break
								end
							end
						end
					end  
				elseif d.getf("level") == 15 then
					say(gameforge.flame_dungeon._370_say)
				elseif d.getf("level") == 6 then -- 507 490
					say(gameforge.flame_dungeon._380_say) 
					notice_multiline(gameforge.flame_dungeon._380_say,d.notice)
					d.setf("level",16)
					d.kill_unique("door6")
					d.kill_unique("idoor6")
					d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_f.txt")
					d.spawn_mob(8057, setting.LEVEL6_TARGET_pos[1],setting.LEVEL6_TARGET_pos[2]) -- 타겟오브젝트 소환
				elseif d.getf("level") == 16 then
					say(gameforge.flame_dungeon._390_say)
					say(gameforge.flame_dungeon._400_say)
				elseif d.getf("level") == 7 then
					-- setskin(NOWINDOW)
                    flame_dungeon.go_boss()
				else
					say(gameforge.flame_dungeon._410_say)
				end
			npc.unlock()		
		end
	


		when dungeon_end_timer.server_timer begin -- 종료 타이머 (끝나고 나가는거)
			local setting = flame_dungeon.setting()
			if d.select(get_server_timer_arg()) then
				flame_dungeon.clear_timer(d.get_map_index())		
				d.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) 
				d.exit_all()
				d.setf("party_leader_pid", 0)
			end
		end

		when killed_A_1.server_timer begin -- 타이머 돌리기1 (level1,level3)
			if d.select(get_server_timer_arg()) then
				if d.count_monster() <= 0 then -- 1레벨 몬스터 전멸시
					if d.getf("level") == 11 then
						notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
						notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					else
						notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
						notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					end
					d.setf("level",0)
				else 
					server_timer ("killed_A_2", 6, get_server_timer_arg())
				end
			end
		end
		when killed_A_2.server_timer begin -- 타이머 돌리기2 (1과 2 번갈아가면서 돌아감)
			if d.select(get_server_timer_arg()) then
				if d.count_monster() <= 0 then -- 1레벨 몬스터 전멸시
					if d.getf("level") == 11 then
						notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
						notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					else
						notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
						notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					end
					d.setf("level",0)
				else 
					server_timer ("killed_A_1", 6, get_server_timer_arg())
				end
			end
		end

		when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 12 begin -- 2레벨 봉인석 열쇠 드랍
			local i = number(1, 100) -- 100분의 1 확률로 열쇠드랍
			if i == 1 then
				game.drop_item (30329, 1)
			end
		end
		when 20386.take with flame_dungeon.is_flamed(pc.get_map_index()) and item.vnum == 30329 and d.getf("level") == 12 begin -- 2레벨 열쇠 먹었을때
			local i = number(1, 5) -- 5분의 1 확률로 진짜 열쇠
			if i == 1 then
				npc.purge()
				item.remove()
				notice_multiline(gameforge.flame_dungeon._440_notice,d.notice)
				notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
				flame_dungeon.level_clear()
			else
				item.remove()
				say(gameforge.flame_dungeon._450_say)
			end
		end

		when 6051.kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 14 begin
			notice_multiline(gameforge.flame_dungeon._460_notice,d.notice)
			notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
			flame_dungeon.level_clear()
		end

		when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 15 begin -- 5레벨 봉인석 열쇠 드랍
			local i = number(1, 30) -- 30분의 1 확률로 열쇠드랍
			if i == 1 then
				game.drop_item (30330, 1)
			end
		end
		when 20386.take with flame_dungeon.is_flamed(d.get_map_index()) and item.vnum == 30330 and d.getf("level") == 15 begin -- 5레벨 진짜열쇠 먹었을때
			local setting = flame_dungeon.setting()
			if npc.get_vid() == d.get_unique_vid("stone5_1") then -- 첫번째 꺼는 선행되어야 할 일이 필요없으니 찾자마자 제거해줌
				npc.purge()
				item.remove()
				say(gameforge.flame_dungeon._470_say)
				d.setf("stonekill",2) -- 2번 돌을 죽여라
				if d.count_monster() < 100 then
					d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_2") then 
				if d.getf("stonekill") == 2 then -- 2번돌을 죽일 차롄데 2번돌에게 열쇠를 먹였을 때
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._480_say)
					d.setf("stonekill",3)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("2번")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_3") then
				if d.getf("stonekill") == 3 then
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._500_say)
					d.setf("stonekill",4)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("3번")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_4") then
				if d.getf("stonekill") == 4 then
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._510_say)
					d.setf("stonekill",5)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
				--	say("4번")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_5") then
				if d.getf("stonekill") == 5 then
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._520_say)
					d.setf("stonekill",6)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("5번")
				end
			elseif npc.get_vid() == d.get_unique_vid("stone5_6") then
				if d.getf("stonekill") == 6 then
					npc.purge()
					item.remove()
					say(gameforge.flame_dungeon._530_say)
					d.setf("stonekill",7)
					if d.count_monster() < 100 then
						d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
					end
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("6번")
				end
			else 
				if d.getf("stonekill") == 7 then
					npc.purge()
					item.remove()
					notice_multiline(gameforge.flame_dungeon._440_notice,d.notice)
					notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
					flame_dungeon.level_clear()
				else
					item.remove()
					say(gameforge.flame_dungeon._490_say)
			--		say("7번")
				end
			end
		end

		when 8057.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==16 begin -- 망마석 파괴했을 때
			notice_multiline(gameforge.flame_dungeon._540_notice,d.notice)
			notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
			flame_dungeon.level_clear()
		end

		when 6091.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==17 begin -- 보스 죽였을때
			notice_multiline(gameforge.flame_dungeon._550_notice,d.notice)
			notice_multiline(gameforge.flame_dungeon._560_notice,d.notice)
			server_timer("dungeon_end_timer", 60,d.get_map_index())	
			flame_dungeon.level_clear()
			
			-- 파티원 중, 야마천 잡는 퀘스트(104렙, 105렙 퀘스트) 진행중인 사람이 있으면 퀘스트 클리어 되도록.
			if party.is_party() then
				party.setf("flame_dungeon_boss_kill_count", 1)
			end
			
		end
	end
end

 

this quest dont work in 2x floor

  • Love 1

Share this post


Link to post

Very nice, but...

local str = slowa[vnum][1]..""..slowa[vnum][2]..""..slowa[vnum][3]..""..slowa[vnum][4]..""..slowa[vnum][5]..""..slowa[vnum][6]

=

local str = slowa[vnum][1]..slowa[vnum][2]..slowa[vnum][3]..slowa[vnum][4]..slowa[vnum][5]..slowa[vnum][6]

Anyway, good job.

  • Love 2

Share this post


Link to post

Very nice, but...

local str = slowa[vnum][1]..""..slowa[vnum][2]..""..slowa[vnum][3]..""..slowa[vnum][4]..""..slowa[vnum][5]..""..slowa[vnum][6]

=

local str = slowa[vnum][1]..slowa[vnum][2]..slowa[vnum][3]..slowa[vnum][4]..slowa[vnum][5]..slowa[vnum][6]

Anyway, good job.

Yes, thanks. First i use a|b|c|d|e|f and I want split it but I refused this idea.

Share this post


Link to post

Nice quest and thanks!
But i didn had the group of the monsters...

 

here for those who dont have them
 

Group bp_group_01


{
Vnum 33360
Leader fire_ghost1 6001
1 fire_ghost1 6001
2 fire_ghost1 6001
}

Group bp_group_02
{
Vnum 33361
Leader fire_tiger_boss1 6002
1 fire_tiger_boss1 6002
2 fire_tiger_boss1 6002
3 fire_ghost1 6001
}

Group bp_group_03
{
Vnum 33362
Leader fire_man1 6003
1 fire_tiger_boss1 6002
2 fire_tiger_boss1 6002
3 fire_ghost1 6001
4 fire_ghost1 6001
}

Group bp_group_04
{
Vnum 33363
Leader fire_king1 6005
1 fire_knight1 6004
2 fire_knight1 6004
3 fire_knight1 6004
4 fire_knight1 6004
}

Group bp_group_05
{
Vnum 33364
Leader fire_king1 6005
1 fire_king1 6005
2 fire_king1 6005
}

Group bp_group_06
{
Vnum 33365
Leader firegolem_soldier 6006
1 firegolem_soldier 6006
2 firegolem_soldier 6006
3 firegolem_soldier 6006
}

Group bp_group_07
{
Vnum 33366
Leader firegolem_general 6008
1 firegolem_magician 6005
2 firegolem_magician 6005
2 firegolem_magician 6005
2 firegolem_magician 6005
}

Group bp_group_08
{
Vnum 33367
Leader firegolem_general 6008
1 firegolem_soldier 6006
2 firegolem_soldier 6006
3 firegolem_soldier 6006
4 firegolem_soldier 6006
}

Group bp_group_09
{
Vnum 33368
Leader firegolem_general 6005
1 fire_king1 6005
2 fire_king1 6005
3 firegolem_magician 6005
4 firegolem_magician 6005
5 firegolem_magician 6005
}

Group bp_group_10
{
Vnum 33369
Leader firegolem_boss 6009
1 fire_king1 6005
2 firegolem_magician 6005
3 firegolem_magician 6005
4 firegolem_soldier 6006
5 firegolem_soldier 6006
}

Group bp_group_05
{
Vnum 33370
Leader yamachun_boss 6091
1 firegolem_boss 6009
2 firegolem_boss 6009
3 firegolem_boss 6009
}



 

  • Love 1

Share this post


Link to post

it works with old cores ! Nice Work !

Share this post


Link to post

hi thx for the quest but i have error

 

WHEN  : wroc.timer
Calls undeclared function! :
kodBramy
Abort (core dumped)

WHEN  : wroc.timer
Calls undeclared function! :
kodBramy
Abort (core dumped)

 

Share this post


Link to post
1 hour ago, HETRO said:

hi thx for the quest but i have error

 

WHEN  : wroc.timer
Calls undeclared function! :
kodBramy
Abort (core dumped)


WHEN  : wroc.timer
Calls undeclared function! :
kodBramy
Abort (core dumped)

 

Go into quest_functions in your quest folder and add this:
kodBramy

Share this post


Link to post
il y a une heure, WorldOby a dit :

Link dead ! Réupload ?

If you're under r2089 then you should use the quest given at the first post, otherwise you can use the one below its post.

Here's a reupload, it contains only the regens, not the map, but you can find it almost everywhere, I used to release it back in 2014 on epvp and FE ! :)

 

FR : Vu que t'es Français passe en MP si tu ne comprends pas ou si tu as besoin d'aide ! :)

EN : As you're French you can PM me if you don't understand or if you need some help ! :)

Share this post


Link to post
Il y a 23 heures, Galet a dit :

If you're under r2089 then you should use the quest given at the first post, otherwise you can use the one below its post.

Here's a reupload, it contains only the regens, not the map, but you can find it almost everywhere, I used to release it back in 2014 on epvp and FE ! :)

 

FR : Vu que t'es Français passe en MP si tu ne comprends pas ou si tu as besoin d'aide ! :)

EN : As you're French you can PM me if you don't understand or if you need some help ! :)

Thank's you ! / Merci 

  • Love 1

Share this post


Link to post

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  
  • Recently Browsing   0 members

    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.