Jump to content

Recommended Posts

  • Management
Just now, Aliremawi said:

open the map with world editor

choose no pvp and chose the area where you need no_pvp 

 

First: I want to disable on the whole map...

Second: That option doesn't block every kind of attack?

I want something done on source...

raw

raw

Link to comment
https://metin2.dev/topic/16317-disable-pvp-on-certain-maps/#findComment-90480
Share on other sites

  • Management
bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim)
{
	switch(ch->GetMapIndex())
	{
		case 113:
		case 219:
		case 240:
		case 351:
		case 352:
			return false;
	}

 

raw

raw

Link to comment
https://metin2.dev/topic/16317-disable-pvp-on-certain-maps/#findComment-90572
Share on other sites

2 hours ago, charparodar said:

bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim)
{
	switch(ch->GetMapIndex())
	{
		case 113:
		case 219:
		case 240:
		case 351:
		case 352:
			return false;
	}

 

Try

bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim)
{
	// »ó´ëąćŔĚ Á׾úŔ¸¸é Áß´ÜÇŃ´Ů.
	if (victim->IsDead())
		return false;

	switch(ch->GetMapIndex())
	{
		case 113:
		case 219:
		case 240:
		case 351:
		case 352:
			{
				if (victim->IsPC())
					return false;
			}
	}

...

 

  • Love 1
Link to comment
https://metin2.dev/topic/16317-disable-pvp-on-certain-maps/#findComment-90573
Share on other sites

  • Management
On 16/07/2017 at 0:14 AM, Den said:

Try


bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim)
{
	// »ó´ëąćŔĚ Á׾úŔ¸¸é Áß´ÜÇŃ´Ů.
	if (victim->IsDead())
		return false;

	switch(ch->GetMapIndex())
	{
		case 113:
		case 219:
		case 240:
		case 351:
		case 352:
			{
				if (victim->IsPC())
					return false;
			}
	}

...

 

Like this monsters doesn't attack the players...

raw

raw

Link to comment
https://metin2.dev/topic/16317-disable-pvp-on-certain-maps/#findComment-90621
Share on other sites

  • Management
Just now, Fleon said:

Then post the solution for everyone.

Are you seriously?

Did you read the whole post? Have you seen Den's posts? Have you seen the top answer? Thought soo...

raw

raw

Link to comment
https://metin2.dev/topic/16317-disable-pvp-on-certain-maps/#findComment-90703
Share on other sites

  • Premium
2 minutes ago, charparodar said:

Are you seriously?

Did you read the whole post? Have you seen Den's posts? Have you seen the top answer? Thought soo...

It`s not for me, i dont care.

But if you get into the solution then posting your code is a must for the others. (the whole func)

Link to comment
https://metin2.dev/topic/16317-disable-pvp-on-certain-maps/#findComment-90705
Share on other sites

  • Management
On 16/07/2017 at 0:22 AM, Den said:

Try


bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim)
{
	// »ó´ëąćŔĚ Á׾úŔ¸¸é Áß´ÜÇŃ´Ů.
	if (victim->IsDead())
		return false;

	switch(ch->GetMapIndex())
	{
		case 113:
		case 219:
		case 240:
		case 351:
		case 352:
			{
				if (victim->IsPC())
					return false;
			}
	}

...

 

This code with the top answer is the solution...

raw

raw

Link to comment
https://metin2.dev/topic/16317-disable-pvp-on-certain-maps/#findComment-90706
Share on other sites

  • Premium
6 minutes ago, charparodar said:

This code with the top answer is the solution...

A typical user doesnt read that far, he goes to the bottom of the page to see if it`s solved or not, it`s a common behavior.

Thanks for sharing, at least i hope now this question will not be spammed for at least 1/2 week

Link to comment
https://metin2.dev/topic/16317-disable-pvp-on-certain-maps/#findComment-90707
Share on other sites

  • 4 months later...
  • 3 years later...

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.