Examples of SayTimeRemainingAction


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

npc.add(ConversationStates.ATTENDING,
    ConversationPhrases.QUEST_MESSAGES,
    new AndCondition(new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES)), new QuestStateStartsWithCondition(QUEST_SLOT, "drinking;")),
    ConversationStates.ATTENDING,
    null,
    new SayTimeRemainingAction(QUEST_SLOT, 1, REQUIRED_MINUTES, "I'm sure I'll be too drunk to have another for at least "));
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES, null,
        ConversationStates.ATTENDING,
        "I like these exotic drinks, I forget the name of my favourite one.",
View Full Code Here

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

    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestNotInStateCondition(QUEST_SLOT, "start"), new QuestStartedCondition(QUEST_SLOT), new NotCondition(new TimePassedCondition(QUEST_SLOT,REQUIRED_MINUTES))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT,REQUIRED_MINUTES,"Thanks, but I think the wood you brought me already will last me another"));
   
    // player is willing to help
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES,
      null,
View Full Code Here

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

            new QuestCompletedCondition(QUEST_SLOT),
            new NotCondition(
                new TimePassedCondition(QUEST_SLOT, 1, delay))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, delay, "You have to check again in"));

    // explanations
    npc.add(ConversationStates.ATTENDING,
        "enemy",
        new QuestInStateCondition(QUEST_SLOT, 0, "start"),
View Full Code Here

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

        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStateStartsWithCondition(QUEST_SLOT, "reading;"),
            new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_DAYS * MINUTES_IN_DAYS))),
        ConversationStates.IDLE,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, REQUIRED_DAYS * MINUTES_IN_DAYS, "I haven't finished reading that book. Maybe I'll be done in"));
   
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStateStartsWithCondition(QUEST_SLOT, "reading;"),
            new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_DAYS * MINUTES_IN_DAYS)),
        ConversationStates.QUEST_2_OFFERED,
        "I've finished reading! That was really interesting. I learned how to make a special #knife from #obsidian.",
        new SetQuestAction(QUEST_SLOT, "book_read"));
           

    npc.add(ConversationStates.QUEST_2_OFFERED,
        "obsidian",
        new LevelGreaterThanCondition(REQUIRED_LEVEL),
        ConversationStates.QUEST_2_OFFERED,
        "That book says that the black gem, obsidian, can be used to make a very sharp cutting edge. Fascinating! If you slay a black dragon to bring it, I'll make a #knife for you.",
        new SetQuestAction(QUEST_SLOT, "knife_offered"));

    npc.add(ConversationStates.QUEST_2_OFFERED,
        "knife",
        new LevelGreaterThanCondition(REQUIRED_LEVEL),
        ConversationStates.QUEST_2_OFFERED,
        "I'll make an obsidian knife if you can slay a black dragon and get the gem which makes the blade. Bring a "
            + FISH
            + " so that I can make the bone handle, too.",
        new SetQuestAction(QUEST_SLOT, "knife_offered"));
   
    npc.add(ConversationStates.QUEST_2_OFFERED,
        Arrays.asList("obsidian", "knife"),
        new NotCondition(new LevelGreaterThanCondition(REQUIRED_LEVEL)),
        ConversationStates.ATTENDING,
        "Well, I don't think you're quite ready for such a dangerous weapon yet. How about you come back when you're above level " + Integer.toString(REQUIRED_LEVEL) + "?",
        null);
   
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "book_read")),
        ConversationStates.QUEST_2_OFFERED,
        "Hi! Perhaps you have come to ask about that #knife again ... ",
        null);
           
    // player says hi to NPC when equipped with the fish and the gem and
    // he's killed a black dragon
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "knife_offered"),
            new KilledCondition("black dragon"),
            new PlayerHasItemWithHimCondition("obsidian"),
            new PlayerHasItemWithHimCondition(FISH)),
        ConversationStates.IDLE,
        "You found the gem for the blade and the fish bone to make the handle! I'll start work right away. Come back in "
        + REQUIRED_MINUTES + " minutes.",
        new MultipleActions(
        new DropItemAction("obsidian"),
        new DropItemAction(FISH),
        new SetQuestAction(QUEST_SLOT, "forging;"),
        new SetQuestToTimeStampAction(QUEST_SLOT, 1)));

    // player says hi to NPC when equipped with the fish and the gem and
    // he's not killed a black dragon
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "knife_offered"),
            new NotCondition(new KilledCondition("black dragon")),
            new PlayerHasItemWithHimCondition("obsidian"),
            new PlayerHasItemWithHimCondition(FISH)),
        ConversationStates.ATTENDING,
        "Didn't you hear me properly? I told you to go slay a black dragon for the obsidian, not buy it! How do I know this isn't a fake gem? *grumble* I'm not making a special knife for someone who is scared to face a dragon.",
        null);

    // player says hi to NPC when not equipped with the fish and the gem
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "knife_offered"),
            new NotCondition(
                new AndCondition(
                    new PlayerHasItemWithHimCondition("obsidian"),
                    new PlayerHasItemWithHimCondition(FISH)))),
        ConversationStates.ATTENDING,
        "Hello again. Don't forget I offered to make that obsidian knife, if you bring me a "
          + FISH
          + " and a piece of obsidian from a black dragon you killed. In the meantime if I can #help you, just say the word.",
        null);

    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStateStartsWithCondition(QUEST_SLOT, "forging;"),
            new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES))),
        ConversationStates.IDLE,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, REQUIRED_MINUTES, "I haven't finished making the knife. Please check back in"));
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new IncreaseXPAction(10000));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new EquipItemAction("obsidian knife", 1, true));
View Full Code Here

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

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStateStartsWithCondition(QUEST_SLOT, "forging;"),
            new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES))),
        ConversationStates.IDLE, null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, REQUIRED_MINUTES, "I haven't finished forging the sword. Please check back in" +
                ""));
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new IncreaseXPAction(5000));
    reward.add(new IncreaseKarmaAction(15.0));
