Jump to content

Question

Posted

Hello, I add this code here https://maxcheaters.com/topic/248730-agathions-acis-401-does-not-interfere-with-summons-or-pets/.

 

 

but i have problem with agathion movement, agathion does not move when the player moves.

The player must stop moving for Agathion to come close him.

 

i think the problem is here at < _followTask = ThreadPool.scheduleAtFixedRate(new Follow(this), 1000, 1000); >>

 

    public void followToOwner()
    {         
        if (_followTask == null)
            _followTask = ThreadPool.scheduleAtFixedRate(new Follow(this), 1000, 1000);
                        
        int rnd = Rnd.get(-30, +30);
        SpawnLocation loc = _owner.getPosition();
                
        if (!checkIfInRange(1000, this, _owner))
            teleport(_owner, 30);
        
        if (_owner.isMoving())
            getAI().tryToFollow(_owner, false);
        else
        {
            if (!checkIfInRange(75, this, _owner))
                getAI().tryToMoveTo(new Location(loc.getX()+rnd, loc.getY()+rnd, loc.getZ()), null);
            else if (checkIfInRange(30, this, _owner))
                getAI().tryToIdle();
                
            if (Config.AGATHION_HEAL_OWNER && !getCast().isCastingNow())
            {
                if (_owner.isInOlympiadMode() || _owner.isInDuel() || _owner.getPvpFlag() != 0 || _owner.isInsideZone(ZoneId.PVP) || _owner.getKarma() != 0)
                    return;
                
                if ((_owner.getStatus().getHpRatio() < Config.AGATHION_PERCENT_TO_HEAL))
                    getAI().tryToCast(_owner, 1011, 18);
            }
            else if (!Config.AGATHION_ONLY_FOLLOW && Config.AGATHION_ALLOW_SOCIAL && !isMoving() && !getCast().isCastingNow())
                broadcastPacket(new SocialAction(this, 1));
        }

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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