Jump to content

torsello

Members
  • Posts

    15
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by torsello

  1. This is the code, and the part its on the last ELSE.

     

    I've to write st.player.giveAvailableSkills()?

    I'm adding on the right part? I write it after give subclass item and after set class and lvl

     

    http://pastebin.com/DAi0TQN2

     

    I have use st.player.giveAvailableSkills() and apear this:

    Traceback (innermost last):
      File "__init__.py", line 704, in onEvent
    AttributeError: giveAvailableSkills
    
            at org.python.core.Py.AttributeError(Unknown Source)
            at org.python.core.PyInstance.invoke(Unknown Source)
            at org.python.pycode.serializable._pyx1442539468425.onEvent$27(__init__.
    py:704)
            at org.python.pycode.serializable._pyx1442539468425.call_function(__init
    __.py)
            at org.python.core.PyTableCode.call(Unknown Source)
            at org.python.core.PyTableCode.call(Unknown Source)
            at org.python.core.PyTableCode.call(Unknown Source)
            at org.python.core.PyFunction.__call__(Unknown Source)
            at org.python.core.PyMethod.__call__(Unknown Source)
            at org.python.core.PyObject.__call__(Unknown Source)
            at org.python.core.PyObject._jcallexc(Unknown Source)
            at org.python.core.PyObject._jcall(Unknown Source)
            at org.python.proxies.main$Quest$709.onEvent(Unknown Source)
            at net.sf.l2j.gameserver.model.quest.Quest.onAdvEvent(Quest.java:540)
            at net.sf.l2j.gameserver.model.quest.Quest.notifyEvent(Quest.java:355)
            at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.processQuestE
    vent(L2PcInstance.java:1428)
            at net.sf.l2j.gameserver.clientpackets.RequestBypassToServer.runImpl(Req
    uestBypassToServer.java:176)
            at net.sf.l2j.gameserver.clientpackets.ClientBasePacket.run(ClientBasePa
    cket.java:78)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    
    
  2. You dont need zone id :P what error

     

    Error while loading zones.
    java.lang.NullPointerException
            at net.sf.l2j.gameserver.datatables.ZoneTable.load(ZoneTable.java:116)
            at net.sf.l2j.gameserver.datatables.ZoneTable.<init>(ZoneTable.java:76)
            at net.sf.l2j.gameserver.datatables.ZoneTable.getInstance(ZoneTable.java
    :64)
            at net.sf.l2j.gameserver.GameServer.<init>(GameServer.java:249)
            at net.sf.l2j.gameserver.GameServer.main(GameServer.java:578)
     
    This error :c
     
    If i replace name by id, doesnt show me any error, but not work
  3. Hi , i've install a Nobless master script (C4 SERVER) , but when i talk to the Npc, and press Make noble, my client crash and apears this:

    Critical error:
    http://pastebin.com/dqqyhw1k

    I think that its because an error on HTML .
    Now the htm of the NPC (id: 66666)
    http://pastebin.com/v4sipNak

    __init__.py of the script :
    http://pastebin.com/vw4CRsua

    1.htm:
    http://pastebin.com/uLcJev4T
    Error1.htm:
    http://pastebin.com/nkkgDMu1
    Error2.htm:
    http://pastebin.com/czL30mpH
    End.htm:
    http://pastebin.com/aFTu6AM0

    i put it on : data/scripts/quest/8204_NpcNoblesse, and i add on scripts.cfg like: 
    quests/8204_NpcNoblesse/__init__.py

    Thanks!!

  4. Someone can help me to do an html for this code? Its an NOBLESS NPC script

    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.actor.appearance import PcAppearance
    from net.sf.l2j.gameserver.model.quest import State
    from net.sf.l2j.gameserver.model.actor.appearance import PcAppearance
    from net.sf.l2j.gameserver.model.quest import QuestState
    from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
    
    qn = "8204_NpcNoblesse"
    
    NPC=[100009]
    GOLDBAR= 3470
    NOBLESS_TIARA = 7694
    QuestId     = 8204
    QuestName   = "NpcNoblesse"
    QuestDesc   = "custom"
    InitialHtml = "1.htm"
    
    print "INFO Loaded: Noblesse Manager"
    
    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(GOLDBAR)
    		
    		if count < 250  and st.getPlayer().getLevel() < 75 :
    			htmltext = "<html><head><body>Sorry, but you dont have enought gb or u low lvl</body></html>"
    
    		elif st.getPlayer().isNoble() == 1 :
    			htmltext = "<html><head><body>Sorry, But you are alrdy nobles</body></html>"
    
    
    		else:
    			st.getPlayer().setTarget(st.getPlayer())
    			
    			if event == "2":
    		            	st.takeItems(GOLDBAR,250)
                                    st.getPlayer().setNoble(true)
                                    st.giveItems(NOBLESS_TIARA,1)
                                    st.playSound("ItemSound.quest_finish")
    				st.setState(State.COMPLETED)
    				return "End.htm"
                                    st.exitQuest(1)	
    	
    				
    			if htmltext != event:
    				st.setState(State.COMPLETED)
    				st.exitQuest(1)
    		return htmltext
    
    
    	def onTalk (self,npc,player):
    	   st = player.getQuestState(qn)
    	   htmltext = "<html><head><body>I have nothing to say to you</body></html>"
    	   st.setState(State.STARTED)
    	   return InitialHtml
    
    QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
    
    for npcId in NPC:
     QUEST.addStartNpc(npcId)
     QUEST.addTalkId(npcId)
    

    Thanks, sorry for my bad english, and i dont know how to create an htm, for the npc 100009 .

×
×
  • Create New...