1 /*************************************************************************** 2 * (C) Copyright 2003-2019 - Stendhal * 3 *************************************************************************** 4 *************************************************************************** 5 * * 6 * This program is free software; you can redistribute it and/or modify * 7 * it under the terms of the GNU General Public License as published by * 8 * the Free Software Foundation; either version 2 of the License, or * 9 * (at your option) any later version. * 10 * * 11 ***************************************************************************/ 12 13 package games.stendhal.server.maps.kirdneh.city; 14 15 import java.util.LinkedList; 16 import java.util.List; 17 import java.util.Map; 18 19 import games.stendhal.server.core.config.ZoneConfigurator; 20 import games.stendhal.server.core.engine.StendhalRPZone; 21 import games.stendhal.server.core.pathfinder.FixedPath; 22 import games.stendhal.server.core.pathfinder.Node; 23 import games.stendhal.server.entity.CollisionAction; 24 import games.stendhal.server.entity.npc.SpeakerNPC; 25 //import games.stendhal.server.entity.npc.action.StoreMessageAction; 26 27 /** 28 * Provides Vlamyklela 29 * 30 * @author omero 31 */ 32 33 public class KirdnehAnxiousSorceressNPC implements ZoneConfigurator { 34 @Override configureZone(StendhalRPZone zone, Map<String, String> attributes)35 public void configureZone(StendhalRPZone zone, Map<String, String> attributes) { 36 buildNPC(zone); 37 } 38 buildNPC(final StendhalRPZone zone)39 private SpeakerNPC buildNPC(final StendhalRPZone zone) { 40 final SpeakerNPC npc = new SpeakerNPC("Vlamyklela") { 41 42 @Override 43 protected void createPath() { 44 final List<Node> nodes = new LinkedList<Node>(); 45 nodes.add(new Node(113, 95)); 46 nodes.add(new Node(117, 89)); 47 nodes.add(new Node(119, 93)); 48 nodes.add(new Node(121, 90)); 49 setPath(new FixedPath(nodes, true)); 50 } 51 52 @Override 53 public void createDialog() { 54 addGreeting( 55 "Ave"); 56 addGoodbye( 57 "Fortvna"); 58 /** 59 * When one has Ad Memoria In Portfolio quest active 60 * Will Convert 1x purple apple into 1x mauve apple 61 */ 62 addHelp( 63 "My stepbrother Brosoklelo... He must be stranded somewhere..." + " " + 64 "Brosoklelo likes dueling magical duels... " + " " + 65 "Tell me you got a purple apple for me!" 66 ); 67 addOffer( 68 "I could turn a purple apple into a mauve apple..." + " " + 69 "When you bring me a purple apple, I will know what to do!" 70 ); 71 addJob( 72 "I can turn a purple apple into a mauve apple. That is my job!" 73 ); 74 addReply( 75 "apple", //trigger 76 "Apples may come in different colors!" + " " + 77 "You would not think an apple can restore lost memory..." + " " + 78 "Say you are were bestowed with a purple apple...", 79 null 80 ); 81 82 /** 83 * additional behavior defined in AdMemoriaInPortfolio quest 84 */ 85 86 } 87 }; 88 89 // Finalize Vlamyklela 90 npc.setEntityClass("bluesorceressnpc"); 91 npc.initHP(100); 92 npc.setPosition(113,99); 93 npc.setCollisionAction(CollisionAction.REROUTE); 94 npc.setDescription("You see Vlamyklela... She seems to be anxiously awaiting news!"); 95 zone.add(npc); 96 return npc; 97 } 98 } 99