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

 

 

You didn't understand me. I HAVE a PK Killer, and perhaps I can make myself.. It's very easy but this is off topic. So I have but when a player makes the skill Provoke it provokes the guard too and the guard kills the player. This means the player can't farm. So my request is a code maybe for L2GuardInstance so the guard won't attack the player when he makes such skill.. :D

  • 0
Posted

Guys, he simply need to do something to just the player can't get aggro of the Guard without get Karma, if he hit the npc, he will not attack to him, because he wanna make an aoe farming area protected by PK-Killers but he cant because pk-killers are killing the players because they are stupid :D...

  • 0
Posted

try get a guard shared here and edit it as you want maybe u wrong something

 

I think you still don't understand me. :D

I'm using Interlude I think I forgot to mention this.

Never mind. My problem isn't in the guard it have to be done a little core edit so the guard should ignore any aggro skills. The problem isn't in the datapack. :/

  • 0
Posted

UPing the topic because I still have problems.. :/

TT-TT.png

 


net.sf.l2j.gameserver.handler.skillhandlers.Disablers.java

 

case AGGDAMAGE:

{

- if (target instanceof L2Attackable)

+ if (!(target instanceof L2GuardInstance) || target instanceof L2Attackable)

target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, activeChar, (int) ((150*skill.getPower())/(target.getLevel()+7)));

 

skill.getEffects(activeChar, target);

break;

}


It's true that I'm cute ?pretty.png

  • 0
Posted

TT-TT.png

 


net.sf.l2j.gameserver.handler.skillhandlers.Disablers.java

 

case AGGDAMAGE:

{

- if (target instanceof L2Attackable)

+ if (!(target instanceof L2GuardInstance) || target instanceof L2Attackable)

target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, activeChar, (int) ((150*skill.getPower())/(target.getLevel()+7)));

 

skill.getEffects(activeChar, target);

break;

}


It's true that I'm cute ?pretty.png

 

It didn't worked for me :/

  • 0
Posted

watusay.png Are you serious ?

 

Provoke have skill type: AGGDAMAGE

 

 

 

<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

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...