Jump to content
  • 0

Mages get half dmg using CP


Question

Posted

Hello, there's an annoying thing about CP Pots..

When a mage use them in PVP, theyr dmg decrease to half... exactly on half..

 

I've checked but i can't find the code of this formula..

 

Can someone tell me?

 

Also on another topic, about olympiad refresh time (rank)... from where i can change it!

 

 

Thanks in advance

Recommended Posts

  • 0
Posted

until fix this bug as i see u have live server do this,

 

 

add hight price or remove cp potions , check this if happens with all potions,

if some1 have cp potions add huge re-use for enter cp or dont allow potions simple on compat ..

  • 0
Posted

I want to allow them...just to fix this bug :D

 

check the item CP pots and check what skill it uses and what does skill...

if no go search in java solutions

use google and search

  • 0
Posted

<skill id="2166" levels="2" name="CP Gauge Potion">

<table name="#power"> 50 200 </table>

<set name="power" val="#power" />

<set name="target" val="TARGET_SELF" />

<set name="skillType" val="COMBATPOINTHEAL" />

<set name="operateType" val="OP_ACTIVE" />

<set name="reuseDelay" val="50" />

<set name="isPotion" val="true" />

<cond msgId="113" addName="1">

<player flying="False" />

</cond>

</skill>

 

That's the skill, nothing strange in here :)

  • 0
Posted

<skill id="2166" levels="2" name="CP Gauge Potion">

<table name="#power"> 50 200 </table>

<set name="power" val="#power" />

<set name="target" val="TARGET_SELF" />

<set name="skillType" val="COMBATPOINTHEAL" />

<set name="operateType" val="OP_ACTIVE" />

<set name="reuseDelay" val="50" />

<set name="isPotion" val="true" />

<cond msgId="113" addName="1">

<player flying="False" />

</cond>

</skill>

 

That's the skill, nothing strange in here :)

 

true then... give me a second...

  • 0
Posted

true then... give me a second...

I think is as Trance said...that the potion is disabling the BSS in pvp :-/ i don't know.

  • 0
Posted

I think is as Trance said...that the potion is disabling the BSS in pvp :-/ i don't know.

 

Wait, chronicle of your L2J?

  • 0
Posted

Wait, chronicle of your L2J?

Interlude.. l2jacis...arround version 260-270 :-/ not sure

  • 0
Posted

Interlude.. l2jacis...arround version 260-270 :-/ not sure

Check Potions.java

 

            case 5592: // CP and Greater CP
                if (!isEffectReplaceable(activeChar, L2Effect.EffectType.COMBAT_POINT_HEAL_OVER_TIME, itemId))
                    return;
                {
                    activeChar.setCurrentCp(200 + activeChar.getCurrentCp());
                    StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
                    su.addAttribute(StatusUpdate.CUR_CP, (int) activeChar.getCurrentCp());
                    activeChar.sendPacket(su);
                    MagicSkillUser MSU = new MagicSkillUser(activeChar, activeChar, 2166, 2, 0, 0);
                    activeChar.broadcastPacket(MSU);
                    SystemMessage sm = new SystemMessage(SystemMessageId.USE_S1);
                    sm.addItemName(itemId);
                    activeChar.sendPacket(sm);
                    activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false);
                }
                return;

 

Print your code here

  • 0
Posted

Can't find that mate :-s i tried to search it and nothing..

 

You know what is Eclipse?

l2j/gameserver/handler/itemhandlers/Potions.java
  • 0
Posted

As I said back then, it's about BSS. Well, !skill.isStatic() should be added for BSS check in java, somewhere in L2Character, I can't remember exactly.

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.handler.skillhandlers;

import net.sf.l2j.gameserver.handler.ISkillHandler;
import net.sf.l2j.gameserver.handler.SkillHandler;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.skills.L2SkillType;

public class CombatPointHeal implements ISkillHandler
{
private static final L2SkillType[] SKILL_IDS =
{
	L2SkillType.COMBATPOINTHEAL
};

@Override
public void useSkill(L2Character actChar, L2Skill skill, L2Object[] targets)
{
	// check for other effects
	ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(L2SkillType.BUFF);

	if (handler != null)
		handler.useSkill(actChar, skill, targets);

	for (L2Object obj : targets)
	{
		if (!(obj instanceof L2Character))
			continue;

		final L2Character target = (L2Character) obj;
		if (target.isDead() || target.isInvul())
			continue;

		double cp = skill.getPower();

		if ((target.getCurrentCp() + cp) >= target.getMaxCp())
			cp = target.getMaxCp() - target.getCurrentCp();

		target.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_CP_WILL_BE_RESTORED).addNumber((int) cp));
		target.setCurrentCp(cp + target.getCurrentCp());

		StatusUpdate sump = new StatusUpdate(target);
		sump.addAttribute(StatusUpdate.CUR_CP, (int) target.getCurrentCp());
		target.sendPacket(sump);
	}
}

@Override
public L2SkillType[] getSkillIds()
{
	return SKILL_IDS;
}
}

 

(checked by Stewie and he see no problem in it)

 

Also L2Character.java is not related with CP potions anyway (as Stewie say)

Does someone have more suggestions?

  • 0
