Ребят, нужен срочно НПЦ Enchanter для l2jfree последних релизов (1.2.3.+). Какие не пробовал - выдает ошибка синтаксиса...
Надеюсь на Вашу помощь, ибо больше никто не может мне помочь
Добавлено через 6 часов 1 минуту
Ну пожалуйста, помогите кто-нибудь.. Или переделайте уже имеющегося под l2jfree, а то я в питоне совсем не шарю...
Ошибка сдежующая:
Traceback (innermost last):
(no code object) at line 0
SyntaxError: ('invalid syntax', ('__init__.py', 24, 1, 'def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)'))
Сам код:
Помогите пожалуйста.. Я уже не знаю что делать...
Надеюсь на Вашу помощь, ибо больше никто не может мне помочь
Добавлено через 6 часов 1 минуту
Ну пожалуйста, помогите кто-нибудь.. Или переделайте уже имеющегося под l2jfree, а то я в питоне совсем не шарю...
Ошибка сдежующая:
Traceback (innermost last):
(no code object) at line 0
SyntaxError: ('invalid syntax', ('__init__.py', 24, 1, 'def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)'))
Сам код:
Код:
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent (self,event,st) :
htmltext = " "
if event == "1" :
itm = st.getItemEquipped(1)
enchlv = st.getEnchantLevel(itm)
enchnew = enchlv + ench
if st.getQuestItemsCount(SCROLL_ARMOR) < NUM :
htmltext="Lack of scrolls"
st.exitQuest(1)
elif st.getQuestItemsCount(itm) >= 2 :
htmltext="<html><head>The same item lies in your inventory.</body></html>"
st.exitQuest(1)
elif itm == 0 :
htmltext = "<html><head>You should ware an item to proceed enchant!</body></html>"
st.exitQuest(1)
elif enchnew > max :
htmltext = "<html><head>You're unable to enchant over the limit!</body></html>"
st.exitQuest(1)
else:
st.takeItems(SCROLL_ARMOR,NUM)
st.takeItems(itm,1)
st.giveItems(itm,1,enchnew)
htmltext = "Earring has been enchanted"
#=========================================
if event == "4" :
itm = st.getItemEquipped(4)
enchlv = st.getEnchantLevel(itm)
enchnew = enchlv + ench
if st.getQuestItemsCount(SCROLL_ARMOR) < NUM :
htmltext="Lack of scrolls"
st.exitQuest(1)
elif st.getQuestItemsCount(itm) >= 2 :
htmltext="<html><head>The same item lies in your inventory. </body></html>"
st.exitQuest(1)
elif itm == 0 :
htmltext = "<html><head>You should ware an item to proceed enchant!</body></html>"
st.exitQuest(1)
elif enchnew > max :
htmltext = "<html><head>You're unable to enchant over the limit!</body></html>"
st.exitQuest(1)
else:
st.takeItems(SCROLL_ARMOR,NUM)
st.takeItems(itm,1)
st.giveItems(itm,1,enchnew)
htmltext = "Necklace has been enchanted"
#=========================================
if event == "5" :
itm = st.getItemEquipped(5)
enchlv = st.getEnchantLevel(itm)
enchnew = enchlv + ench
if st.getQuestItemsCount(SCROLL_ARMOR) < NUM :
htmltext="Lack of scrolls"
st.exitQuest(1)
elif st.getQuestItemsCount(itm) >= 2 :
htmltext="<html><head>The same item lies in your inventory. </body></html>"
st.exitQuest(1)
elif itm == 0 :
htmltext = "<html><head>You should ware an item to proceed enchant!</body></html>"
st.exitQuest(1)
elif enchnew > max :
htmltext = "<html><head>You're unable to enchant over the limit!</body></html>"
st.exitQuest(1)
else:
st.takeItems(SCROLL_ARMOR,NUM)
st.takeItems(itm,1)
st.giveItems(itm,1,enchnew)
htmltext = "Ring has been enchanted"
#=========================================
if event == "6" :
itm = st.getItemEquipped(6)
enchlv = st.getEnchantLevel(itm)
enchnew = enchlv + ench
if st.getQuestItemsCount(SCROLL_ARMOR) < NUM :
htmltext="Lack of scrolls"
st.exitQuest(1)
elif st.getQuestItemsCount(itm) >= 2 :
htmltext="<html><head>The same item lies in your inventory. </body></html>"
st.exitQuest(1)
elif itm == 0 :
htmltext = "<html><head>You should ware an item to proceed enchant!</body></html>"
st.exitQuest(1)
elif enchnew > max :
htmltext = "<html><head>You're unable to enchant over the limit!</body></html>"
st.exitQuest(1)
else:
st.takeItems(SCROLL_ARMOR,NUM)
st.takeItems(itm,1)
st.giveItems(itm,1,enchnew)
htmltext = "Ring has been enchanted"
#=========================================
if event == "10" :
itm = st.getItemEquipped(10)
enchlv = st.getEnchantLevel(itm)
enchnew = enchlv + ench
if st.getQuestItemsCount(SCROLL_ARMOR) < NUM :
htmltext="Lack of scrolls"
st.exitQuest(1)
elif st.getQuestItemsCount(itm) >= 2 :
htmltext="<html><head>The same item lies in your inventory. </body></html>"
st.exitQuest(1)
elif itm == 0 :
htmltext = "<html><head>You should ware an item to proceed enchant!</body></html>"
st.exitQuest(1)
elif enchnew > max :
htmltext = "<html><head>You're unable to enchant over the limit!</body></html>"
st.exitQuest(1)
else:
st.takeItems(SCROLL_ARMOR,NUM)
st.takeItems(itm,1)
st.giveItems(itm,1,enchnew)
htmltext = "Shield has been enchanted"
#=========================================
if event == "8" :
itm = st.getItemEquipped(8)
enchlv = st.getEnchantLevel(itm)
enchnew = enchlv + ench
if st.getQuestItemsCount(SCROLL_ARMOR) < NUM :
htmltext="Lack of scrolls"
st.exitQuest(1)
elif st.getQuestItemsCount(itm) >= 2 :
htmltext="<html><head>The same item lies in your inventory. </body></html>"
st.exitQuest(1)
elif itm == 0 :
htmltext = "<html><head>You should ware an item to proceed enchant!</body></html>"
st.exitQuest(1)
elif enchnew > max :
htmltext = "<html><head>You're unable to enchant over the limit!</body></html>"
st.exitQuest(1)
else:
st.takeItems(SCROLL_ARMOR,NUM)
st.takeItems(itm,1)
st.giveItems(itm,1,enchnew)
htmltext = "Helmet has been enchanted"
#=========================================
if event == "2" :
itm = st.getItemEquipped(2)
enchlv = st.getEnchantLevel(itm)
enchnew = enchlv + ench
if st.getQuestItemsCount(SCROLL_ARMOR) < NUM :
htmltext="Lack of scrolls"
st.exitQuest(1)
elif st.getQuestItemsCount(itm) >= 2 :
htmltext="<html><head>The same item lies in your inventory. </body></html>"
st.exitQuest(1)
elif itm == 0 :
htmltext = "<html><head>You should ware an item to proceed enchant!</body></html>"
st.exitQuest(1)
elif enchnew > max :
htmltext = "<html><head>You're unable to enchant over the limit!</body></html>"
st.exitQuest(1)
else:
st.takeItems(SCROLL_ARMOR,NUM)
st.takeItems(itm,1)
st.giveItems(itm,1,enchnew)
htmltext = "Earring has been enchanted"
#=========================================
if event == "11" :
itm = st.getItemEquipped(11)
enchlv = st.getEnchantLevel(itm)
enchnew = enchlv + ench
if st.getQuestItemsCount(SCROLL_ARMOR) < NUM :
htmltext="Lack of scrolls"
st.exitQuest(1)
elif st.getQuestItemsCount(itm) >= 2 :
htmltext="<html><head>The same item lies in your inventory. </body></html>"
st.exitQuest(1)
elif itm == 0 :
htmltext = "<html><head>You should ware an item to proceed enchant!</body></html>"
st.exitQuest(1)
elif enchnew > max :
htmltext = "<html><head>You're unable to enchant over the limit!</body></html>"
st.exitQuest(1)
else:
st.takeItems(SCROLL_ARMOR,NUM)
st.takeItems(itm,1)
st.giveItems(itm,1,enchnew)
htmltext = "Gloves has been enchanted"
#=========================================
(вырезал из-за сильно большого кол-ва символов)
#=========================================
return htmltext
def onTalk (self,npc,player) :
st = player.getQuestState(qn)
npcId = npc.getNpcId()
id = st.getInt("cound")
htmltext = "<html><head><body>I have nothing to say to you</body></html>"
if not st : return htmltext
if npcId == NPC:
if id == loop:
htmltext = "You can't enchant any more"
else:
htmltext = "ench.htm"
return htmltext
QUEST = Quest(5654, qn, "custom")
QUEST.addStartNpc(NPC)
QUEST.addTalkId(NPC)
Помогите пожалуйста.. Я уже не знаю что делать...