*Problem with Buffer, restore CP/HP/MP (not disabled)

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Nuken
Posts: 13
Joined: Wed Jun 01, 2011 11:08 pm

*Problem with Buffer, restore CP/HP/MP (not disabled)

Post by Nuken »

Hi guys, i have serious problems with \scripts\custom\NpcBuffer\NpcBuffer.java (555Id NPC)

When using the buff, auto buff or scheme Buffer = CP/HP restores for 100%. I do not need such a function.
Need disable restore options.

I removed code the script from NpcBuffer.java (\scripts\custom\NpcBuffer\NpcBuffer.java):

Code: Select all

pcStatus.setCurrentHp (pcStat.getMaxHp ());pcStatus.setCurrentCp (pcStat.getMaxCp ());

Buffer still recovers Cp / Hp ..

I also removed code from L2CabaleBufferInstance.java (gameserver\model\actor\instance):

Code: Select all

target.setCurrentCp (target.getMaxCp ());target.setCurrentHp (target.getMaxHp ());

No result, buffer also restores Hp / CP, what could be the problem?

My script Buffer (\scripts\custom\NpcBuffer\NpcBuffer.java):
http://pastebin.com/Aj3EwnQ4 (upd)
Last edited by Nuken on Fri Jan 06, 2012 12:32 pm, edited 1 time in total.
User avatar
lucan
Posts: 590
Joined: Wed Mar 16, 2011 10:39 pm
Location: Brazil

Re: *Problem with Buffer, restore CP/HP/MP (not disabled)

Post by lucan »

Try comment or remove the line 1239...
1239. heal(player, getpetbuff);

Code: Select all

 //        heal(player, getpetbuff); 
User avatar
pokiokio
Posts: 259
Joined: Wed Mar 04, 2009 8:08 pm

Re: *Problem with Buffer, restore CP/HP/MP (not disabled)

Post by pokiokio »

Remove "heal(player, getpetbuff);" at line 1126 and 1239. :)
Image
Prolly the youngest L2j user :P
Nuken
Posts: 13
Joined: Wed Jun 01, 2011 11:08 pm

Re: *Problem with Buffer, restore CP/HP/MP (not disabled)

Post by Nuken »

pokiokio wrote:Remove "heal(player, getpetbuff);" at line 1126 and 1239. :)
removed, does not work, restore the Hp/Cp :cry:
where the problem is? help guys(:
User avatar
pokiokio
Posts: 259
Joined: Wed Mar 04, 2009 8:08 pm

Re: *Problem with Buffer, restore CP/HP/MP (not disabled)

Post by pokiokio »

Well then, remove the whole "private void heal(comPcInstance player, boolean isPet)"
Image
Prolly the youngest L2j user :P
Nuken
Posts: 13
Joined: Wed Jun 01, 2011 11:08 pm

Re: *Problem with Buffer, restore CP/HP/MP (not disabled)

Post by Nuken »

pokiokio wrote:Well then, remove the whole "private void heal(comPcInstance player, boolean isPet)"
removed, not work..
Nuken
Posts: 13
Joined: Wed Jun 01, 2011 11:08 pm

Re: *Problem with Buffer, restore CP/HP/MP (not disabled)

Post by Nuken »

Guys, what else could be the problem? Need your help.
The new script paste http://pastebin.com/Aj3EwnQ4 (upd)
Help please, buffer now again restore Hp/Cp :cry:

Code: Select all

private void heal(L2PcInstance player, boolean isPet)    {        L2Summon target;        if (!isPet) {            PcStatus pcStatus = player.getStatus();            PcStat pcStat = player.getStat();            pcStatus.setCurrentMp(pcStat.getMaxMp());        }        else if (/*isPet &&*/ (target = player.getPet()) != null) {            SummonStatus petStatus = target.getStatus();            SummonStat petStat = target.getStat();            petStatus.setCurrentMp(petStat.getMaxMp());            if (target instanceof L2PetInstance) {                L2PetInstance pet = (L2PetInstance) target;                pet.setCurrentFed(pet.getMaxFed());                player.sendPacket(new SetSummonRemainTime(pet.getMaxFed(), pet.getCurrentFed()));            }            else if (target instanceof L2SummonInstance) {                L2SummonInstance summon = (L2SummonInstance) target;                summon.decTimeRemaining(summon.getTimeRemaining() - summon.getTotalLifeTime());                player.sendPacket(new SetSummonRemainTime(summon.getTotalLifeTime(), summon.getTimeRemaining()));            }            else if (DEBUG) throw new RuntimeException();        }    }     @Override
Post Reply