Package games.stendhal.server.entity.npc.action

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


    // Player says yes they want to help
    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(
View Full Code Here


    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("letter", "note", "whiggins", "apology"),
        new AndCondition(new QuestInStateCondition(mithrilcloak.getQuestSlot(), "taking_letter"), new PlayerHasItemWithHimCondition("sealed envelope")),
        ConversationStates.ATTENDING,
        "*reads* ... *reads* ... Well, I must say, that is a weight off my mind. Thank you ever so much. Please convey my warmest regards to Whiggins. All is forgiven.",
        new MultipleActions(
                   new DropItemAction("sealed envelope"),
                   new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "took_letter", 10.0)
        ));
  }
View Full Code Here

    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("fabric", "mithril", "cloak", "mithril cloak", "task", "quest"),
        new AndCondition(new QuestInStateCondition(mithrilcloak.getQuestSlot(), "got_fabric"), new PlayerHasItemWithHimCondition(mithrilcloak.getFabricName())),
        ConversationStates.ATTENDING,
        "Wow you got the " + mithrilcloak.getFabricName() + " , that took longer than I expected! Now, to cut it I need magical #scissors, if you would go get them from #Hogart. I will be waiting for you to return.",
        new MultipleActions(
                   new DropItemAction(mithrilcloak.getFabricName()),
                   new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "need_scissors", 10.0)
        ));

    // remind about fabric. there are so many steps to getting fabric
View Full Code Here

    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("clasp", "mithril clasp", "cloak", "mithril cloak", "task", "quest"),
        new AndCondition(new QuestInStateCondition(mithrilcloak.getQuestSlot(), "got_clasp"), new PlayerHasItemWithHimCondition("mithril clasp")),
        ConversationStates.ATTENDING,
        "Wow, Pedinghaus really outdid himself this time. It looks wonderful on your new cloak! Wear it with pride.",
        new MultipleActions(
                   new DropItemAction("mithril clasp"),
                   new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "done", 10.0),
                   new EquipItemAction("mithril cloak", 1, true),
                   new IncreaseXPAction(1000)
                   )
View Full Code Here

    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("blue striped cloak", "mithril", "mithril cloak", "ida"),
        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

            new PlayerHasInfostringItemWithHimCondition("leather legs", "tom"),
            new PlayerHasInfostringItemWithHimCondition("note", "charles"),
            new PlayerHasInfostringItemWithHimCondition("scale armor", "peter")),
        ConversationStates.ATTENDING,
        "Oh my! Peter, Tom, and Charles are all dead? *cries*. Anyway, here is your reward. And keep the IOU.",
        new MultipleActions(actions));

    henry.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(henry.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
View Full Code Here

        Arrays.asList("map", "henry"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "map"),
                new PlayerHasInfostringItemWithHimCondition("map", "henry")),
        ConversationStates.ATTENDING,
        "The map! Wonderful! Thank you. And here is your reward.",
        new MultipleActions(actions));
   
    james.add(ConversationStates.ATTENDING,
        Arrays.asList("map", "henry"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "map"),
                new NotCondition(new PlayerHasInfostringItemWithHimCondition("map", "henry"))),
View Full Code Here

      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

      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
View Full Code Here

    npc.add(ConversationStates.QUESTION_1,
        ConversationPhrases.YES_MESSAGES,
        new PlayerHasItemWithHimCondition("chocolate bar"),
        ConversationStates.ATTENDING,
        "Thank you EVER so much! You are very kind. Here, take a fresh flower as a present.",
        new MultipleActions(reward));
   
 
    // player did have chocolate but put it on ground after question?
    npc.add(ConversationStates.QUESTION_1,
        ConversationPhrases.YES_MESSAGES,
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.npc.action.MultipleActions

Copyright © 2018 www.massapicom. 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.