Posted

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.handler.skillhandlers;

import net.sf.l2j.gameserver.handler.ISkillHandler;
import net.sf.l2j.gameserver.handler.SkillHandler;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.skills.L2SkillType;

public class CombatPointHeal implements ISkillHandler
{
private static final L2SkillType[] SKILL_IDS =
{
	L2SkillType.COMBATPOINTHEAL
};

@Override
public void useSkill(L2Character actChar, L2Skill skill, L2Object[] targets)
{
	// check for other effects
	ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(L2SkillType.BUFF);

	if (handler != null)
		handler.useSkill(actChar, skill, targets);

	for (L2Object obj : targets)
	{
		if (!(obj instanceof L2Character))
			continue;

		final L2Character target = (L2Character) obj;
		if (target.isDead() || target.isInvul())
			continue;

		double cp = skill.getPower();

		if ((target.getCurrentCp() + cp) >= target.getMaxCp())
			cp = target.getMaxCp() - target.getCurrentCp();

		target.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_CP_WILL_BE_RESTORED).addNumber((int) cp));
		target.setCurrentCp(cp + target.getCurrentCp());

		StatusUpdate sump = new StatusUpdate(target);
		sump.addAttribute(StatusUpdate.CUR_CP, (int) target.getCurrentCp());
		target.sendPacket(sump);
	}
}

@Override
public L2SkillType[] getSkillIds()
{
	return SKILL_IDS;
}
}

 

(checked by Stewie and he see no problem in it)

 

Also L2Character.java is not related with CP potions anyway (as Stewie say)

Does someone have more suggestions?

 

 

From now-on Acis is no more L2J for me.

  • 0
Posted

Big thanks for your time Stewie. Rly appreciate.

 

And im still looking for a solution.

 

Thx

  • 0
Posted

Big thanks for your time Stewie. Rly appreciate.

 

And im still looking for a solution.

 

Thx

 

No prob but as i see L2JInterlude != L2JAcis...

Guest
This topic is now closed to further replies.


  • Posts

    • L2GOLD - Gold x45 C4 Project   C4 - Scions of Destiny: Protocol 656   Fully L2Gold Features - Daily Quest - Daily Mining Quest - Ancient Weapons -Refine System  -Rebirth System -Fully configurable everything you want -Gold stats/Gold skills/Gold items working 100% -Zones 100% alike  -Unique donations system (npc or voicedcommand .donate) - On Enchant success announcement ( if +16 for weapon, 8 for armor , 7 for jewel) - Announce of Castle Lord - Announce of Hero  - Olympiad Max A grade - Olympiad Buffs on matches changed to Gold Alike -Buff shop system on selling buffs with command .buffshop Shift+click dropinfo on mobs. and many more ingame addons.   Server is running a Test Server: Online to anyone can test it.   Game Client: https://www.mediafire.com/file/d0000rmt8ym0323/Lineage_2_C4_Client.rar/file   Game Patch: https://www.mediafire.com/file/39sojdex2mgj55k/L2Gold+Patch+C4.rar/file   GM Accounts: ID: root1 pass root1 [ accounts go from  root1 until root20 ]   Regular Accounts Registrations: http://84.247.164.27/?page=register   Some Screenshots: https://imgur.com/a/KSE4kdq   Contact me here via PM (only serious buyers).    Price of the product: Fully Server Pack + Source ( 200 Euros )
    • Https://lineage2dex.com Discord link : https://discord.com/channels/786506979493281794/814778540893536307/1424434670690504874 ## Dexters! **Our x25 server is celebrating its first week!** 🔥 Online stays strong at peak levels!  New players are joining every day, with 200+ new master accounts registered daily — amazing results! ✨ Tomorrow we launch a new episode along with the first event. Full details will be shared in the morning(October 6). 🎁 And for this little celebration, here’s a bonus code with a small gift for you! ## O05-IIW **Contains: ** * x3 - Training Potion 200% (20 min) * x200 - Mana Potions Loyatly (no weight) *The code will remain active until October 6, 7 AM(server time). And be sure, you have at less 20 slots free on inv before using a code.* **👉 How to redeem:** 1. Log in to your Master Account on site. 2. Click the Redeem Bonus Code button at the top of the panel, type code click redeem. 3. Select the account and character you want to receive the gift.  **Codes work only 1 time for 1 Master Account!** ### Enjoy your adventure, Dexters!
    • Complete Server Pack + Source Files:     C4 Scions Of Destiny: P656 Retail X1 L2OFF Server Pack + Source: Price: 70 EUR   C4 Scions Of Destiny: P656 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 90 EUR Screenshots: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl   C6 Interlude: P746 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR The same as C4 but in C6 Client so the Screenshots is the same: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl     C6 Interlude: P746 L2Gold L2OFF Server Pack + Source: Price: 50EUR Screenshots: https://imgur.com/a/9kB3oA9   C6 - Classic Interlude: P110 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR Screenshots: https://imgur.com/a/Z2kZxuv   Contact me here via PM (only serious buyers). 
    • Where should I modify the IP to be able to put it online for testing?
    • I had issues with Smart Guard to, there is not even support in many cases.
  • Topics

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