Ir para conteúdo
  • Cadastre-se
  • 0

BUFFER


Mn Rafinha

Pergunta

Tô usando a l2jfrozen 1004, eu to tentando adaptar esse script que era da l2jmwx/dot do antigo Caligula para essa aí, alguém pode dar a força?

7rIy1o1nQV_hUUJXsIzlag.png

após eu clicar pra buffar ou em qualquer outro comando da window ele dá esse erro aqui ó 2MB0esBgTTuWSqxluPCTlQ.png

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.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

qn = "912_buffer"

NPC          = [40001]
min_level     = 1
max_level     = 90
min_prise     = 10000
prise_ID     = 57
QuestId      = 912
QuestName    = "buffer"
QuestDesc    = "custom"
InitialHtml  = "buff.htm"
Buff_prise   = 10000
Chant_prise  = 10000
Song_prise     = 10000
Dance_prise     = 10000
Hero_prise     = 10000
Noble_prise     = 10000
Summon_prise = 10000    
Prophecy_prise = 10000
Full_buff_f1_prise = 100000
Full_buff_f2_prise = 200000
Full_buff_f3_prise = 300000
Full_buff_m1_prise = 100000
Full_buff_m2_prise = 200000
Full_buff_m3_prise = 300000

print "importing custom: 912_buffer    OK"

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(prise_ID)
        if count < min_prise :
            htmltext = "<html><head><body>    .</body></html>

 

Só tô pedindo essa help pq to perdidão nesse buffer

ERRO: 

 

jan 19, 2018 4:39:42 AM com.l2jfrozen.gameserver.model.quest.Quest showError
ADVERTÊNCIA: C:\Users\Rafael\eclipse-workspace\Lineage2\server\Stable_1004\gameserver\build\dist\gameserver\data\scripts\custom\912_buffer\__init__.py
Traceback (innermost last):
  File "__init__.py", line 130, in onEvent
NameError: SkillTable

    at org.python.core.Py.NameError(Unknown Source)
    at org.python.core.PyFrame.getglobal(Unknown Source)
    at org.python.pycode._pyx494.onEvent$3(__init__.py:130)
    at org.python.pycode._pyx494.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$456.onEvent(Unknown Source)
    at com.l2jfrozen.gameserver.model.quest.Quest.onAdvEvent(Quest.java:744)
    at com.l2jfrozen.gameserver.model.quest.Quest.notifyEvent(Quest.java:551)
    at com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance.processQuestEvent(L2PcInstance.java:2510)
    at com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:308)
    at com.l2jfrozen.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:75)
    at com.l2jfrozen.gameserver.network.L2GameClient.run(L2GameClient.java:1194)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

 

Editado por Mn Rafinha
Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts recomendados

  • 0

já mudou os imports? parece que o buffer tá tentando fazer uma conexão com a db para usar a tabela SkillTable

Link para o comentário
Compartilhar em outros sites


  • 0

Resolvido, atualizei com esse script, obrigado a quem comentou.

SCRIPT:

import sys
from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from com.l2jfrozen.gameserver.datatables import SkillTable
from com.l2jfrozen.util.database import L2DatabaseFactory
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 = "912_buffer"

NPC          = [912]
min_level     = 1
max_level     = 90
min_prise     = 10000
prise_ID     = 57
QuestId      = 912
QuestName    = "buffer"
QuestDesc    = "custom"
InitialHtml  = "buff.htm"
Buff_prise   = 10000
Chant_prise  = 10000
Song_prise     = 10000
Dance_prise     = 10000
Hero_prise     = 10000
Noble_prise     = 10000
Summon_prise = 10000    
Prophecy_prise = 10000
Full_buff_f1_prise = 100000
Full_buff_f2_prise = 200000
Full_buff_f3_prise = 300000
Full_buff_m1_prise = 100000
Full_buff_m2_prise = 200000
Full_buff_m3_prise = 300000

print "importing custom: 912_buffer    OK"

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(prise_ID)
        if count < min_prise :
            htmltext = "<html><head><body>    .</body></html>

Link para o comentário
Compartilhar em outros sites

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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  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.

Processando...




×
×
  • Criar Novo...

Important Information

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.