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
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 11-08-2013, 03:19 PM   #1
poseidom69
Membro - Soldado
 
Avatar de poseidom69
 
Registrado em: Jul 2013
Posts: 19
Agradeceu: 4
Agradecido 1 Vez em 1 Post
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
Pontos: 1,122, Nível: 18
Pontos: 1,122, Nível: 18 Pontos: 1,122, Nível: 18 Pontos: 1,122, Nível: 18
Atividade: 50%
Atividade: 50% Atividade: 50% Atividade: 50%

Inventório de poseidom69

Padrão Bloqeuar Enchant de capaS.

Como bloquear ou remover enchant de capas do npc enchanter.

__init__.py do npc
Spoiler

import sys
from gameserver import Config
from gameserver.model.quest import State
from gameserver.model.quest import QuestState
from gameserver.model.quest.jython import QuestJython as JQuest

qn = "99940_SafeEnchant"

QuestId = 99940
QuestName = "SafeEnchant"
QuestDesc = "custom"

ENCHANT_CHECK = 1
AMOUNT_OF_ENCHANT = 6
PAYMENT_ITEM_ID = 3470
PAYMENT_AMOUNT = 10
ENCHANT_NPC = 80007
weapons = ['Sword','Blunt','Dagger','Bow','Pole','Etc','Fist' ,'Dual Sword','Dual Fist','Big Sword','Big Blunt','Ancient','Crossbow','Rapier','Dual Dagger']
armors = ['Light','Heavy','Magic','Shield','Sigil']
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 99940_SafeEnchant enchantItem_" + str(Item.getObjectId()) +"\">" + Item.getItem().getName() + "+" + str(Item.getEnchantLevel()) + "</a><br>"
if htmltext == "":
htmltext = "Você não tem itens encantáveis equipados ou em sua mochila."
htmltext = "<html><title>Npc Enchanter</title><body>Para que seu item seja encantado é preciso que o mesmo esteja +0.<br>Por favor selecione um item a ser encantado na lista abaixo:<br><br>" + htmltext + "</body></html>"
elif 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
Item = st.getPlayer().getInventory().getItemByObjectId(ob jId )
if Item :
itemType = Item.getItem().getItemType().toString()
itemEnchant = Item.getEnchantLevel()
if st.getQuestItemsCount(PAYMENT_ITEM_ID) >= PAYMENT_AMOUNT :
if (itemType in weapons and itemEnchant >= ENCHANT_CHECK) or (itemType in armors and itemEnchant >= ENCHANT_CHECK) or (itemType in jewels and itemEnchant >= ENCHANT_CHECK) :
htmltext = "notPlusZero.htm"
else :
Item.setEnchantLevel(itemEnchant+AMOUNT_OF_ENCHANT )
st.takeItems(PAYMENT_ITEM_ID, PAYMENT_AMOUNT)
htmltext = "Congratulations.htm"
else :
htmltext = "notEnoughItems.htm"
else :
htmltext = "Error.htm"
return htmltext

def onTalk (self,npc,player):
htmltext = "<html><body>Houve algum problema relacionado a este Npc, reporte ao administrador.</body></html>"
st = player.getQuestState(qn)
if not st : return htmltext
if npc.getNpcId() == ENCHANT_NPC :
htmltext = "Start.htm"
return htmltext

QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

QUEST.addStartNpc(ENCHANT_NPC)
QUEST.addTalkId(ENCHANT_NPC)

poseidom69 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:01 AM.