Jump to content

Recommended Posts

9 minutes ago, iBeast said:

Then switch map to CH99 and then quest function with timer and after timer ends, warp player back to town.

  

Hope I helped, iBeast

I do not know how to do the timer the way the player is taken to town.

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107587
Share on other sites

quest special map
	state start begin
		when xyz.chat."Take me to the map" begin
			say("Do you want to enter?")
			local s = select ("Yes", "No")
			if s == 2 then return end
			if s == 1 then pc.warp(x, y) timer("leave_timer", secs) end --Warping and setting timer
		end --when
		
		when "leave_timer".timer begin --When runs out - returns to basic position timer
			pc.warp(x, y)
		end --when
	end --state
end --quest

Try it this way... Code is not tested, only "sample".

 

iBeast

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107588
Share on other sites

3 minutes ago, iBeast said:

quest special map
	state start begin
		when xyz.chat."Take me to the map" begin
			say("Do you want to enter?")
        	local s = select ("Yes", "No")
			if s == 2 then return end
			if s == 1 then pc.warp(x, y) timer("leave_timer", secs) end --Warping and setting timer
		end --when
		
		when "leave_timer".timer begin --When runs out - returns to basic position timer
			pc.warp(x, y)
		end --when
	end --state
end --quest

 

my edit

quest special map
	state start begin
		when xyz.chat."Take me to the map" begin
			say("Do you want to enter?")
        	local s = select ("Yes", "No")
			if s == 2 then return end
			if s == 1 then pc.warp(772800, 774700) timer("leave_timer", 10) end --Warping and setting timer
		end --when
		
		when "leave_timer".timer begin --When runs out - returns to basic position timer
			warp_to_village()
		end --when
	end --state
end --quest

enjoy?

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107589
Share on other sites

1 minute ago, amosth said:

my edit


quest special map
	state start begin
		when xyz.chat."Take me to the map" begin
			say("Do you want to enter?")
        	local s = select ("Yes", "No")
			if s == 2 then return end
			if s == 1 then pc.warp(772800, 774700) timer("leave_timer", 10) end --Warping and setting timer
		end --when
		
		when "leave_timer".timer begin --When runs out - returns to basic position timer
			warp_to_village()
		end --when
	end --state
end --quest

enjoy?

You have not edited NPC ID in chat function.

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107590
Share on other sites

Just now, iBeast said:

You have not edited NPC ID in chat function.

sorry.

quest special map
	state start begin
		when 20006.chat."Take me to the map" begin
			say("Do you want to enter?")
        	local s = select ("Yes", "No")
			if s == 2 then return end
			if s == 1 then pc.warp(772800, 774700) timer("leave_timer", 10) end --Warping and setting timer
		end --when
		
		when "leave_timer".timer begin --When runs out - returns to basic position timer
			warp_to_village()
		end --when
	end --state
end --quest

is correct? warp_to_village() to leave time?

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107591
Share on other sites

Just now, amosth said:

sorry.


quest special map
	state start begin
		when 20006.chat."Take me to the map" begin
			say("Do you want to enter?")
        	local s = select ("Yes", "No")
			if s == 2 then return end
			if s == 1 then pc.warp(772800, 774700) timer("leave_timer", 10) end --Warping and setting timer
		end --when
		
		when "leave_timer".timer begin --When runs out - returns to basic position timer
			warp_to_village()
		end --when
	end --state
end --quest

is correct? warp_to_village() to leave time?

(As I wrote... It is not tested, so  theoretically yes)

And yes, when timer runs out, it will do "commands" in that "when".

 

iBeast

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107592
Share on other sites

13 minutes ago, iBeast said:

(As I wrote... It is not tested, so  theoretically yes)

 And yes, when timer runs out, it will do "commands" in that "when".

  

iBeast

not work =/

my quest complete

	when 20006.chat."test" with pc.get_map_index()== 1 or pc.get_map_index() == 21 or pc.get_map_index() == 41 begin
		----"111111222222333333444444555555666666777777888888999999000000"
	    say_title("Mirine:")
		say("")
	    say("test")
		say("")
		local lab  = select("Enter", "Exit")
		if lab == 1 then
		if pc.count_item(2498) >= 1 then
		pc.give_item2("2499",1)
		pc.remove_item("2498",1)
		pc.warp(772800,774700)
		timer("leave_timer", 10)
		else
	    say_title("Mirine:")
		say("")
		say("Not item sorry =/")
		say("")
		end
		end
		if lab == 2 then
		return
		end
	end

	when "leave_timer".timer begin --When runs out - returns to basic position timer
		--warp_to_village()
		say("teste")
	end --when	

 

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107593
Share on other sites

