Package games.stendhal.server.entity.npc.fsm

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()


    assertFalse(player.hasQuest(QUEST_SLOT));
    assertEquals("Bye.", getReply(npc));
    en.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(npc.isTalking());
    assertEquals(MedicineForTadTest.SSSHH_COME_HERE, getReply(npc));
    en.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
  }

  /**
   * Tests for quest.
   */
 
View Full Code Here


   */
  @Test
  public void testQuest() {
    final SpeakerNPC tad = getNPC("Tad");
    final Engine engineTad = tad.getEngine();
    engineTad.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(tad.isTalking());
    assertEquals(SSSHH_COME_HERE, getReply(tad));
    engineTad.step(player, "task");
    assertTrue(tad.isTalking());
    assertEquals(
View Full Code Here

    final SpeakerNPC tad = getNPC("Tad");
    final Engine engineTad = tad.getEngine();
    engineTad.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(tad.isTalking());
    assertEquals(SSSHH_COME_HERE, getReply(tad));
    engineTad.step(player, "task");
    assertTrue(tad.isTalking());
    assertEquals(
        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        getReply(tad));
    engineTad.step(player, "yes");
View Full Code Here

    engineTad.step(player, "task");
    assertTrue(tad.isTalking());
    assertEquals(
        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        getReply(tad));
    engineTad.step(player, "yes");
    assertTrue(player.hasQuest(QUEST_SLOT));
    engineTad.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
    assertFalse(tad.isTalking());
    assertEquals("Bye.", getReply(tad));
View Full Code Here

    assertEquals(
        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        getReply(tad));
    engineTad.step(player, "yes");
    assertTrue(player.hasQuest(QUEST_SLOT));
    engineTad.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
    assertFalse(tad.isTalking());
    assertEquals("Bye.", getReply(tad));

    final StackableItem flask = new StackableItem("flask", "", "", null);
    flask.setQuantity(1);
View Full Code Here

    final StackableItem flask = new StackableItem("flask", "", "", null);
    flask.setQuantity(1);
    flask.setID(new ID(2, ZONE_NAME));
    player.getSlot("bag").add(flask);
    assertTrue(player.isEquipped("flask"));
    engineTad.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(tad.isTalking());
    assertEquals(
        "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.",
        getReply(tad));
    assertTrue(player.hasQuest(QUEST_SLOT));
View Full Code Here

    assertEquals(
        "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.",
        getReply(tad));
    assertTrue(player.hasQuest(QUEST_SLOT));
    assertEquals("ilisa", player.getQuest(QUEST_SLOT));
    engineTad.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));

    final SpeakerNPC ilisa = getNPC("Ilisa");
    final Engine engineIlisa = ilisa.getEngine();
    engineIlisa.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals(
View Full Code Here

    assertEquals("ilisa", player.getQuest(QUEST_SLOT));
    engineTad.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));

    final SpeakerNPC ilisa = getNPC("Ilisa");
    final Engine engineIlisa = ilisa.getEngine();
    engineIlisa.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals(
        "Ah, I see you have that flask. #Tad needs medicine, right? Hmm... I'll need a #herb. Can you help?",
        getReply(ilisa));
    engineIlisa.step(player, "yes");
    assertEquals("North of Semos, near the tree grove, grows a herb called arandula. Here is a picture I drew so you know what to look for.",getReply(ilisa));
View Full Code Here

    final Engine engineIlisa = ilisa.getEngine();
    engineIlisa.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals(
        "Ah, I see you have that flask. #Tad needs medicine, right? Hmm... I'll need a #herb. Can you help?",
        getReply(ilisa));
    engineIlisa.step(player, "yes");
    assertEquals("North of Semos, near the tree grove, grows a herb called arandula. Here is a picture I drew so you know what to look for.",getReply(ilisa));
    assertEquals("corpse&herbs", player.getQuest(QUEST_SLOT));
    engineIlisa.step(player, "tad");
    assertEquals("He needs a very powerful potion to heal himself. He offers a good reward to anyone who will help him.", getReply(ilisa));
    engineIlisa.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
View Full Code Here

        "Ah, I see you have that flask. #Tad needs medicine, right? Hmm... I'll need a #herb. Can you help?",
        getReply(ilisa));
    engineIlisa.step(player, "yes");
    assertEquals("North of Semos, near the tree grove, grows a herb called arandula. Here is a picture I drew so you know what to look for.",getReply(ilisa));
    assertEquals("corpse&herbs", player.getQuest(QUEST_SLOT));
    engineIlisa.step(player, "tad");
    assertEquals("He needs a very powerful potion to heal himself. He offers a good reward to anyone who will help him.", getReply(ilisa));
    engineIlisa.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
    assertEquals("Bye.", getReply(ilisa));

    engineTad.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.