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

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


    assertEquals("I run this windmill, where I can #mill people's #grain into flour for them. I also supply the bakery in Semos.", getReply(npc));

    assertTrue(en.step(player, "grain"));
    assertEquals("There's a farm nearby; they usually let people harvest there. You'll need a scythe, of course.", getReply(npc));

    assertTrue(en.step(player, "help"));
    assertEquals("Do you know the bakery in Semos? I'm proud to say they use my flour. But the wolves ate my delivery boy again recently... they're probably running out.", getReply(npc));

    assertTrue(en.step(player, "mill"));
    assertEquals("I can only mill a sack of flour if you bring me 5 #'sheaves of grain'.", getReply(npc));
View Full Code Here


    assertEquals("There's a farm nearby; they usually let people harvest there. You'll need a scythe, of course.", getReply(npc));

    assertTrue(en.step(player, "help"));
    assertEquals("Do you know the bakery in Semos? I'm proud to say they use my flour. But the wolves ate my delivery boy again recently... they're probably running out.", getReply(npc));

    assertTrue(en.step(player, "mill"));
    assertEquals("I can only mill a sack of flour if you bring me 5 #'sheaves of grain'.", getReply(npc));

    assertTrue(en.step(player, "mill flour"));
    assertEquals("I can only mill a sack of flour if you bring me 5 #'sheaves of grain'.", getReply(npc));
View Full Code Here

    assertEquals("Do you know the bakery in Semos? I'm proud to say they use my flour. But the wolves ate my delivery boy again recently... they're probably running out.", getReply(npc));

    assertTrue(en.step(player, "mill"));
    assertEquals("I can only mill a sack of flour if you bring me 5 #'sheaves of grain'.", getReply(npc));

    assertTrue(en.step(player, "mill flour"));
    assertEquals("I can only mill a sack of flour if you bring me 5 #'sheaves of grain'.", getReply(npc));

    assertTrue(en.step(player, "mill two sacks of flour"));
    assertEquals("I can only mill 2 sacks of flour if you bring me 10 #'sheaves of grain'.", getReply(npc));
View Full Code Here

    assertEquals("I can only mill a sack of flour if you bring me 5 #'sheaves of grain'.", getReply(npc));

    assertTrue(en.step(player, "mill flour"));
    assertEquals("I can only mill a sack of flour if you bring me 5 #'sheaves of grain'.", getReply(npc));

    assertTrue(en.step(player, "mill two sacks of flour"));
    assertEquals("I can only mill 2 sacks of flour if you bring me 10 #'sheaves of grain'.", getReply(npc));

    assertTrue(en.step(player, "mill grain"));
    assertEquals("Sorry, I don't produce sheaves of grain.", getReply(npc));
View Full Code Here

    assertEquals("I can only mill a sack of flour if you bring me 5 #'sheaves of grain'.", getReply(npc));

    assertTrue(en.step(player, "mill two sacks of flour"));
    assertEquals("I can only mill 2 sacks of flour if you bring me 10 #'sheaves of grain'.", getReply(npc));

    assertTrue(en.step(player, "mill grain"));
    assertEquals("Sorry, I don't produce sheaves of grain.", getReply(npc));

    assertTrue(equipWithStackableItem(player, "grain", 10));

    assertTrue(en.step(player, "mill two sacks of flour"));
View Full Code Here

    assertTrue(en.step(player, "mill grain"));
    assertEquals("Sorry, I don't produce sheaves of grain.", getReply(npc));

    assertTrue(equipWithStackableItem(player, "grain", 10));

    assertTrue(en.step(player, "mill two sacks of flour"));
    assertEquals("I need you to fetch me 10 #'sheaves of grain' for this job. Do you have it?", getReply(npc));

    assertTrue(en.step(player, "yes"));
    assertEquals("OK, I will mill 2 sacks of flour for you, but that will take some time. Please come back in 4 minutes.", getReply(npc));
View Full Code Here

    assertTrue(equipWithStackableItem(player, "grain", 10));

    assertTrue(en.step(player, "mill two sacks of flour"));
    assertEquals("I need you to fetch me 10 #'sheaves of grain' for this job. Do you have it?", getReply(npc));

    assertTrue(en.step(player, "yes"));
    assertEquals("OK, I will mill 2 sacks of flour for you, but that will take some time. Please come back in 4 minutes.", getReply(npc));

    assertFalse(player.isEquipped("flour"));

    assertTrue(en.step(player, "bye"));
View Full Code Here

    assertTrue(en.step(player, "yes"));
    assertEquals("OK, I will mill 2 sacks of flour for you, but that will take some time. Please come back in 4 minutes.", getReply(npc));

    assertFalse(player.isEquipped("flour"));

    assertTrue(en.step(player, "bye"));
    assertEquals("Bye.", getReply(npc));

    // wait one minute
    setPastTime(player, QUEST_SLOT, 2, 1*60);

 
View Full Code Here

    assertEquals("Bye.", getReply(npc));

    // wait one minute
    setPastTime(player, QUEST_SLOT, 2, 1*60);

    assertTrue(en.step(player, "hi"));
    assertEquals("Welcome back! I'm still busy with your order to mill 2 sacks of flour for you. Come back in 3 minutes to get it.", getReply(npc));

    assertFalse(player.isEquipped("flour"));

    assertTrue(en.step(player, "bye"));
View Full Code Here

        getReply(npc));

    for (final String cloakName : wc.getNeededItems()) {
      weapon = new Item(cloakName, "", "", null);
      pl.getSlot("bag").add(weapon);
      en.step(pl, cloakName);
    }

    assertEquals(
        "At last, my collection is complete! Thank you very much; here, take this pair of swords in exchange!",
        getReply(npc));
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.