From: Miguel A. B. L. <ari...@us...> - 2007-04-12 23:27:04
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/quests In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv5767/src/games/stendhal/server/maps/quests Modified Files: StuffForVulcanus.java Log Message: Now the black dragon home is ready :) Index: StuffForVulcanus.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/quests/StuffForVulcanus.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** StuffForVulcanus.java 12 Apr 2007 20:15:55 -0000 1.7 --- StuffForVulcanus.java 12 Apr 2007 23:26:31 -0000 1.8 *************** *** 2,5 **** --- 2,6 ---- import java.util.ArrayList; + import java.util.Arrays; import java.util.List; *************** *** 234,242 **** npc.add(ConversationStates.ATTENDING, ! "forge", null, ConversationStates.ATTENDING, ! "I will need "+REQUIRED_IRON+" #iron, "+REQUIRED_WOOD+" #wood logs, "+REQUIRED_GOLD_BAR+" #gold bars and "+REQUIRED_GIANT_HEART+" #giant hearts", ! null); npc.add(ConversationStates.ANY, --- 235,255 ---- npc.add(ConversationStates.ATTENDING, ! Arrays.asList("forge", "missing"), null, ConversationStates.ATTENDING, ! null, ! new SpeakerNPC.ChatAction() { ! @Override ! public void fire(Player player, String text, SpeakerNPC engine) { ! String[] tokens = player.getQuest(QUEST_SLOT).split(";"); ! ! int neededIron=REQUIRED_IRON-Integer.parseInt(tokens[1]); ! int neededWoodLogs=REQUIRED_WOOD-Integer.parseInt(tokens[2]); ! int neededGoldBars=REQUIRED_GOLD_BAR-Integer.parseInt(tokens[3]); ! int neededGiantHearts=REQUIRED_GIANT_HEART-Integer.parseInt(tokens[4]); ! ! engine.say("I will need "+neededIron+" #iron, "+neededWoodLogs+" #wood logs, "+neededGoldBars+" #gold bars and "+neededGiantHearts+" #giant hearts."); ! } ! }); npc.add(ConversationStates.ANY, |