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

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


    reward.add(new DropItemAction("icecream"));
    reward.add(new EquipItemAction("present"));
    reward.add(new IncreaseXPAction(500));
    reward.add(new SetQuestAction(QUEST_SLOT, "eating;"));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT,1));
    reward.add(new IncreaseKarmaAction(10.0));
   
    npc.add(ConversationStates.QUESTION_1,
        ConversationPhrases.YES_MESSAGES,
        new PlayerHasItemWithHimCondition("icecream"),
        ConversationStates.ATTENDING,
View Full Code Here


        "That's how long,", "That's how long",
        "Thats how long,", "Thats how long"),
      ConversationStates.INFORMATION_4,
      "\"I will be your friend.\"", null);

    ChatAction reward = new MultipleActions(new IncreaseKarmaAction(10), new IncreaseXPAction(25), new SetQuestToYearAction("susi"));
    npc.add(ConversationStates.INFORMATION_4,
      "",
      new TriggerExactlyInListCondition("I will be your friend.", "I will be your friend"),
      ConversationStates.ATTENDING,
      "Yay! We are friends now.",
View Full Code Here

        new TriggerExactlyInListCondition("One is silver,", "One is silver"),
        ConversationStates.INFORMATION_8, "\"And the other gold.\"",
        null);

    // lowercase "and" is ignored, even in full match mode
    ChatAction reward = new MultipleActions(new IncreaseKarmaAction(15), new IncreaseXPAction(50), new SetQuestToYearAction("susi"));
    npc.add(ConversationStates.INFORMATION_8, "",
        new TriggerExactlyInListCondition("And the other gold.", "And the other gold", "the other gold.", "the other gold"),
        ConversationStates.ATTENDING,
        "Yay! We are even better friends now.",
        reward);
View Full Code Here

    ChatAction completeAction = new  MultipleActions(
        new SetQuestAction(QUEST_SLOT, "done"),
        new SayTextAction("Great! Now I can heal many people for free. Thanks a lot. Take this for your work."),
        new IncreaseXPAction(50),
        new IncreaseKarmaAction(5),
        new EquipItemAction("minor potion", 5)
        );

    /* add triggers for the item names */
    final ItemCollection items = new ItemCollection();
View Full Code Here

   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("snowball", REQUIRED_SNOWBALLS));
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT));
    reward.add(new IncreaseKarmaAction(15));
    // player gets either cod or perch, which we don't have a standard action for
    // and the npc says the name of the reward, too
    reward.add(new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            String rewardClass;
View Full Code Here

      null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("leather helmet"));
    reward.add(new IncreaseXPAction(50));
    reward.add(new IncreaseKarmaAction(10));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));

    // make sure the player isn't cheating by putting the
    // helmet away and then saying "yes"
    monogenes.add(
View Full Code Here

   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("teddy"));
    reward.add(new IncreaseXPAction(20));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
              new OrCondition(
                  new QuestNotStartedCondition(QUEST_SLOT),
View Full Code Here

    actions.add(new DropRecordedItemAction(QUEST_SLOT,0));
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
    actions.add(new IncrementQuestAction(QUEST_SLOT, 2, 1));
    actions.add(new SetQuestAction(QUEST_SLOT, 0, "done"));
    actions.add(new IncreaseXPDependentOnLevelAction(8, 90.0));
    actions.add(new IncreaseKarmaAction(10.0));
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,0)),
View Full Code Here

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("beer"));
    reward.add(new EquipItemAction("money", 20));
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));
    npc.add(
      ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
      new PlayerHasItemWithHimCondition("beer"),
      ConversationStates.ATTENDING,
View Full Code Here

    npc.add(ConversationStates.ATTENDING,
      questTrigger,
      new AndCondition(new QuestNotCompletedCondition(QUEST_SLOT), new PlayerHasItemWithHimCondition("ice sword")),
      ConversationStates.ATTENDING,
      "my ice :)",
      new MultipleActions(new DropItemAction("ice sword"), new IncreaseXPAction(1000), new IncreaseKarmaAction(30.0), new SetQuestAction(QUEST_SLOT, "done;1")));
   
    // says quest or ice and has ice sword with him (second+ time)
    // player gets a karma bonus and some xp
    npc.add(ConversationStates.ATTENDING,
      questTrigger,
View Full Code Here

TOP

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

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.