Перейти к содержимому
La2Base
Главная
ЗагрузкиВикиФорумFAQ
ruen
Регистрация Войти
ГлавнаяФайлыВикиВойти
  • Главная
  • Загрузки
  • Вики
  • FAQ
  • Обратная связь
  • О проекте
  • Правила
  • Конфиденциальность
  • Условия использования

© 2026 la2base.com · Все права защищены

ruen
Форум/Флуд/Есть у кого НПЦ, который точит оружие
Поиск

Есть у кого НПЦ, который точит оружие

8 ответов210 просмотровСейчас просматривают: 1
itvUser
itvUser

Пользователь

Бывалый

Постов: 114

На форуме с: 20.11.2007

Репутация: +113

Рейтинг: 0

· 20.11.2008, 20:03

У кого есть НПЦ, точащий оружие в заданном пределе для l2jfree 1.2.3+ .


Пожалуйста, очень надо, если есть у кого, выложите мне. Буду очень признателен.

Все, что видил на сайте\форуме, не подходят (пути менял). Вечно какая-то ошибка то про синтаксис то про еще что-то вылезет...

Спасибо,

0
A
alex12345678
· 20.11.2008, 20:12

Так ты ошибку пиши а не нпц который тебе нужен...тыкай спасибку если помог :D :)

Так ты ошибку пиши а не нпц который тебе нужен...тыкай спасибку если помог :D :)

0
F
fox

Автор

Новичок

Постов: 2

На форуме с: 20.11.2008

Рейтинг: 0

· 20.11.2008, 20:36

Traceback (innermost last):
(no code object) at line 0
SyntaxError: ('inconsistent dedent', ('__init__.py', 26, 3, ' if event == "1":'))

ошибка в описанной ранее сборке

0
F
fox

Автор

Новичок

Постов: 2

На форуме с: 20.11.2008

Рейтинг: 0

· 20.11.2008, 21:01

скрипт:

Код
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 = "5654_Enchanter"

#Items constants
SCROLL_ARMOR = 6578        #Item ID required to enchant armor
SCROLL_WEAPON = 6577      #Item ID required to enchant weapon
NUM = 10                             #Item ID quantity for 1 cycle of enchant

#Configs
NPC = 70041                      #NPC ID
loop = 2                               #1 for one-time enchant, 2 for unlimited
ench = 0                            #Enchant levels per cycle
max = 15                           #Maxmum enchant for item


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"
#=========================================
  if event == "13" :
    itm = st.getItemEquipped(13)
    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 = "Stockings has been enchanted"
#=========================================
  if event == "14" :
    itm = st.getItemEquipped(14)
    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 = "Boots has been enchanted"
#=========================================
  if event == "12" :
    itm = st.getItemEquipped(12)
    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 = "Chest has been enchanted"
#=========================================
  if event == "9" :
    itm = st.getItemEquipped(9)
    enchlv = st.getEnchantLevel(itm)
    enchnew = enchlv + ench
    if itm == 8190 :
      htmltext = "<html><head>Do not try to enchant Demonic Sword Zariche! It's prohibited!</body></html>"
      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 ==  8689 :
      htmltext = "<html><head>Do not try to enchant Blood Sword Akamanah! It's prohibited!</body></html>"
      st.exitQuest(1)
    elif st.getQuestItemsCount(SCROLL_WEAPON) < NUM :
      htmltext="Lack of scrolls"
      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(itm,1)
      st.takeItems(SCROLL_WEAPON,NUM)
      st.giveItems(itm,1,enchnew)
      htmltext = "Your weapon 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)
print "------------->Enchanter (scrolls) loaded"

0
itvUser
itvUser

Пользователь

Бывалый

Постов: 114

На форуме с: 20.11.2007

Репутация: +113

Рейтинг: 0

· 21.11.2008, 16:17

Ребят))) Ну помогите пожалуйста что-ли)

0
itvUser
itvUser

Пользователь

Бывалый

Постов: 114

На форуме с: 20.11.2007

Репутация: +113

Рейтинг: 0

· 21.11.2008, 22:42

Неужели так трудуно помочь... Хотябы намек бы дали что-ли что делать и где ошибка..

0
saracin
saracin

Пользователь

Ветеран

Постов: 575

На форуме с: 22.04.2008

Репутация: +503

Рейтинг: 0

· 22.11.2008, 12:34

/ru/forum/dopolneniya-ot-nashikh-polzovatelej/1022
вот доработаный у меня пашет

— Бойтесь

0
itvUser
itvUser

Пользователь

Бывалый

Постов: 114

На форуме с: 20.11.2007

Репутация: +113

Рейтинг: 0

· 22.11.2008, 13:01

А что за сборка у тебя? Ибо это я и ставлю, но как видишь имеется такая ошибка... Выложи свой __init__.py я попробую что-ли..

ошибка как написал fox (со мной работает)...

0
Войдите или зарегистрируйтесь чтобы ответить