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

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


        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,
        new PlayerHasItemWithHimCondition("chocolate bar"),
View Full Code Here


                  new RewardPlayerAction(),
                  new IncreaseXPAction(100000),
                  new IncrementQuestAction(QUEST_SLOT,3,1),
                  // empty the 2nd index as we use it later
                  new SetQuestAction(QUEST_SLOT,2,""),
                  new SetQuestToTimeStampAction(QUEST_SLOT,1),
                  new SetQuestAction(QUEST_SLOT,0,"done")));

          // player killed not enough enemies.
          npc.add(ConversationStates.ATTENDING,
              ConversationPhrases.QUEST_MESSAGES,
View Full Code Here

    // player has wood and tells sally, yes, it is for her
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("wood", REQUIRED_WOOD));
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT));
    reward.add(new IncreaseKarmaAction(10));
    reward.add(new ChatAction() {
      public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
        String rewardClass;
        if (Rand.throwCoin() == 1) {
View Full Code Here

        "Great! I think I'll read this for a while. Bye!",
        new MultipleActions(
            new DropItemAction("blue book"),
            new IncreaseXPAction(500),
            new SetQuestAction(QUEST_SLOT, "reading;"),
            new SetQuestToTimeStampAction(QUEST_SLOT, 1)));

    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new OrCondition(new QuestInStateCondition(QUEST_SLOT,"seeking_book"), new QuestInStateCondition(QUEST_SLOT, "got_book")),
View Full Code Here

        + REQUIRED_MINUTES + " minutes.",
        new MultipleActions(
        new DropItemAction("obsidian"),
        new DropItemAction(FISH),
        new SetQuestAction(QUEST_SLOT, "forging;"),
        new SetQuestToTimeStampAction(QUEST_SLOT, 1)));

    // player says hi to NPC when equipped with the fish and the gem and
    // he's not killed a black dragon
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
View Full Code Here

    final List<ChatAction> startforging = new LinkedList<ChatAction>();
    startforging.add(new DropItemAction("goblet"));
    startforging.add(new DropItemAction("iron", 10));
    startforging.add(new IncreaseKarmaAction(5.0));
    startforging.add(new SetQuestAction(QUEST_SLOT, "forging;"));
    startforging.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
   
    // Player returned with goblet and had killed the vampire lord, and has iron, so offer to forge the sword.
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestInStateCondition(QUEST_SLOT,"start"),
View Full Code Here

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("icecream"));
    reward.add(new EquipItemAction("present"));
    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,
        new PlayerHasItemWithHimCondition("icecream"),
View Full Code Here

    final List<ChatAction> actions = new LinkedList<ChatAction>();
      actions.add(addRandomNumberOfItemsAction);
    actions.add(new IncreaseXPAction(15000));
    actions.add(new SetQuestAction(QUEST_SLOT, 0, "killed"));
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
    actions.add(new IncrementQuestAction(QUEST_SLOT,2,1));
   
    LinkedList<String> triggers = new LinkedList<String>();
    triggers.addAll(ConversationPhrases.FINISH_MESSAGES);
    triggers.addAll(ConversationPhrases.QUEST_MESSAGES);   
View Full Code Here

    final SpeakerNPC npc = npcs.get("Mr. Yeti");
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("snowball", REQUIRED_SNOWBALLS));
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT));
    reward.add(new IncreaseKarmaAction(15));
    // player gets either cod or perch, which we don't have a standard action for
    // and the npc says the name of the reward, too
    reward.add(new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
View Full Code Here

    // common place to get the start quest actions as we can both starts it and abort and start again
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new StartRecordingRandomItemCollectionAction(QUEST_SLOT,0,items,"Ados is in need of supplies. Go fetch [item]"
        + " and say #complete, once you've brought it."))
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
   
    return new MultipleActions(actions);
  }
View Full Code Here

TOP

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

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.