Jump to content
  • 0

Question

Posted

hello i do adapt baium java from acis last rev to frozen is working perfect but

the angels is not hit i try to fix it but nathing. is not show nathing error in console

and baium attack angel but angel is not attack baium. i want if any can help

for fix the problem

 

here is the code 

http://pastebin.com/rRc1r6wm

6 answers to this question

Recommended Posts

  • 0
Posted

no i change the ramdom target and again the angel is hit me if i am in boss zone but after i am dead is not

target baium and start attack

        public L2Character getRandomTarget(L2NpcInstance npc)
        {
                L2Character[] characters = new L2Character[_Zone.getCharactersInside().size()];
                int count = 0;
                for (L2Character cha : _Zone.getCharactersInside().values())
                {
                        if (! (cha instanceof L2PcInstance || cha instanceof L2Summon || cha instanceof L2DecoInstance)) continue;
                        if (! Util.checkIfInRange(9000, npc, cha, true)) continue;
                        if (cha.isDead()) continue;
                        if (cha.isAlikeDead()) continue;
                        if (cha.getZ() < npc.getZ() - 100 || cha.getZ() > npc.getZ() + 100) continue;
                        if (! GeoData.getInstance().canSeeTarget(cha.getX(), cha.getY(), cha.getZ(), npc.getX(), npc.getY(), npc.getZ())) continue;
                        characters[count++] = cha;
                }
                if (count > 0)
                {
                        QuestTimer timer = getQuestTimer("clean_player", null, null);
                        if (timer != null)
                                timer.cancel();
                        startQuestTimer("clean_player", 20000, null, null);
                        return characters[Rnd.get(count)];
                }
                return null;
        }
  • 0
Posted

if i have weapon he say my name like 

[1] target1 -> support

and after say

[2] target1 -> support target2 -> baium

 if i remove weapon say

[2] target1 -> null target2 -> baium

 

but again is not attack angel -> baium....

            else if (event.equalsIgnoreCase("angels_aggro_reconsider"))
            {
                boolean updateTarget = false; // Update or no the target
               
                for (L2NpcInstance minion : _Minions)
                {
                    L2Attackable angel = ((L2Attackable) minion);
                    if (angel == null)
                        continue;
                   
                    L2Character victim = angel.getMostHated();
                   
                    if (Rnd.get(100) < 10) // Chaos time
                        updateTarget = true;
                    else
                    {
                        if (victim != null) // Target is a unarmed player ; clean aggro.
                        {
                            if (victim instanceof L2PcInstance && victim.getActiveWeaponInstance() == null)
                            {
                                angel.stopHating(victim); // Clean the aggro number of previous victim.
                                updateTarget = true;
                            }
                            logcheck.info("[1] Target1 -> " +victim);
                        }
                        else
                            // No target currently.
                            updateTarget = true;
                    }
                   
                    if (updateTarget)
                    {
                        L2Character newVictim = getRandomTarget(minion);
                        if (newVictim != null && victim != newVictim)
                        {
                            angel.addDamageHate(newVictim, 0, 10000);
                            angel.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, newVictim);
                            logcheck.info("[2] Target1 -> " + victim + " Target2 -> " + newVictim);
                        }
                    }
                }
            }

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