Examples of SpeakerNPC


Examples of games.stendhal.server.entity.npc.SpeakerNPC

  /**
   * Tests for hiAndBye.
   */
  @Test
  public void testHiAndBye() {
    final SpeakerNPC npc = getNPC("Felina");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi Felina"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

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

Examples of games.stendhal.server.entity.npc.SpeakerNPC

  /**
   * Tests for buyCat.
   */
  @Test
  public void testBuyCat() {
    final SpeakerNPC npc = getNPC("Felina");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

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

Examples of games.stendhal.server.entity.npc.SpeakerNPC

  /**
   * Tests for sellCat.
   */
  @Test
  public void testSellCat() {
    final SpeakerNPC npc = getNPC("Felina");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

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

Examples of games.stendhal.server.entity.npc.SpeakerNPC

   */
  @Test
  public final void testOnDestroyNPC() {

    final Player pl = PlayerTestHelper.createPlayer("hugo");
    final SpeakerNPC npc = SpeakerNPCTestHelper.createSpeakerNPC("npcTest");
    final StendhalRPZone testzone = new StendhalRPZone("Testzone");
    testzone.add(npc);
    testzone.add(pl);

    assertEquals(1, npc.getID().getObjectID());
    pl.setAdminLevel(5000);
    pl.clearEvents();

    MockStendhalRPRuleProcessor.get().addPlayer(pl);
    final RPAction action = new RPAction();
View Full Code Here

Examples of games.stendhal.server.entity.npc.SpeakerNPC

  /**
   * Tests for hiAndBye.
   */
  @Test
  public void testHiAndBye() {
    final SpeakerNPC npc = getNPC("Nishiya");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hello"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

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

Examples of games.stendhal.server.entity.npc.SpeakerNPC

  @Test
  public void testBuySheep() {
    final StendhalRPWorld world = SingletonRepository.getRPWorld();
    registerPlayer(player, world.getZone(ZONE_NAME));

    final SpeakerNPC npc = getNPC("Nishiya");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

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

Examples of games.stendhal.server.entity.npc.SpeakerNPC

  /**
   * Tests for sellSheep.
   */
  @Test
  public void testSellSheep() {
    final SpeakerNPC npc = getNPC("Nishiya");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi Nishiya"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

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

Examples of games.stendhal.server.entity.npc.SpeakerNPC

  /**
   * Tests for hiAndBye.
   */
  @Test
  public void testHiAndBye() {
    final SpeakerNPC npc = getNPC("Jenny");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi Jenny"));
    assertEquals("Greetings! I am Jenny, the local miller. If you bring me some #grain, I can #mill it into flour for you.", getReply(npc));

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

Examples of games.stendhal.server.entity.npc.SpeakerNPC

  /**
   * Tests for quest.
   */
  @Test
  public void testQuest() {
    final SpeakerNPC npc = getNPC("Jenny");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Greetings! I am Jenny, the local miller. If you bring me some #grain, I can #mill it into flour for you.", getReply(npc));

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

Examples of games.stendhal.server.entity.npc.SpeakerNPC

  /**
   * Tests buying pansy seed from Jenny.
   */
  @Test
  public void testSellingPansySeed() {
    final SpeakerNPC npc = getNPC("Jenny");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Greetings! I am Jenny, the local miller. If you bring me some #grain, I can #mill it into flour for you.", getReply(npc));

    equipWithMoney(player, 30);
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.