Jump to content
  • 0

[Request] Help from devs for GuardKnownList


Question

Posted

Does any1 of pro devs know if this will work for GuardKnownList

if (player.getKarma() > 0 && !object.isVisible())
           {
               if (_log.isDebugEnabled()) _log.debug(getActiveChar().getObjectId()+": PK "+player.getObjectId()+" entered scan range");
               
               // Set the L2GuardInstance Intention to AI_INTENTION_ACTIVE
               if (getActiveChar().getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE)
                   getActiveChar().getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, null);
           }
else if (player.getKarma() > 0)
           {
               if (_log.isDebugEnabled()) _log.debug(getActiveChar().getObjectId()+": PK "+player.getObjectId()+" entered scan range");
               
               // Set the L2GuardInstance Intention to AI_INTENTION_ACTIVE
               if (getActiveChar().getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE)
                   getActiveChar().getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, null);
           }[/Code]

Bug appeared with L2Guard, if player is invisible and even if he have karma he isnt added to GuardKnownList i think, cuz they dont attack player.

This bug goes like: Pk some1, use Silent Move, and u r free to go. Guards will not touch u.

If this has nothing with knownlist than pls tell me what file should be edited to have this working.

8 answers to this question

Recommended Posts

  • 0
Posted

1. If you are with access bigger then 1 they will not attack you

2. Change the aggro to 1000

3. If the server is pvp you can delete the silent move the players dont need it in pvp server ;D

  • 0
Posted

Or sth like this

if (skill.getId() == 221 && getKarma() > 0) return;[/Code]

And add it in L2PcInstance/useMagic

It will be ok?

  • 0
Posted

at L2Character

public boolean removedSkill = false;

in StartPvPFlag()
if (getFirstEffect(221) != null) 
{
   removeSkill(SkillTable.getInstance().getInfo(221, 1));
   ((L2PcInstance)this).sendSkillList();
   removedSkill = true; 
}

in StopPvPFlag()
   if (removedSkill == true) addSkill(SkillTable.getInstance().getInfo(221, 1));

Ill not have problems with this?

  • 0
Posted

1. If you are with access bigger then 1 they will not attack you

2. Change the aggro to 1000

3. If the server is pvp you can delete the silent move the players dont need it in pvp server ;D

 

silent move is importand, e.x. to go and check if an rb is spawned example ant queen/etc.

 

i don't think that you will find an answer here by search i searched for ya and find nothing, try to go on your server pack site and request it :)

  • 0
Posted

mb i shouldnt bump this.. some1 correct me if im wrong :)

i've used this

at L2AttackableAI.java / private boolean autoAttackCondition(L2Character target)

from this -->
if (!(me instanceof L2RaidBossInstance) && player.isSilentMoving() && !player.isCastingNow() && !player.isAttackingNow())

to this -->
if (!(me instanceof L2RaidBossInstance) && !(me instanceof L2GuardInstance) && player.isSilentMoving() && !player.isCastingNow() && !player.isAttackingNow())

Its working quite good..

Can i use it like this? I won't have any troubles?

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