Jump to content

Recommended Posts

Hey guys, i wanted to use the official warp ring quest, but i dont know how to create categorys in a clean way, can someone help me?

 

quest ring_warp begin
	state start begin
		when 10031.sig_use begin
		--	if pc.get_level() < item.get_value (0) then
		--		say("·¹º§ÀÌ ³·¾Æ ¸ø°¡³×")
		--		say("")
		--		return
		--	end
		

			local empire = pc.get_empire()

			local max_use = item.get_value(0)
			local n = item.get_socket (0)
			if n >= max_use then
				say ("Vorgang abbrechen. ")
				return
			end

			say(string.format("Teleportieren zu (verbleibende Sprünge: %d) ", max_use -n))
			local sub_set = 0
			
			local town1={
					"Yongan ",
					"Joan ",
					"Pyungmoo ",
				}

			local town2={
					"Yayang ",
					"Bokjung ",
					"Bakra ",
				}
			sub_set = select(town1[empire],town2[empire],"Tal von Seungryong ", "Yongbi-Wüste ", "Berg Sohan ","Doyyumhwan ","Abbrechen ")
			if sub_set == 7 then -- ´Ý±â
				return
			end

			local warp = {
				{ -- empire town -1
				
					{ 474300 , 954800 },
					{ 63800 , 166400 },
					{ 959900 , 269200 },
				},
				{ -- empire town -2
					{ 353100 , 882900},
					{ 145500 , 240000 },
					{ 863900 , 246000 },
					
				},
				-- 64 map_n_threeway
				{
					{ 402100, 673900 },
					{ 270400, 739900 },
					{ 321300, 808000 },
				},
				-- 63 metin2_map_n_desert_01
				{
					{ 217800, 627200 },
					{ 221900, 502700 },
					{ 344000, 502500 },
				},
				-- 61 map_n_snowm_01
				{
					{ 434200, 290600 },
					{ 375200, 174900 },
					{ 491800, 173600 },
				},
				-- 62 metin2_map_n_flame_01
				{
					{ 599400, 756300 },
					{ 597800, 622200 },
					{ 730700, 689800 },
				},
			}

			if not pc.warp(warp[sub_set][empire][1], warp[sub_set][empire][2]) then
				return
			end

			item.set_socket(1, get_global_time() + item.get_value(1))
			if n == max_use - 1 then
				item.remove()
			else
				item.set_socket(0, n + 1)
			end
		end --when
 	end -- end_of_state
end -- end_of_quest

 

Link to comment
https://metin2.dev/topic/19817-question-about-a-warpring-quest/
Share on other sites

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