_followTask = ThreadPoolManager.getInstance().schedule(new ThinkFollow(), 250L);
final Reflection ref = actor.getReflection();
if ((ref != null) && (_chatTimer < System.currentTimeMillis()))
{
_chatTimer = System.currentTimeMillis() + 5000;
final Player masterplayer = target.getPlayer();
final Map<Skill, Integer> d_skill = new HashMap<>();
final double distance = actor.getDistance(target);
switch (ref.getInstancedZoneId())
{
case 156:
final QuestState qs = masterplayer.getQuestState(_10293_SevenSignsForbiddenBook.class);
if ((qs != null) && !qs.isCompleted())
{
if (Rnd.chance(20))
{
return;
}
if (qs.getCond() == 1)
{
Functions.npcSay(actor, NpcString.I_MUST_ASK_LIBRARIAN_SOPHIA_ABOUT_THE_BOOK);
}
else if (qs.getCond() == 2)
{
Functions.npcSay(actor, NpcString.WHAT_TOOK_SO_LONG_I_WAITED_FOR_EVER);
}
else if (qs.getCond() >= 5)
{
if (Rnd.chance(50))
{
Functions.npcSay(actor, NpcString.THE_BOOK_THAT_WE_SEEK_IS_CERTAINLY_HERE);
}
else
{
Functions.npcSay(actor, NpcString.AN_UNDERGROUND_LIBRARY);
}
}
}
break;
case 151:
final QuestState qs2 = masterplayer.getQuestState(_10294_SevenSignsMonasteryofSilence.class);
if ((qs2 != null) && !qs2.isCompleted())
{
if (qs2.getCond() == 2)
{
if (Rnd.chance(20))
{
if (Rnd.chance(70))
{
Functions.npcSay(actor, NpcString.IT_SEEMS_THAT_YOU_CANNOT_REMEMBER_TO_THE_ROOM_OF_THE_WATCHER_WHO_FOUND_THE_BOOK);
}
else
{
Functions.npcSay(actor, NpcString.REMEMBER_THE_CONTENT_OF_THE_BOOKS_THAT_YOU_FOUND);
}
}
if (target.getCurrentHpPercents() < 70)
{
addDesiredSkill(d_skill, target, distance, heal);
}
if (target.getCurrentMpPercents() < 50)
{
addDesiredSkill(d_skill, target, distance, recharge);
}
if (target.isInCombat())
{
addDesiredSkill(d_skill, target, distance, blessBlood);
}
addDesiredSkill(d_skill, target, distance, vampRage);
addDesiredSkill(d_skill, target, distance, holyResist);
final Skill r_skill = selectTopSkill(d_skill);
chooseTaskAndTargets(r_skill, target, distance);
doTask();
}
else if (qs2.getCond() == 3)
{
Functions.npcSay(actor, NpcString.YOUR_WORK_HERE_IS_DONE_SO_RETURN_TO_THE_CENTRAL_GUARDIAN);
}
}
final QuestState qs3 = masterplayer.getQuestState(_10295_SevenSignsSolinasTomb.class);
if ((qs3 != null) && !qs3.isCompleted())
{
if (qs3.getCond() == 1)
{
if (Rnd.chance(20))
{
if (Rnd.chance(30))
{
Functions.npcSay(actor, NpcString.TO_REMOVE_THE_BARRIER_YOU_MUST_FIND_THE_RELICS_THAT_FIT_THE_BARRIER_AND_ACTIVATE_THE_DEVICE);
}
else if (Rnd.chance(30))
{
Functions.npcSay(actor, NpcString.THE_GUARDIAN_OF_THE_SEAL_DOESNT_SEEM_TO_GET_INJURED_AT_ALL_UNTIL_THE_BARRIER_IS_DESTROYED);
}
else
{
Functions.npcSay(actor, NpcString.THE_DEVICE_LOCATED_IN_THE_ROOM_IN_FRONT_OF_THE_GUARDIAN_OF_THE_SEAL_IS_DEFINITELY_THE_BARRIER_THAT_CONTROLS_THE_GUARDIANS_POWER);
}
}
if (target.getCurrentHpPercents() < 80)
{
addDesiredSkill(d_skill, target, distance, heal);
}
if (target.getCurrentMpPercents() < 70)
{
addDesiredSkill(d_skill, target, distance, recharge);
}
if (target.isInCombat())
{
addDesiredSkill(d_skill, target, distance, blessBlood);
}
addDesiredSkill(d_skill, target, distance, vampRage);
addDesiredSkill(d_skill, target, distance, holyResist);
final Skill r_skill = selectTopSkill(d_skill);
chooseTaskAndTargets(r_skill, target, distance);
doTask();
}
}
final QuestState qs4 = masterplayer.getQuestState(_10296_SevenSignsPoweroftheSeal.class);
if ((qs4 != null) && !qs4.isCompleted())
{
if (qs4.getCond() == 2)
{
if (target.getCurrentHpPercents() < 80)