Jump to content

Disable PvP on certain maps


Go to solution Solved by Den,

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 13

      Metin2 Closed Beta Content (2003-2004)

    2. 25

      [SRC] Metin2 on LINUX - The Old Metin2 Project

    3. 2

      United/Club/Midgard serverfiles?

    4. 13

      Metin2 Closed Beta Content (2003-2004)

    5. 13

      Metin2 Closed Beta Content (2003-2004)

    6. 0

      Football Ground

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.