1 minute ago, amosth said:

not work =/

my quest complete


	when 20006.chat."Labirinto" with pc.get_map_index()== 1 or pc.get_map_index() == 21 or pc.get_map_index() == 41 begin
		----"111111222222333333444444555555666666777777888888999999000000"
	    say_title("Mirine:")
		say("")
	    say("test")
		say("")
		local lab  = select("Enter", "Exit")
		if lab == 1 then
		if pc.count_item(2498) >= 1 then
		pc.give_item2("2499",1)
		pc.remove_item("2498",1)
		pc.warp(772800,774700)
		timer("leave_timer", 10)
		else
	    say_title("Mirine:")
		say("")
		say("Not item sorry =/")
		say("")
		end
		end
		if lab == 2 then
		return
		end
	end

	when "leave_timer".timer begin --When runs out - returns to basic position timer
		--warp_to_village()
		say("teste")
	end --when	

 

Add me on Skype (contact on my website).

I will look at it.

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107594
Share on other sites

  • Premium
5 hours ago, iBeast said:

quest special map
	state start begin
		when xyz.chat."Take me to the map" begin
			say("Do you want to enter?")
			local s = select ("Yes", "No")
			if s == 2 then return end
			if s == 1 then pc.warp(x, y) timer("leave_timer", secs) end --Warping and setting timer
		end --when
		
		when "leave_timer".timer begin --When runs out - returns to basic position timer
			pc.warp(x, y)
		end --when
	end --state
end --quest

Try it this way... Code is not tested, only "sample".

 

iBeast

You can't put pc functions inside of global functions, it will crash the server.

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107604
Share on other sites

1 hour ago, Mário. said:

You can't put pc functions inside of global functions, it will crash the server.

I cant use it only inside of server_timer I think. "Timer" is player related...
But I am not sure... It was only sample.

iBeast

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107606
Share on other sites

It is simple like a nail.

quest special_map begin
	state start begin	
		when 20006.chat."test" with pc.get_map_index()== 1 or pc.get_map_index() == 21 or pc.get_map_index() == 41 begin
			say_title("Mirine:")
			say("")
			say("test")
			say("")
			if select("Enter", "Exit") == 2 then return end
			if pc.count_item(2498) >= 1 then
				pc.remove_item("2498",1)
				pc.warp(x ,x ) -- Your coordinates are going here
				pc.setqf("duration",get_time()+ 60 * 20) -- The maximum duration the player can be on the map (60 * 20 = 20 minutes)
			else
				say_title("Mirine:")
				say("")
				say("Not item sorry =/")
				say("")
			end
		end

		when login or enter with pc.get_map_index() == x begin -- Put here the index of your special map
			loop_timer("check", 1)
		end
		
		when check.timer begin
			if get_time() > pc.getqf("duration") then
				warp_to_village()
			end
		end
	end
end
Quote

You can't put pc functions inside of global functions, it will crash the server.

The timer and loop_timer are player related. You can use any player related quest command.

  • Love 1
Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107618
Share on other sites

On 10/21/2018 at 11:50 AM, Xploitz said:

It is simple like a nail.


quest special_map begin
	state start begin	
		when 20006.chat."test" with pc.get_map_index()== 1 or pc.get_map_index() == 21 or pc.get_map_index() == 41 begin
			say_title("Mirine:")
			say("")
			say("test")
			say("")
			if select("Enter", "Exit") == 2 then return end
			if pc.count_item(2498) >= 1 then
				pc.remove_item("2498",1)
				pc.warp(x ,x ) -- Your coordinates are going here
				pc.setqf("duration",get_time()+ 60 * 20) -- The maximum duration the player can be on the map (60 * 20 = 20 minutes)
			else
				say_title("Mirine:")
				say("")
				say("Not item sorry =/")
				say("")
			end
		end

		when login or enter with pc.get_map_index() == x begin -- Put here the index of your special map
			loop_timer("check", 1)
		end
		
		when check.timer begin
			if get_time() > pc.getqf("duration") then
				warp_to_village()
			end
		end
	end
end

The timer and loop_timer are player related. You can use any player related quest command.

Nice!!! Thanks!! 

One question.. the dc map return to map count time?

Link to comment
https://metin2.dev/topic/19787-time-in-map-quest/#findComment-107748
Share on other sites

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.