L2JMobius

Salvation Quest: Start of Fate Q10331

crisaori · 6 · 1236

Offline crisaori

  • Vassal
  • *
    • Posts: 3
Hi everyone,  I'm currently facing an issue in my LabyrinthOfBelis (Start of Fate's Quest) instance script where mobs are spawning but dying instantly while the NPC is hitting the generator and we have to protect him, preventing the counter from reaching the required value of 6.

Observed Behavior:
The mobs spawn correctly.
This prevents the counter from incrementing to 6, as the mobs are not alive long enough to be counted or killed by the player.

Here's the relevant part of the code diff:

https://pastebin.com/1RFrJDsC

This should allow the mobs to stay alive and be counted properly.
Since this is my first contribution, lmk if I did something wrong.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 19655

Offline crisaori

  • Vassal
  • *
    • Posts: 3
Do they attack you after this change?

They spawn and run toward the NPC to attack him, but they don't target me. Before the change, they were dying instantly upon spawning, which left me trapped in the instance indefinitely.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 19655
It probably happens on many more locations.
Try this instead.
Code: (diff) [Select]
Index: java/org/l2jmobius/gameserver/model/actor/Creature.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Creature.java (revision 18427)
+++ java/org/l2jmobius/gameserver/model/actor/Creature.java (working copy)
@@ -5298,6 +5298,9 @@
  */
  public void fullRestore()
  {
+ // Full restore takes 100ms. Util then set template HP.
+ setCurrentHp(getMaxHp());
+
  ThreadPool.schedule(() ->
  {
  setCurrentHp(getMaxHp());


Offline crisaori

  • Vassal
  • *
    • Posts: 3
It probably happens on many more locations.
Try this instead.
Code: (diff) [Select]
Index: java/org/l2jmobius/gameserver/model/actor/Creature.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Creature.java (revision 18427)
+++ java/org/l2jmobius/gameserver/model/actor/Creature.java (working copy)
@@ -5298,6 +5298,9 @@
  */
  public void fullRestore()
  {
+ // Full restore takes 100ms. Util then set template HP.
+ setCurrentHp(getMaxHp());
+
  ThreadPool.schedule(() ->
  {
  setCurrentHp(getMaxHp());

This worked too! Mobs still don't aggro on player tho, even if I hit them. (Just letting you know, IMO this is not a problem)








Online Mobius

  • Distinguished King
  • *****
    • Posts: 19655
It probably happens on many more locations.
Try this instead.
Code: (diff) [Select]
Index: java/org/l2jmobius/gameserver/model/actor/Creature.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Creature.java (revision 18427)
+++ java/org/l2jmobius/gameserver/model/actor/Creature.java (working copy)
@@ -5298,6 +5298,9 @@
  */
  public void fullRestore()
  {
+ // Full restore takes 100ms. Util then set template HP.
+ setCurrentHp(getMaxHp());
+
  ThreadPool.schedule(() ->
  {
  setCurrentHp(getMaxHp());
Committed with https://gitlab.com/MobiusDevelopment/L2J_Mobius/-/commit/8e9a0f2600fe9f184c07ee5e3729bce6b565f233

This worked too! Mobs still don't aggro on player tho, even if I hit them. (Just letting you know, IMO this is not a problem)





Try with a non GM character.