Unhardcoded faction guards, fixed aggro and various improvements.
This commit is contained in:
@@ -10,10 +10,6 @@ EnableFactionSystem = False
|
||||
# Default: 85332,16199,-1252
|
||||
StartingLocation = 85332,16199,-1252
|
||||
|
||||
# Faction manager NPC ID.
|
||||
# Default: 500
|
||||
FactionManagerNpcId = 500
|
||||
|
||||
# Spawn location for faction manager NPC.
|
||||
# Default: 85712,15974,-1260,26808
|
||||
ManagerSpawnLocation = 85712,15974,-1260,26808
|
||||
@@ -47,14 +43,6 @@ EvilNameColor = 0000FF
|
||||
# Default: True
|
||||
EnableFactionGuards = True
|
||||
|
||||
# Good Guard NPC ID.
|
||||
# Default: 501
|
||||
GoodGuardNpcId = 501
|
||||
|
||||
# Evil Guard NPC ID.
|
||||
# Default: 502
|
||||
EvilGuardNpcId = 502
|
||||
|
||||
# Upon death, respawn at faction base.
|
||||
# Default: True
|
||||
RespawnAtFactionBase = True
|
||||
|
4
L2J_Mobius_Classic_2.1_Zaken/dist/game/data/html/guard/501.htm
vendored
Normal file
4
L2J_Mobius_Classic_2.1_Zaken/dist/game/data/html/guard/501.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Sentinel:<br>
|
||||
You must use extreme caution, sir! There have been reports of roaming thugs in this area, who think nothing of killing for the sheer pleasure of it. Please let me know if you see any of them. My bow will protect you from these murderers.<br>
|
||||
May the divine protection of Eva be with you always.
|
||||
</body></html>
|
3
L2J_Mobius_Classic_2.1_Zaken/dist/game/data/html/guard/502.htm
vendored
Normal file
3
L2J_Mobius_Classic_2.1_Zaken/dist/game/data/html/guard/502.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Centurion:<br>
|
||||
I am sworn by the will of Paagrio to destroy all evildoers! If you see any of them, tell me. My bow will put an end to their treachery!
|
||||
</body></html>
|
@@ -31,9 +31,7 @@ import ai.AbstractNpcAI;
|
||||
public final class FactionSystem extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int MANAGER = Config.FACTION_MANAGER_NPCID;
|
||||
private static final int GOOD_GUARD = Config.FACTION_GOOD_GUARD_NPCID;
|
||||
private static final int EVIL_GUARD = Config.FACTION_EVIL_GUARD_NPCID;
|
||||
private static final int MANAGER = 500;
|
||||
// Other
|
||||
private static final String[] TEXTS =
|
||||
{
|
||||
@@ -48,7 +46,6 @@ public final class FactionSystem extends AbstractNpcAI
|
||||
addStartNpc(MANAGER);
|
||||
addTalkId(MANAGER);
|
||||
addFirstTalkId(MANAGER);
|
||||
addAggroRangeEnterId(EVIL_GUARD, GOOD_GUARD);
|
||||
|
||||
if (Config.FACTION_SYSTEM_ENABLED)
|
||||
{
|
||||
@@ -168,16 +165,6 @@ public final class FactionSystem extends AbstractNpcAI
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
if (Config.FACTION_SYSTEM_ENABLED && Config.FACTION_GUARDS_ENABLED && ((player.isGood() && (npc.getId() == EVIL_GUARD)) || (player.isEvil() && (npc.getId() == GOOD_GUARD))))
|
||||
{
|
||||
addAttackDesire(npc, player);
|
||||
}
|
||||
return super.onAggroRangeEnter(npc, player, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new FactionSystem();
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="500" displayId="34210" name="Faction Manager" usingServerSideName="true" title=" " usingServerSideTitle="true" type="L2Npc">
|
||||
<npc id="500" displayId="9000" name="Faction Manager" usingServerSideName="true" title=" " usingServerSideTitle="true" type="L2Npc">
|
||||
<race>ELF</race>
|
||||
<sex>FEMALE</sex>
|
||||
<stats>
|
||||
|
Reference in New Issue
Block a user