Jump to content
  • 0

[Request] Guard Aggro


Question

Posted

Hello!

I've made PK Killers which should guard the players from karma guys. But when you want to farm and make for example "Provoke" the guard attacks you and you can't farm like this. So somebody can make such code and tell me where exactly to put it, please? :p

Recommended Posts

  • 0
Posted

 

 

<skill id="286" levels="3" name="Provoke">
  <table name="#magicLvl"> 43 55 60 </table>
  <table name="#mpConsume"> 57 75 89 </table>
  <table name="#skillRadius"> 500 700 900 </table>
  <set name="mpConsume" val="#mpConsume"/>
  <set name="power" val="500"/>
  <set name="target" val="TARGET_AURA"/>
  <set name="skillRadius" val="#skillRadius"/>
  <set name="reuseDelay" val="15000"/>
  <set name="hitTime" val="1500"/>
  <set name="skillType" val="AGGDAMAGE"/>
  <set name="operateType" val="OP_ACTIVE"/>
  <set name="castRange" val="-1"/>
  <set name="effectRange" val="-1"/>
  <for>
  </for>
</skill>

 

 

Yep, it's AGGDAMAGE type, but it still doesn't work. I've tried with this code too and it doesn't work too ===>

 

Index: java/net/sf/l2j/gameserver/model/L2Skill.java
===================================================================
--- java/net/sf/l2j/gameserver/model/L2Skill.java   (revision 1434)
+++ java/net/sf/l2j/gameserver/model/L2Skill.java   (working copy)
@@ -38,6 +38,7 @@
import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2SummonInstance;
+import net.sf.l2j.gameserver.model.actor.instance.L2GuardInstance;
import net.sf.l2j.gameserver.model.base.ClassId;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.serverpackets.EtcStatusUpdate;
@@ -1316,7 +1317,7 @@
             {
                 int radius = getSkillRadius();
                 boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
-
+               
                 L2PcInstance src = null;
                 if (activeChar instanceof L2PcInstance) src = (L2PcInstance)activeChar;
                 if (activeChar instanceof L2Summon) src = ((L2Summon)activeChar).getOwner();
@@ -1358,6 +1359,10 @@
                                         continue;
                                 }
                             }
+                            if(obj instanceof L2GuardInstance)
+                            {
+                               return null;
+                            }
                         }
                         if (!Util.checkIfInRange(radius, activeChar, obj, true)) continue;

 

This doesn't work too :/

 

so.. Help? :D

 

 

UPing topic.

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