[Share] Missing Quests Part 1

    Share

    roko91

    Posts : 238
    Join date : 2013-01-30
    Age : 26
    Location : Bulgaria

    [Share] Missing Quests Part 1

    Post  roko91 on 8th July 2013, 19:37

    Yesterday I noticed that many quests are missing and that's why I decided to adapt existing quests from post-C4 projects for L2JLisvus. I managed to adapt 10 quests then I tested all of them and they work perfect Smile
    The following list shows which missing quests I adapted so far:
    Code:
    '11_SecretMeetingWithKetraOrcs',
    '12_SecretMeetingWithVarkaSilenos',
    '13_ParcelDelivery',
    '14_WhereaboutsOfTheArchaeologist',
    '15_SweetWhisper',
    '16_TheComingDarkness',
    '17_LightAndDarkness',
    '18_MeetingWithTheGoldenRam',
    '20_BringUpWithLove',
    '353_PowerOfDarkness',
    Here is the share:
    http://www.mediafire.com/download/7ptcdlql16g7c7z/missing_quests_part1.zip

    I was planning to adapt more quests such as:
    Code:
    '21_HiddenTruth',
    '22_TragedyInVonHellmannForest',
    '23_LidiasHeart',
    '24_InhabitantsOfTheForrestOfTheDead',
    '25_HidingBehindTheTruth',
    '27_ChestCaughtWithABaitOfWind',
    '28_ChestCaughtWithABaitOfIcyAir',
    '29_ChestCaughtWithABaitOfEarth',
    '30_ChestCaughtWithABaitOfFire',
    '50_LanoscosSpecialBait',
    '51_OFullesSpecialBait',
    '52_WilliesSpecialBait',
    '53_LinnaeusSpecialBait',
    and etc. but they all need method onTalk (self,npc,st) to be changed to onTalk (self,npc,player) to do check if the required quest is completed in order to start each of them (e.g. player.getQuestState("21_HiddenTruth")). I just don't know if it's possible with attribute "st" instead of "player". I know that DnR is tired of quest engine updates but I think this one is urgent. I can easily adapt all "__init__.py" scripts to match the altered method but the core part is quite difficult for me. I wish to do the "datapack" (scripts) part if DnR wishes to do the "core" part in order to split the work (just a suggestion). Then I will adapt from post-C4 projects a lot of quests that are currently missing. Just consider it please Smile


    Last edited by roko91 on 11th July 2013, 03:09; edited 1 time in total

    DnR
    Admin
    Admin

    Posts : 985
    Join date : 2012-12-03

    Re: [Share] Missing Quests Part 1

    Post  DnR on 9th July 2013, 16:04

    Excellent work. Smile
    I' m not planning to change onTalk method variables.
    QuestState seems more efficient for onTalk than L2PcInstance to me, that's why i changed everything apart from it.
    I know it's harder to adapt quests due to this, but if that makes you feel better, once you share quests, i can adapt onTalk parts.
    You've already done enough. Smile

    Thank you very much. Smile

    roko91

    Posts : 238
    Join date : 2013-01-30
    Age : 26
    Location : Bulgaria

    Re: [Share] Missing Quests Part 1

    Post  roko91 on 9th July 2013, 18:43

    DnR wrote:Excellent work. Smile
    I' m not planning to change onTalk method variables.
    QuestState seems more efficient for onTalk than L2PcInstance to me, that's why i changed everything apart from it.
    I know it's harder to adapt quests due to this, but if that makes you feel better, once you share quests, i can adapt onTalk parts.
    You've already done enough. Smile

    Thank you very much. Smile

    Don't thank me ... it's my pleasure Smile
    If you tell me how to check if the required quest is completed I will do all work by myself because now I can't test them (I don't know what I share). I talking of course about the quests I mentioned above that I was planning to adapt. That check is the only problem I face for now Smile

    DnR
    Admin
    Admin

    Posts : 985
    Join date : 2012-12-03

    Re: [Share] Missing Quests Part 1

    Post  DnR on 9th July 2013, 20:28

    roko91 wrote:
    Don't thank me ... it's my pleasure Smile
    If you tell me how to check if the required quest is completed I will do all work by myself because now I can't test them (I don't know what I share). I talking of course about the quests I mentioned above that I was planning to adapt. That check is the only problem I face for now Smile

    Just take a look at this. I think you will figure out what to do.
    Scripts usually have a state check in "starting NPC". If you add the check before npc id checks, player will receive "This quest has already been completed." text by all NPCs related to the quest (provided that he/she clicks quest ofc).

    All non-repeatable quests have a complete state "st.setState(COMPLETED)", once completed.

    In onTalk, or onEvent (depending on html), you can return html instantly.
    if id == COMPLETED :
      return "<html><body>This quest has already been completed.</body></html>"

    "id" variable is st.getState()
    "id = st.getState()"

    or do the same as done in this code.
    def onTalk (self,npc,st):
      htmltext = "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>"
      npcId = npc.getNpcId()
      id = st.getState()
      level = st.getPlayer().getLevel()
      cond = st.getInt("cond")
      if npcId == LIESEL and cond == 0 :
        if id == COMPLETED :
          htmltext = "<html><body>This quest has already been completed.</body></html>"

        elif level < 74 :
          htmltext = "8263-1.htm"
          st.exitQuest(1)
        elif level >= 74 :
          htmltext = "8263-0.htm"
      elif npcId == LIESEL and cond == 1 :
        htmltext = "8263-2.htm"
      elif npcId == GHOST_OF_ADVENTURER and cond == 1 and id == STARTED:
        htmltext = "8538-0.htm"
      return htmltext

    I hope i helped. Smile

    roko91

    Posts : 238
    Join date : 2013-01-30
    Age : 26
    Location : Bulgaria

    Re: [Share] Missing Quests Part 1

    Post  roko91 on 9th July 2013, 21:06

    That's the way you check the state of the current quest but what I have to do if I have to check the state of another quest? For example: "22_TragedyInVonHellmannForest" needs "21_HiddenTruth" to be completed in order to start. If the method onTalk have "player" attribute instead of "st" this check is simple: player.getQuestState("21_HiddenTruth"). But now I can't access "player" to get another quest state ("st" is only for current quest right?). I think to try with "st.getPlayer().getQuestState("21_HiddenTruth")". I hope it will work Smile

    DnR
    Admin
    Admin

    Posts : 985
    Join date : 2012-12-03

    Re: [Share] Missing Quests Part 1

    Post  DnR on 9th July 2013, 21:38

    roko91 wrote:That's the way you check the state of the current quest but what I have to do if I have to check the state of another quest? For example: "22_TragedyInVonHellmannForest" needs "21_HiddenTruth" to be completed in order to start. If the method onTalk have "player" attribute instead of "st" this check is simple: player.getQuestState("21_HiddenTruth"). But now I can't access "player" to get another quest state ("st" is only for current quest right?). I think to try with "st.getPlayer().getQuestState("21_HiddenTruth")". I hope it will work Smile
    Yes, it will.
    Once you talk to starting npc, a quest state will automatically be created.

    qs = st.getPlayer().getQuestState("21_HiddenTruth")
    if not qs :
     st.exitQuest(1)
     return "your text"

    In that case, you just have to exit quest state that was created the moment you talked to npc.

    roko91

    Posts : 238
    Join date : 2013-01-30
    Age : 26
    Location : Bulgaria

    Re: [Share] Missing Quests Part 1

    Post  roko91 on 9th July 2013, 21:40

    I test it ATM and it seems promising for now Smile

    Sponsored content

    Re: [Share] Missing Quests Part 1

    Post  Sponsored content


      Current date/time is 28th July 2017, 18:03