Jump to content

Check Time Event


Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

This is the hidden content, please
( GitHub )


Somebody asked me about auto night and day change(server time). I coded simple func and added few features.

Auto night and day change:

Spoiler


makerange(6, 21)

Changeable {6,7,8,...,21}

Auto snow mode at winter:

Spoiler


for (auto i : { 1,2,12 })

January, February, December

Reminder for special days:

Spoiler


	std::map<std::string, dateinfo> specialdays	{
		// syntax: {"name", {day, month}}
		{"Pi Day", {14,3}},
	};

 

Announcement every hour

You can add new features like this.

  • Metin2 Dev 21
  • Dislove 1
  • Good 6
  • Love 1
  • Love 13

 

Link to comment
Share on other sites

  • Honorable Member
4 hours ago, ReFresh said:

@Mali61 I feel so sad, it's only for C++11 or above right?

actually I used structed bindings too. c++17 and greater required. But I created a tutorial for c++2a:

 

  • Metin2 Dev 1
  • Good 1
  • Love 1

 

Link to comment
Share on other sites

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.