Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
639_GuardiansOfTheHolyGrail
#1
Не работает квест этот...Сборка la2base 1.1.6 Interlude
Вообщем занёс я его в __init__.py
Закинул в скрипты в quests/
При запуске ГС ошибку не выдаёт...Что мол побитый или не правильный квест...Всё норм грузится..Но НПЦ всё равно не даёт мне квест...Выдаёт вот что:
You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.
Вот код квеста:
Код:
#Guardians of the Holy Grail made by Bloodshed
import sys
from net.l2emuproject.tools.random                  import Rnd
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 = "639_GuardiansOfTheHolyGrail"

#NPCS
DOMINIC = 31350
GREMORY = 32008
GRAIL = 32028

#MONSTERS
MONSTERS = range(22122,22136)

#ITEMS
WATER_BOTTLE = 8070
HOLY_WATER_BOTTLE = 8071
SCRIPTURES = 8069

class Quest (JQuest) :

  def __init__(self,id,name,descr):
    JQuest.__init__(self,id,name,descr)
    self.questItemIds = [WATER_BOTTLE,HOLY_WATER_BOTTLE]

  def onEvent (self, event, st) :
    htmltext = event
    if event == "31350-03.htm" :
      st.set("cond","1")
      st.setState(State.STARTED)
      st.playSound("ItemSound.quest_accept")
    elif event == "31350-07.htm" :
      st.playSound("ItemSound.quest_finish")
      st.exitQuest(1)
    elif event == "31350-08.htm" :
      QI = st.getQuestItemsCount(SCRIPTURES)
      st.takeItems(SCRIPTURES,-1)
      st.giveItems(57,int(1625*QI))
    elif event == "32008-05.htm" :
      st.set("cond","2")
      st.playSound("ItemSound.quest_middle")
      st.giveItems(WATER_BOTTLE,1)
    elif event == "32028-02.htm" :
      st.set("cond","3")
      st.playSound("ItemSound.quest_middle")
      st.takeItems(WATER_BOTTLE,-1)
      st.giveItems(HOLY_WATER_BOTTLE,1)
    elif event == "32008-07.htm" :
      st.set("cond","4")
      st.playSound("ItemSound.quest_middle")
      st.takeItems(HOLY_WATER_BOTTLE,-1)
    elif event == "32008-08a.htm" :
      st.takeItems(SCRIPTURES,4000)
      st.giveItems(959,1)
    elif event == "32008-08b.htm" :
      st.takeItems(SCRIPTURES,400)
      st.giveItems(960,1)
    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

    npcId = npc.getNpcId()
    cond = st.getInt("cond")
    id = st.getState()
    if npcId == DOMINIC :
      if player.getLevel() >= 73 :
        if id == State.CREATED :
          htmltext = "31350-01.htm"
        elif id == State.STARTED and st.getQuestItemsCount(SCRIPTURES) >= 1 :
          htmltext = "31350-04.htm"
        else :
          htmltext = "31350-05.htm"
      else :
        htmltext = "31350-00.htm"
        st.exitQuest(1)
    elif npcId == GREMORY :
      if cond == 1 :
        htmltext = "32008-01.htm"
      elif cond == 2 :
        htmltext = "32008-05b.htm"
      elif cond == 3 :
        htmltext = "32008-06.htm"
      elif cond == 4 and st.getQuestItemsCount(SCRIPTURES) == 0 :
        htmltext = "32008-08d.htm"
      elif cond == 4 and st.getQuestItemsCount(SCRIPTURES) >= 4000 :
        htmltext = "32008-08c.htm"
      elif cond == 4 and st.getQuestItemsCount(SCRIPTURES) >= 400 and st.getQuestItemsCount(SCRIPTURES) < 4000 :
        htmltext = "32008-08.htm"
    elif npcId == GRAIL :
      if cond == 2 :
        htmltext = "32028-01.htm"
    return htmltext

  def onKill(self, npc, player, isPet) :
    st = player.getQuestState(qn)
    if not st : return
    if st.getState() != State.STARTED : return

    cond = st.getInt("cond")
    if st.getState() == State.STARTED :
      if cond >= 1 :
        rr = Rnd.get(10)
        rr = rr + 5
        st.giveItems(SCRIPTURES,rr)
        st.playSound("ItemSound.quest_itemget")
    return

QUEST       = Quest(639,qn,"Guardians of the Holy Grail")

QUEST.addStartNpc(DOMINIC)

QUEST.addTalkId(DOMINIC)
QUEST.addTalkId(GREMORY)
QUEST.addTalkId(GRAIL)

for i in MONSTERS :
    QUEST.addKillId(i)
Помогите пожалуйста с настройкой.
#2
Попробуй в секции Разговора изменить строку:

