Jump to content
  • 0

Help me to fix this error


Question

6 answers to this question

Recommended Posts

  • 0
Posted

L2j Frozen and here is the code from int..

 

# Npc by RevoltadO
import sys
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 = "8500_LevelDown"
NPCid = [80005]
NPC = [80005]
ADENA = 57
QuestId = 8500
QuestName = "LevelDown"
QuestDesc = "custom"
InitialHtml = "1.htm"


print "Regress 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()
        #Regress level for 1kk
        if event == "1":
            if st.getQuestItemsCount(ADENA) >= 1000:
                  st.takeItems(ADENA,1000)
                  delexp = (st.player.getStat().getExp() - st.player.getStat() .getExpForLevel(level-1))
                  st.player.getStat().addExp(-delexp)
                  return "2.htm"
            else:
                  htmltext = "You do not have Adena"
                  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)

 

Gs doesn't give errors but when i click to delevel i get this error

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..