Jump to content
  • 0

[HELP] Bluff rate and atributes power


Question

Posted

Hey guys, ok i got a litle porblem, in my server i got my bluff whit a regular succes rate, but it only works vs warrior classes, vs mages it is too low i made this config whit the skills xml, changing "magiclvl" values and "power", i repeat it work perfect vs warriors clases but vs mages not.

 

And about my elements, are over power, i xplain, if a spellhouler make his weapon whit wind element "wind stones", his skills power increase too much, and i want to drop it a bit.

 

If any one know how to change this things please tell me, thx in advance.


PD: i was searching for long time in the java folder but i find nothing good.


PD2: i want to increace the pvp counts in all areas, like general field, arena field, but i dont know how to do it, i was trying to add it in l2pcinstance.java near to:

public void increasePvpKills()
   {
       // Add karma to attacker and increase its PK counter
       setPvpKills(getPvpKills() + 1);

 

whit this code:

if (isInsideZone(ZONE_PVP))

 

any hint?

 


 

THX in advance guys

 

am learning steep by steep but is a litle bit hard whitout a sensei xD cheers

 

 

4 answers to this question

Recommended Posts

  • 0
Posted

public void onKillUpdatePvPKarma(L2Character target)
{
	if (target == null) return;
	if (!(target instanceof L2Playable)) return;

	L2PcInstance targetPlayer = target.getActingPlayer();

	if (targetPlayer == null) return;                                          // Target player is null
	if (targetPlayer == this) return;                                          // Target player is self

	if (isCursedWeaponEquipped())
	{
		CursedWeaponsManager.getInstance().increaseKills(_cursedWeaponEquippedId);
		// Custom message for time left
		// CursedWeapon cw = CursedWeaponsManager.getInstance().getCursedWeapon(_cursedWeaponEquipedId);
		// SystemMessage msg = new SystemMessage(SystemMessageId.THERE_IS_S1_HOUR_AND_S2_MINUTE_LEFT_OF_THE_FIXED_USAGE_TIME);
		// int timeLeftInHours = (int)(((cw.getTimeLeft()/60000)/60));
		// msg.addItemName(_cursedWeaponEquipedId);
		// msg.addNumber(timeLeftInHours);
		// sendPacket(msg);
		return;
	}

	// If in duel and you kill (only can kill l2summon), do nothing
	if (isInDuel() && targetPlayer.isInDuel()) return;

        // If in Arena, do nothing
	if (isInsideZone(ZONE_PVP) || targetPlayer.isInsideZone(ZONE_PVP))
		return;

        // Check if it's pvp
	if (
			(
					checkIfPvP(target) &&            //   Can pvp and
					targetPlayer.getPvpFlag() != 0   //   Target player has pvp flag set
			) ||                                     // or
			(
					isInsideZone(ZONE_PVP) &&         		 //   Player is inside pvp zone and
					targetPlayer.isInsideZone(ZONE_PVP) 	 //   Target player is inside pvp zone
			)
	)
		increasePvpKills(target);
	else
	// Target player doesn't have pvp flag set
	{
		// check about wars
		if (targetPlayer.getClan() != null && getClan() != null
				&& getClan().isAtWarWith(targetPlayer.getClanId())
				&& targetPlayer.getClan().isAtWarWith(getClanId())
				&& targetPlayer.getPledgeType() != L2Clan.SUBUNIT_ACADEMY
				&& getPledgeType() != L2Clan.SUBUNIT_ACADEMY)
		{
			// 'Both way war' -> 'PvP Kill'
			increasePvpKills(target);
			return;
		}

            // 'No war' or 'One way war' -> 'Normal PK'
		if (targetPlayer.getKarma() > 0)                                        // Target player has karma
		{
			if (Config.KARMA_AWARD_PK_KILL)
                    increasePvpKills(target);
		}
		else if (targetPlayer.getPvpFlag() == 0)                                                                    // Target player doesn't have karma
		{
			increasePkKillsAndKarma(target);
			//Unequip adventurer items
			checkItemRestriction();
		}
	}
}

Here you can config PvP kills...

  • 0
Posted

omg like 100 lines before where i was making changes, ok so i can make a litle config to set it true,false if player is in pvp zone? whit a public boolean roght?

 

Here:

public void onKillUpdatePvPKarma(L2Character target)
{
	if (target == null) return;
	if (!(target instanceof L2Playable)) return;

	L2PcInstance targetPlayer = target.getActingPlayer();

	if (targetPlayer == null) return;                                          // Target player is null
	if (targetPlayer == this) return;                                          // Target player is self

	if (isCursedWeaponEquipped())
	{
		CursedWeaponsManager.getInstance().increaseKills(_cursedWeaponEquippedId);
		// Custom message for time left
		// CursedWeapon cw = CursedWeaponsManager.getInstance().getCursedWeapon(_cursedWeaponEquipedId);
		// SystemMessage msg = new SystemMessage(SystemMessageId.THERE_IS_S1_HOUR_AND_S2_MINUTE_LEFT_OF_THE_FIXED_USAGE_TIME);
		// int timeLeftInHours = (int)(((cw.getTimeLeft()/60000)/60));
		// msg.addItemName(_cursedWeaponEquipedId);
		// msg.addNumber(timeLeftInHours);
		// sendPacket(msg);
		return;
	}

	// If in duel and you kill (only can kill l2summon), do nothing
	if (isInDuel() && targetPlayer.isInDuel()) return;

       [color=red]// If in Arena, do nothing
	if (isInsideZone(ZONE_PVP) || targetPlayer.isInsideZone(ZONE_PVP))
		return;[/color]

       // Check if it's pvp
	if (
			(
					checkIfPvP(target) &&            //   Can pvp and
					targetPlayer.getPvpFlag() != 0   //   Target player has pvp flag set
			) ||                                     // or
			(
					isInsideZone(ZONE_PVP) &&         		 //   Player is inside pvp zone and
					targetPlayer.isInsideZone(ZONE_PVP) 	 //   Target player is inside pvp zone
			)
	)
		increasePvpKills(target);
	else
	// Target player doesn't have pvp flag set
	{
		// check about wars
		if (targetPlayer.getClan() != null && getClan() != null
				&& getClan().isAtWarWith(targetPlayer.getClanId())
				&& targetPlayer.getClan().isAtWarWith(getClanId())
				&& targetPlayer.getPledgeType() != L2Clan.SUBUNIT_ACADEMY
				&& getPledgeType() != L2Clan.SUBUNIT_ACADEMY)
		{
			// 'Both way war' -> 'PvP Kill'
			increasePvpKills(target);
			return;
		}

           // 'No war' or 'One way war' -> 'Normal PK'
		if (targetPlayer.getKarma() > 0)                                        // Target player has karma
		{
			if (Config.KARMA_AWARD_PK_KILL)
                   increasePvpKills(target);
		}
		else if (targetPlayer.getPvpFlag() == 0)                                                                    // Target player doesn't have karma
		{
			increasePkKillsAndKarma(target);
			//Unequip adventurer items
			checkItemRestriction();
		}
	}
}

Here you can config PvP kills...

 

something like this?

 

public static boolean ALLOW_PVP_EVERYWHERE;

ALLOW_PVP_EVERYWHERE = Boolean.parseBoolean(otherSettings.getProperty("PvPArenaZone", "False"));

if(Config.ALLOW_PVP_EVERYWHERE)
     {
       increasePvpKills(target);
			return;
     }

 

of course in diferent places.

 

  • 0
Posted

ok i found it C:\L2JServer\L2_GameServer\java\net\sf\l2j\gameserver\model\Elements.java

 

package net.sf.l2j.gameserver.model;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.skills.Stats;
import net.sf.l2j.gameserver.skills.funcs.FuncAdd;
import net.sf.l2j.gameserver.skills.funcs.LambdaConst;

public final class Elementals
{
private ElementalStatBoni _boni = null;
public final static byte NONE = -1;
public final static byte FIRE = 0;
public final static byte WATER = 1;
public final static byte WIND = 2;
public final static byte EARTH = 3;
public final static byte HOLY = 4;
public final static byte DARK = 5;

public final static int ENCHANT_CHANCE = Config.ENCHANT_CHANCE_ELEMENT;

public final static int FIRST_WEAPON_BONUS = 20;
public final static int NEXT_WEAPON_BONUS = 5;
public final static int ARMOR_BONUS = 6;

public final static int[] WEAPON_VALUES =
{
	0,   // Level 1
	25,  // Level 2
	75,  // Level 3
	150, // Level 4
	175, // Level 5
	225, // Level 6
	300, // Level 7
	325, // Level 8
	375, // Level 9
	450, // Level 10
	475, // Level 11
	525, // Level 12
	600, // Level 13
	Integer.MAX_VALUE  // TODO: Higher stones
};

public final static int[] ARMOR_VALUES =
{
	0,  // Level 1
	12, // Level 2
	30, // Level 3
	60, // Level 4
	72, // Level 5
	90, // Level 6
	120, // Level 7
	132, // Level 8
	150, // Level 9
	180, // Level 10
	192, // Level 11
	210, // Level 12
	240, // Level 13
	Integer.MAX_VALUE  // TODO: Higher stones
};

public final static int[] STONES = 
{
	9546,
	9547,
	9549,
	9548,
	9551,
	9550
};

public final static int[] CRYSTALS =
{
	9552,
	9553,
	9555,
	9554,
	9557,
	9556
};

public final static int[] JEWELS =
{
	9558,
	9559,
	9561,
	9560,
	9563,
	9562
};

public final static int[] ENERGIES = 
{
	9564,
	9565,
	9567,
	9566,
	9569,
	9568
};

private byte _element = NONE;
private int _value = 0;

public byte getElement()
{
	return _element;
}

public void setElement(byte type)
{
	_element = type;
	_boni.setElement(type);
}

public int getValue()
{
	return _value;
}

public void setValue(int val)
{
	_value = val;
	_boni.setValue(val); 
}

public static String getElementName(byte element)
{
	switch(element)
	{
		case FIRE:
			return "Fire";
		case WATER:
			return "Water";
		case WIND:
			return "Wind";
		case EARTH:
			return "Earth";
		case DARK:
			return "Dark";
		case HOLY:
			return "Holy";
	}
	return "None";
}

public static byte getElementId(String name)
{
	String tmp = name.toLowerCase();
	if (tmp.equals("fire"))
		return FIRE;
	if (tmp.equals("water"))
		return WATER;
	if (tmp.equals("wind"))
		return WIND;
	if (tmp.equals("earth"))
		return EARTH;
	if (tmp.equals("dark"))
		return DARK;
	if (tmp.equals("holy"))
		return HOLY;
	return NONE;
}

public static byte getOppositeElement(byte element)
{
	return (byte)((element % 2 == 0) ? (element + 1) : (element - 1));
}

@Override
public String toString()
{
	return getElementName(_element) + " +" + _value;
}

public Elementals(byte type, int value)
{
	_element = type;
	_value = value;
	_boni = new ElementalStatBoni(_element, _value);
}

public class ElementalStatBoni  
{  
	private byte _elementalType;  
	private int _elementalValue;  
	private boolean _active;  

	public ElementalStatBoni(byte type, int value)  
	{  
		_elementalType = type;  
		_elementalValue = value;  
		_active = false;  
	}  

	public void applyBonus(L2PcInstance player, boolean isArmor)  
	{  
		// make sure the bonuses are not applied twice..  
		if (_active)  
			return;  

		switch (_elementalType)  
		{  
			case FIRE:  
				if (isArmor)  
					player.addStatFunc(new FuncAdd(Stats.FIRE_RES, 0x40, this, new LambdaConst(_elementalValue)));  
				else  
					player.addStatFunc(new FuncAdd(Stats.FIRE_POWER, 0x40, this, new LambdaConst(_elementalValue)));  
				break;  
			case WATER:  
				if (isArmor)  
					player.addStatFunc(new FuncAdd(Stats.WATER_RES, 0x40, this, new LambdaConst(_elementalValue)));  
				else  
					player.addStatFunc(new FuncAdd(Stats.WATER_POWER, 0x40, this, new LambdaConst(_elementalValue)));  
				break;  
			case WIND:  
				if (isArmor)  
					player.addStatFunc(new FuncAdd(Stats.WIND_RES, 0x40, this, new LambdaConst(_elementalValue)));  
				else  
					player.addStatFunc(new FuncAdd(Stats.WIND_POWER, 0x40, this, new LambdaConst(_elementalValue)));  
				break;  
			case EARTH:  
				if (isArmor)  
					player.addStatFunc(new FuncAdd(Stats.EARTH_RES, 0x40, this, new LambdaConst(_elementalValue)));  
				else  
					player.addStatFunc(new FuncAdd(Stats.EARTH_POWER, 0x40, this, new LambdaConst(_elementalValue)));  
				break;  
			case DARK:  
				if (isArmor)  
					player.addStatFunc(new FuncAdd(Stats.DARK_RES, 0x40, this, new LambdaConst(_elementalValue)));  
				else  
					player.addStatFunc(new FuncAdd(Stats.DARK_POWER, 0x40, this, new LambdaConst(_elementalValue)));  
				break;  
			case HOLY:  
				if (isArmor)  
					player.addStatFunc(new FuncAdd(Stats.HOLY_RES, 0x40, this, new LambdaConst(_elementalValue)));  
				else  
					player.addStatFunc(new FuncAdd(Stats.HOLY_POWER, 0x40, this, new LambdaConst(_elementalValue)));  
				break;  
		}  

		_active = true;  
	}  

	public void removeBonus(L2PcInstance player)  
	{  
		// make sure the bonuses are not removed twice  
		if (!_active)  
			return;  

		((L2Character) player).removeStatsOwner(this);  

		_active = false;  
	}  

	public void setValue(int val)  
	{  
		_elementalValue = val;  
	}  

	public void setElement(byte type)  
	{  
		_elementalType = type;  
	}  
}  

public void applyBonus(L2PcInstance player, boolean isArmor)  
{  
	_boni.applyBonus(player, isArmor);  
}  

public void removeBonus(L2PcInstance player)  
{  
	_boni.removeBonus(player);  
}  

public void updateBonus(L2PcInstance player, boolean isArmor)  
{  
	_boni.removeBonus(player);  
	_boni.applyBonus(player, isArmor);  
}  
}  

 

any idea how to edit the power increace?

Guest
This topic is now closed to further replies.


×
×
  • 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