Код:
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)

    [B][color=DarkRed]if not st : return htmltext[/color][/B] - это попробуй убрать чтоб провести секцию на этап обноружения ID Npc
#3
вообще нужно изменить путь
from net.l2emuproject.tools.random import Rnd
from net.l2emuproject.gameserver.model.quest import State
from net.l2emuproject.gameserver.model.quest import QuestState
from net.l2emuproject.gameserver.model.quest.jython

посмотри как у тебя в остальных прописан путь
#4
Вот исправил как должно быть + сделал, как сказалdiahellfire.Всё работает.Всем спасибо.Внизу полностью рабочий квест под la2base
Код:
#Guardians of the Holy Grail made by Bloodshed
import sys
[color=Red]from net.l2emuproject.tools.random                  import Rnd[/color]
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 = "639_GuardiansOfTheHolyGrail"

#NPCS
DOMINIC = 31350
GREMORY = 32008
GRAIL = 32028

#MONSTERS
MONSTERS = range(22122,22136)

#ITEMS
WATER_BOTTLE = 8070
HOLY_WATER_BOTTLE = 8071
SCRIPTURES = 8069

class Quest (JQuest) :

  def __init__(self,id,name,descr):
    JQuest.__init__(self,id,name,descr)
    self.questItemIds = [WATER_BOTTLE,HOLY_WATER_BOTTLE]

  def onEvent (self, event, st) :
    htmltext = event
    if event == "31350-03.htm" :
      st.set("cond","1")
      st.setState(State.STARTED)
      st.playSound("ItemSound.quest_accept")
    elif event == "31350-07.htm" :
      st.playSound("ItemSound.quest_finish")
      st.exitQuest(1)
    elif event == "31350-08.htm" :
      QI = st.getQuestItemsCount(SCRIPTURES)
      st.takeItems(SCRIPTURES,-1)
      st.giveItems(57,int(1625*QI))
    elif event == "32008-05.htm" :
      st.set("cond","2")
      st.playSound("ItemSound.quest_middle")
      st.giveItems(WATER_BOTTLE,1)
    elif event == "32028-02.htm" :
      st.set("cond","3")
      st.playSound("ItemSound.quest_middle")
      st.takeItems(WATER_BOTTLE,-1)
      st.giveItems(HOLY_WATER_BOTTLE,1)
    elif event == "32008-07.htm" :
      st.set("cond","4")
      st.playSound("ItemSound.quest_middle")
      st.takeItems(HOLY_WATER_BOTTLE,-1)
    elif event == "32008-08a.htm" :
      st.takeItems(SCRIPTURES,4000)
      st.giveItems(959,1)
    elif event == "32008-08b.htm" :
      st.takeItems(SCRIPTURES,400)
      st.giveItems(960,1)
    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

    npcId = npc.getNpcId()
    cond = st.getInt("cond")
    id = st.getState()
    if npcId == DOMINIC :
      if player.getLevel() >= 73 :
        if id == State.CREATED :
          htmltext = "31350-01.htm"
        elif id == State.STARTED and st.getQuestItemsCount(SCRIPTURES) >= 1 :
          htmltext = "31350-04.htm"
        else :
          htmltext = "31350-05.htm"
      else :
        htmltext = "31350-00.htm"
        st.exitQuest(1)
    elif npcId == GREMORY :
      if cond == 1 :
        htmltext = "32008-01.htm"
      elif cond == 2 :
        htmltext = "32008-05b.htm"
      elif cond == 3 :
        htmltext = "32008-06.htm"
      elif cond == 4 and st.getQuestItemsCount(SCRIPTURES) == 0 :
        htmltext = "32008-08d.htm"
      elif cond == 4 and st.getQuestItemsCount(SCRIPTURES) >= 4000 :
        htmltext = "32008-08c.htm"
      elif cond == 4 and st.getQuestItemsCount(SCRIPTURES) >= 400 and st.getQuestItemsCount(SCRIPTURES) < 4000 :
        htmltext = "32008-08.htm"
    elif npcId == GRAIL :
      if cond == 2 :
        htmltext = "32028-01.htm"
    return htmltext

  def onKill(self, npc, player, isPet) :
    st = player.getQuestState(qn)
    if not st : return
    if st.getState() != State.STARTED : return

    cond = st.getInt("cond")
    if st.getState() == State.STARTED :
      if cond >= 1 :
        rr = Rnd.get(10)
        rr = rr + 5
        st.giveItems(SCRIPTURES,rr)
        st.playSound("ItemSound.quest_itemget")
    return

QUEST       = Quest(639,qn,"Guardians of the Holy Grail")

QUEST.addStartNpc(DOMINIC)

QUEST.addTalkId(DOMINIC)
QUEST.addTalkId(GREMORY)
QUEST.addTalkId(GRAIL)

for i in MONSTERS :
    QUEST.addKillId(i)


Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)