Jump to content
  • 0

[help java] increase level npc little edit


Question

Posted

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)

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...