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

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


        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new PlayerHasItemWithHimCondition("flask")),
        ConversationStates.ATTENDING,
        "Ok, you got the flask! Here take this money to cover your expense. Now, I need you to take it to #ilisa... she'll know what to do next.",
        new MultipleActions(processStep));

    // player said hi with flask on ground then picked it up and said flask
    npc.add(ConversationStates.ATTENDING, "flask",
                new AndCondition(new QuestInStateCondition(QUEST_SLOT, "start"), new PlayerHasItemWithHimCondition("flask")),
                ConversationStates.ATTENDING,
                "Ok, you got the flask! Here take this money to cover your expense. Now, I need you to take it to #ilisa... she'll know what to do next.",
                new MultipleActions(processStep));


    // remind the player to take the flask to ilisa.
    // note Ilisa is spelled with a small i here because I
    // and l cannot be told apart in game
View Full Code Here


        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "ilisa"),
            new PlayerHasItemWithHimCondition("flask")),
        ConversationStates.ATTENDING,
        "Ah, I see you have that flask. #Tad needs medicine, right? Hmm... I'll need a #herb. Can you help?",
        new MultipleActions(processStep));

    npc.add(
        ConversationStates.ATTENDING,
        Arrays.asList("herb", "arandula", "yes", "ok"),
//        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "corpse&herbs"), new NotCondition(new PlayerHasItemWithHimCondition("arandula"))),
View Full Code Here

        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "corpse&herbs"),
            new PlayerHasItemWithHimCondition("arandula")),
        ConversationStates.ATTENDING,
        "Okay! Thank you. Now I will just mix these... a pinch of this... and a few drops... there! Can you ask #Tad to stop by and collect it? I want to see how he's doing.",
        new MultipleActions(processStep));

    npc.add(ConversationStates.ATTENDING, Arrays.asList("potion",
        "medicine"), null, ConversationStates.ATTENDING,
        "The medicine that #Tad is waiting for.", null);
  }
View Full Code Here

    // and l cannot be told apart in game
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "potion")),
        ConversationStates.ATTENDING, "Thanks! I will go talk with #ilisa as soon as possible.",
        new MultipleActions(processStep));
  }
View Full Code Here

      ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
      new PlayerHasItemWithHimCondition("leather helmet"),
      ConversationStates.ATTENDING,
      "Bless you, my good friend! Now my head will stay nice and warm.",
      new MultipleActions(reward));

    monogenes.add(
      ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.NO_MESSAGES,
      null,
View Full Code Here

        ConversationPhrases.YES_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Wow, it's incredible to see this close up! Many thanks. Now, perhaps we can #deal together.",
        new MultipleActions(new DropRecordedItemAction(QUEST_SLOT),
                  new SetQuestAction(QUEST_SLOT, "done"),
                  new IncreaseXPAction(100000)));
   
    npc.add(ConversationStates.QUEST_ITEM_QUESTION,
        ConversationPhrases.NO_MESSAGES,
View Full Code Here

                  new QuestNotStartedCondition(QUEST_SLOT),
                  new QuestNotCompletedCondition(QUEST_SLOT)),
              new PlayerHasItemWithHimCondition("teddy")),
      ConversationStates.ATTENDING,
      "You found him! *hugs teddy* Thank you, thank you! *smile*",
      new MultipleActions(reward));

    npc.add(
      ConversationStates.ATTENDING,
      "teddy",
      new AndCondition(new QuestNotCompletedCondition(QUEST_SLOT), new NotCondition(new PlayerHasItemWithHimCondition("teddy"))),
View Full Code Here

    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

        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,0)),
        ConversationStates.ATTENDING,
        "Good work! Let me thank you on behalf of the people of Ados!",
        new MultipleActions(actions));
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new NotCondition(new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,0))),
View Full Code Here

    // Player agrees to collect flower
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.ATTENDING,
      "Thank you! Once you find it, say #flower to me so I know you have it. I'll be sure to give you a nice reward.",
      new MultipleActions(new SetQuestAction(QUEST_SLOT, 0, "start"),
                new IncreaseKarmaAction(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 MultipleActions(new SetQuestAction(QUEST_SLOT, 0, "rejected"),
          new DecreaseKarmaAction(10.0)));
  }
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.