Jump to content

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Active+ Member

quest afkauto begin
	state start begin
	end
	state run begin
		when login begin
			if(game.get_event_flag("afk_mod") == 0) then
				return
			else
				if(pc.getqf("afk") == 0) then
					pc.setqf("limit_time",get_time()+15*60)
					pc.setqf("afk",1)
					pc.setqf("localy",pc.get_local_y())
					pc.setqf("localx",pc.get_local_x())
					timer("Check",10)
				elseif(pc.getqf("afk") == 1 and not pc.is_polymorphed() and not pc.is_gm()) then
					if(get_time() >= pc.getqf("limit_time") and pc.getqf("localy") == pc.get_local_y() and pc.getqf("localx") == pc.get_local_x()) then
						command("logout")
						notice_in_map(pc.name.." Afk moduna geçmiştir.Bu yüzden oyundan çıkartıldı. [AFK-MOD] ")
						notice_all("Writer By : Mehmet")
						pc.setqf("afk",0)
					else
						timer("Check",10)
					end
				else
					timer("Check",10)
				end
			end
		end
		
		when Check.timer begin
			if(game.get_event_flag("afk_mod") == 0) then
				return
			else
				if(pc.getqf("afk") == 0) then
					pc.setqf("limit_time",get_time()+15*60)
					pc.setqf("afk",1)
					pc.setqf("localy",pc.get_local_y())
					pc.setqf("localx",pc.get_local_x())
				 elseif(pc.getqf("afk") == 1 and not pc.is_polymorphed()) then
					if(get_time() >= pc.getqf("limit_time") and pc.getqf("localy") == pc.get_local_y() and pc.getqf("localx") == pc.get_local_x()) then
						command("logout")
						notice_in_map(pc.name.." Afk moduna geçmiştir.Bu yüzden oyundan çıkartıldı. [AFK-MOD] ")
						notice_all("Writer by : Mehmet")
						pc.setqf("afk",0)
						cleartimer("Checkone")
						cleartimer("Check")						
					else
						timer("Checkone",10)
					end
				else
					timer("Checkone",10)
				end
			end
		end
		
		when Checkone.timer begin
			if(game.get_event_flag("afk_mod") == 0) then
				return
			else
				if(pc.getqf("afk") == 0) then
					pc.setqf("limit_time",get_time()+15*60)
					pc.setqf("afk",1)
					pc.setqf("localy",pc.get_local_y())
					pc.setqf("localx",pc.get_local_x())
				 elseif(pc.getqf("afk") == 1 and not pc.is_polymorphed()) then
					if(get_time() >= pc.getqf("limit_time") and pc.getqf("localy") == pc.get_local_y() and pc.getqf("localx") == pc.get_local_x()) then
						command("logout")
						notice_in_map(pc.name.." Afk moduna geçmiştir.Bu yüzden oyundan çıkartıldı. [AFK-MOD] ")
						notice_all("Writer by : Mehmet")
						pc.setqf("afk",0)
						cleartimer("Checkone")
						cleartimer("Check")
					else
						timer("Check",10)
					end
				else
					timer("Check",10)
				end
			end
		end 

 

Writed by Aveline, I hope that would be enough

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.