Ir para conteúdo
  • Cadastre-se
  • 0

ERRO NPC HERO REWARD - L2JFROZEN - LIONNA


Mullet

Pergunta

BOM, ESTOU TENTANDO COLOCAR ESTE NPC HERO REWARD EM MEU SERVIDOR

POREM, ESTÁ DANDO UM ERRO EM UMA LINHA

VOU POSTAR A FOTO DO ERRO E EM BAIXO O CODIGO DO ARQUIVO

 

12065666_1654624401421547_72172579405192

 

 

import sys
from com.l2jlionna.gameserver.model.actor.instance import L2PcInstance
from com.l2jlionna.gameserver.model.actor.instance import L2NpcInstance
from java.util import Iterator
from com.l2jlionna.gameserver.datatables import SkillTable
from com.l2jlionna.util.database import L2DatabaseFactory
from com.l2jlionna.gameserver.model.actor.appearance import PcAppearance
from com.l2jlionna.gameserver.model.quest import State
from com.l2jlionna.gameserver.model.actor.appearance import PcAppearance
from com.l2jlionna.gameserver.model.quest import QuestState
from com.l2jlionna.gameserver.model.quest.jython import QuestJython as JQuest
qn = "36_NpcHero"
NPC=[36]
GOLDBAR = 5556
DESTINY_CIRCLET = 0
QuestId = 36
QuestName = "NpcHero"
QuestDesc = "custom"
InitialHtml = "1.htm"
print "--INFO Loaded: Custom Hero Seller--"
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 < 10 and st.getPlayer().getLevel() < 80 :
htmltext = "<html><head><body>You dont have enough items to use this Action.</body></html>"
elif st.getPlayer().isHero() == 1 :
htmltext = "<html><head><body> Sorry, You Have Already Hero Status!</body></html>"
elif st.getQuestItemsCount(GOLDBAR) < 300 :
htmltext = "<html><head><body>You dont have enough items to use this Action.</body></html>"
else:
st.getPlayer().setTarget(st.getPlayer())
if event == "2":
st.takeItems(GOLDBAR,300)
st.getPlayer().setHero(True)
st.giveItems(DESTINY_CIRCLET,1)
st.playSound("ItemSound.quest_finish")
return "HeroFinish.htm"
st.exitQuest(1)
if htmltext != event:
st.setState(State.COMPLETED)
st.exitQuest(1)
return htmltext
def onTalk (self,npc,player):
npcId = npc.getNpcId()
st = player.getQuestState(qn)
htmltext = u"<html><head><body>\u041c\u043d\u0435 \u043d\u0435 \u0447\u0435\u0433\u043e \u0442\u0435\u0431\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c.</body></html>"
return InitialHtml
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)
a linha que está dando erro é essa
st.getPlayer().setHero(True)

 

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts recomendados


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.