Jump to content

GODLike™

Banned
  • Posts

    24
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by GODLike™

  1. Edited: Becouse of Prexix. Here is one more useful code: Faction engine: http://www.mediafire...tion_Engine.rar Faction guards: http://www.mediafire...ctionGuards.zip Index: C:/Eclipse/workspace/L2_GameServer/java/net/sf/l2j/gameserver/ai/L2AttackableAI.java =================================================================== --- C:/Eclipse/workspace/L2_GameServer/java/net/sf/l2j/gameserver/ai/L2AttackableAI.java (revision 3278) +++ C:/Eclipse/workspace/L2_GameServer/java/net/sf/l2j/gameserver/ai/L2AttackableAI.java (working copy) @@ -47,6 +47,8 @@ import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2RiftInvaderInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2GoodGuardInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2EvilGuardInstance; import net.sf.l2j.gameserver.model.quest.Quest; import net.sf.l2j.gameserver.taskmanager.DecayTaskManager; import net.sf.l2j.gameserver.util.Util; @@ -234,6 +236,42 @@ return false; } + // Check if the actor is a L2GuardInstance + else if (_actor instanceof L2GoodGuardInstance) + { + + // Check if the L2PcInstance target has karma (=PK) + if (target instanceof L2PcInstance && ((L2PcInstance) target).isevil()) + // Los Check + return GeoData.getInstance().canSeeTarget(me, target); + + //if (target instanceof L2Summon) + // return ((L2Summon)target).getKarma() > 0; + + // Check if the L2MonsterInstance target is aggressive + if (target instanceof L2MonsterInstance) + return (((L2MonsterInstance) target).isAggressive() && GeoData.getInstance().canSeeTarget(me, target)); + + return false; + } + // Check if the actor is a L2GuardInstance + else if (_actor instanceof L2EvilGuardInstance) + { + + // Check if the L2PcInstance target has karma (=PK) + if (target instanceof L2PcInstance && ((L2PcInstance) target).isgood()) + // Los Check + return GeoData.getInstance().canSeeTarget(me, target); + + //if (target instanceof L2Summon) + // return ((L2Summon)target).getKarma() > 0; + + // Check if the L2MonsterInstance target is aggressive + if (target instanceof L2MonsterInstance) + return (((L2MonsterInstance) target).isAggressive() && GeoData.getInstance().canSeeTarget(me, target)); + + return false; + } else if (_actor instanceof L2FriendlyMobInstance) { // the actor is a L2FriendlyMobInstance
  2. I can't believe that forums is still alive, i was a really old members here, years ago. Glad to be again with you here. Current Mode: Starting cheating the world! Edit: tittle mistake.
×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..