A Project for Chronicle 4 based on L2JServer.


    Trying to get an interlude npc work

    Share

    Neeeeeeeeeel.-

    Posts : 44
    Join date : 2014-01-04
    Location : Argentina

    Trying to get an interlude npc work

    Post  Neeeeeeeeeel.- on 5th January 2014, 06:25

    This is the npc script:
    http://pastebin.com/fmMSxLAw

    I know python language but I don't know which imports I need to replace... If you could give me a clue to know which import should be replaced will be awesome:D

    Edit:
    I realized how should I put the imports... there is one that I didn't find but I commented it... (from net.sf.l2j.gameserver.network.L2GameClient import GameClientState)

    I updated pastebin source with my custom __ini__.py

    Is there any way to track the python script errors in the NPC file?

    PS:
    This is pointless, isn't it? (line 580).
    Code:
    if s.getId() > 7028 and s.getId() < 7065 and player.isGM():
     temp=1; j=i+1
    elif s.getId() > 1311 and s.getId() <= 1316:
     temp=1; j=i+1
    elif s.getId() > 1367 and s.getId() <= 1373:
     temp=1; j=i+1
    elif s.getId() > 630 and s.getId() <= 662:
     temp=1; j=i+1
    elif s.getId() > 798 and s.getId() <= 804:
     temp=1; j=i+1
    elif s.getId() > 1488 and s.getId() <= 1491:
     temp=1; j=i+1

    Neeeeeeeeeel.-

    Posts : 44
    Join date : 2014-01-04
    Location : Argentina

    Re: Trying to get an interlude npc work

    Post  Neeeeeeeeeel.- on 11th January 2014, 03:12

    Does anyone can give me any help with this? At least a tip to know where should I start searching, I have no idea...

    Update:
    I put this
    Code:
       except Exception,e:
            print "Failed to import custom : ",name
            print str(e)

    Now I see: cannot import name EnchantGroupsTable
    There is no EnchantGroupsTable.java in datatables, where I found the same info?

    Update 2: EnchantGroupsTable done.

    Now where can I find the same info as in GameClientState & CharSelectionInfo
    They are used here:
    Code:
    client = player.getClient()
    player.setClient(None)
    player.deleteMe()
    client.setActiveChar(None)
    client.setState(GameClientState.AUTHED)
    client.sendPacket(RestartResponse.valueOf(True))
    cl = CharSelectionInfo(client.getAccountName(), client.getSessionId().playOkID1)
    client.sendPacket(cl)
    client.setCharSelection(cl.getCharInfo())

      Current date/time is 26th September 2017, 21:17