Siege guards AI improvement.
This commit is contained in:
@@ -99,8 +99,6 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
|
||||||
if (event.equals("AGGRO_CHECK"))
|
|
||||||
{
|
{
|
||||||
if ((npc != null) && !npc.isDead())
|
if ((npc != null) && !npc.isDead())
|
||||||
{
|
{
|
||||||
@@ -124,8 +122,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@@ -152,7 +149,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
final Castle castle = npc.getCastle();
|
final Castle castle = npc.getCastle();
|
||||||
final Fort fortress = npc.getFort();
|
final Fort fortress = npc.getFort();
|
||||||
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,8 +99,6 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
|
||||||
if (event.equals("AGGRO_CHECK"))
|
|
||||||
{
|
{
|
||||||
if ((npc != null) && !npc.isDead())
|
if ((npc != null) && !npc.isDead())
|
||||||
{
|
{
|
||||||
@@ -124,8 +122,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@@ -152,7 +149,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
final Castle castle = npc.getCastle();
|
final Castle castle = npc.getCastle();
|
||||||
final Fort fortress = npc.getFort();
|
final Fort fortress = npc.getFort();
|
||||||
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,8 +99,6 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
|
||||||
if (event.equals("AGGRO_CHECK"))
|
|
||||||
{
|
{
|
||||||
if ((npc != null) && !npc.isDead())
|
if ((npc != null) && !npc.isDead())
|
||||||
{
|
{
|
||||||
@@ -124,8 +122,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@@ -152,7 +149,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
final Castle castle = npc.getCastle();
|
final Castle castle = npc.getCastle();
|
||||||
final Fort fortress = npc.getFort();
|
final Fort fortress = npc.getFort();
|
||||||
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,8 +99,6 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
|
||||||
if (event.equals("AGGRO_CHECK"))
|
|
||||||
{
|
{
|
||||||
if ((npc != null) && !npc.isDead())
|
if ((npc != null) && !npc.isDead())
|
||||||
{
|
{
|
||||||
@@ -124,8 +122,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@@ -152,7 +149,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
final Castle castle = npc.getCastle();
|
final Castle castle = npc.getCastle();
|
||||||
final Fort fortress = npc.getFort();
|
final Fort fortress = npc.getFort();
|
||||||
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -73,8 +73,6 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
|
||||||
if (event.equals("AGGRO_CHECK"))
|
|
||||||
{
|
{
|
||||||
if ((npc != null) && !npc.isDead())
|
if ((npc != null) && !npc.isDead())
|
||||||
{
|
{
|
||||||
@@ -98,8 +96,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@@ -126,7 +123,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
final Castle castle = npc.getCastle();
|
final Castle castle = npc.getCastle();
|
||||||
final Fort fortress = npc.getFort();
|
final Fort fortress = npc.getFort();
|
||||||
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
npc.setScriptValue(fortress != null ? fortress.getResidenceId() : (castle != null ? castle.getResidenceId() : 0));
|
||||||
startQuestTimer("AGGRO_CHECK", 2000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user