L2JMobius

C4 Q159_ProtectTheWaterSource: wrong stage condition prevents quest completition

altronrain · 2 · 210

Offline altronrain

  • Heir
  • **
    • Posts: 18
On the second part of the quest player should bring up 5 more "Plague Dust" items to quest giver.
But due to wrong quest stage condition required items don't drop (killed 20+ for the test -- no drop (chance 40%)).

1) After completing 1st part of the quest it is set to condition 3:
https://imgur.com/yhHlrNF

2) OnKill function's "else if" condition for the second part of the quest is waiting for quest condition 2:
https://imgur.com/8gwGKvZ

3) After manually changing else if to st.isCond(3) I could get required quest items and end the quest:
https://imgur.com/rfbn5SS

Diff patch for the quest:
Code: [Select]
diff -U 3 dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java
--- dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java Sun Jun 19 12:05:08 2022
+++ dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java Sun Jun 26 18:44:03 2022
@@ -140,7 +140,7 @@
  {
  st.setCond(2);
  }
- else if (st.isCond(2) && st.dropItems(PLAGUE_DUST, 1, 5, 400000))
+ else if (st.isCond(3) && st.dropItems(PLAGUE_DUST, 1, 5, 400000))
  {
  st.setCond(4);
  }