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

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


        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


        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
    // that the player could be in many quest states and she still is just waiting for fabric
    npc.add(ConversationStates.ATTENDING,
View Full Code Here

        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("thanks", "josephine", "mithril", "cloak", "mithril cloak", "task", "quest"),
        new QuestInStateCondition(mithrilcloak.getQuestSlot(), "gave_striped_cloak"),
        ConversationStates.ATTENDING,
        "Aw, Josephine is so sweet. I'm glad she liked her blue striped cloak. Now, YOUR cloak is nearly ready, it just needs a clasp to fasten it! My friend #Pedinghaus will make it for you, if you go and ask him.",
        new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "need_clasp", 10.0)
        );

    npc.addReply("Josephine", "Surely you know Josephine? That flirty flighty girl from Fado, bless her heart.");
    npc.addReply("Pedinghaus", "I mean the wizard who works with Joshua in the Ados smithy.");
  }
View Full Code Here

   
    henry.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.ATTENDING,
      "Thank you! I'll be waiting for your return.",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "start", 5.0));

    henry.add(
      ConversationStates.QUEST_OFFERED,
      "group",
      null,
      ConversationStates.QUEST_OFFERED,
      "The General sent five of us to explore this area in search for #treasure. So, will you help me find them?",
      null);

        henry.add(
        ConversationStates.QUEST_OFFERED,
        "treasure",
        null,
        ConversationStates.QUEST_OFFERED,
        "A big treasure is rumored to be #somewhere in this dungeon. Will you help me find my group?",
        null);

    henry.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.NO_MESSAGES, null,
        ConversationStates.ATTENDING,
        "OK. I understand. I'm scared of the #dwarves myself.",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(2500));
    actions.add(new DropInfostringItemAction("leather legs","tom"));
    actions.add(new DropInfostringItemAction("scale armor","peter"));
View Full Code Here

      "Kanmararn, the legendary kingdom of the #dwarves.");

    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(5000));
    actions.add(new DropInfostringItemAction("map","Henry"));
    actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "done", 15.0))
    actions.add(new EquipItemAction("steel boots", 1, true));
   
    james.add(ConversationStates.ATTENDING,
        Arrays.asList("map", "henry"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "map"),
View Full Code Here

      ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.ATTENDING,
      "Great! Please get me it as quickly as possible... there's a huge waiting list!",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "start", 5.0));

    npc.add(
      ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES,
      null,
      ConversationStates.ATTENDING,
      "Oh... I suppose I will have to get somebody else to do it, then.",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));

    npc.add(
      ConversationStates.QUEST_OFFERED,
      "jynath",
      null,
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES,
        null,
        ConversationStates.ATTENDING,
        "Thank you!",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "start", 10.0));
   
    // Player says no, they've lost karma
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.NO_MESSAGES,
        null,
        ConversationStates.IDLE,
        "Ok, I'll wait till mommy finds some helpers...",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));
   
    // Player has got chocolate bar and spoken to mummy
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("chocolate bar"));
    reward.add(new ChatAction() {
View Full Code Here

    // Player says yes they want to help
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.ATTENDING,
      null,     
      new MultipleActions(new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "machine;", 15.0),
                new StartRecordingRandomItemCollectionAction(mithrilcloak.getQuestSlot(), 1, items, "Thank you! To fix it, it needs [#item]. I'm ever so grateful for your help.")));
   
    // player said no they didn't want to help
    npc.add(
      ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES,
      null,
      ConversationStates.IDLE,
      "Oh dear, I don't know what I can do without a decent sewing machine. But don't worry I won't bother you any longer!",
      new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "rejected", -5.0));


    // player asks for quest but they already did it 
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
View Full Code Here

       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,
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.