hy guys i'have find this npc can increase level i want set can only lvl1 player can use it
wo want help me ?
script:
import sys
import l2.brick.gameserver.model.quest.Quest;
import l2.brick.gameserver.model.quest.QuestState;
from l2.brick.gameserver.model.quest.jython import QuestJython as JQuest
qn = "8500_LevelUp"
NPCid = [65534]
NPC = [65534]
ADENA = 10639
QuestId = 8500
QuestName = "LevelUp"
QuestDesc = "custom"
InitialHtml = "1.htm"
print "Rise Level Npc Sucessfully imported"
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()
#Went up a level for 1kk
if event == "1":
if st.getQuestItemsCount(ADENA) >= 4:
st.takeItems(ADENA,1)
delexp = (st.player.getStat().getExp() - st.player.getStat() .getExpForLevel(level+52))
st.player.getStat().addExp(-delexp)
return "2.htm"
else:
htmltext = "You do not have Bonus Coin."
return htmltext
def onTalk (self,npcid,player):
st = player.getQuestState(qn)
st.setState(State.STARTED)
return InitialHtml
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)