Jump to content
  • 0

How to make the PK-Guard smarter?


Question

3 answers to this question

Recommended Posts

  • 0
Posted

you need to change his instance so its java, anyway.. i dont have that one anymore, but if you post the handle cast code.. im sure i can try to help you more..

  • 0
Posted

L2GuardInstance...

 

maybe this can help you.

 

Index: L2JEclipse-Game/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java
===================================================================
--- L2JEclipse-Game/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java	(revision 649)
+++ L2JEclipse-Game/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java	(working copy)
@@ -202,11 +203,19 @@
	@Override
	public void onAction(L2PcInstance player)
	{
-		if (!canTarget(player)) return;
+		if (!canTarget(player))
+			return;

		// Check if the L2PcInstance already target the L2GuardInstance
		if (getObjectId() != player.getTargetId())
		{
+			
+			if (!player.isAlikeDead() || player.isFakeDeath())
+				return;
+			
+			if (!player.isSilentMoving())
+				return;
+			
			if (Config.DEBUG) _log.fine(player.getObjectId()+": Targetted guard "+getObjectId());

			// Set the target of the L2PcInstance player

  • 0
Posted

try to add in L2AttackableAI.java

 

find:

if (!(me instanceof L2RaidBossInstance) && player.isSilentMoving() && !player.isCastingNow() && !player.isAttackingNow())
    return false;

 

and make it:

if (!(me instanceof L2RaidBossInstance) && !(me instanceof L2GuardInstance) && player.isSilentMoving() && !player.isCastingNow() && !player.isAttackingNow())
    return false;

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock