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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...