heal and cancel buffs at buffer

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
Lupu1
Posts: 335
Joined: Wed Nov 04, 2009 7:51 am

heal and cancel buffs at buffer

Post by Lupu1 »

On gracia final I had this and worked but on epilogue no works anymore :\

<td><button action="bypass -h npc_%objectId%_Heal" value="Heal" width=120 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
<td><button action="bypass -h npc_%objectId%_removeBuffs" value="Cancel Buffs" width=120 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: heal and cancel buffs at buffer

Post by janiii »

npc type?

anyway, removeBuffs should be RemoveBuffs, with capital R. try it :)

// moved to support, not a feature request
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Lupu1
Posts: 335
Joined: Wed Nov 04, 2009 7:51 am

Re: heal and cancel buffs at buffer

Post by Lupu1 »

janiii wrote:npc type?

anyway, removeBuffs should be RemoveBuffs, with capital R. try it :)

// moved to support, not a feature request
L2NpcBuffer, k RemoveBuffs works :) but heal no work :\
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: heal and cancel buffs at buffer

Post by janiii »

for Heal you need to write what it should heal, e.g. "Heal HP MP CP" or "Heal HP" .
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Lupu1
Posts: 335
Joined: Wed Nov 04, 2009 7:51 am

Re: heal and cancel buffs at buffer

Post by Lupu1 »

Thx for help all works now :)
Vampyre
Posts: 88
Joined: Tue Jun 30, 2009 7:43 am

Re: heal and cancel buffs at buffer

Post by Vampyre »

ok so I want this on a SEPERATE npc, not my npcbuffer...

if I try to use it on a normal NPC whose htm is in the 'default' folder I get one of hte following errors on my game console
L2NpcInstance: Unknown NPC bypass: "Heal HP" NpcId: 62007
or
L2NpcInstance: Unknown NPC bypass: "RemoveBuffs" NpcId: 62007
if I attempt to use a script which states
elif event == "heal" :
player.restoreMP()
player.restoreHP()
htmltext = "main.html"
I get this error
Image

line 89 is "player.restoreMP()"
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: heal and cancel buffs at buffer

Post by janiii »

in order to be able to use the bypasses Heal and RemoveBuffs, the npc has to be of type L2NpcBuffer, and it will show the htm from mods/NpcBuffer*.htm .

if you want to heal a player in a jython script, just check what the bypasses in L2NpcBufferInstance class do. there is no such method as restoreHP() for a player instance.

Code: Select all

player.setCurrentHpMp(player.getMaxHp(),player.getMaxMp());player.setCurrentCp(player.getMaxCp());
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Post Reply