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

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


                  new SetQuestAction(QUEST_SLOT, 0, "flower_brought"),
                  new IncrementQuestAction(QUEST_SLOT, 2, 1)));

    npc.add(ConversationStates.ATTENDING,
      Arrays.asList("flower", "Rhosyd"),
      new NotCondition(new PlayerHasItemWithHimCondition("rhosyd")),
      ConversationStates.ATTENDING,
      "You don't seem to have a rhosyd bloom with you. But Rose Leigh wanders all over the island, I'm sure you'll find her one day!",
      null);

  }
View Full Code Here


      "Hey! Is that beer for me?", null);

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestActiveCondition(QUEST_SLOT),
          new NotCondition(new PlayerHasItemWithHimCondition("beer"))),
      ConversationStates.ATTENDING,
      "Hey, I'm still waiting for that beer, remember? Anyway, what can I do for you?",
      null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
View Full Code Here

    final SpeakerNPC npc = npcs.get("tomi");

    // says quest or ice and doesn't have an ice sword and hasn't brought one before
    npc.add(ConversationStates.ATTENDING,
      questTrigger,
      new AndCondition(new QuestNotCompletedCondition(QUEST_SLOT), new NotCondition(new PlayerHasItemWithHimCondition("ice sword"))),
      ConversationStates.ATTENDING,
      "my ice? ice plz", null);

    // says quest or ice and doesn't have an ice sword and has brought one in the past
    npc.add(ConversationStates.ATTENDING,
      questTrigger,
      new AndCondition(new QuestCompletedCondition(QUEST_SLOT), new NotCondition(new PlayerHasItemWithHimCondition("ice sword"))),
      ConversationStates.ATTENDING,
      "where is my ice?", null);

    // says quest or ice and has ice sword with him (first time)
    // player gets a karma bonus and some xp
View Full Code Here

    // Player asking about rats when quest is neither inactive nor invasion phase
    getMainNPC().add(
        ConversationStates.ATTENDING,
        Arrays.asList("rats", "rats!"),
        new AndCondition(
          new NotCondition(new TPPQuestInPhaseCondition(INACTIVE)),
          new NotCondition(new TPPQuestInPhaseCondition(INVASION))),
        ConversationStates.ATTENDING,
        "The rats are gone. "+
          "You can get #reward for your help now, ask about #details "+
          "if you want to know more.",
        null);   
   
    // Player asked about reward at invasion time
    getMainNPC().add(
        ConversationStates.ATTENDING,
        "reward",
        new TPPQuestInPhaseCondition(INVASION),
        ConversationStates.ATTENDING,
        "Ados is being invaded by rats! "+
          "I dont want to reward you now, "+
          " until all rats are dead.",
        null);
   
    // Player asked about reward not at invasion time
    getMainNPC().add(
        ConversationStates.ATTENDING,
        "reward",
        new NotCondition(new TPPQuestInPhaseCondition(INVASION)),
        ConversationStates.ATTENDING,
        null,
        new RewardPlayerAction());
   
    //Player asked about details at invasion time
    getMainNPC().add(
        ConversationStates.ATTENDING,
        "details",
        new TPPQuestInPhaseCondition(INVASION),
        ConversationStates.ATTENDING,
        "Ados is being invaded by rats! "+
          "I dont want to either reward you or "+
          "explain details to you now,"+
          " until all rats are dead.",
        null);
   
    getMainNPC().add(
        ConversationStates.ATTENDING,
        "details",
        new NotCondition(new TPPQuestInPhaseCondition(INVASION)),
        ConversationStates.ATTENDING,
        null,
        new DetailsKillingsAction());
  }
View Full Code Here

        "Would you like to visit our dragon lair?",
        null);
       
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestCompletedCondition(QUEST_SLOT), new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, MathHelper.MINUTES_IN_ONE_WEEK))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, MathHelper.MINUTES_IN_ONE_WEEK, "I think they've had enough excitement for a while.  Come back in"));
   
    npc.add(ConversationStates.ATTENDING,
View Full Code Here

        null);
   
    // player asks about quest which he has done already but it is not time to repeat it
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES)), new QuestStateStartsWithCondition(QUEST_SLOT, "waiting;")),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, REQUIRED_MINUTES, "The coal amount behind my counter is still high enough. I will not need more for"));

    // Player agrees to get the coal
View Full Code Here

            }));

    // player asks about quest or says coal when they are supposed to bring some coal and they don't have it
    npc.add(
        ConversationStates.ATTENDING, triggers,
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "start"), new NotCondition(new PlayerHasItemWithHimCondition("coal",25))),
        ConversationStates.ATTENDING,
        "You don't have the coal amount which I need yet. Go and pick some more pieces up, please.",
        null);
   
    npc.add(
View Full Code Here

 
  private void getQuest() {
    final SpeakerNPC npc = npcs.get("Hazel");
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new NotCondition(new TimePassedCondition(QUEST_SLOT,1,expireDelay))),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You're already on a quest to bring the museum [item]"
            + ". Please say #complete if you have it with you."));
   
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new TimePassedCondition(QUEST_SLOT,1,expireDelay)),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You're already on a quest to bring the museum [item]"
            + ". Please say #complete if you have it with you. But, perhaps that is now too rare an item. I can give you #another task, or you can return with what I first asked you."));
 
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestCompletedCondition(QUEST_SLOT),
                 new NotCondition(new TimePassedCondition(QUEST_SLOT,1,delay))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT,1, delay, "The museum can only afford to send you to fetch an item once a week. Please check back in"));
   
   
View Full Code Here

        new MultipleActions(actions));
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new NotCondition(new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,0))),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You don't seem to have [item]"
            + " with you. Please get it and say #complete only then."));
   
View Full Code Here

        startQuestAction());
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.ABORT_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                  new NotCondition(new TimePassedCondition(QUEST_SLOT,1,expireDelay))),
        ConversationStates.ATTENDING,
        "It hasn't been long since you've started your quest, you shouldn't give up so soon.",
        null);
   
    npc.add(ConversationStates.ATTENDING,
View Full Code Here

TOP

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

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.