Examples of SetQuestAction


Examples of games.stendhal.server.entity.npc.action.SetQuestAction

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES, null,
        ConversationStates.ATTENDING,
        "Wonderful! I'm so relieved! Please take this note to Pedinghaus, you will find him in Ados goldsmiths. Tell him you have a #letter for him.",     
        new MultipleActions(new EquipItemAction("sealed envelope", 1, true),
                  new SetQuestAction(mithrilcloak.getQuestSlot(), "taking_letter"))
        );
   
    // player said no they didn't want to help
    npc.add(
      ConversationStates.QUEST_OFFERED,
View Full Code Here

Examples of games.stendhal.server.entity.npc.action.SetQuestAction

        new AndCondition(new QuestInStateCondition(mithrilcloak.getQuestSlot(), "taking_striped_cloak"), new PlayerHasItemWithHimCondition("blue striped cloak")),
        ConversationStates.ATTENDING,
        "Oh that's from Ida isn't it?! Oh yay! Thank you! Please tell her thanks from me!!",
        new MultipleActions(
                   new DropItemAction("blue striped cloak"),
                   new SetQuestAction(mithrilcloak.getQuestSlot(), "gave_striped_cloak")
                   )
        );


  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.action.SetQuestAction

      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestInStateCondition(QUEST_SLOT, "start")),
      ConversationStates.ATTENDING,
      "Oh, Ceryl's looking for that book back? My goodness! I completely forgot about it... here you go!",
      new MultipleActions(new EquipItemAction("black book", 1, true), new SetQuestAction(QUEST_SLOT, "jynath")));

    /** If player keeps asking for the book, just tell him to hurry up */
    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
 
View Full Code Here

Examples of games.stendhal.server.entity.npc.action.SetQuestAction

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("black book"));
    reward.add(new EquipItemAction("money", 50));
    reward.add(new IncreaseXPAction(100));
    reward.add(new IncreaseKarmaAction(10.0));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));

    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestInStateCondition(QUEST_SLOT, "jynath"),
          new PlayerHasItemWithHimCondition("black book")),
      ConversationStates.ATTENDING,
      "Oh, you got the book back! Phew, thanks!",
      new MultipleActions(reward));

    // There is no other way to get the book.
    // Remove that quest slot so that the player can get
    // it again from Jynath
    // As the book is both bound and useless outside the
    // quest, this is not a problem
    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestInStateCondition(QUEST_SLOT, "jynath"),
          new NotCondition(new PlayerHasItemWithHimCondition("black book"))),
      ConversationStates.ATTENDING,
      "Haven't you got that #book back from #Jynath? Please go look for it, quickly!",
      new SetQuestAction(QUEST_SLOT, "start"));
  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.action.SetQuestAction

        player.equipOrPutOnGround(reward);
        player.notifyWorldAboutChanges();
      }
    });
    reward.add(new IncreaseXPAction(500));
    reward.add(new SetQuestAction(QUEST_SLOT, "eating;"));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT,1));
    reward.add(new IncreaseKarmaAction(10.0));
           
    npc.add(ConversationStates.QUESTION_1,
        ConversationPhrases.YES_MESSAGES,
View Full Code Here

Examples of games.stendhal.server.entity.npc.action.SetQuestAction

          ConversationPhrases.GREETING_MESSAGES,
          new AndCondition(new GreetingMatchesNameCondition(mummyNPC.getName()),
              new QuestInStateCondition(QUEST_SLOT, "start")),
          ConversationStates.ATTENDING,
          "Oh you met my daughter Elisabeth already. You seem like a nice person so it would be really kind, if you can bring her a chocolate bar because I'm not #strong enough for that.",
          new SetQuestAction(QUEST_SLOT, "mummy"));

    mummyNPC.addReply("strong", "I tried to get some chocolate for Elisabeth a few times, but I couldn't make my way through the assassins and bandits running around #there.");
   
    mummyNPC.addReply("there", "They live in and around the Ados castle. Take care there! I also heard about #someone who sells chocolate bars.");
   
View Full Code Here

