Package games.stendhal.server.entity.npc.condition

Examples of games.stendhal.server.entity.npc.condition.KilledInSumForQuestCondition


        // player killed enough enemies.
          npc.add(ConversationStates.ATTENDING,
              ConversationPhrases.QUEST_MESSAGES,
              new AndCondition(
                  new QuestInStateCondition(QUEST_SLOT, 1, enemy),
                  new KilledInSumForQuestCondition(QUEST_SLOT, 2, enemyForces.get(enemy).first())),
              ConversationStates.ATTENDING,
              null,
              new MultipleActions(
                  new RewardPlayerAction(),
                  new IncreaseXPAction(100000),
                  new IncrementQuestAction(QUEST_SLOT,3,1),
                  // empty the 2nd index as we use it later
                  new SetQuestAction(QUEST_SLOT,2,""),
                  new SetQuestToTimeStampAction(QUEST_SLOT,1),
                  new SetQuestAction(QUEST_SLOT,0,"done")));

          // player killed not enough enemies.
          npc.add(ConversationStates.ATTENDING,
              ConversationPhrases.QUEST_MESSAGES,
              new AndCondition(
                  new QuestInStateCondition(QUEST_SLOT, 1, enemy),
                  new NotCondition(
                      new KilledInSumForQuestCondition(QUEST_SLOT, 2, enemyForces.get(enemy).first()))),
              ConversationStates.ATTENDING,
              null,
              new ExplainAction());

    }
View Full Code Here


        kn="no";
      }
      history.add("Currently I have killed "+
          kn+" "+
          Grammar.plnoun(killedNumber, givenEnemies));
      if(new KilledInSumForQuestCondition(QUEST_SLOT, 2, givenNumber).fire(player, null, null)) {
        history.add("I have killed enough creatures to get my reward now.");
      } else {
        history.add((givenNumber-killedNumber)+" "+
            Grammar.plnoun(givenNumber-killedNumber, givenEnemies)+" left to kill.");       
      }
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.npc.condition.KilledInSumForQuestCondition

Copyright © 2018 www.massapicom. 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.