@Override public boolean onEnterZoneEvent(QuestEnv env, ZoneName zoneName) { Player player = env.getPlayer(); if (player == null) return false; QuestState qs = player.getQuestStateList().getQuestState(questId); if (zoneName != ZoneName.get("DRANA_PRODUCTION_LAB_300250000")) return false; if (qs == null || qs.getQuestVars().getQuestVars() != 1) return false; if (qs.getStatus() != QuestStatus.START) return false; qs.setStatus(QuestStatus.REWARD); updateQuestStatus(env); return true; }
@Override public boolean onAtDistanceEvent(QuestEnv env) { Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); if (qs != null && qs.getStatus() == QuestStatus.START) { if (qs.getQuestVars().getQuestVars() == 0) { qs.setStatus(QuestStatus.REWARD); updateQuestStatus(env); return true; } } return false; }