Jump to content

Recommended Posts

  • 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
Share on other sites

  • Premium
--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
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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