Jump to content
  • 0

pvp points per character level


Question

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

go to L2PcInstance.java find setPvpKills() and setPkKills() and write this 
if(this.getLevel() <10){
                return;

}
you must write it right after opening the method key.

 

If you use aCis you must do this in Player.java

Edited by TGSLineage2
  • 0
Posted
24 minutes ago, TGSLineage2 said:

go to L2PcInstance.java find setPvpKills() and setPkKills() and write this 
if(this.getLevel() <10){
                return;

}
you must write it right after opening the method key.

 

If you use aCis you must do this in Player.java

 

Thanks for helping me. I found this in Player.java. I added the code you gave me, but it's giving an error. How could I add?

/**
	 * Set PvP Kills of the Player (number of player killed during a PvP).
	 * @param pvpKills A value.
	 */
	public void setPvpKills(int pvpKills)
	{
		_pvpKills = pvpKills;
	}
	/**
	 * Set the PK counter of the Player.
	 * @param pkKills A number.
	 */
	public void setPkKills(int pkKills)
	{
		_pkKills = pkKills;
	}
  • 0
Posted (edited)

You can try this, find this line   // Add PvP point to attacker. and  write  if(target.getLevel>10) before  setPvpKills(getPvpKills() + 1);
find // PK Points are increased only if you kill a player and write  if(target.getLevel>10) after if (target instanceof Player) {

if you want it not to add when the murderer is level less than 10 replace target with "this"

Edited by TGSLineage2
  • 0
Posted
47 minutes ago, TGSLineage2 said:

Você pode tentar isso, encontrar esta linha // Adicionar ponto PvP ao invasor. e escreva if (t arget.getLevel> 10) antes de setPvpKills (getPvpKills () + 1);
find // PK Points são aumentados apenas se você matar um jogador e escrever if (target.getLevel> 10) depois de if (target instanceof Player) {

se você não adicionar quando o assassino estiver em um nível inferior a 10, substitua o alvo por este

 

Understand. I added this way:

				// Add PvP point to attacker.
				if (!isInEvent() || isInEvent() && Config.TVT_COUNT_KILLS_PVP)
					setPvpKills(getPvpKills() + 1);
				// Se o player for level 10, nao conta pvp pontos
				if (target.getLevel() < 10);

There is no error when compiling. I will test in game, but I can't now because of the protection of pvp points on the same IP and I'm running the server on the same computer. I will test and say if it worked. Thank you very much. Another thing, would you add this in the settings?

  • 0
Posted (edited)
21 minutes ago, naustagic said:

 

Understand. I added this way:


				// Add PvP point to attacker.
				if (!isInEvent() || isInEvent() && Config.TVT_COUNT_KILLS_PVP)
					setPvpKills(getPvpKills() + 1);
				// Se o player for level 10, nao conta pvp pontos
				if (target.getLevel() < 10);

There is no error when compiling. I will test in game, but I can't now because of the protection of pvp points on the same IP and I'm running the server on the same computer. I will test and say if it worked. Thank you very much. Another thing, would you add this in the settings?

add in config //player section at the end  karma and pvp
public static int MIN_LEVEL_TO_ADD_PVP_PK_KILL;
then after this   PVP_PVP_TIME = players.getProperty("PvPVsPvPTime", 30000);
MinLevelToAddPvPPkKill = players.getProperty("MinLevelToAddPvPPkKill",10);

and in players.properties add after PvPVsPvPTime = 30000
MinLevelToAddPvPPkKill = 10;

 

then replace 10 for this config in the code I gave you.

 

Edited by TGSLineage2
  • 0
Posted
29 minutes ago, TGSLineage2 said:

add in config //player section at the end  karma and pvp
public static int MIN_LEVEL_TO_ADD_PVP_PK_KILL;
then after this   PVP_PVP_TIME = players.getProperty("PvPVsPvPTime", 30000);
MinLevelToAddPvPPkKill = players.getProperty("MinLevelToAddPvPPkKill",10);

and in players.properties add after PvPVsPvPTime = 30000
MinLevelToAddPvPPkKill = 10;

 

then replace 10 for this config in the code I gave you.

image.png

I added this in config.java:

/ ** MINIMO LEVEL FOR COUNT PVP POINTS * /

public static int MIN_LEVEL_TO_ADD_PVP_PK_KILL;

 

 

and in: private static final void loadLimits () {

I added this:

PVP_PVP_TIME = limits.getProperty("PvPVsPvPTime", 30000);

MIN_LEVEL_TO_ADD_PVP_PK_KILL = limits.getProperty ("MinLevelToAddPvPPkKill", 10);

 

Is that correct?

 

In Player.java what do I replace if (target.getLevel () <10) ;?

  • 0
Posted
2 minutes ago, TGSLineage2 said:

replace 10 for Config.MIN_LEVEL_TO_ADD_PVP_PK_KILL

I added, compiled and didn't generate an error. I will test. Thanks a lot for the help. As soon as I test it, I notice it here.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock