Ir para conteúdo
  • Cadastre-se
  • 0

[GRACIA PT2> L2jfree 1.2.6 ]Erro python


patricktb

Pergunta

Onde esta o erro?

 

 

Error on: C:\Gracia\L2WarHead\Servidor\Gameserver\data\scripts\teleports\3030_Vips\__init__.py.error.log

Line: -1 - Column: -1

 

Traceback (innermost last):

(no code object) at line 0

SyntaxError: ('invalid syntax', ('__init__.py', 22, 37, ' st.getPlayer().isCharViP() == 0 :'))

 

 

 

Parte do scrypt.

 

# Created by Ham Wong on 2007.02.28

import sys

from com.l2jfree.gameserver.model.quest import State

from com.l2jfree.gameserver.model.quest import QuestState

from com.l2jfree.gameserver.model.quest.jython import QuestJython as JQuest

 

qn = "3030_Vips"

NPC=[9900]

 

html = '<html><body>Oh, you\'re a Noblesse! Why didn\'t you say so? We offer a special level of service to the Noblesse!<br><br>Use the Noblesse Gate Pass.<br>\

<a action="bypass -h %bypass%">Teleport to Hunting Grounds</a><br><br>Do not Use the Noblesse Gate Pass<br>\

<a action="bypass -h npc_%objectId%_Chat 2">Teleport to Hunting Grounds</a><br><a action="bypass -h npc_%objectId%_Chat 0">Return</a></body></html>'

 

class Quest (JQuest) :

 

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

 

def onEvent (self,event,st):

return event

 

def onTalk (self,npc,player):

st.getPlayer().isCharViP() == 0 :

if player.ischarViP() == 1:

htmltext='nivel_1.htm'

else :

htmltext='naovip.htm'

return htmltext

 

QUEST = Quest(3030,qn,"Teleports")

 

for item in NPC:

QUEST.addStartNpc(item)

QUEST.addTalkId(item)

Servidor Lineage II Sem Custom:

Clique aqui

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts recomendados


Mesmo erro:

 

Error on: C:\Gracia\L2WarHead\Servidor\Gameserver\data\scripts\teleports\3030_Vips\__init__.py.error.log

Line: -1 - Column: -1

 

Traceback (innermost last):

(no code object) at line 0

SyntaxError: ('invalid syntax', ('__init__.py', 23, 31, ' if player.ischarViP() == 1;'))

Servidor Lineage II Sem Custom:

Clique aqui

Link para o comentário
Compartilhar em outros sites

Pelo que pesquizei era este mesmo: ' player.isCharVip()'

 

 

Ainda nao estou copilando se precisa para resolver isso ah vou :C .

 

 

VO mudar as variavei para ver se da algo ...

Editado por patricktb

Servidor Lineage II Sem Custom:

Clique aqui

Link para o comentário
Compartilhar em outros sites

Vamos la usei o systema que tem aki no forum postado de .py para vip:

 

Ficando o Novo Assim:

 

# Created by Ham Wong on 2007.02.28

import sys

from com.l2jfree.gameserver.model.quest import State

from com.l2jfree.gameserver.model.quest import QuestState

from com.l2jfree.gameserver.model.quest.jython import QuestJython as JQuest

 

qn = "3030_Vips"

NPC=[9900]

 

html = '<html><body>Oh, you\'re a Noblesse! Why didn\'t you say so? We offer a special level of service to the Noblesse!<br><br>Use the Noblesse Gate Pass.<br>\

<a action="bypass -h %bypass%">Teleport to Hunting Grounds</a><br><br>Do not Use the Noblesse Gate Pass<br>\

<a action="bypass -h npc_%objectId%_Chat 2">Teleport to Hunting Grounds</a><br><a action="bypass -h npc_%objectId%_Chat 0">Return</a></body></html>'

 

class Quest (JQuest) :

 

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

 

def onEvent (self,event,st):

return event

 

def onTalk (self,npc,player):

if player.isVip() == 1 :

htmltext = "nivel_1.htm"

return htmltext

elif player.isVip() == 2 :

htmltext = "nivel_1.htm"

return htmltext

elif player.isVip() == 3 :

htmltext = "nivel_2.htm"

return htmltext

else :

htmltext="naovip.htm"

return htmltext

 

 

QUEST = Quest(2000,qn,"Teleports")

 

for item in NPC:

QUEST.addStartNpc(item)

QUEST.addTalkId(item)

 

 

Nao da erro ao ligar e aparece a seguinte mensagem: INFO Replaced: (3030_Vips) with a new version (3030_Vips)

 

 

E ao logar tentando passar NPC para puxar os htm da queest ele aparece assim:

 

 

erro.jpg

 

 

Onde esta o erro? ^^ .

Servidor Lineage II Sem Custom:

Clique aqui

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.