A Project for Chronicle 4 based on L2JServer.


    Help for Top PvP/PK/Online adaptation.

    Share
    avatar
    arteon

    Posts : 82
    Join date : 2013-12-14

    Help for Top PvP/PK/Online adaptation.

    Post  arteon on 16th July 2015, 20:31

    I have been using this script for years, it even works on current l2j h5. It was made for gracia final/epilogue. Anyway i need to adapt it for use on lisvus.

    mediafire.com download/nf8c6971xdhndi6/50300_PKlist.zip

    And here is the error i get on lisvus

    Code:
    C:\Users\Dimitris\Desktop\C4test\gameserver\data\scripts\custom\50300_PKlist\__i
    nit__.py
    java.lang.NullPointerException
            at net.sf.l2j.gameserver.model.quest.QuestState.getStateId(QuestState.ja
    va:270)
            at net.sf.l2j.gameserver.model.quest.Quest.createQuestInDb(Quest.java:10
    03)
            at net.sf.l2j.gameserver.model.quest.Quest.newQuestState(Quest.java:178)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.python.core.PyReflectedFunction.__call__(Unknown Source)
            at org.python.core.PyMethod.__call__(Unknown Source)
            at org.python.core.PyObject.__call__(Unknown Source)
            at org.python.core.PyInstance.invoke(Unknown Source)
            at org.python.pycode.serializable._pyx1437067133242.onFirstTalk$4(__init
    __.py:134)
            at org.python.pycode.serializable._pyx1437067133242.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$352.onFirstTalk(Unknown Source)
            at net.sf.l2j.gameserver.model.quest.Quest.notifyFirstTalk(Quest.java:37
    5)
            at net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance.onAction(L2N
    pcInstance.java:660)
            at net.sf.l2j.gameserver.model.actor.instance.L2FolkInstance.onAction(L2
    FolkInstance.java:50)
            at net.sf.l2j.gameserver.clientpackets.Action.runImpl(Action.java:120)
            at net.sf.l2j.gameserver.clientpackets.ClientBasePacket.run(ClientBasePa
    cket.java:85)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)

    avatar
    DnR
    Admin
    Admin

    Posts : 1027
    Join date : 2012-12-03

    Re: Help for Top PvP/PK/Online adaptation.

    Post  DnR on 17th July 2015, 11:27

    Hello, the cause of this error is the missing initial state.

    Code:

    QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
    +CREATED = State('Start', QUEST)

    +QUEST.setInitialState(CREATED)

    QUEST.addStartNpc(NPC)
    QUEST.addFirstTalkId(NPC)
    QUEST.addTalkId(NPC)
    print "PYTHON: Top PvP/PK loaded."

    It's required in this quest engine. I hope it helps.
    avatar
    arteon

    Posts : 82
    Join date : 2013-12-14

    Re: Help for Top PvP/PK/Online adaptation.

    Post  arteon on 17th July 2015, 16:29

    Thanks, now it works.

    Hoever im getting some other errors now.

    Registered on login as Server 1 : Bartz
    could not insert char quest:
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Dupl
    icate entry '268475313-50300_PKlist-<state>-0' for key 'PRIMARY'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
    va:2155)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :2458)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :2375)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :2359)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewP
    roxyPreparedStatement.java:105)
    at net.sf.l2j.gameserver.model.quest.Quest.createQuestVarInDb(Quest.java
    :863)
    at net.sf.l2j.gameserver.model.quest.Quest.createQuestInDb(Quest.java:10
    03)
    at net.sf.l2j.gameserver.model.quest.Quest.newQuestState(Quest.java:178)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.python.core.PyReflectedFunction.__call__(Unknown Source)
    at org.python.core.PyMethod.__call__(Unknown Source)
    at org.python.core.PyObject.__call__(Unknown Source)
    at org.python.core.PyInstance.invoke(Unknown Source)
    at org.python.pycode.serializable._pyx1437139634667.onFirstTalk$4(__init
    __.py:134)
    at org.python.pycode.serializable._pyx1437139634667.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$352.onFirstTalk(Unknown Source)
    at net.sf.l2j.gameserver.model.quest.Quest.notifyFirstTalk(Quest.java:37
    5)
    at net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance.onAction(L2N
    pcInstance.java:660)
    at net.sf.l2j.gameserver.model.actor.instance.L2FolkInstance.onAction(L2
    FolkInstance.java:50)
    at net.sf.l2j.gameserver.clientpackets.Action.runImpl(Action.java:120)
    at net.sf.l2j.gameserver.clientpackets.ClientBasePacket.run(ClientBasePa
    cket.java:85)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    could not insert char quest:
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Dupl
    icate entry '268475313-50300_PKlist-<state>-0' for key 'PRIMARY'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
    va:2155)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :2458)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :2375)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :2359)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewP
    roxyPreparedStatement.java:105)
    at net.sf.l2j.gameserver.model.quest.Quest.createQuestVarInDb(Quest.java
    :863)
    at net.sf.l2j.gameserver.model.quest.Quest.createQuestInDb(Quest.java:10
    03)
    at net.sf.l2j.gameserver.model.quest.Quest.newQuestState(Quest.java:178)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.python.core.PyReflectedFunction.__call__(Unknown Source)
    at org.python.core.PyMethod.__call__(Unknown Source)
    at org.python.core.PyObject.__call__(Unknown Source)
    at org.python.core.PyInstance.invoke(Unknown Source)
    at org.python.pycode.serializable._pyx1437139634667.onFirstTalk$4(__init
    __.py:134)
    at org.python.pycode.serializable._pyx1437139634667.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$352.onFirstTalk(Unknown Source)
    at net.sf.l2j.gameserver.model.quest.Quest.notifyFirstTalk(Quest.java:37
    5)
    at net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance.onAction(L2N
    pcInstance.java:660)
    at net.sf.l2j.gameserver.model.actor.instance.L2FolkInstance.onAction(L2
    FolkInstance.java:50)
    at net.sf.l2j.gameserver.clientpackets.Action.runImpl(Action.java:120)
    at net.sf.l2j.gameserver.clientpackets.ClientBasePacket.run(ClientBasePa
    cket.java:85)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    could not insert char quest:
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Dupl
    icate entry '268475313-50300_PKlist-<state>-0' for key 'PRIMARY'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
    va:2155)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :2458)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :2375)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :2359)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewP
    roxyPreparedStatement.java:105)
    at net.sf.l2j.gameserver.model.quest.Quest.createQuestVarInDb(Quest.java
    :863)
    at net.sf.l2j.gameserver.model.quest.Quest.createQuestInDb(Quest.java:10
    03)
    at net.sf.l2j.gameserver.model.quest.Quest.newQuestState(Quest.java:178)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.python.core.PyReflectedFunction.__call__(Unknown Source)
    at org.python.core.PyMethod.__call__(Unknown Source)
    at org.python.core.PyObject.__call__(Unknown Source)
    at org.python.core.PyInstance.invoke(Unknown Source)
    at org.python.pycode.serializable._pyx1437139634667.onFirstTalk$4(__init
    __.py:134)
    at org.python.pycode.serializable._pyx1437139634667.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$352.onFirstTalk(Unknown Source)
    at net.sf.l2j.gameserver.model.quest.Quest.notifyFirstTalk(Quest.java:37
    5)
    at net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance.onAction(L2N
    pcInstance.java:660)
    at net.sf.l2j.gameserver.model.actor.instance.L2FolkInstance.onAction(L2
    FolkInstance.java:50)
    at net.sf.l2j.gameserver.clientpackets.Action.runImpl(Action.java:120)
    at net.sf.l2j.gameserver.clientpackets.ClientBasePacket.run(ClientBasePa
    cket.java:85)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    avatar
    DnR
    Admin
    Admin

    Posts : 1027
    Join date : 2012-12-03

    Re: Help for Top PvP/PK/Online adaptation.

    Post  DnR on 18th July 2015, 11:47

    I can't test it right now, but try removing certain lines from onFirstTalk call.
    It should look like this.

    Code:

    def onFirstTalk (self,npc,player):
       return InitialHtml

    Sponsored content

    Re: Help for Top PvP/PK/Online adaptation.

    Post  Sponsored content


      Current date/time is 19th November 2017, 14:07