Jump to content

[Quest] Automatic Day and Night on the server


xpro
 Share

Recommended Posts

  • Administrator

This quest will automatically change from day to night and vice versa depending on the time. @-)

- When it is 19:00, it will be night
- When it is 08:00 it will be day.

quest dynamic_day_night begin
    state start begin
	when login or logout begin
	local ora = os.date("%H")
	if (os.date("%H")) >= "19" or (os.date("%H")) <= "07" then
		if game.get_event_flag("xmas_boom") == 0 then
		game.set_event_flag("xmas_boom", 1)
		end
		notice ( "[Server] At 8:00 a.m., the sun will once again pour its warm rays over these lands." )
	else
		if game.get_event_flag("xmas_boom") == 1 then
		game.set_event_flag("xmas_boom", 0)
		end
		notice ( "[At 19:00 the sun will set." )
	end
end
end
end
Link to comment
Share on other sites

  • Metin2PServers Bot

Thank you for the post xpro
Now we will take care that your topic reaches many people by adding tags

Forum Description : Metin2 Server Files, Server Files, Metin2 Private Servers, Metin2, Metin2 Systems, C++ and Python, Metin2 Home Pages, Metin2 Private Server, Metin2 Download, Metin2 Support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2.

Tags:  #Metin2 Server Files, #Server Files, #Metin2 Private Servers, #Metin2, #Metin2 Systems, #C++ and Python, #Metin2 Home Pages, #Metin2 Private Server, #Metin2 Download, #Metin2 Support, #Metin2 Forum, #Metin2 Pvp Servers, #Errors, #Bugs, #Requests, #Metin2 Pvp #Forum .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Terms of Service