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

    • We will help you pass verification on any service or application you need! Fast, reliable, and secure. Pay for the first verification and get a 10% discount on the second one. Learn more: Go to
    • We will help you pass verification on any service or application you need! Fast, reliable, and secure. Pay for the first verification and get a 10% discount on the second one. Learn more: Go to
    • Long-term rental of virtual numbers — maximum control and convenience. No need to change numbers every time or worry about losing access anymore. Now you can rent virtual numbers for hours, days, or months and use them as permanent ones: — stable SMS reception from popular services — permanent access to accounts — an ideal solution for registration, verification, and repeated logins — one number — full control for the entire rental period This is the choice for those who value reliability, uninterrupted access, and predictable results. Important: even many top SMS services are unable to offer such an exclusive long-term rental option. Go to the SMS service
    • We are looking for partners and account suppliers for cooperation We are open to partnerships with reliable account suppliers for the following dating services: ➡ Tinder ➡ Badoo ➡ Bumble ➡ Hinge ➡ Happn ➡ Meetic ➡ VK Dating We are considering long-term cooperation, stable volumes, and mutually beneficial terms. If you have any offers, we will be glad to discuss the details. Contact us using the details below. ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • We are looking for partners and account suppliers for cooperation We are open to partnerships with reliable account suppliers for the following dating services: ➡ Tinder ➡ Badoo ➡ Bumble ➡ Hinge ➡ Happn ➡ Meetic ➡ VK Dating We are considering long-term cooperation, stable volumes, and mutually beneficial terms. If you have any offers, we will be glad to discuss the details. Contact us using the details below. ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • 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