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

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


    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(5.0/3.0, 290.0));
    actions.add(new IncreaseKarmaAction(10.0));
    actions.add(new ChatAction() {
      public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
        int goldamount;
        final StackableItem money = (StackableItem) SingletonRepository.getEntityManager()
                .getItem("money");
View Full Code Here


            new QuestStateStartsWithCondition(QUEST_SLOT,"decorating"),
            new TimePassedCondition(QUEST_SLOT, 1, 5)
          );
    final ChatAction action = new MultipleActions(
                      new SetQuestAction(QUEST_SLOT,"done"),
                      new IncreaseKarmaAction(20),
                      new IncreaseXPAction(10000),
                      // here, true = bind them to player
                      new EquipItemAction("black legs", 1, true)
                    );
    npc.add(ConversationStates.IDLE,
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.ATTENDING,
      "Thank you so much! I hope that my #mum is ok and will return soon! Please tell her my name, #Jef, to prove that I sent you to her. If you have found her, return to me please and I'll give you something for your efforts.",
      new MultipleActions(new SetQuestAction(QUEST_SLOT, 0, "start"),
                new IncreaseKarmaAction(10.0)));

    // Player says no, they've lost karma.
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES, null, ConversationStates.IDLE,
      "Oh. Ok. I can understand you... You look like a busy hero so I'll not try to convince you of helping me out.",
View Full Code Here

        Arrays.asList("flower", "zantedeschia", "fine", "amber", "done"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, 0, "found_mom"), new PlayerHasItemWithHimCondition("zantedeschia")),
        ConversationStates.ATTENDING, null,
        new MultipleActions(new DropItemAction("zantedeschia"),
                                    new IncreaseXPAction(5000),
                                    new IncreaseKarmaAction(15),
                  addRandomNumberOfItemsAction,                      
                  new IncrementQuestAction(QUEST_SLOT, 2, 1),
                  new SetQuestToTimeStampAction(QUEST_SLOT,1),
                  new SetQuestAction(QUEST_SLOT, 0, "done")));
View Full Code Here

                  public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
                    int pLevel = player.getLevel();
                    player.setQuest(QUEST_SLOT, getRequiredItemsCollection(pLevel));
                  }
                },
                new IncreaseKarmaAction(20),
                // here we have been careful to say the items from the collection only after the quest slot was set,
                // because in this quest, the amounts depend on level, above.
                new SayRequiredItemsFromCollectionAction(
                        QUEST_SLOT,
                        "Wroff! Right now, I need [items]. Do you by chance have anything of that with you already?")));
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.ATTENDING,
      "Thank you! Once you find it, say #flower to me so I know you have it. I'll be sure to give you a nice reward.",
      new MultipleActions(new SetQuestAction(QUEST_SLOT, 0, "start"),
                new IncreaseKarmaAction(10.0)));

    // Player says no, they've lost karma.
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES, null, ConversationStates.IDLE,
      "Oh, never mind. Bye then.",
View Full Code Here

        ConversationStates.IDLE,
        "Heres a new flower to take the pretty lady, but mind you don't lose that one.",
        new MultipleActions(new EquipItemAction("rhosyd", 1, true),
                        new SetQuestAction(QUEST_SLOT, 0, "got_flower"),
                        // dock some karma for losing the flower
                        new IncreaseKarmaAction(-20.0),
                        new SetQuestToTimeStampAction(QUEST_SLOT, 1)));
   
    rose.add(ConversationStates.QUESTION_1,
        ConversationPhrases.NO_MESSAGES,
        lostFlowerCondition,
View Full Code Here

        Arrays.asList("flower", "Rhosyd"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, 0, "got_flower"), new PlayerHasItemWithHimCondition("rhosyd")),
        ConversationStates.ATTENDING, null,
        new MultipleActions(new DropItemAction("rhosyd"),
                                    new IncreaseXPAction(5000),
                                    new IncreaseKarmaAction(15),
                  addRandomNumberOfItemsAction,
                  new SetQuestAction(QUEST_SLOT, 0, "flower_brought"),
                  new IncrementQuestAction(QUEST_SLOT, 2, 1)));

    npc.add(ConversationStates.ATTENDING,
View Full Code Here

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("blue elf cloak"));
    reward.add(new EquipItemAction("golden shield", 1, true));
    reward.add(new IncreaseXPAction(15000));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(25));
    npc.add(ConversationStates.QUESTION_1,
        ConversationPhrases.YES_MESSAGES,
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "1"), new PlayerHasItemWithHimCondition("blue elf cloak")),
        ConversationStates.ATTENDING,
        "Thank you very much! Now I have enough cloaks to survive the winter. Here, take this golden shield as a reward.",
View Full Code Here

    toKill.put("mountain elder dwarf", new Pair<Integer, Integer>(0,2));
    toKill.put("mountain hero dwarf",   new Pair<Integer, Integer>(0,2));
    toKill.put("mountain leader dwarf", new Pair<Integer, Integer>(0,2));
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseKarmaAction(5.0));
    actions.add(new SetQuestAction(QUEST_SLOT, 0, "start"));
    actions.add(new StartRecordingKillsAction(QUEST_SLOT, 1, toKill));
   
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES,
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.