Jump to content
  • 0

Interlude npc buffer


Question

Posted

Interlude L2j and L2jdb server last update

Oneo Npc Buffer

Script Error

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() < 1 :
		htmltext = "<html><head><body>You dont have enough Adena,<br> or your level is too low. You must be 40 or higher.</body></html>"
	else:
		st.takeItems(ADENA_ID,0)
		st.getPlayer().setTarget(st.getPlayer())

		if event == "2":
			st.takeItems(ADENA_ID,160000)
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4360,3),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4359,3),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4358,3),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4357,2),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4354,4),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4353,6),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4350,4),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4347,6),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1218,33),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1013,32),False,False)
			st.getplayer().recoverHPMP()		
			return "4.htm"
			st.setState(COMPLETED)

The Line "st.getplayer().recoverHPMP()" Couse a Script Error as a result stoping the script and dont doing Hp/Mp recover.

I need an other commant to replace with. (i tride Gm Heal commant from the core but i dont know java to find the right one.)

2 answers to this question

Recommended Posts

  • 0
Posted

and if count < 150000  or st.getPlayer().getLevel() < 10 :

 

Erm Do You Know What This Means??

 

The "Code" You Gave Has Nothing To Do With That....

 

This Code Is That If The Player Hasnt 150k Adena Or His Is Lower Than 10 Level The Buffer Can't Buff Him...

 

---------------------------------------------------------------------------------------------------------

 

 

Try This One As An HP Recovery

 

#Greater Heal
if event == "70":
st.takeItems(ADENA_ID,0)
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1217,1),False,False)
st.getPlayer().restoreHPMP()
return "1.htm"
st.setState(COMPLETED)	

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...