Jump to content
metin2dev
Mali61

c++ Notice System With Timer

Recommended Posts

 

Spoiler

//syntax:
#NewNotice        
# message    yourmessage(._.->space)
# message    secondmessage(._.->space)
# gmlvl    GM_LEVEL(0-5)
# minlvl    minumumlevel
# maxlvl    maximumlevel
# mapidx    forkedmapindex    
# mapidx    forkedmapindex    
# chat_type    Chat Type(0-4)
# day_type    Day Type(0-1) 0->Month Days(0-31), 1->Week Days(0-6)
# date    Day    
# hour    Hour    
# min    Minute    
# end

//Note: if you remove day, message will repeat everyday
//Note2: if you remove hour, message will repeat everyhour
//Note3: you can remove mapidx for everymap
//Note4: if you remove(chat_type, day_type, minlvl, maxlvl, gmlvl) system will reset default values
//Note5: you can add as many (messages, date, hour, min, mapidx) as you want

 

 

https://github.com/blackdragonx61/Metin2

  • Like 4

Share this post


Link to post
Share on other sites

That's why metin2 is cancerous community..we stole code/ideas from another guys and put inside without any mention or thanks for it, doesn't importantly if you post free or not.

1.

Spoiler

void CTournamentPvP::Destroy()
{
	ClearSTDMap();
	if (running_event != NULL)
	{
		event_cancel(&running_event);
		running_event = NULL;
	}
}

void DestroyAutoNotice()
{
	message_data.clear();
	if (running_event != NULL)
	{
		event_cancel(&running_event);
		running_event = NULL;
	}
}

 

2.

Spoiler

bool CTournamentPvP::Initialize()
{
	if (running_event != NULL)
	{
		event_cancel(&running_event);
		running_event = NULL;
	}

	TournamentPvPInfoData* info = AllocEventInfo<TournamentPvPInfoData>();
	info->pTournament = this;
	running_event = event_create(tournament_timer, info, PASSES_PER_SEC(30));
}

void InitAutoNotice()
{
	if (running_event != NULL)
	{
		event_cancel(&running_event);
		running_event = NULL;
	}

	AutoNoticeInfoData* info = AllocEventInfo<AutoNoticeInfoData>();
	running_event = event_create(automatic_event_timer, info, PASSES_PER_SEC(1));
}

 

3.

Spoiler

void CheckAutoNotice()
{
	time_t cur_Time = time(NULL);
	struct tm vKey = *localtime(&cur_Time);
}

void CTournamentPvP::PrepareAnnouncement()
{
	time_t cur_Time = time(NULL);
	struct tm vKey = *localtime(&cur_Time);
}

 

There are more..

You know very well about what i'm talking, already there exist more guys which take system a, b from C and make some changes and adapt it for another things.
I don't will talk about the rest of code which is already non-sense, already all people can see it. 
Look:

Already you and this guy stole the same concept of call event and check real time from Tournament PvP and do some changes, great coders.

Good luck "Developer of future."

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites
19 minutes ago, Tasho said:

That's why metin2 is cancerous community..we stole code/ideas from another guys and put inside without any mention or thanks for it, doesn't importantly if you post free or not.

1.

  Reveal hidden contents


void CTournamentPvP::Destroy()
{
	ClearSTDMap();
	if (running_event != NULL)
	{
		event_cancel(&running_event);
		running_event = NULL;
	}
}

void DestroyAutoNotice()
{
	message_data.clear();
	if (running_event != NULL)
	{
		event_cancel(&running_event);
		running_event = NULL;
	}
}

 

2.

  Reveal hidden contents


bool CTournamentPvP::Initialize()
{
	if (running_event != NULL)
	{
		event_cancel(&running_event);
		running_event = NULL;
	}

	TournamentPvPInfoData* info = AllocEventInfo<TournamentPvPInfoData>();
	info->pTournament = this;
	running_event = event_create(tournament_timer, info, PASSES_PER_SEC(30));
}

void InitAutoNotice()
{
	if (running_event != NULL)
	{
		event_cancel(&running_event);
		running_event = NULL;
	}

	AutoNoticeInfoData* info = AllocEventInfo<AutoNoticeInfoData>();
	running_event = event_create(automatic_event_timer, info, PASSES_PER_SEC(1));
}

 

3.

  Reveal hidden contents


void CheckAutoNotice()
{
	time_t cur_Time = time(NULL);
	struct tm vKey = *localtime(&cur_Time);
}

void CTournamentPvP::PrepareAnnouncement()
{
	time_t cur_Time = time(NULL);
	struct tm vKey = *localtime(&cur_Time);
}

 

There are more..

You know very well about what i'm talking, already there exist more guys which take system a, b from C and make some changes and adapt it for another things.
I don't will talk about the rest of code which is already non-sense, already all people can see it. 
Look:

Already you and this guy stole the same concept of call event and check real time from Tournament PvP and do some changes, great coders.

Good luck "Developer of future."

Cry bitch

Share this post


Link to post
Share on other sites

don't forget sysinstall/configure/Time Zone

After select UTC

Share this post


Link to post
Share on other sites
1 hour ago, Mali61 said:

So?

  s.every(1min, []() { CHAT_TYPE_NOTICE("MyNotice"); }); // Pseudocode

 

Share this post


Link to post
Share on other sites
19 minutes ago, Fleon said:

  s.every(1min, []() { CHAT_TYPE_NOTICE("MyNotice"); }); // Pseudocode

 

But you can't set settings from txt, if you know that use why do you wrote? 

Share this post


Link to post
Share on other sites
On 3/20/2018 at 3:58 PM, Mali61 said:

But you can't set settings from txt, if you know that use why do you wrote? 

It's not like you should always bitch about everything that we say.

I'm sharing on the subject a library that can be used as an alternative, then people are free to choose between what they want, i'm not trying anything here or either saying anything bad to you.

Share this post


Link to post
Share on other sites

at least doing something and sharing it to the community. what are you guys doing? Do you thank "WEBZEN YMIR GAMES" for the files you use? If we look at it from that point of view, the whole Metin2 community is a thief.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×