Jump to content

Recommended Posts

Hi. I want to make a timer for my dungeon when I chat the npc and start the mission the time start running and after every 15 mins it reminds me of time.. and when the time is over it sends all players to village ... I'm bad with .timer thing so can you guys help me with this please? 

 

Thank you 

Link to comment
https://metin2.dev/topic/21458-dungeon-timer/
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hey! Here's an example:


        when 9003.chat."start timer" begin
            timer("your_timer_name", 60)
        end
        
        when your_timer_name.timer begin
            --Do something
        end

 

1 minute timer after you press "start timer" on general store

It's all lies

Link to comment
https://metin2.dev/topic/21458-dungeon-timer/#findComment-116333
Share on other sites

  • Active Member
--Init loop timer on dungeon entrance & dungeon limit timer
server_loop_timer("timenotice",300,d.get_map_index())  --Timer will be triggered each 300 seconds in this exact dungeon map, changing map will destroy timer
d.setf("time", get_global_time()+60*60*1) --This dungeon has a limit of 60 minutes

--When timer is triggered, inform players about time
when purgatorytimenotice.server_timer begin 
	if d.select(get_server_timer_arg()) then 
        local secondsLeft = (d.getf("time") - get_global_time()) 
        local minutesLeft = math.ceil(secondsLeft / 60) 
        d.notice("Time Left: "..minutesLeft.." minutes!") 
	end 
end 

 

Link to comment
https://metin2.dev/topic/21458-dungeon-timer/#findComment-116374
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.