Minor timer improvements.
This commit is contained in:
parent
d16cc9290f
commit
014e6ddfdb
@ -29,7 +29,7 @@ import ai.AbstractNpcAI;
|
|||||||
*/
|
*/
|
||||||
public final class HillsOfGold extends AbstractNpcAI
|
public final class HillsOfGold extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// Npcs
|
// NPCs
|
||||||
private static final int GOLEM_OF_REPAIRS = 19309;
|
private static final int GOLEM_OF_REPAIRS = 19309;
|
||||||
private static final int EXCAVATOR_GOLEM = 19312;
|
private static final int EXCAVATOR_GOLEM = 19312;
|
||||||
private static final int DRILL_GOLEM = 19310;
|
private static final int DRILL_GOLEM = 19310;
|
||||||
@ -59,7 +59,7 @@ public final class HillsOfGold 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("SPICULA_AGGRO") && (npc != null) && !npc.isDead())
|
if ((npc != null) && !npc.isDead())
|
||||||
{
|
{
|
||||||
L2World.getInstance().forEachVisibleObject(npc, L2MonsterInstance.class, npc.getAggroRange(), nearby ->
|
L2World.getInstance().forEachVisibleObject(npc, L2MonsterInstance.class, npc.getAggroRange(), nearby ->
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@ public final class HillsOfGold extends AbstractNpcAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
startQuestTimer("SPICULA_AGGRO", 10000, npc, null);
|
startQuestTimer("SPICULA_AGGRO" + npc.getObjectId(), 10000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ public final class HillsOfGold extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
if ((npc.getId() == SPICULA_1) || (npc.getId() == SPICULA_2))
|
if ((npc.getId() == SPICULA_1) || (npc.getId() == SPICULA_2))
|
||||||
{
|
{
|
||||||
startQuestTimer("SPICULA_AGGRO", 5000, npc, null);
|
startQuestTimer("SPICULA_AGGRO" + npc.getObjectId(), 5000, npc, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public final class YeSagiraGuards 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("GUARD_AGGRO") && (npc != null) && !npc.isDead() && !npc.isInCombat())
|
if ((npc != null) && !npc.isDead() && !npc.isInCombat())
|
||||||
{
|
{
|
||||||
final List<L2MonsterInstance> nearbyMonsters = L2World.getInstance().getVisibleObjects(npc, L2MonsterInstance.class, 1000);
|
final List<L2MonsterInstance> nearbyMonsters = L2World.getInstance().getVisibleObjects(npc, L2MonsterInstance.class, 1000);
|
||||||
if (!nearbyMonsters.isEmpty())
|
if (!nearbyMonsters.isEmpty())
|
||||||
@ -57,6 +57,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
npc.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
|
npc.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
startQuestTimer("GUARD_AGGRO" + npc.getObjectId(), 10000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -65,7 +66,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
public String onSpawn(L2Npc npc)
|
public String onSpawn(L2Npc npc)
|
||||||
{
|
{
|
||||||
npc.setIsInvul(true);
|
npc.setIsInvul(true);
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, true);
|
startQuestTimer("GUARD_AGGRO" + npc.getObjectId(), 5000, npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), 3000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -149,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" + npc.getId(), getRandom(1000, 10000), npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import ai.AbstractNpcAI;
|
|||||||
*/
|
*/
|
||||||
public final class HillsOfGold extends AbstractNpcAI
|
public final class HillsOfGold extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// Npcs
|
// NPCs
|
||||||
private static final int GOLEM_OF_REPAIRS = 19309;
|
private static final int GOLEM_OF_REPAIRS = 19309;
|
||||||
private static final int EXCAVATOR_GOLEM = 19312;
|
private static final int EXCAVATOR_GOLEM = 19312;
|
||||||
private static final int DRILL_GOLEM = 19310;
|
private static final int DRILL_GOLEM = 19310;
|
||||||
@ -59,7 +59,7 @@ public final class HillsOfGold 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("SPICULA_AGGRO") && (npc != null) && !npc.isDead())
|
if ((npc != null) && !npc.isDead())
|
||||||
{
|
{
|
||||||
L2World.getInstance().forEachVisibleObject(npc, L2MonsterInstance.class, npc.getAggroRange(), nearby ->
|
L2World.getInstance().forEachVisibleObject(npc, L2MonsterInstance.class, npc.getAggroRange(), nearby ->
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@ public final class HillsOfGold extends AbstractNpcAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
startQuestTimer("SPICULA_AGGRO", 10000, npc, null);
|
startQuestTimer("SPICULA_AGGRO" + npc.getObjectId(), 10000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ public final class HillsOfGold extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
if ((npc.getId() == SPICULA_1) || (npc.getId() == SPICULA_2))
|
if ((npc.getId() == SPICULA_1) || (npc.getId() == SPICULA_2))
|
||||||
{
|
{
|
||||||
startQuestTimer("SPICULA_AGGRO", 5000, npc, null);
|
startQuestTimer("SPICULA_AGGRO" + npc.getObjectId(), 5000, npc, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public final class YeSagiraGuards 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("GUARD_AGGRO") && (npc != null) && !npc.isDead() && !npc.isInCombat())
|
if ((npc != null) && !npc.isDead() && !npc.isInCombat())
|
||||||
{
|
{
|
||||||
final List<L2MonsterInstance> nearbyMonsters = L2World.getInstance().getVisibleObjects(npc, L2MonsterInstance.class, 1000);
|
final List<L2MonsterInstance> nearbyMonsters = L2World.getInstance().getVisibleObjects(npc, L2MonsterInstance.class, 1000);
|
||||||
if (!nearbyMonsters.isEmpty())
|
if (!nearbyMonsters.isEmpty())
|
||||||
@ -57,6 +57,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
npc.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
|
npc.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
startQuestTimer("GUARD_AGGRO" + npc.getObjectId(), 10000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -65,7 +66,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
public String onSpawn(L2Npc npc)
|
public String onSpawn(L2Npc npc)
|
||||||
{
|
{
|
||||||
npc.setIsInvul(true);
|
npc.setIsInvul(true);
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, true);
|
startQuestTimer("GUARD_AGGRO" + npc.getObjectId(), 5000, npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), 3000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -149,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" + npc.getId(), getRandom(1000, 10000), npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import ai.AbstractNpcAI;
|
|||||||
*/
|
*/
|
||||||
public final class HillsOfGold extends AbstractNpcAI
|
public final class HillsOfGold extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// Npcs
|
// NPCs
|
||||||
private static final int GOLEM_OF_REPAIRS = 19309;
|
private static final int GOLEM_OF_REPAIRS = 19309;
|
||||||
private static final int EXCAVATOR_GOLEM = 19312;
|
private static final int EXCAVATOR_GOLEM = 19312;
|
||||||
private static final int DRILL_GOLEM = 19310;
|
private static final int DRILL_GOLEM = 19310;
|
||||||
@ -59,7 +59,7 @@ public final class HillsOfGold 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("SPICULA_AGGRO") && (npc != null) && !npc.isDead())
|
if ((npc != null) && !npc.isDead())
|
||||||
{
|
{
|
||||||
L2World.getInstance().forEachVisibleObject(npc, L2MonsterInstance.class, npc.getAggroRange(), nearby ->
|
L2World.getInstance().forEachVisibleObject(npc, L2MonsterInstance.class, npc.getAggroRange(), nearby ->
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@ public final class HillsOfGold extends AbstractNpcAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
startQuestTimer("SPICULA_AGGRO", 10000, npc, null);
|
startQuestTimer("SPICULA_AGGRO" + npc.getObjectId(), 10000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ public final class HillsOfGold extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
if ((npc.getId() == SPICULA_1) || (npc.getId() == SPICULA_2))
|
if ((npc.getId() == SPICULA_1) || (npc.getId() == SPICULA_2))
|
||||||
{
|
{
|
||||||
startQuestTimer("SPICULA_AGGRO", 5000, npc, null);
|
startQuestTimer("SPICULA_AGGRO" + npc.getObjectId(), 5000, npc, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public final class YeSagiraGuards 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("GUARD_AGGRO") && (npc != null) && !npc.isDead() && !npc.isInCombat())
|
if ((npc != null) && !npc.isDead() && !npc.isInCombat())
|
||||||
{
|
{
|
||||||
final List<L2MonsterInstance> nearbyMonsters = L2World.getInstance().getVisibleObjects(npc, L2MonsterInstance.class, 1000);
|
final List<L2MonsterInstance> nearbyMonsters = L2World.getInstance().getVisibleObjects(npc, L2MonsterInstance.class, 1000);
|
||||||
if (!nearbyMonsters.isEmpty())
|
if (!nearbyMonsters.isEmpty())
|
||||||
@ -57,6 +57,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
npc.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
|
npc.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
startQuestTimer("GUARD_AGGRO" + npc.getObjectId(), 10000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -65,7 +66,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
public String onSpawn(L2Npc npc)
|
public String onSpawn(L2Npc npc)
|
||||||
{
|
{
|
||||||
npc.setIsInvul(true);
|
npc.setIsInvul(true);
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, true);
|
startQuestTimer("GUARD_AGGRO" + npc.getObjectId(), 5000, npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), 3000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -149,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" + npc.getId(), getRandom(1000, 10000), npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import ai.AbstractNpcAI;
|
|||||||
*/
|
*/
|
||||||
public final class HillsOfGold extends AbstractNpcAI
|
public final class HillsOfGold extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// Npcs
|
// NPCs
|
||||||
private static final int GOLEM_OF_REPAIRS = 19309;
|
private static final int GOLEM_OF_REPAIRS = 19309;
|
||||||
private static final int EXCAVATOR_GOLEM = 19312;
|
private static final int EXCAVATOR_GOLEM = 19312;
|
||||||
private static final int DRILL_GOLEM = 19310;
|
private static final int DRILL_GOLEM = 19310;
|
||||||
@ -59,7 +59,7 @@ public final class HillsOfGold 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("SPICULA_AGGRO") && (npc != null) && !npc.isDead())
|
if ((npc != null) && !npc.isDead())
|
||||||
{
|
{
|
||||||
L2World.getInstance().forEachVisibleObject(npc, L2MonsterInstance.class, npc.getAggroRange(), nearby ->
|
L2World.getInstance().forEachVisibleObject(npc, L2MonsterInstance.class, npc.getAggroRange(), nearby ->
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@ public final class HillsOfGold extends AbstractNpcAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
startQuestTimer("SPICULA_AGGRO", 10000, npc, null);
|
startQuestTimer("SPICULA_AGGRO" + npc.getObjectId(), 10000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ public final class HillsOfGold extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
if ((npc.getId() == SPICULA_1) || (npc.getId() == SPICULA_2))
|
if ((npc.getId() == SPICULA_1) || (npc.getId() == SPICULA_2))
|
||||||
{
|
{
|
||||||
startQuestTimer("SPICULA_AGGRO", 5000, npc, null);
|
startQuestTimer("SPICULA_AGGRO" + npc.getObjectId(), 5000, npc, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public final class YeSagiraGuards 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("GUARD_AGGRO") && (npc != null) && !npc.isDead() && !npc.isInCombat())
|
if ((npc != null) && !npc.isDead() && !npc.isInCombat())
|
||||||
{
|
{
|
||||||
final List<L2MonsterInstance> nearbyMonsters = L2World.getInstance().getVisibleObjects(npc, L2MonsterInstance.class, 1000);
|
final List<L2MonsterInstance> nearbyMonsters = L2World.getInstance().getVisibleObjects(npc, L2MonsterInstance.class, 1000);
|
||||||
if (!nearbyMonsters.isEmpty())
|
if (!nearbyMonsters.isEmpty())
|
||||||
@ -57,6 +57,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
npc.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
|
npc.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
startQuestTimer("GUARD_AGGRO" + npc.getObjectId(), 10000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -65,7 +66,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
public String onSpawn(L2Npc npc)
|
public String onSpawn(L2Npc npc)
|
||||||
{
|
{
|
||||||
npc.setIsInvul(true);
|
npc.setIsInvul(true);
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, true);
|
startQuestTimer("GUARD_AGGRO" + npc.getObjectId(), 5000, npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), 3000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -149,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" + npc.getId(), getRandom(1000, 10000), npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), 3000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -149,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" + npc.getId(), getRandom(1000, 10000), npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), 3000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -123,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" + npc.getId(), getRandom(1000, 10000), npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ public class SiegeGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startQuestTimer("AGGRO_CHECK" + npc.getId(), 3000, npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), 3000, npc, null);
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -123,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" + npc.getId(), getRandom(1000, 10000), npc, null);
|
startQuestTimer("AGGRO_CHECK" + npc.getObjectId(), getRandom(1000, 10000), npc, null);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user