Package games.stendhal.server.entity.npc.action

Examples of games.stendhal.server.entity.npc.action.SayRequiredItemAction


      npc.add(ConversationStates.QUEST_ITEM_QUESTION,
          ConversationPhrases.YES_MESSAGES,
          new NotCondition(new PlayerHasRecordedItemWithHimCondition(mithrilcloak.getQuestSlot(),1)),
          ConversationStates.ATTENDING,
          null,
          new SayRequiredItemAction(mithrilcloak.getQuestSlot(),1,"No, you don't have [the item] I need. What a shame."));
                 

      // player doesn't have the item to fix machine yet       
       npc.add(ConversationStates.QUEST_ITEM_QUESTION,
           ConversationPhrases.NO_MESSAGES,
           null,
           ConversationStates.ATTENDING,
           null,
           new SayRequiredItemAction(mithrilcloak.getQuestSlot(),1,"Ok, well if there's anything else I can help you with just say. Don't forget to bring [the item] next time though!"));

       //offer cloak
       npc.add(ConversationStates.QUEST_2_OFFERED,
           ConversationPhrases.YES_MESSAGES,
           new QuestCompletedCondition(mithrilcloak.getShieldQuestSlot()),
View Full Code Here


        ConversationPhrases.YES_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                new NotCondition(new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT))),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT, "Hm, no, you don't have [item], don't try to fool me!"));
   
    npc.add(ConversationStates.QUEST_ITEM_QUESTION,
        ConversationPhrases.YES_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Wow, it's incredible to see this close up! Many thanks. Now, perhaps we can #deal together.",
        new MultipleActions(new DropRecordedItemAction(QUEST_SLOT),
                  new SetQuestAction(QUEST_SLOT, "done"),
                  new IncreaseXPAction(100000)));
   
    npc.add(ConversationStates.QUEST_ITEM_QUESTION,
        ConversationPhrases.NO_MESSAGES,
        null,
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT, "Very well, come back when you have [the item] with you."));
  }
View Full Code Here

    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 fetch [item]"
            + ". Say #complete if you brought it!"));
   
    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 fetch [item]"
            + ". Say #complete if you brought it! Perhaps there are no supplies of that left at all! You could fetch #another item if you like, or 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))),
View Full Code Here

        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 didn't fetch [item]"
            + " yet. Go and get it and say #complete only once you're done."));
   
  }
View Full Code Here

    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))),
View Full Code Here

        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

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStateStartsWithCondition(QUEST_SLOT, "start;")),
        ConversationStates.QUEST_ITEM_BROUGHT,
        null,
        new SayRequiredItemAction(QUEST_SLOT, 1, "Welcome back! Have you brought the [item]?"));

    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new DropRecordedItemAction(QUEST_SLOT,1));
    actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "done;1", 5.0));
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
    actions.add(new IncreaseXPAction(200));
 
    npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
      new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,1),
      ConversationStates.ATTENDING, "Thank you! You have rescued our rare animals.",
      new MultipleActions(actions));

        npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
            ConversationPhrases.YES_MESSAGES,
            new NotCondition(new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,1)),
            ConversationStates.ATTENDING, null,
            new SayRequiredItemAction(QUEST_SLOT, 1, "*sigh* I SPECIFICALLY said that we need [item]!")
            );

    npc.add(ConversationStates.QUEST_ITEM_BROUGHT, ConversationPhrases.NO_MESSAGES, null,
        ConversationStates.ATTENDING, "Well, hurry up! These rare animals are starving!",
        null);
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.npc.action.SayRequiredItemAction

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.