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

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


      ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.ATTENDING,
      "Once I had a nice #'leather cuirass', but it was destroyed during the last robbery. If you find a new one, I'll give you a reward.",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "start", 5.0));

    // player is not willing to help
    npc.add(
      ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES, null,
      ConversationStates.ATTENDING,
      "Well, then I guess I'll just duck and cover.",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));

    // player wants to know what a leather cuirass is
    npc.add(
      ConversationStates.ATTENDING,
      Arrays.asList("leather cuirass", "leather", "cuirass"),
View Full Code Here


    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.ATTENDING,
      "Thank you! You can ask Florence Bouillabaisse to make you fish soup. I think she's in Ados market somewhere.",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "start", 2.0));

    // player is not willing to help
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES,
      null,
      ConversationStates.ATTENDING,
      "Oh no, please, he's so sick.",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));
  }
View Full Code Here

      ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES,
      null,
      ConversationStates.IDLE,
      "Oh, well forget it then, if you don't want an immortal sword...",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -10.0));

    npc.addReply("exact",
      "This archaic magic requires that the ingredients are added on a exact order.");
  }
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES, null,
        ConversationStates.ATTENDING,
        "Oh, great! I am really hungry and thirsty. 3 #sandwiches, 3 bottles of #beer and 3 glasses of #wine should be enough. Please bring it to me and say #food!",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "start", 5.0));

    // Player says no, they've lost karma.
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.NO_MESSAGES, null, ConversationStates.IDLE,
        "Oh, thats not nice... but ok. Maybe the next visitor can help me.",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -10.0));
   
    npc.addReply("beer", "In an INN of course!");
    npc.addReply("wine", "In an INN of course!");
    npc.addReply(Arrays.asList("sandwiches", "sandwich"), "Come on, ask in a bakery!");
  }
View Full Code Here

    actions.add(new IncreaseXPAction(600));
    actions.add(new DropItemAction("sandwich",3));
    actions.add(new DropItemAction("beer",3));
    actions.add(new DropItemAction("wine",3));
    // the extra parts in the quest state are for wrvil and mrotho not to give them cloaks and armor twice
    actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "clothes;none;none", 2.0));   
   
    npc.add(ConversationStates.QUEST_ITEM_QUESTION, ConversationPhrases.YES_MESSAGES,
        new AndCondition(
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new PlayerHasItemWithHimCondition("sandwich",3),
View Full Code Here

 
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(4000));
    actions.add(new DropInfostringItemAction("golden armor","Phalk"));
    actions.add(new DropInfostringItemAction("dwarf cloak","Phalk"));
    actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "done", 5.0))
    actions.add(new EquipItemAction("dwarvish armor", 1, true));
   
    npc.add(ConversationStates.ATTENDING, "clothes",
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, 0, "clothes"),
        new PlayerHasInfostringItemWithHimCondition("golden armor","Phalk"),
View Full Code Here

   */
  protected void acceptQuest() {
    concreteQuest.getNPC().add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.IDLE, concreteQuest.respondToQuestAcception(),
      new SetQuestAndModifyKarmaAction(concreteQuest.getSlotName(), "", concreteQuest.getKarmaDiffForQuestResponse()));
  }
View Full Code Here

TOP

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

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.