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

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


    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("gold bar", GOLD_AMOUNT));
    reward.add(new EquipItemAction("nalwor bank key", 1, true));
    reward.add(new IncreaseXPAction(200));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(getName()),
            new QuestInStateCondition(QUEST_SLOT, "lorithien"),
            new PlayerHasItemWithHimCondition("gold bar", GOLD_AMOUNT)),
View Full Code Here


                new KilledForQuestCondition(QUEST_SLOT, 0)),
        ConversationStates.ATTENDING,
        "Good work! Let me thank you in the name of the people of Semos!",
        new MultipleActions(
            new IncreaseXPDependentOnLevelAction(5, 95.0),
            new IncreaseKarmaAction(5.0),
            new IncrementQuestAction(QUEST_SLOT, 2, 1),
            new SetQuestToTimeStampAction(QUEST_SLOT,1),
            new SetQuestAction(QUEST_SLOT,0,"done")
    ));
  }
View Full Code Here

    final List<ChatAction> actions = new LinkedList<ChatAction>();
      actions.add(new EquipItemAction("greater potion", 10));
    actions.add(new IncreaseXPAction(5000));
    actions.add(new SetQuestAction(QUEST_SLOT, "killed;1"));
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
    actions.add(new IncreaseKarmaAction(10.0));

   
    LinkedList<String> triggers = new LinkedList<String>();
    triggers.addAll(ConversationPhrases.FINISH_MESSAGES);
    triggers.addAll(ConversationPhrases.QUEST_MESSAGES);   
View Full Code Here

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("sandwich", FOOD_AMOUNT));
    reward.add(new IncreaseXPAction(150));
    reward.add(new SetQuestAction(QUEST_SLOT, "joshua"));
    reward.add(new IncreaseKarmaAction(15));

    npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
      new PlayerHasItemWithHimCondition("sandwich", FOOD_AMOUNT),
      ConversationStates.ATTENDING,
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.ATTENDING,
      "Wonderful! You must have good #karma.",
      new MultipleActions(
          new IncreaseKarmaAction(5.0),
          new SetQuestAction(QUEST_SLOT, "done"),
          new EnableFeatureAction("karma_indicator")));

    // player is not willing to help other people
    // player gets a little karma removed
View Full Code Here

    reward.add(new EquipItemAction("potion", 3));
    reward.add(new IncreaseXPAction(100));
    reward.add(new IncrementQuestAction(QUEST_SLOT, 2, 1) );
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT,1));
    reward.add(new SetQuestAction(QUEST_SLOT, 0, "done"));
    reward.add(new IncreaseKarmaAction(5.0));
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.combine(ConversationPhrases.QUEST_MESSAGES, EXTRA_TRIGGER),
        new AndCondition(
            new QuestActiveCondition(QUEST_SLOT),
View Full Code Here

          new QuestNotInStateCondition(QUEST_SLOT, 0, "done"),
          new SystemPropertyCondition("stendhal.minetown")),
      ConversationStates.ATTENDING, "I guess you still have to talk to some people.", null);

    ChatAction reward = new MultipleActions(
      new IncreaseKarmaAction(15),
      new IncreaseXPAction(400),
      new SetQuestAction(QUEST_SLOT, 0, "done"),
      new EquipItemAction("empty scroll", 5),
      new SetHallOfFameToAgeDiffAction(QUEST_SLOT, 1, "P"),
      loadSignFromHallOfFame);
View Full Code Here

 
      final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("scythe"));
    reward.add(new IncreaseXPAction(1000));
    reward.add(new SetQuestAction(QUEST_SLOT, "capture"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.ATTENDING, "scythe",
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "start"),
        new PlayerHasItemWithHimCondition("scythe")),
        ConversationStates.ATTENDING,
View Full Code Here

   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("egg"));
    reward.add(new IncreaseXPAction(1000));
    reward.add(new SetQuestAction(QUEST_SLOT, "jailed"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.ATTENDING, "egg",
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "egg"),
            new PlayerHasItemWithHimCondition("egg")),
            ConversationStates.ATTENDING,
View Full Code Here

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("barbarian armor"));
    reward.add(new IncreaseXPAction(50000));
    reward.add(new EquipItemAction("gold bar", 20));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(15));
   
    npc.add(ConversationStates.ATTENDING, "armor",
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "armor"),
            new PlayerHasItemWithHimCondition("barbarian armor")),
            ConversationStates.ATTENDING,
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.