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

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


        new AndCondition(new QuestInStateCondition(mithrilcloak.getQuestSlot(), "got_scissors"), new PlayerHasItemWithHimCondition("magical scissors")),
        ConversationStates.ATTENDING,
        "You brought those magical scissors! Excellent! Now that I can cut the fabric I need a magical needle. You can buy one from a trader in the abandoned keep of Ados mountains, #Ritati Dragon something or other. Just go to him and ask for his 'specials'.",
        new MultipleActions(
                   new DropItemAction("magical scissors"),
                   new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "need_needle;", 10.0),
                   new IncreaseXPAction(100)
                   )
        );

    // remind about scissors
View Full Code Here


      ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES,
      null,
      ConversationStates.IDLE,
      "I can't believe you are going to pass up this opportunity! You must be daft!!!",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -10.0));

    npc.addReply("exact",
      "As I have listed them here, you must provide them in that order.");
  }
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "Nice :-) Come back when you have them and say #wood.",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "wood", 2.0));

    /*
     * Player asks about wood.
     */
    npc.add(ConversationStates.QUEST_OFFERED,
 
View Full Code Here

                new PlayerHasItemWithHimCondition("wood",10)),
        ConversationStates.ATTENDING,
        "Great, now I can make new arrows. But for the bows I need " +
        "bowstrings. Please go to #Karl. I know he has horses and if " +
        "you tell him my name he will give you  #'horse hairs' from a horsetail.",
        new MultipleActions(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "hair", 2.0), new DropItemAction("wood", 10)));

    /*
     * For simplicity, respond to 'Karl' at any time.
     */
    npc.addReply("Karl", "Karl is a farmer, east of Semos. He has many pets on his farm.");
View Full Code Here

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new EquipItemAction("scale armor", 1, true));
    reward.add(new EquipItemAction("chain legs", 1, true));
    reward.add(new IncreaseXPAction(100));
    reward.add(new DropItemAction("horse hair"));
    reward.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "done", 10.0));
   
    /*
     * Player asks about horse hair, and has collected some - take it
and ask for horse hair.
     */
 
View Full Code Here

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

    zara.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES, null,
      ConversationStates.ATTENDING,
      "Ok, but I would have had a nice reward for you...",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));

    zara.add(
      ConversationStates.QUEST_OFFERED,
      Arrays.asList("suntan cream", "suntan", "cream"),
      null,
View Full Code Here

// Player agrees to get the drink
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES, null,
        ConversationStates.ATTENDING,
        "Thank you! If you have found some, say #drink to me so I know you have it. I'll be sure to give you a nice reward.",
        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,
        "Oh, never mind. Bye then.",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -10.0));
  }
View Full Code Here

                new EquipItemAction("fish pie", pieAmount, true).fire(player, sentence, npc);
                npc.say("Thank you!! Take " +
                    Grammar.thisthese(pieAmount) + " " +
                    Grammar.quantityplnoun(pieAmount, "fish pie", "") +
                    " from my cook, and this kiss, from me.");
                new SetQuestAndModifyKarmaAction(getSlotName(), "drinking;"
                                 + System.currentTimeMillis(), 15.0).fire(player, sentence, npc);
              }
            }));

    npc.add(
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES,
      null,
      ConversationStates.ATTENDING,
      "Then I fear for the safety of the Nalwor elves...",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));

    npc.add(
      ConversationStates.QUEST_OFFERED,
      Arrays.asList("secret", "room", "secret room"),
      null,
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.ATTENDING,
      "Okay. You can find wood in the forest north of here. Come back when you get ten pieces of wood!",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "start", 5.0));

    // player is not willing to help
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES,
      null,
      ConversationStates.ATTENDING,
      "Oh dear, how am I going to cook all this meat? Perhaps I'll just have to feed it to the animals...",
      new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));
  }
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.