// TODO: add Pacifist achievement for not participating in pvp for 6 months or more (last_pvp_action_time)
// Befriend Susi and complete quests for all children
achievements.add(createAchievement("friend.quests.children", "Childrens' friend", "Complete quests for all children",
Achievement.MEDIUM_BASE_SCORE, true,
new AndCondition(
// Susi Quest is never set to done, therefore we check just if the quest has been started (condition "anyFriends" from FoundGirl.java)
new QuestStartedCondition("susi"),
// Help Tad, Semos Town Hall (Medicine for Tad)
new QuestCompletedCondition("introduce_players"),
// Plink, Semos Plains North
new QuestCompletedCondition("plinks_toy"),
// Anna, in Ados
new QuestCompletedCondition("toys_collector"),
// Sally, Orril River
// 'completed' doesn't work for Sally - return player.hasQuest(QUEST_SLOT) && !"start".equals(player.getQuest(QUEST_SLOT)) && !"rejected".equals(player.getQuest(QUEST_SLOT));
new AndCondition(new QuestActiveCondition("campfire"), new QuestNotInStateCondition("campfire", "start")),
// Annie, Kalavan city gardens
new QuestStateStartsWithCondition("icecream_for_annie","eating;"),
// Elisabeth, Kirdneh
new QuestStateStartsWithCondition("chocolate_for_elisabeth","eating;"),
// Jef, Kirdneh
new QuestCompletedCondition("find_jefs_mom"),
// Hughie, Ados farmhouse
new AndCondition(new QuestActiveCondition("fishsoup_for_hughie"), new QuestNotInStateCondition("fishsoup_for_hughie", "start")))));
// quests about finding people
achievements.add(createAchievement("friend.quests.find", "Private Detective", "Find all lost and hidden people",
Achievement.HARD_BASE_SCORE, true,
new AndCondition(
// Rat Children (Agnus)
new QuestCompletedCondition("find_rat_kids"),
// Find Ghosts (Carena)
new QuestCompletedCondition("find_ghosts"),
// Meet Angels (any of the cherubs)
new ChatCondition() {
public boolean fire(final Player player, final Sentence sentence, final Entity entity) {
if (!player.hasQuest("seven_cherubs")) {
return false;
}
final String npcDoneText = player.getQuest("seven_cherubs");
final String[] done = npcDoneText.split(";");
final int left = 7 - done.length;
return left < 0;
}
})));
// earn over 250 karma
achievements.add(createAchievement("friend.karma.250", "Good Samaritan", "Earn a very good karma",
Achievement.MEDIUM_BASE_SCORE, true,
new ChatCondition() {
public boolean fire(final Player player, final Sentence sentence, final Entity entity) {
return player.getKarma()>250;
}
}));
// meet Santa Claus and Easter Bunny
achievements.add(createAchievement("friend.meet.seasonal", "Still Believing", "Meet Santa Claus and Easter Bunny",
Achievement.EASY_BASE_SCORE, true, new AndCondition(new QuestWithPrefixCompletedCondition("meet_santa_"), new QuestWithPrefixCompletedCondition("meet_bunny_"))));
return achievements;
}