Jump to content

Disable Empire Attack


Go to solution Solved by Anyone,

Recommended Posts

Acum 10 ore, Ashok.N a spus:

Take a look at the NPC features. You can set the target as NPC if it is a different kingdom.

NPC features from where? 

All I know is to edit some things in database and make quests. 

How can I make kingdoms unable to attack each other even if they're on other's territory? 

Link to comment
Share on other sites

Acum 4 ore, Mandi a spus:

Open char_battle.cpp and search: CHARACTER::Attack and in this bool function you can put a condition for what do you want.

It's so simple, just try harder! This is for your own good. As you see no one doesn't give a sheet for what you want.

This doesn't mean that I should simply give up.

I don't know what to edit from there, I need more clues or something. 

Link to comment
Share on other sites

You are english? If you are, it's much more simple for you to do that, because it's about logic.. and it's in english language. For the people who doesn't know english it's much more harder.

Take a look https://metin2.download/picture/EYQ4zo1To7cOmr1RjjGj268RAok51v3c/.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

La 6/23/2017 la 23:01, Mandi a spus:

You are english? If you are, it's much more simple for you to do that, because it's about logic.. and it's in english language. For the people who doesn't know english it's much more harder.

Take a look https://metin2.download/picture/4877xpvT85q4mt4M47PqNXuL05v7rd28/.png

I know english and I also know some C# and javascript, but not C++ 

Yes, they are alike,  but I don't know how to write C++ code for server.

And that code from the image should be put in... char.cpp , right?

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

vor 13 Stunden schrieb Anyone:

Do you want that Player A (Shinsoo) can't attack Player B (Jinno)

Right?

This code looks ok if you are checking what I wrote:

https://metin2.download/picture/4877xpvT85q4mt4M47PqNXuL05v7rd28/.png

and now write in code not screenshot^^

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Acum 1 oră, Anyone a spus:

Yes.

Just add check of map index

I have no ideea how to do this in C++ 

something like:

if (GetEmpire() != pkVictim->GetEmpire())

{
  ChatPacket(CHAT_TYPE_INFO,LC_TEXT("You can't attack player %s because is from another kingdom!"),pkVictim->GetName());
  return false;
  if HowToCheckMap() == mapId('MapNumber') {
      return true;
   }
}

?

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.