L2JMobius

Superion Auto-Hunting

gamelike85 · 10 · 608

Offline gamelike85

  • Count
  • *****
    • Posts: 404
  • "I fix it for a cookie!"
There's a bug that causes the target to be canceled when you activate "Auto-Hunting". This happens when fighting the bosses:

Code: [Select]
<npc id="29197" level="99" type="GrandBoss" name="Earth Wyrm Trasken" title="Hell's Gate">
 and

Code: [Select]
<npc id="29200" level="99" type="Monster" name="Earth Wyrm Tail">
I'm not sure if it's normal, but it happens...

 :)


Online Mobius

  • Distinguished King
  • *****
    • Posts: 19715
Change target type in auto play settings?


Offline gamelike85

  • Count
  • *****
    • Posts: 404
  • "I fix it for a cookie!"
I've already tried everything, I thought it was an instance problem or a boss collision issue.

Any Target
Monsters
Characters
NPC

In any of them, it cancels...


Online Mobius

  • Distinguished King
  • *****
    • Posts: 19715
99% sure GrandBoss to Monster will cause issues.


Offline gamelike85

  • Count
  • *****
    • Posts: 404
  • "I fix it for a cookie!"
99% sure GrandBoss to Monster will cause issues.

I was thinking the same thing, it's probably related, although the same thing happens with type="Monster" and type="GrandBoss", now I don't know what's going on there...  :(


Online Mobius

  • Distinguished King
  • *****
    • Posts: 19715
I was thinking the same thing, it's probably related, although the same thing happens with type="Monster" and type="GrandBoss", now I don't know what's going on there...  :(
Check AutoPlayTaskManager.
Prety sure someone retported that, that is how it works on retail.


Offline gamelike85

  • Count
  • *****
    • Posts: 404
  • "I fix it for a cookie!"
Code: [Select]
private boolean isTargetModeValid(int mode, Player player, Creature creature)
{
if (!creature.isTargetable() || (creature.isNpc() && (creature.isInvul() || !creature.asNpc().isShowName())))
{
return false;
}

switch (mode)
{
case 1: // Monster
{
return creature.isMonster() && !creature.isRaid() && creature.isAutoAttackable(player);
}
case 2: // Characters
{
return creature.isPlayable() && creature.isAutoAttackable(player);
}
case 3: // NPC
{
return creature.isNpc() && !creature.isMonster() && !creature.isInsideZone(ZoneId.PEACE);
}
default: // Any Target
{
return (creature.isNpc() && !creature.isInsideZone(ZoneId.PEACE)) || (creature.isPlayable() && creature.isAutoAttackable(player));
}
}
}
}

If that's how it is in the official server, the developer must have been high as a kite the size of a building; it makes no sense that it can't be used against bosses. Well, that settles the matter then, although I haven't seen anything related to it or that it's actually like that. I'll have to join an official server to clear up any doubts.

IA:

Quote
Auto-hunting can't be used with Raid Bosses in Lineage 2 because they are often a specific type of target that the auto-hunt system can't be set to automatically engage. Unlike regular mobs, you must manually target and attack Raid Bosses. It's likely a system design choice to prevent characters from using the auto-hunt macro on high-priority, boss-level enemies, which is often considered a more manual and skill-based activity.

An alternative "Custom" configuration could be added to allow it to be used against Raidboss, since it's rather tedious to spend 4 hours hitting a monster manually.


Online gigilo1968

  • Black Sheep
  • Baron
  • *****
    • Posts: 206
    • Hi5
Replace it with this

Code: [Select]
                                case 1: // Monster
{
return creature.isMonster()/* &&!creature.isRaid() */  && creature.isAutoAttackable(player); // add RB in target
}


Offline gamelike85

  • Count
  • *****
    • Posts: 404
  • "I fix it for a cookie!"

Online GuruGel

  • Knight
  • ***
    • Posts: 91
I solved it this way:
Config.java
(Decide for yourself where to write the config file)
Code: [Select]
public static String RAID_ATACK;
----------------------------------------------

RAID_ATACK = custom.getString("RaidAutoAtack", "ON_RB");

AutoPlayTaskManager.java
Code: [Select]
private boolean isTargetModeValid(int mode, Player player, Creature creature)
{
if (Config.RAID_ATACK.equalsIgnoreCase("OFF_RB"))
{
if (!creature.isTargetable() || (creature.isNpc() && (creature.isInvul() || !creature.asNpc().isShowName())))
{
return false;
}
}

switch (mode)
{
case 1: // Monster
{
if (Config.RAID_ATACK.equalsIgnoreCase("ON_RB"))
{
return creature.isMonster() && creature.isAutoAttackable(player);
}
return creature.isMonster() && !creature.isRaid() && creature.isAutoAttackable(player);
}
case 2: // Characters
{
return creature.isPlayable() && creature.isAutoAttackable(player);
}
case 3: // NPC
{
return creature.isNpc() && !creature.isMonster() && !creature.isInsideZone(ZoneId.PEACE);
}
default: // Any Target
{
return (creature.isNpc() && !creature.isInsideZone(ZoneId.PEACE)) || (creature.isPlayable() && creature.isAutoAttackable(player));
}
}
}