Hi i need a litle fix @ the rebirth system...
I want the manger giving items instead of skills...Plz Help me!!!!
Im using l2jfrozen rebirth manager....
I did this delevel npc but it sucks!!!I dont know how to connect the db...
import sys
from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from com.l2jfrozen.gameserver.datatables import SkillTable
from com.l2jfrozen.util.database import L2DatabaseFactory
from com.l2jfrozen.gameserver.model.quest import State
from com.l2jfrozen.gameserver.model.quest import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest
qn = "10021_SubirLevel"
NPCid = [10021]
NPC = [10021]
REBIRTH_LIST = 4042
QuestId = 10021
QuestName = "SubirLevel"
QuestDesc = "custom"
InitialHtml = "1.htm"
print "importing custom: 10021_SubirLevel"
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent(self,event,st) :
htmltext = event
level = st.getPlayer().getLevel()
if event == "1":
if st.getPlayer().getLevel() >= 80:
delexp = (st.player.getStat().getExp() - st.player.getStat() .getExpForLevel(level-80))
st.player.getStat().addExp(-delexp)
st.giveItems(REBIRTH_LIST,1)
return "2.htm"
else:
htmltext = "Come back when you are at lvl 80!"
return htmltext
def onTalk (self,npcid,player):
st = player.getQuestState(qn)
st.setState(STARTED)
return InitialHtml
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
CREATED=State('Start',QUEST)
STARTED=State('Started',QUEST)
COMPLETED=State('Completed',QUEST)
QUEST.setInitialState(CREATED)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)