Jump to content

Recommended Posts

Hi Everybody!

Well, I am tryed the dragon lair quest qc with the server, but the quest not running perfectly.

When I am qc this quest avaiable this message:

--[[
# DUNGEON INFO #

Dungeon Name: Surgun Magarasi 2.Kat
Boss Name: Beran Setaou
Timer Count: 3 - Server Timer | 0 - PLAYER TIMER
Level Range: 75 - 120
Step Count: 1
Cooldown Time: 3

Ticket Vnum: NULL
Second Ticket Vnum: NULL

Map Index: 208
Base Cordinat: X = 8436 || Y = 10669

Entry Map Name: Surgun Magarasi 2.Kat
Entry Map Index: 73
Entry Base Cordinat: X = 1800 || Y = 12199

Boss Vnum: 2493
Guard Vnum: 30121

Mini Boss Vnums:

# DUNGEON INFO #

]]

quest dragonlair begin
	state start begin
		when 30121.chat.lc_quest("17") with pc.get_map_index() == 73 begin
			say_title(mob_name(30121))
			say(lc_quest("ENTER_DUNGEON"))
			local x = select(lc_quest("INDIVIDUAL"),lc_quest("PARTY"),lc_quest("CANCEL"))
			if x == 1 then
				say_title(mob_name(30121))
				say("")
				say(lc_quest("ALONE"))
				local c = select(lc_quest("YES"),lc_quest("CANCEL"))
				if c == 1 then

					if pc.get_level() < 75 then
						say_title(mob_name(30121))
						say("")
						say(lc_quest("LEVEL_ERROR"))
						return
					end

					if not pc.is_gm() and pc.getf("dragonlair","cooldown") > get_global_time() then
						local r_cooldown = pc.getf("dragonlair","cooldown") - get_global_time()
						say_title(mob_name(30121))
						say("")
						say(lc_quest("10"))
						say(r_cooldown..lc_quest("11"))
						return
					end

					if pc.count_item(25165) < 1 then
						say_title(mob_name(30121))
						say("")
						say(lc_quest("NO_KEY"))
						say_item_vnum(25165,1)
						return
					else
						pc.remove_item(25165,1)
						d.new_jump(208, 8436*100, 10669*100)
						d.setf("first_regen",1)
						d.setf("DungeonBlock",1)
					end
				else
					return
				end
			elseif x == 2 then
				say_title(mob_name(30121))
				say("")
				say(lc_quest("GROUP"))
				local c = select(lc_quest("YES"),lc_quest("CANCEL"))
				if c == 1 then
					if not party.is_party() then
						say_title(mob_name(30121))
						say("")
						say(lc_quest("NO_KEY"))
						return
					end

					if party.get_near_count() < 2 then
						say_title(mob_name(30121))
						say("")
						say(lc_quest("NO_PARTY"))
						return
					end

					local user_fail_level = {}
					local user_fail_ticket = {}
					local user_fail_cooldown = {}
					local ticketCheck = true
					local LevelCheck = true
					local CooldownCheck = true
					local pids = {party.get_member_pids()}

					for i, pid in next, pids, nil do
						q.begin_other_pc_block(pid)
						if pc.get_level() < 75 then
							table.insert(user_fail_level, pc.get_name())
							LevelCheck = false
						end
						if pc.count_item(25165) < 1 then
							table.insert(user_fail_ticket, pc.get_name())
							ticketCheck = false
						end
						if pc.getf("dragonlair","cooldown") > get_global_time() then
							table.insert(user_fail_cooldown, pc.get_name())
							CooldownCheck = false
						end
						q.end_other_pc_block()
					end

					if ticketCheck == false then
						say(lc_quest("NO_MEMBER_KEY "))
						local a = 1
						for i, name in next, user_fail_ticket, nil do
							say(string.format("%d. %s",a,name))
							a = a+1
						end
						say("")
						say_item_vnum(25165,1)
						return
					end

					if LevelCheck == false then
						say(lc_quest("LOW_LEVEL"))
						local a = 1
						for i, name in next, user_fail_level, nil do
							say(string.format("%d. %s",a,name))
							a = a+1
						end
						say("")
						--say("QUEST_MISSION_GEREKEN_LEVEL_75_105")
						return
					end

					if CooldownCheck == false then
						say(lc_quest("COOLDOWN"))
						local a = 1
						for i, name in next, user_fail_cooldown, nil do
							say(string.format("%d. %s",a,name))
							a = a+1
						end
						return
					end

					if ticketCheck == true and LevelCheck == true and CooldownCheck == true then
						for i, pid in next, pids, nil do
							q.begin_other_pc_block(pid)
							if pc.count_item(25165) >= 1 then
								pc.remove_item(25165,1)
							end
							q.end_other_pc_block()
						end
						d.new_jump_party(208, 8436, 10669)
						d.setf("first_regen",1)
						d.setf("DungeonBlock",1)
					end
				else
					return
				end
			end
		end

		when logout with pc.get_map_index() >= 2080000 and pc.get_map_index() <= 2089990 begin
			if d.getf("DungeonBlock") == 1 then
				pc.setf("dragonlair","map",d.get_map_index())
				pc.setf("dragonlair","time",get_global_time()+5*60)
				pc.setf("dragonlair","channel",pc.get_channel_id())
			else
				pc.setf("dragonlair","map",0)
				pc.setf("dragonlair","time",0)
				pc.setf("dragonlair","channel",0)
			end
			--pc.warp(1800*100,12199*100)
		end

		when login with pc.get_map_index() >= 2080000 and pc.get_map_index() <= 2089990 begin
			pc.set_warp_location_local(73, 1800, 12199)
			local real_time = get_global_time()
			local index = d.get_map_index()
			if index >= 2080000 and index <= 2089990 then
				if not pc.is_gm() and pc.getf("dragonlair","cooldown") > get_global_time() then
					pc.setf("dragonlair","map",0)
					pc.setf("dragonlair","time",0)
					pc.setf("dragonlair","channel",0)
					pc.warp(1800*100,12199*100)
					return
				end
				if d.getf("DungeonBlock") == 1 then
					if d.getf("first_regen") == 1 then
						server_timer("beran_1",1,index)
					end
					cmdchat(string.format("RefreshDungeonTimer %d %d",1,d.getf("real_time")-real_time))
				else
					pc.warp(1800*100,12199*100)
				end
			end
		end

		when beran_1.server_timer begin
			local index = get_server_timer_arg()
			if d.select(index) then
				if d.getf("first_regen") == 1 then
					d.setf("first_regen",0)
					d.spawn_mob(8034, 188, 178)
					d.spawn_mob(8034, 177, 178)
					d.spawn_mob(8034, 177, 168)
					d.spawn_mob(8034, 188, 168)
					d.mission_notice(index,"1005")
					server_timer("beran_full_timer", 60*30,index)
					d.setf("real_time",get_global_time()+60*30)
					GetMissionInfo(1,60*30)
					d.regen_file("data/dungeon/dragonlair/skia_deliboss.txt")
					d.setf("stones",0)
					d.setf("step",0)
				end
			end
		end

		when beran_full_timer.server_timer begin
			if d.select(get_server_timer_arg()) then
				d.setf("DungeonBlock",0)
				d.setf("IsOn",0)
				d.setf("step",0)
				d.setf("stones",0)
				d.setf("level",0)
				d.setf("real_time",0)
				d.global_warp_all_to_base(1800*100,12199*100,get_server_timer_arg(),1)
			end
		end

		when 8034.kill with pc.get_map_index() >= 2080000 and pc.get_map_index() <= 2089990 begin
			local new = d.getf("stones")+1
			d.setf("stones",new)
			if new == 4 then
				d.setf("stones",0)
				local step = d.getf("step")+1
				d.setf("step",step)
				if step == 3 then
					d.mission_notice(index,"1010")
					d.spawn_group(2430, 183, 173,0,1,1)
				else
					d.spawn_mob(2491, 156, 174)
				end
			end
		end

		when 2491.kill with pc.get_map_index() >= 2080000 and pc.get_map_index() <= 2089990 begin
			d.spawn_mob(8034, 188, 178)
			d.spawn_mob(8034, 177, 178)
			d.spawn_mob(8034, 177, 168)
			d.spawn_mob(8034, 188, 168)
		end

		when 2493.kill with pc.get_map_index() >= 2080000 and pc.get_map_index() <= 2089990 begin
			d.spawn_mob(30130, pc.get_local_x()-5, pc.get_local_y()+5)
			server_timer("beran_dead_timer",1,d.get_map_index())
			do_battlepass_mission(6, 1, 208)
			d.setf("dungeon_empire", pc.get_empire())--add DUNGEON_COOLDOWN_EVENT=5
			end

		when beran_dead_timer.server_timer begin
			local index = get_server_timer_arg()
			if d.select(index) then
				if d.getf("DungeonBlock") == 1 then
					d.setf("DungeonBlock",0)
					d.mission_notice(index,"1003")
					GetMissionInfo(1,60)
					d.setf("IsOn",0)
					d.setf("step",0)
					d.setf("stones",0)
					d.setf("level",0)
					d.setf("real_time",0)
					if game.check_event(5, d.getf("dungeon_empire")) then --add DUNGEON_COOLDOWN_EVENT=5
						d.setqf2("dragonlair","cooldown",get_global_time()+30*60)
					else
						d.setqf2("dragonlair","cooldown",get_global_time()+60*60)
					end
					d.track_update(2493)
					clear_server_timer("beran_full_timer",index)
					clear_server_timer("beran_1",index)
					--clear_server_timer("beran_dead_timer",index)
					d.global_warp_all_to_base(1800*100,12199*100,index,60)
				end
			end
		end

		when 30121.chat.lc_quest("BACK_DUNGEON") with pc.getf("dragonlair","map") >= 1 begin
			if get_global_time() > pc.getf("dragonlair","time") then
				say_title(mob_name(30121))
				say("")
				say(lc_quest("CANT_BACK"))
				pc.setf("dragonlair","map",0)
				pc.setf("dragonlair","time",0)
				pc.setf("dragonlair","channel",0)
				dungeon_manager.UpdateDungeonTime()
				return
			end

			local dungeonChannel = pc.getf("dragonlair","channel")
			if dungeonChannel == pc.get_channel_id() then
				local dungeonMap = pc.getf("dragonlair","map")
				if d.select(dungeonMap) then
					say_title(mob_name(30121))
					say("")
					say(lc_quest("BACK_QUESTION"))
					local x = select(lc_quest("YES"),lc_quest("CANCEL"))
					if x == 1 then
						pc.warp(8436*100,10669*100, dungeonMap)
					else
						return
					end
				else
					say_title(mob_name(30121))
					say("")
					say(lc_quest("DUNGEON_REMOVE"))
					pc.setf("dragonlair","map",0)
					pc.setf("dragonlair","time",0)
					pc.setf("dragonlair","channel",0)
					dungeon_manager.UpdateDungeonTime()
					return
				end
			else
				say_title(mob_name(30121))
				say("")
				say(lc_quest("NO_CH"))
				say(lc_quest(string.format("NO_CH2 %d", dungeonChannel)))
			end
		end
	end
end

./qc dragonlair.quest this message :
 

QUEST : dragonlair
STATE : start
WHEN  : 30121.chat (lc_quest)
dragonlair.lua:32:when doesn't have begin-end clause. (()
Abort (core dumped)


Where the problem this quest?

Link to comment
https://metin2.dev/topic/30471-dragolair-quest-help/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.