Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • 0

Metin2 quest func where you can detect location



Hey folks, I'm new to this and trying to experiment with metin2 quests. Does anyone know how to add the location detection function to a quest? For example, do you remember the horse/pony level-up (lv. 1-10) quest on the official servers? TIA!

Link to post

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

    state training_frame_purple_step5 begin
        when letter begin
            target.pos("__TARGET__", 490, 560, 62, "")
        when letter begin
        when button or info begin
        when 22000.use or 22010.use begin
        when __TARGET__.target.arrive begin

        when unmount begin


I marked with red what you're looking for.

(local_x, local_y, mapindex when you set the target's location)


If you don't want to make a target (like treasure hunting or something) then you can use these quest function:


I just wrote an example quest for hidden treasure hunting:

quest lost_treasure begin
	state start begin
		when login with pc.get_map_index() == 255 and pc.getqf("treasure") == 0 begin
			loop_timer("hidden_treasure", 3)
			chat("Search the hidden spot!")
		when hidden_treasure.timer with pc.getqf("treasure") == 0 begin
			if pc.get_local_x() >= 100 and if pc.get_local_x() <= 150 and pc.get_local_y() >= 50 and pc.get_local_y() <= 100 then
				chat("You found the area!")

So if the user go to the rectangle (x: 100,150; y: 50, 100) he'll get gold only once.

It uses loop_timer (3sec) but i suppose it is one time or event quest so it'll be good.

Edited by TMP4 (see edit history)
  • Love 1
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

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