Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo.
Caso seja registrado, efetue login.
Esqueceu sua senha? Clique aqui
Recomendamos o uso do Mozilla Firefox para uma melhor visualização.    


Início Postados Hoje Marcar Fóruns Como Lidos Álbums Banidos SE Team Medalhas
Voltar   Secret Experience > Área L2J > [L2J] Dúvidas > [L2J] Dúvidas Solucionadas
Registrar Loteria VIPStaff SERegras do fórum Comunidade Arcade Postados Hoje Pesquisar Experience
   

Secret Experience.NET   Secret Experience Corporation - Welcome To The Real World
     Anúncios SE

 
 
Ferramentas do Tópico Modos de Exibição
Prev Post Anterior   Próximo Post Next
Antigo 04-10-2009, 06:45 AM   #1
 
Avatar de CavaleiroNegro
 
Registrado em: May 2009
Localização: Minas Gerais-Pouso Alegre
Posts: 2,249
Agradeceu: 754
Agradecido 2,075 Vezes em 922 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
Enviar mensagem via Windows Live Messenger para CavaleiroNegro
Pontos: 11,212, Nível: 69
Pontos: 11,212, Nível: 69 Pontos: 11,212, Nível: 69 Pontos: 11,212, Nível: 69
Atividade: 16%
Atividade: 16% Atividade: 16% Atividade: 16%

Nome Real: Júlio César R.de Morães

Inventório de CavaleiroNegro

Padrão Erro de Script

Bom pessoal vamos la.

Estou mexeno numa rev EMU Gracia CT2 aqui e fazendo um NPC Enchante.

Consegui fazer os scripts tudo certinho porém acontece isso ao clicar para enchantar a arma :


[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
import sys
from net.l2emuproject.gameserver.model.quest import State
from net.l2emuproject.gameserver.model.quest import QuestState
from net.l2emuproject.gameserver.model.quest.jython import QuestJython as JQuest

qn = "safe_enchant"

ENCHANT_NPC = 90000
weapons = ['Sword','Blunt','Dagger','Bow','Pole','Etc','Fist','Dual Sword','Dual Fist','Big Sword','Big Blunt','Ancient','Crossbow','Rapier']
armors = ['Light','Heavy','Magic','Shield']
jewels = ['None']
acceptableItemTypes = weapons+armors+jewels

class Quest (JQuest) :

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

  def onEvent (self,event,st) :
    if event == "choose_item" :
      htmltext = ""
      for Item in st.getPlayer().getInventory().getItems():
        # given an item instance, get the item template to check what type it is
        itemType = Item.getItem().getItemType().toString()
        itemGrade = Item.getItem().getCrystalType()
        if itemType in acceptableItemTypes and itemGrade > 0 :
          htmltext += "<a action=\"bypass -h Quest safe_enchant enchantItem_" + str(Item.getObjectId()) +"\">" + Item.getItem().getName() + "+" + str(Item.getEnchantLevel()) + "</a><br>"
      if htmltext == "":
        htmltext = "You have no enchantable items in your inventory"
      htmltext = "<html><body>Enchanter:<br>Please choose which item you wish me to enchant, from the below list:<br>" + htmltext + "</body></html>"
    if event.startswith("enchantItem_"):
      # get the object id out of the event string
      objId = int(event.replace("enchantItem_", ""))
      # to avoid exploitation, check if the stored objectId still corresponds to an existing item
      # and if that item is still not equipped
      Item = st.getPlayer().getInventory().getItemByObjectId(objId )
      if Item and not Item.isEquipped() :
        itemType = Item.getItem().getItemType().toString()
        itemEnchant = Item.getEnchantLevel()
        if st.getQuestItemsCount(57) >= 10 :
           if (itemType in weapons and itemEnchant >= Config.ENCHANT_MAX_WEAPON) or (itemType in armors and itemEnchant >= Config.ENCHANT_MAX_ARMOR) or (itemType in jewels and itemEnchant >= Config.ENCHANT_MAX_JEWELRY) :
              htmltext = "reachedMaxEnchant.htm"
           else :
             Item.setEnchantLevel(itemEnchant+1)
             st.takeItems(57, 1000000)
             htmltext = "congratulations.htm"
        else :
          htmltext = "notEnoughItems.htm"
      else :
        htmltext = "cheater.htm"
    return htmltext

  def onTalk (self,npc,player):
    htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"
    st = player.getQuestState(qn)
    if not st : return htmltext
    if npc.getNpcId() == ENCHANT_NPC :
       htmltext = "1.htm"
    return htmltext

QUEST    = Quest(9000,qn,"Custom")

QUEST.addStartNpc(ENCHANT_NPC)
QUEST.addTalkId(ENCHANT_NPC)
Quem puder me ajudar para saber qual seria o erro ficarei grato...(Analizei aqui porém não sei qual o poblema real,senão me engano é por causa do caminho java da rev)

__________________
Olá voce é novo na SecretExperience ?

Hum então voce ja deve ter lido as regras ? Não ? Então leia nossas regras evite ser alertado :
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
Ainda tem dúvida de algo ? Então leia nosso FAQ : [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
CavaleiroNegro está offline   Responder com Citação
Links Patrocinados
 


Regras para Posts
Você não pode postar novos tópicos
Você não pode postar respostas
Você não pode postar anexos
Você não pode editar seus posts

Código [IMG] Sim
Código HTML Não

Ir para...


Horários baseados na GMT -3. Agora são 01:02 AM.