- Joined
- Jan 28, 2009
- Messages
- 9
- Reaction score
- 0
i have downloaded a buffer for my server, and i have a problem with the restoreHPMP and RestoreCP.
i get a script error ingame when i try use the restoreCP or restoreHPMP, also if i take buff i get the buff followed by a script error.
i try use # in front of the line: st.getPlayer().restoreHPMP()
so it looks like this: #st.getPlayer().restoreHPMP()
and then buffs work fine, but still no restoreHPMP or restoreCP, so i have to use pots when i buff to get mana.
Can anyone tell me whats the error?
its not my script, i downloaded a buffer, even if i download another buffer same problem again.
NVM.......
i found the error, the script is for L2jfree and i use L2J
Found a buffer who works for me now.........
Only difference is to change: st.getPlayer().restoreHPMP()
To this: st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())
i get a script error ingame when i try use the restoreCP or restoreHPMP, also if i take buff i get the buff followed by a script error.
i try use # in front of the line: st.getPlayer().restoreHPMP()
so it looks like this: #st.getPlayer().restoreHPMP()
and then buffs work fine, but still no restoreHPMP or restoreCP, so i have to use pots when i buff to get mana.
Can anyone tell me whats the error?
its not my script, i downloaded a buffer, even if i download another buffer same problem again.
Code:
import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j import L2DatabaseFactory
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
qn = "9999_NPCBuffer"
NPC=[40006]
ADENA_ID=57
QuestId = 9999
QuestName = "NPCBuffer"
QuestDesc = "custom"
InitialHtml = "1.htm"
print "importing custom: 9999: NPCBuffer"
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent(self,event,st):
htmltext = event
count=st.getQuestItemsCount(ADENA_ID)
if count < 150000 or st.getPlayer().getLevel() < 0 :
htmltext = "<html><head><body>You dont have enough Adena.</body></html>"
else:
st.takeItems(ADENA_ID,0)
st.getPlayer().setTarget(st.getPlayer())
if event == "6":
st.takeItems(ADENA_ID,1000)
st.getPlayer().restoreHPMP()
return "1.htm"
st.setState(COMPLETED)
#Wind Walk
if event == "7":
st.takeItems(ADENA_ID,25000)
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4342,2),False,False)
st.getPlayer().restoreHPMP()
return "5.htm"
st.setState(COMPLETED)
NVM.......
i found the error, the script is for L2jfree and i use L2J
Found a buffer who works for me now.........
Only difference is to change: st.getPlayer().restoreHPMP()
To this: st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())
Last edited:

