Page 1 of 1

heal and cancel buffs at buffer

Posted: Mon Jan 11, 2010 6:26 pm
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>

Re: heal and cancel buffs at buffer

Posted: Mon Jan 11, 2010 6:34 pm
by janiii
npc type?

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

// moved to support, not a feature request

Re: heal and cancel buffs at buffer

Posted: Tue Jan 12, 2010 7:27 am
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 :\

Re: heal and cancel buffs at buffer

Posted: Tue Jan 12, 2010 7:35 am
by janiii
for Heal you need to write what it should heal, e.g. "Heal HP MP CP" or "Heal HP" .

Re: heal and cancel buffs at buffer

Posted: Tue Jan 12, 2010 8:30 am
by Lupu1
Thx for help all works now :)

Re: heal and cancel buffs at buffer

Posted: Thu Jan 14, 2010 10:38 am
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()"

Re: heal and cancel buffs at buffer

Posted: Thu Jan 14, 2010 10:49 am
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());