View Full Code Here

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

    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, WEEK_IN_MINUTES*2)), new QuestStateStartsWithCondition(QUEST_SLOT, "killed")),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, WEEK_IN_MINUTES*2, "These monks learned their lesson for now but I could need your help again in"));
 

    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new SetQuestAction(QUEST_SLOT, 0, "start"));
    actions.add(new StartRecordingKillsAction(QUEST_SLOT, 1, creaturestokill));
View Full Code Here

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

                new NotCondition(new TimePassedCondition(QUEST_SLOT, DAYS_BEFORE_REPEAT * MINUTES_IN_DAYS)),
                new NotCondition(new AdventureZoneExistsCondition())
            ),
            ConversationStates.ATTENDING,
            null,
            new SayTimeRemainingAction(QUEST_SLOT, DAYS_BEFORE_REPEAT * MINUTES_IN_DAYS, "Your life force will not support the island so soon after you last visited. You will be ready again in"));

        // player returns within DAYS_BEFORE_REPEAT days, if the zone still exists that he was in before, send him straight up.
        add(ConversationStates.ANY,
            Arrays.asList("challenge", "fight", "battle", "fee"),
            new AndCondition(
View Full Code Here

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

    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("emerald ring", "life", "emerald"),
        new AndCondition(new QuestStateStartsWithCondition(QUEST_SLOT, FORGING),
            new NotCondition(new TimePassedCondition(QUEST_SLOT,1,REQUIRED_MINUTES))),
        ConversationStates.IDLE, null,
        new SayTimeRemainingAction(QUEST_SLOT,1, REQUIRED_MINUTES,"I haven't finished fixing your ring of life. Please check back in"));
   
   
    npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
        "price",
        null,
View Full Code Here

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

            new QuestStartedCondition(QUEST_SLOT),
            new QuestNotInStateCondition(QUEST_SLOT, "start"),
            new NotCondition(new TimePassedCondition(QUEST_SLOT, REQUIRED_MINUTES))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, REQUIRED_MINUTES, "I have enough snow for my new sculpture. Thank you for helping! "
            + "I might start a new one in" ));

    // asks about quest - has never started it
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
View Full Code Here

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

    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, "I can only give you a new quest once a day. Please check back in"));
   
   

   
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.