Examples of games.stendhal.server.entity.npc.action.SetQuestAction

          ConversationPhrases.YES_MESSAGES,
          new PlayerHasRecordedItemWithHimCondition(mithrilcloak.getQuestSlot(),1),
          ConversationStates.QUEST_2_OFFERED,
          "Thank you so much! Listen, I must repay the favour, and I have a wonderful idea. Do you want to hear more?",
          new MultipleActions(new DropRecordedItemAction(mithrilcloak.getQuestSlot(),1),
              new SetQuestAction(mithrilcloak.getQuestSlot(), "fixed_machine"),
              new IncreaseXPAction(100)));
     
      // we stored the needed part name as part of the quest slot
      npc.add(ConversationStates.QUEST_ITEM_QUESTION,
          ConversationPhrases.YES_MESSAGES,
          new NotCondition(new PlayerHasRecordedItemWithHimCondition(mithrilcloak.getQuestSlot(),1)),
          ConversationStates.ATTENDING,
          null,
          new SayRequiredItemAction(mithrilcloak.getQuestSlot(),1,"No, you don't have [the item] I need. What a shame."));
                 

      // player doesn't have the item to fix machine yet       
       npc.add(ConversationStates.QUEST_ITEM_QUESTION,
           ConversationPhrases.NO_MESSAGES,
           null,
           ConversationStates.ATTENDING,
           null,
           new SayRequiredItemAction(mithrilcloak.getQuestSlot(),1,"Ok, well if there's anything else I can help you with just say. Don't forget to bring [the item] next time though!"));

       //offer cloak
       npc.add(ConversationStates.QUEST_2_OFFERED,
           ConversationPhrases.YES_MESSAGES,
           new QuestCompletedCondition(mithrilcloak.getShieldQuestSlot()),
           ConversationStates.ATTENDING,      
           "I will make you the most amazing cloak of mithril. You just need to get me the fabric and any tools I need! First please bring me a couple yards of " + mithrilcloak.getFabricName() + ". The expert on fabrics is the wizard #Kampusch.",
           new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "need_fabric", 10.0));
         

      // player asks for quest but they haven't completed mithril shield quest
      npc.add(ConversationStates.QUEST_2_OFFERED,
        ConversationPhrases.YES_MESSAGES,
        new AndCondition(
                 new NotCondition(new QuestCompletedCondition(mithrilcloak.getShieldQuestSlot())),
                 new QuestStartedCondition(mithrilcloak.getShieldQuestSlot())
                 ),
        ConversationStates.ATTENDING,
        "Oh, I see you are already on a quest to obtain a mithril shield. You see, I was going to offer you a mithril cloak. But you should finish that first. Come back when you've finished the mithril shield quest and we will speak again.",
        new SetQuestAction(mithrilcloak.getQuestSlot(), "need_mithril_shield"));
     
      // player asks for quest but they haven't completed mithril shield quest
      npc.add(ConversationStates.QUEST_2_OFFERED,
          ConversationPhrases.YES_MESSAGES,
          new QuestNotStartedCondition(mithrilcloak.getShieldQuestSlot()),
          ConversationStates.ATTENDING,
          "There are legends of a wizard called Baldemar, in the famous underground magic city, who will forge a mithril shield for those who bring him what it needs. You should meet him and do what he asks. Once you have completed that quest, come back here and speak with me again. I will have another quest for you.",
          new SetQuestAction(mithrilcloak.getQuestSlot(), "need_mithril_shield"));

      // player refused to hear more about another quest after fixing machine
      npc.add(ConversationStates.QUEST_2_OFFERED,
          ConversationPhrases.NO_MESSAGES,
          null,
View Full Code Here

Examples of games.stendhal.server.entity.npc.action.SetQuestAction

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("suntan cream"));
    reward.add(new EquipItemAction("small key", 1, true));
    reward.add(new IncreaseXPAction(1000));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(15));
   
    zara.add(
      ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
View Full Code Here

Examples of games.stendhal.server.entity.npc.action.SetQuestAction

            new QuestNotCompletedCondition("Monogenes")),
        ConversationStates.INFORMATION_1,
        "Hello there, stranger! Don't be too intimidated if people are quiet and reserved... " +
        "the fear of Blordrough and his forces has spread all over the country, and we're all " +
        "a bit concerned. I can offer a few tips on socializing though, would you like to hear them?",
        new SetQuestAction("Monogenes", "done"));
       
    npc.add(
      ConversationStates.ATTENDING,
      ConversationPhrases.HELP_MESSAGES,
      null,
View Full Code Here

Examples of games.stendhal.server.entity.npc.action.SetQuestAction

        null);

    final List<ChatAction> actions = new LinkedList<ChatAction>();
    //actions.add(new StartRecordingKillsAction("dark elf archer", "dark elf captain", "thing"));
    actions.add(new IncreaseKarmaAction(5.0));
    actions.add(new SetQuestAction(QUEST_SLOT, "started"));
    actions.add(new ExamineChatAction("dark-elves-wanted.png", "Wanted!", ""));

    npc.add(
      ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.