Page 1 of 1

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

Posted: Fri Jan 06, 2012 10:12 am
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)

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

Posted: Fri Jan 06, 2012 11:15 am
by lucan
Try comment or remove the line 1239...
1239. heal(player, getpetbuff);

Code: Select all

 //        heal(player, getpetbuff); 

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

Posted: Fri Jan 06, 2012 11:15 am
by pokiokio
Remove "heal(player, getpetbuff);" at line 1126 and 1239. :)

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

Posted: Fri Jan 06, 2012 11:55 am
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(:

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

Posted: Fri Jan 06, 2012 11:58 am
by pokiokio
Well then, remove the whole "private void heal(comPcInstance player, boolean isPet)"

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

Posted: Fri Jan 06, 2012 12:10 pm
by Nuken
pokiokio wrote:Well then, remove the whole "private void heal(comPcInstance player, boolean isPet)"
removed, not work..

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

Posted: Fri Jan 06, 2012 12:36 pm
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